optics.graphics
Class GammaGreyScale

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

public class GammaGreyScale
extends ColourScale

ColourScale to give a GammaGreyScale with a min, max and valuable gamma.

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
GammaGreyScale()
          Default constructor with min of 0.0, max of 1.0 and gamma of 1.0
GammaGreyScale(ColourScale cs)
          Form a GammaGreyScale from the supplied ColourScale where lower and upper limits and gamma values are retained.
GammaGreyScale(double min, double max)
          Form GammaGreyScale setting min and max (gamma defaults to 1.0)
GammaGreyScale(double min, double max, double gamma)
          Form GammaGreyScale setting min and max and gamma
 
Method Summary
 GammaGreyScale clone()
          Method to clone the current GammaGreyScale
 float[] toRGB(float value)
          Method to do the linear scale gamma
 
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

GammaGreyScale

public GammaGreyScale(double min,
                      double max,
                      double gamma)
Form GammaGreyScale setting min and max and gamma

Parameters:
min - the min value
max - the max value
gamma - the gamma correction

GammaGreyScale

public GammaGreyScale(double min,
                      double max)
Form GammaGreyScale setting min and max (gamma defaults to 1.0)

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

GammaGreyScale

public GammaGreyScale()
Default constructor with min of 0.0, max of 1.0 and gamma of 1.0


GammaGreyScale

public GammaGreyScale(ColourScale cs)
Form a GammaGreyScale from the supplied ColourScale where lower and upper limits and gamma values are retained.

Parameters:
cs - the ColourScale
Method Detail

clone

public GammaGreyScale clone()
Method to clone the current GammaGreyScale

Overrides:
clone in class java.lang.Object

toRGB

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

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