Enum ContourPlot.DefaultColorMap

java.lang.Object
java.lang.Enum<ContourPlot.DefaultColorMap>
gov.nih.mipav.model.algorithms.ContourPlot.DefaultColorMap
All Implemented Interfaces:
ContourPlot.ColorMap, Serializable, Comparable<ContourPlot.DefaultColorMap>, java.lang.constant.Constable
Enclosing class:
ContourPlot

public static enum ContourPlot.DefaultColorMap extends Enum<ContourPlot.DefaultColorMap> implements ContourPlot.ColorMap
  • Enum Constant Details

  • Field Details

  • Constructor Details

    • DefaultColorMap

      private DefaultColorMap(int[] colors, double[] locations)
    • DefaultColorMap

      private DefaultColorMap(int... colors)
    • DefaultColorMap

      private DefaultColorMap(ContourPlot.ColorMap map)
  • Method Details

    • values

      public static ContourPlot.DefaultColorMap[] 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 ContourPlot.DefaultColorMap valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • numColors

      public int numColors()
      Specified by:
      numColors in interface ContourPlot.ColorMap
      Returns:
      the number of discrete colors in this ContourPlot.ColorMap
    • getColor

      public int getColor(int index)
      Description copied from interface: ContourPlot.ColorMap
      Returns the ith color
      Specified by:
      getColor in interface ContourPlot.ColorMap
      Parameters:
      index - index of the color
      Returns:
      ith color in integer packed ARGB format (0xff00ff00 is opaque green)
    • getColors

      public int[] getColors()
      Specified by:
      getColors in interface ContourPlot.ColorMap
      Returns:
      all discrete colors in this ContourPlot.ColorMap in integer packed ARGB format (0xff00ff00 is opaque green)
    • getLocation

      public double getLocation(int index)
      Description copied from interface: ContourPlot.ColorMap
      Returns the location of the ith color within the unit interval.
      Specified by:
      getLocation in interface ContourPlot.ColorMap
      Parameters:
      index - index of the location/color
      Returns:
      location within [0,1]
    • getLocations

      public double[] getLocations()
      Specified by:
      getLocations in interface ContourPlot.ColorMap
      Returns:
      all locations of the discrete colors in this ContourPlot.ColorMap