Package qupath.lib.display
Interface SingleChannelDisplayInfo
- All Superinterfaces:
ChannelDisplayInfo
- All Known Implementing Classes:
DirectServerChannelInfo
ChannelDisplayInfo
that determines colors based upon a single value for each pixel.
This is able to supply the underlying values as a float array.- Author:
- Pete Bankhead
-
Nested Class Summary
Nested classes/interfaces inherited from interface qupath.lib.display.ChannelDisplayInfo
ChannelDisplayInfo.ModifiableChannelDisplayInfo
-
Method Summary
Modifier and TypeMethodDescriptionfloat
getValue
(BufferedImage img, int x, int y) Extract the value for a single pixel of an image.float[]
getValues
(BufferedImage img, int x, int y, int w, int h, float[] array) Extract values for a square of pixels from an image.boolean
Check ifgetValue(BufferedImage, int, int)
returns fixed values, or if they are dependent on other properties of theImageData
.Methods inherited from interface qupath.lib.display.ChannelDisplayInfo
doesSomething, getColor, getMaxAllowed, getMaxDisplay, getMethod, getMinAllowed, getMinDisplay, getName, getRGB, getRGB, getValueAsString, isAdditive, isBrightnessContrastRescaled, updateRGBAdditive, updateRGBAdditive
-
Method Details
-
getValue
Extract the value for a single pixel of an image.- Parameters:
img
- the imagex
- x-coordinate of the pixely
- y-coordinate of the pixel- Returns:
- the value of the pixel
-
getValues
Extract values for a square of pixels from an image.- Parameters:
img
- the imagex
- x-coordinate of the top left corner of the region to extracty
- y-coordinate of the top left corner of the region to extractw
- width of the region to extracth
- height of the region to extractarray
- optional array that may be used to store the output values- Returns:
- array of values
-
isMutable
boolean isMutable()Check ifgetValue(BufferedImage, int, int)
returns fixed values, or if they are dependent on other properties of theImageData
.For example, a transform based on color deconvolution should be flagged as mutable because stain vectors change, while a simple channel separation is not considered mutable (since the pixel values for the underlying image remain constant in QuPath).
- Returns:
-