Trispark JDT
2.50.13

com.archimed.dicom.image
Class GrayColorModel

java.lang.Object
  extended by java.awt.image.ColorModel
      extended by com.archimed.dicom.image.GrayColorModel
All Implemented Interfaces:
java.awt.Transparency

public class GrayColorModel
extends java.awt.image.ColorModel

This class represents a ColorModel for use with Grayscale images. For images with pixel depth 8, it is possible to use IndexColorModel. But for higher pixel depths, use an int[] for pixeldata in combination with this ColorModel (where the window/level has to be adjustable).

Since:
11/02/1999

Field Summary
 
Fields inherited from class java.awt.image.ColorModel
pixel_bits, transferType
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
GrayColorModel(int bits)
          Constructs a GrayColorModel for the specified number of bits per pixel
GrayColorModel(int bits, int max)
          Constructs a GrayColorModel.
GrayColorModel(int bits, int min, int max)
          Constructs a GrayColorModel.
 
Method Summary
 int getAlpha(int pixel)
          from java.awt.ColorModel
 int getBlue(int pixel)
          from java.awt.ColorModel
 int getGreen(int pixel)
          from java.awt.ColorModel
 int getMax()
          returns the maximum pixelvalue (specified in the constructor)
 int getMin()
          returns the minimum pixelvalue (specified in the constructor)
 int getRed(int pixel)
          from java.awt.ColorModel
 int getRGB(int pixel)
          from java.awt.ColorModel
 void setWindowLevel(WL wl)
          changes the current window/level - pair.
 
Methods inherited from class java.awt.image.ColorModel
coerceData, createCompatibleSampleModel, createCompatibleWritableRaster, equals, finalize, getAlpha, getAlphaRaster, getBlue, getColorSpace, getComponents, getComponents, getComponentSize, getComponentSize, getDataElement, getDataElement, getDataElements, getDataElements, getDataElements, getGreen, getNormalizedComponents, getNormalizedComponents, getNumColorComponents, getNumComponents, getPixelSize, getRed, getRGB, getRGBdefault, getTransferType, getTransparency, getUnnormalizedComponents, hasAlpha, hashCode, isAlphaPremultiplied, isCompatibleRaster, isCompatibleSampleModel, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GrayColorModel

public GrayColorModel(int bits)
Constructs a GrayColorModel for the specified number of bits per pixel


GrayColorModel

public GrayColorModel(int bits,
                      int max)
Constructs a GrayColorModel.

Parameters:
bits - - the number of bits per pixel.
max - - the biggest pixel value in the image.

GrayColorModel

public GrayColorModel(int bits,
                      int min,
                      int max)
Constructs a GrayColorModel.

Parameters:
bits - - the number of bits per pixel.
min - - the smallest pixel value in the image.
max - - the largest pixel value in the image.
Method Detail

setWindowLevel

public void setWindowLevel(WL wl)
changes the current window/level - pair.

See Also:
WL

getAlpha

public int getAlpha(int pixel)
from java.awt.ColorModel

Specified by:
getAlpha in class java.awt.image.ColorModel

getRed

public int getRed(int pixel)
from java.awt.ColorModel

Specified by:
getRed in class java.awt.image.ColorModel

getGreen

public int getGreen(int pixel)
from java.awt.ColorModel

Specified by:
getGreen in class java.awt.image.ColorModel

getBlue

public int getBlue(int pixel)
from java.awt.ColorModel

Specified by:
getBlue in class java.awt.image.ColorModel

getRGB

public int getRGB(int pixel)
from java.awt.ColorModel

Overrides:
getRGB in class java.awt.image.ColorModel

getMax

public int getMax()
returns the maximum pixelvalue (specified in the constructor)


getMin

public int getMin()
returns the minimum pixelvalue (specified in the constructor)


Trispark JDT
2.50.13

Copyright © 1999-2008 Trispark. All Rights Reserved.