Package inra.ijpb.color
Enum ColorMaps.CommonLabelMaps
java.lang.Object
java.lang.Enum<ColorMaps.CommonLabelMaps>
inra.ijpb.color.ColorMaps.CommonLabelMaps
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ColorMaps.CommonLabelMaps>
,java.lang.constant.Constable
- Enclosing class:
- ColorMaps
public static enum ColorMaps.CommonLabelMaps extends java.lang.Enum<ColorMaps.CommonLabelMaps>
A collection of color maps useful for displaying label images.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
-
Enum Constant Summary
Enum Constants Enum Constant Description FIRE
Colormap containing the Fire colorsGLASBEY
Colormap containing Glasbey colorsGLASBEY_BRIGHT
Colormap containing Glasbey colorsGLASBEY_DARK
Colormap containing Glasbey colorsGOLDEN_ANGLE
A colormap with contrasted adjacent colors, useful for label imagesGRAYS
Colormap containing gray valuesICE
Colormap containing blue-white valuesJET
Matlab's jet colormapMAIN_COLORS
Colormap containing only few main colorsMIXED_COLORS
Colormap containing mixed colorsREDGREEN
Colormap containing Red to green valuesRGB332
Colormap containing RGB332SPECTRUM
Colormap containing a whole range of colors -
Method Summary
Modifier and Type Method Description byte[][]
computeLut(int nValues, boolean shuffle)
Compute look-up table for current color mapstatic ColorMaps.CommonLabelMaps
fromLabel(java.lang.String label)
Determines the color map from its label.static java.lang.String[]
getAllLabels()
java.lang.String
getLabel()
Get label name associated to color mapjava.lang.String
toString()
static ColorMaps.CommonLabelMaps
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ColorMaps.CommonLabelMaps[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
Enum Constant Details
-
GRAYS
Colormap containing gray values -
FIRE
Colormap containing the Fire colors -
GLASBEY
Colormap containing Glasbey colors -
GLASBEY_DARK
Colormap containing Glasbey colors -
GLASBEY_BRIGHT
Colormap containing Glasbey colors -
GOLDEN_ANGLE
A colormap with contrasted adjacent colors, useful for label images -
ICE
Colormap containing blue-white values -
SPECTRUM
Colormap containing a whole range of colors -
JET
Matlab's jet colormap -
RGB332
Colormap containing RGB332 -
MAIN_COLORS
Colormap containing only few main colors -
MIXED_COLORS
Colormap containing mixed colors -
REDGREEN
Colormap containing Red to green values
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getLabel
public java.lang.String getLabel()Get label name associated to color map- Returns:
- label name of the color map
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Enum<ColorMaps.CommonLabelMaps>
-
computeLut
public byte[][] computeLut(int nValues, boolean shuffle)Compute look-up table for current color map- Parameters:
nValues
- number of colors for the mapshuffle
- flag to shuffle table values after its construction- Returns:
- the result of LUT computation
-
getAllLabels
public static java.lang.String[] getAllLabels()- Returns:
- all colormap labels.
-
fromLabel
Determines the color map from its label.- Parameters:
label
- the name of the color map- Returns:
- the enumeration item corresponding to the given label
- Throws:
java.lang.IllegalArgumentException
- if label is not recognized.
-