| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.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 | _alphaAlpha value for this colormap | 
| protected  byte[] | _aMapMap of alpha component | 
| protected  int | _bitsNumber of bits used for each pixel | 
| protected  byte[] | _bMapMap of blue color | 
| protected  byte[] | _gMapMap of green color | 
| protected  boolean | _isInvertedFlag to indicate if this is a inverted colormap. | 
| protected  int | _lowerLimitlower limit, inclusive [lower, upper) | 
| protected  java.awt.Color | _overColorover color | 
| protected  byte[] | _rMapMap of red color | 
| protected  int | _sizeTotal number of levels | 
| protected  java.awt.Color | _underColorunder color | 
| protected  int | _upperLimitupper limit, exclusive [lower, upper) | 
| static int | BLUEBlue colormap | 
| static int | BONEBone colormap | 
| static int | COOLCool colormap | 
| static int | COPPERCopper colormap | 
| static int | FLAGFlag colormap | 
| static int | GRAYGray colormap | 
| static int | GREENGreen colormap | 
| static int | HOTHot colormap | 
| static int | HOTMETALHotmetal colormap | 
| static int | HSVHSV colormap | 
| static int | PINKPink colormap | 
| static int | REDRed colormap | 
| static int | SPECIAL_SPECTRALSpecial Spectral colormap | 
| static int | SPECTRALSpectral 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.Objectpublic 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 | |||||||||