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 colors
    GLASBEY
    Colormap containing Glasbey colors
    GLASBEY_BRIGHT
    Colormap containing Glasbey colors
    GLASBEY_DARK
    Colormap containing Glasbey colors
    GOLDEN_ANGLE
    A colormap with contrasted adjacent colors, useful for label images
    GRAYS
    Colormap containing gray values
    ICE
    Colormap containing blue-white values
    JET
    Matlab's jet colormap
    MAIN_COLORS
    Colormap containing only few main colors
    MIXED_COLORS
    Colormap containing mixed colors
    REDGREEN
    Colormap containing Red to green values
    RGB332
    Colormap containing RGB332
    SPECTRUM
    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 map
    static 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 map
    java.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

  • Method Details

    • values

      public static ColorMaps.CommonLabelMaps[] 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

      public static ColorMaps.CommonLabelMaps valueOf​(java.lang.String name)
      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 name
      java.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 class java.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 map
      shuffle - 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

      public static ColorMaps.CommonLabelMaps fromLabel​(java.lang.String label)
      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.