uk.ac.ed.ph.signal
Class LinearGreyScale

java.lang.Object
  extended by java.awt.color.ColorSpace
      extended by uk.ac.ed.ph.signal.ColourScale
          extended by uk.ac.ed.ph.signal.LinearGreyScale
All Implemented Interfaces:
Serializable

public class LinearGreyScale
extends ColourScale

ColourScale to give a linear grey scale with a min/max

See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.ed.ph.signal.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()
          Default constrcuor with min defaulting to 0.0 and max to 1.0
LinearGreyScale(ColourScale cs)
          Form a linear greyscale from specifed ColourScale where lower and upper are copied.
LinearGreyScale(double min, double max)
          Constructor setting min and max
 
Method Summary
 float[] toRGB(float value)
          Method to do the linear scale with thresold
 
Methods inherited from class uk.ac.ed.ph.signal.ColourScale
fromCIEXYZ, fromRGB, getGamma, getLowerLimit, getUpperLimit, scaledPixelValue, setDisplayRange, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearGreyScale

public LinearGreyScale(double min,
                       double max)
Constructor setting min and max

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

LinearGreyScale

public LinearGreyScale()
Default constrcuor with min defaulting to 0.0 and max to 1.0


LinearGreyScale

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

Parameters:
cs - the specifiyinf ColourScale
Method Detail

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