public class ImageColormap extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
protected javax.media.jai.LookupTableJAI |
colorLookupTable
Used to make a color image froma grayscale image using a selected colormap
|
protected String |
colorLookupTableName
Name of the current color lookup table
|
protected byte[][] |
colorLut
Copy of current color lookup table data to use for shift, rotate, scale ops
|
static String |
DEFAULT_COLOR_LUT
Default color lookup table to use
|
protected float[] |
intensityLookupTable
Used to modify the order of the colors in the color lookup table
|
protected String |
intensityLookupTableName
Name of the current intensity lookup table
|
protected static int |
NUM_COLORS
The number of colors in the display image
|
Constructor and Description |
---|
ImageColormap()
Default constructor: Initialize with the default colormap.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Return a shallow copy
|
boolean |
equals(ImageColormap colormap)
Return true if this object is equivalent to the given one.
|
javax.media.jai.LookupTableJAI |
getColorLookupTable()
Return the current lookup table used to add color to a grayscale image.
|
String |
getColorLookupTableName()
Return the name of the current color lookup table
|
String |
getIntensityLookupTableName()
Return the name of the current intensity lookup table
|
void |
resetColormap()
Reset the colormap shift, rotate and scale settings to 0.
|
void |
rotateColormap(int amount)
Rotate the colormap by the given amount.
|
void |
saveColormap()
Save the current colormap state for the next shift, rotate or scale operation.
|
void |
scaleColormap(int amount)
Scale the colormap by the given amount.
|
void |
setColorLookupTable(String name)
Create a color RGB lookup table that can be added to the image processing chain,
so that we can manipulate the image colors.
|
void |
setDefaultColormap()
Reset the colormap to the default.
|
void |
setIntensityLookupTable(String name)
Create an intensity lookup table that can be added to the image processing chain
to rearrange the order of the colors in the colormap.
|
void |
shiftColormap(int amount)
Shift the colormap by the given amount.
|
protected javax.media.jai.LookupTableJAI colorLookupTable
protected String colorLookupTableName
protected byte[][] colorLut
protected float[] intensityLookupTable
protected String intensityLookupTableName
public static final String DEFAULT_COLOR_LUT
protected static final int NUM_COLORS
public ImageColormap()
public void setColorLookupTable(String name)
name
- the name of the colormap table to use. This is currently
One of: "Background", "Blue", "Heat", "Isophot", "Light", "Pastel",
"Ramp", "Real", "Smooth", "Staircase", "Standard".
User defined maps will be implemented in a later release.public void setIntensityLookupTable(String name)
name
- the name of the intensity lookup table to use. This is currently
One of: "Equal", "Exponential", "Gamma", "Jigsaw", "Lasritt", "Logarithmic",
"Negative", "Negative Log", "Ramp", "Staircase".
User defined intensity lookup tables will be implemented in a later release.public void saveColormap()
public void rotateColormap(int amount)
public void shiftColormap(int amount)
public void scaleColormap(int amount)
public void setDefaultColormap()
public void resetColormap()
public javax.media.jai.LookupTableJAI getColorLookupTable()
public String getColorLookupTableName()
public String getIntensityLookupTableName()
public boolean equals(ImageColormap colormap)
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.