optics.graphics
Class LinearGreyScale

java.lang.Object
  extended by java.awt.color.ColorSpace
      extended by optics.graphics.ColourScale
          extended by optics.graphics.LinearGreyScale
All Implemented Interfaces:
java.io.Serializable

public class LinearGreyScale
extends ColourScale

ColourScale to give a LinearGreyScale with a min/max limits.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class optics.graphics.ColourScale
gamma, lowerLimit, MAX_VALUE, MIN_VALUE, reverse, upperLimit
 
Fields inherited from class java.awt.color.ColorSpace
CS_CIEXYZ, CS_GRAY, CS_LINEAR_RGB, CS_PYCC, CS_sRGB, TYPE_2CLR, TYPE_3CLR, TYPE_4CLR, TYPE_5CLR, TYPE_6CLR, TYPE_7CLR, TYPE_8CLR, TYPE_9CLR, TYPE_ACLR, TYPE_BCLR, TYPE_CCLR, TYPE_CMY, TYPE_CMYK, TYPE_DCLR, TYPE_ECLR, TYPE_FCLR, TYPE_GRAY, TYPE_HLS, TYPE_HSV, TYPE_Lab, TYPE_Luv, TYPE_RGB, TYPE_XYZ, TYPE_YCbCr, TYPE_Yxy
 
Constructor Summary
LinearGreyScale()
          Form linear grey scale with default min and max of 0.0 and 1.0.
LinearGreyScale(ColourScale cs)
          Form a linear greyscale from specifed ColourScale where lower and upper limits are copied.
LinearGreyScale(double min, double max)
          Form linear grey scale setting min and max limits.
 
Method Summary
 LinearGreyScale clone()
          Method to clone the current LinearGreyScale
 float[] toRGB(float value)
          Method to do the linear scale with thresold
 
Methods inherited from class optics.graphics.ColourScale
fromCIEXYZ, fromRGB, getGamma, getLowerLimit, getUpperLimit, scaledPixelValue, setGamma, setLimits, setLowerLimit, setReverseContarst, setUpperLimit, toCIEXYZ, toRGB
 
Methods inherited from class java.awt.color.ColorSpace
getInstance, getMaxValue, getMinValue, getName, getNumComponents, getType, isCS_sRGB
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearGreyScale

public LinearGreyScale(double min,
                       double max)
Form linear grey scale setting min and max limits.

Parameters:
min - the min value
max - the max value

LinearGreyScale

public LinearGreyScale()
Form linear grey scale with default min and max of 0.0 and 1.0.


LinearGreyScale

public LinearGreyScale(ColourScale cs)
Form a linear greyscale from specifed ColourScale where lower and upper limits are copied.

Parameters:
cs - the specifying ColourScale
Method Detail

clone

public LinearGreyScale clone()
Method to clone the current LinearGreyScale

Overrides:
clone in class java.lang.Object

toRGB

public float[] toRGB(float value)
Method to do the linear scale with thresold

Overrides:
toRGB in class ColourScale
Parameters:
value - the pixel value
Returns:
float[3] the rgb values