Package gov.nih.mipav.model.algorithms
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDefaultColorMap(int... colors) privateDefaultColorMap(int[] colors, double[] locations) private -
Method Summary
Modifier and TypeMethodDescriptionintgetColor(int index) Returns the ith colorint[]doublegetLocation(int index) Returns the location of the ith color within the unit interval.double[]intstatic ContourPlot.DefaultColorMapReturns the enum constant of this type with the specified name.static ContourPlot.DefaultColorMap[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface gov.nih.mipav.model.algorithms.ContourPlot.ColorMap
copy, interpolate, resample
-
Enum Constant Details
-
S_COPPER
-
D_COOL_WARM
-
-
Field Details
-
map
-
-
Constructor Details
-
DefaultColorMap
private DefaultColorMap(int[] colors, double[] locations) -
DefaultColorMap
private DefaultColorMap(int... colors) -
DefaultColorMap
-
-
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
numColors
public int numColors()- Specified by:
numColorsin interfaceContourPlot.ColorMap- Returns:
- the number of discrete colors in this
ContourPlot.ColorMap
-
getColor
public int getColor(int index) Description copied from interface:ContourPlot.ColorMapReturns the ith color- Specified by:
getColorin interfaceContourPlot.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:
getColorsin interfaceContourPlot.ColorMap- Returns:
- all discrete colors in this
ContourPlot.ColorMapin integer packed ARGB format (0xff00ff00 is opaque green)
-
getLocation
public double getLocation(int index) Description copied from interface:ContourPlot.ColorMapReturns the location of the ith color within the unit interval.- Specified by:
getLocationin interfaceContourPlot.ColorMap- Parameters:
index- index of the location/color- Returns:
- location within [0,1]
-
getLocations
public double[] getLocations()- Specified by:
getLocationsin interfaceContourPlot.ColorMap- Returns:
- all locations of the discrete colors in this
ContourPlot.ColorMap
-