Package qupath.lib.color
Class ColorModels
java.lang.Object
qupath.lib.color.ColorModels
Helper class for creating a JSON-serializable way to generate a
ColorModel
.- Author:
- Pete Bankhead
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Simple builder to create aColorModel
.static class
Helper class to the display of a single channel (band) in aColorModel
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ColorModels.DisplayBand
createBand
(String colorMapName, int band, double minDisplay, double maxDisplay) Create aColorModels.DisplayBand
to define the colormap associated with an image band (channel).static ColorModels.DisplayBand
createBand
(String colorMapName, int band, double minDisplay, double maxDisplay, double gamma) Create aColorModels.DisplayBand
to define the colormap associated with an image band (channel).createColorModelBuilder
(ColorModels.DisplayBand mainChannel, ColorModels.DisplayBand alphaChannel) Create aColorModels.ColorModelBuilder
with a main channel and an optional alpha channel.
-
Constructor Details
-
ColorModels
public ColorModels()
-
-
Method Details
-
createColorModelBuilder
public static ColorModels.ColorModelBuilder createColorModelBuilder(ColorModels.DisplayBand mainChannel, ColorModels.DisplayBand alphaChannel) Create aColorModels.ColorModelBuilder
with a main channel and an optional alpha channel.- Parameters:
mainChannel
- the main channel to display (colormap will be used)alphaChannel
- an optional alpha channel (colormap will be ignored)- Returns:
- the
ColorModels.ColorModelBuilder
-
createBand
public static ColorModels.DisplayBand createBand(String colorMapName, int band, double minDisplay, double maxDisplay) Create aColorModels.DisplayBand
to define the colormap associated with an image band (channel).- Parameters:
colorMapName
- name of theColorMaps.ColorMap
band
- image band (theBufferedImage
term - QuPath often refers to this as a channel)minDisplay
- value associated with the first entry in theColorMaps.ColorMap
maxDisplay
- value associated with the last entry in theColorMaps.ColorMap
- Returns:
- See Also:
-
createBand
public static ColorModels.DisplayBand createBand(String colorMapName, int band, double minDisplay, double maxDisplay, double gamma) Create aColorModels.DisplayBand
to define the colormap associated with an image band (channel).- Parameters:
colorMapName
- name of theColorMaps.ColorMap
band
- image band (theBufferedImage
term - QuPath often refers to this as a channel)minDisplay
- value associated with the first entry in theColorMaps.ColorMap
maxDisplay
- value associated with the last entry in theColorMaps.ColorMap
, used to adjust the value nonlinearly when requesting a colorgamma
- gamma value associated with theColorMaps.ColorMap
- Returns:
- See Also:
-