|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ucla.loni.LOVE.colormap.ColorMap
public abstract class ColorMap
Base class for colormap, also provides all constants for colormap.
The ColorMap
class is colormap for
indexed gray image. Given bits used per pixel, and
upper and lower limits. User can get an IndexColorModel
by calling getColorModel()
method.
More advanced user can use getRedMap, getGreenMap,
getBlueMap
to get those arrays directly.
"Under Color" The color for intensity less than lower limit.
"Over Color" The color for intensity that is higher than upper limit.
See the figure for a illustration of the concept.
. Upper Limit . ^ . 255 | |*********** . | * . | * . | * . | * . | * . | * . 0 *********|-------------------> . 0 Lower Limit 4095
Field Summary | |
---|---|
protected byte |
_alpha
Alpha value for this colormap |
protected byte[] |
_aMap
Map of alpha component |
protected int |
_bits
Number of bits used for each pixel |
protected byte[] |
_bMap
Map of blue color |
protected byte[] |
_gMap
Map of green color |
protected boolean |
_isInverted
Flag to indicate if this is a inverted colormap. |
protected int |
_lowerLimit
lower limit, inclusive [lower, upper) |
protected java.awt.Color |
_overColor
over color |
protected byte[] |
_rMap
Map of red color |
protected int |
_size
Total number of levels |
protected java.awt.Color |
_underColor
under color |
protected int |
_upperLimit
upper limit, exclusive [lower, upper) |
static int |
BLUE
Blue colormap |
static int |
BONE
Bone colormap |
static int |
COOL
Cool colormap |
static int |
COPPER
Copper colormap |
static int |
FLAG
Flag colormap |
static int |
GRAY
Gray colormap |
static int |
GREEN
Green colormap |
static int |
HOT
Hot colormap |
static int |
HOTMETAL
Hotmetal colormap |
static int |
HSV
HSV colormap |
static int |
PINK
Pink colormap |
static int |
RED
Red colormap |
static int |
SPECIAL_SPECTRAL
Special Spectral colormap |
static int |
SPECTRAL
Spectral colormap |
Constructor Summary | |
---|---|
ColorMap()
Default constructor Required for plugin usage. |
|
ColorMap(int size,
int bits)
Constructor |
Method Summary | |
---|---|
protected abstract void |
_setColorMap()
Actual set up of color map in range. |
byte |
getAlpha()
Get the current alpha value |
byte[] |
getAlphaMap()
Get alpha map |
byte[] |
getBlueMap()
Get blue map |
java.awt.image.ColorModel |
getColorModel()
Get a colormodel of this give colormap |
byte[] |
getGreenMap()
Get green map |
boolean |
getInverted()
iget the invert flag. |
int |
getLowerLimit()
Gets the lower limit. |
abstract java.lang.String |
getName()
Get the names of the actual color map |
java.awt.Color |
getOverColor()
Get over color. |
byte[] |
getRedMap()
Get red map |
int |
getSize()
Get the size of the colormap. |
java.awt.Color |
getUnderColor()
Get under color. |
int |
getUpperLimit()
Gets the upper limit. |
void |
initializeColorMap(int size,
int bits)
Initialize this colormap. |
void |
invertColorMap()
|
void |
setAlpha(byte alpha)
Set the alpha value of this map |
void |
setInverted(boolean flag)
set the invert flag. |
boolean |
setLimits(int lowerLimit,
int upperLimit)
Set the upper limit and lower limit of this colormap, Nothing will be changed if the input is invalid. |
boolean |
setLowerLimit(int lowerLimit)
Set the lower limit. |
void |
setOverColor(java.awt.Color overColor)
Set over color. |
void |
setUnderColor(java.awt.Color underColor)
Set under color. |
boolean |
setUpperLimit(int upperLimit)
Set the upper limit. |
java.lang.String |
toString()
Get a String representation of the colormap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int GRAY
public static final int HOTMETAL
public static final int SPECTRAL
public static final int RED
public static final int GREEN
public static final int BLUE
public static final int BONE
public static final int COOL
public static final int COPPER
public static final int FLAG
public static final int HOT
public static final int HSV
public static final int PINK
public static final int SPECIAL_SPECTRAL
protected java.awt.Color _underColor
protected java.awt.Color _overColor
protected byte[] _rMap
protected byte[] _gMap
protected byte[] _bMap
protected byte[] _aMap
protected int _upperLimit
protected int _lowerLimit
protected int _size
protected int _bits
protected byte _alpha
protected boolean _isInverted
Constructor Detail |
---|
public ColorMap()
public ColorMap(int size, int bits)
Method Detail |
---|
public void initializeColorMap(int size, int bits)
size
- Size of the colormap.bits
- Bits of each pixel.public int getSize()
public int getUpperLimit()
public int getLowerLimit()
public java.awt.image.ColorModel getColorModel()
public byte[] getRedMap()
public byte[] getGreenMap()
public byte[] getBlueMap()
public byte[] getAlphaMap()
public void setAlpha(byte alpha)
alpha
- alpha valuepublic byte getAlpha()
public java.awt.Color getOverColor()
public void setOverColor(java.awt.Color overColor)
overColor
- over colorpublic java.awt.Color getUnderColor()
public void setUnderColor(java.awt.Color underColor)
underColor
- under colorpublic boolean setUpperLimit(int upperLimit)
upperLimit
-
public boolean setLowerLimit(int lowerLimit)
lowerLimit
- Lower limit.
public boolean setLimits(int lowerLimit, int upperLimit)
lowerLimit
- window of this colormapupperLimit
- level of this colormap
public void setInverted(boolean flag)
public void invertColorMap()
public boolean getInverted()
public java.lang.String toString()
toString
in class java.lang.Object
public abstract java.lang.String getName()
protected abstract void _setColorMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |