ij
Class LookUpTable

java.lang.Object
  extended by ij.LookUpTable

public class LookUpTable
extends java.lang.Object

This class represents a color look-up table.


Constructor Summary
LookUpTable(java.awt.image.ColorModel cm)
          Constructs a LookUpTable object from a ColorModel.
LookUpTable(java.awt.Image img)
          Constructs a LookUpTable object from an AWT Image.
 
Method Summary
static java.awt.image.ColorModel createGrayscaleColorModel(boolean invert)
           
 void drawColorBar(java.awt.Graphics g, int x, int y, int width, int height)
           
 void drawUnscaledColorBar(ImageProcessor ip, int x, int y, int width, int height)
           
 byte[] getBlues()
           
 java.awt.image.ColorModel getColorModel()
           
 byte[] getGreens()
           
 int getMapSize()
           
 byte[] getReds()
           
 boolean isGrayscale()
          Returns true if this is a 256 entry grayscale LUT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookUpTable

public LookUpTable(java.awt.Image img)
Constructs a LookUpTable object from an AWT Image.


LookUpTable

public LookUpTable(java.awt.image.ColorModel cm)
Constructs a LookUpTable object from a ColorModel.

Method Detail

getMapSize

public int getMapSize()

getReds

public byte[] getReds()

getGreens

public byte[] getGreens()

getBlues

public byte[] getBlues()

getColorModel

public java.awt.image.ColorModel getColorModel()

isGrayscale

public boolean isGrayscale()
Returns true if this is a 256 entry grayscale LUT.

See Also:
ImageProcessor.isColorLut()

drawColorBar

public void drawColorBar(java.awt.Graphics g,
                         int x,
                         int y,
                         int width,
                         int height)

drawUnscaledColorBar

public void drawUnscaledColorBar(ImageProcessor ip,
                                 int x,
                                 int y,
                                 int width,
                                 int height)

createGrayscaleColorModel

public static java.awt.image.ColorModel createGrayscaleColorModel(boolean invert)