Package qupath.lib.images.servers
Interface ColorTransforms.ColorTransform
- Enclosing class:
- ColorTransforms
public static interface ColorTransforms.ColorTransform
Interface defining a color transform that can extract a float values from a BufferedImage.
The simplest example of this is to extract a single channel (band) from an image.
-
Method Summary
Modifier and TypeMethodDescriptionfloat[]
extractChannel
(ImageServer<BufferedImage> server, BufferedImage img, float[] pixels) Extract a (row-wise) array containing the pixels extracted from a BufferedImage.getName()
Get a displayable name for the transform.boolean
supportsImage
(ImageServer<BufferedImage> server) Query whether this transform can be applied to the specified image.
-
Method Details
-
extractChannel
Extract a (row-wise) array containing the pixels extracted from a BufferedImage.- Parameters:
server
- the server from which the image was read; can be necessary for some transforms (e.g. to request color deconvolution stains)img
- the imagepixels
- optional preallocated array; will be used if it is long enough to hold the transformed pixels- Returns:
-
supportsImage
Query whether this transform can be applied to the specified image. Reasons why it may not be include the type or channel number being incompatible.- Parameters:
server
-- Returns:
-
getName
String getName()Get a displayable name for the transform.- Returns:
-