Package qupath.lib.experimental.pixels
Interface MaskSupplier<S,T>
- Type Parameters:
S
- the type of imageT
- 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.
A functional interface for supplying a mask corresponding to an image.
- Since:
- v0.5.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic MaskSupplier
<BufferedImage, BufferedImage> Create a image supplier that returns a buffered image.getMask
(Parameters<S, T> parameters, ROI roi) Get a mask corresponding to the image, depicting a specified ROI.
-
Method Details
-
getMask
Get a mask corresponding to the image, depicting a specified ROI. In contrast to anImageSupplier
, this may be given a ROI that differs from the main ROI of the parent object stored in theParameters
. 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 callparameters.getImage()
to ensure this.- Parameters:
parameters
-roi
-- Returns:
- Throws:
IOException
- See Also:
-
createBufferedImageMaskSupplier
Create a image supplier that returns a buffered image.- Returns:
-