|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.color.ColorSpace
optics.graphics.ColourScale
public class ColourScale
Class to implement a ColorSpace for direct display of single plane Float/Double images using standard Java classes.
Field Summary | |
---|---|
protected double |
gamma
Gamma correction value |
protected double |
lowerLimit
Lowest pixel limit |
protected static float |
MAX_VALUE
Static final Max valie of 1.0 |
protected static float |
MIN_VALUE
Static final Min Value of 0.0 |
protected boolean |
reverse
Constract reverse flag. |
protected double |
upperLimit
Highest pixel limit |
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 | |
---|---|
ColourScale()
Default consturctor needed to initialise underlying class. |
Method Summary | |
---|---|
float[] |
fromCIEXYZ(float[] rgb)
Required implementation of fromCIEXYZ conversion (not used) |
float[] |
fromRGB(float[] rgb)
Implements fromfromRGB (not used) |
double |
getGamma()
Method to get the current gamma |
double |
getLowerLimit()
Method to get the current lower limit. |
double |
getUpperLimit()
Method to get the current upper limit. |
protected float |
scaledPixelValue(float value)
Method to form the scaled pixel value in the range MIN_VALUE - > MAX_VALUE wrt to the current lower and upper limits. |
void |
setGamma(double g)
Method to set gamma |
void |
setLimits(double min,
double max)
Method to set the ranges. |
void |
setLowerLimit(double min)
Method to set the lower limit (upper will remain unchanged) |
void |
setReverseContarst(boolean b)
Meth ot set/unset reverse contarst, (defaults to false) |
void |
setUpperLimit(double max)
Method to set the upper limit, (lower will remain unhanged) |
float[] |
toCIEXYZ(float[] values)
Required implementation of fromCIEXYZ conversion (not used) |
float[] |
toRGB(float value)
Return the rgb value for a single input pixel value. |
float[] |
toRGB(float[] values)
Implement method from ColorSpace to give RGB values as floats. |
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 |
Field Detail |
---|
protected static final float MIN_VALUE
protected static final float MAX_VALUE
protected double lowerLimit
protected double upperLimit
protected double gamma
protected boolean reverse
Constructor Detail |
---|
public ColourScale()
Method Detail |
---|
public float[] toCIEXYZ(float[] values)
toCIEXYZ
in class java.awt.color.ColorSpace
public float[] fromCIEXYZ(float[] rgb)
fromCIEXYZ
in class java.awt.color.ColorSpace
public float[] toRGB(float[] values)
toRGB
in class java.awt.color.ColorSpace
values
- array of input values, only [0] used
float[]
rgb values.public float[] fromRGB(float[] rgb)
fromRGB
in class java.awt.color.ColorSpace
public float[] toRGB(float value)
value
- the pixel value
float[]
the rgb values.public void setLimits(double min, double max)
min
- the lower valuemax
- the upper valuepublic double getLowerLimit()
double
current lower limit.public double getUpperLimit()
double
current upper limit.public void setLowerLimit(double min)
min
- the new lower limitpublic void setUpperLimit(double max)
max
- the new upper limitpublic void setGamma(double g)
g
- the gamma factorpublic double getGamma()
public void setReverseContarst(boolean b)
protected float scaledPixelValue(float value)
value
- the input pixel value.
float
scaled pixel value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |