Interface MaskSupplier<S,T>

Type Parameters:
S - the type of image
T - the type of mask
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MaskSupplier<S,T>
A functional interface for supplying a mask corresponding to an image.
Since:
v0.5.0
  • Method Details

    • getMask

      T getMask(Parameters<S,T> parameters, ROI roi) throws IOException
      Get a mask corresponding to the image, depicting a specified ROI. In contrast to an ImageSupplier, this may be given a ROI that differs from the main ROI of the parent object stored in the Parameters. This is useful for cases where different masks might be required, e.g. to represent a cell nucleus or cytoplasm.

      When the mask is an image, it should be the same size as the result of parameters.getImage(). It is valid for this method to call parameters.getImage() to ensure this.

      Parameters:
      parameters -
      roi -
      Returns:
      Throws:
      IOException
      See Also:
    • createBufferedImageMaskSupplier

      static MaskSupplier<BufferedImage,BufferedImage> createBufferedImageMaskSupplier()
      Create a image supplier that returns a buffered image.
      Returns: