|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectpsychWithJava.CLUT
public class CLUT
Provides methods to perform (inverse) color lookup operations.
| Constructor Summary | |
|---|---|
CLUT(double[] table)
Constructs a CLUT object for an 8 bit video display system. |
|
CLUT(double[] table,
int bits)
Constructs a CLUT object for a system with an arbitrary number of bits. |
|
CLUT(java.lang.String filename)
Constructs a CLUT object for an 8 bit video display system. |
|
CLUT(java.lang.String filename,
int bits)
Constructs a CLUT object for a system with an arbitrary number of bits. |
|
| Method Summary | |
|---|---|
double |
getMaxLum()
returns the maximum available luminance |
int |
lum2Pix(double lum)
Returns the pixel whose luminance is CLOSEST to the required luminance. |
int |
lum2Pix(int lum)
Returns the pixel whose luminance is CLOSEST to the required luminance. |
double |
pix2Lum(int pixel)
Returns the RELATIVE luminance of the given pixel. |
void |
setClut(double[] table)
Sets a new color look-up table (CLUT). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CLUT(java.lang.String filename)
filename - the name of the file containing luminance values for all pixels
from 255 to 0 in descending order.
java.lang.IllegalArgumentException - if the file has different number of elements than 256public CLUT(double[] table)
table - the double array containing luminance values for all pixels
from 255 to 0 in descending order.
java.lang.IllegalArgumentException - if the file has different number of elements than 256
public CLUT(java.lang.String filename,
int bits)
throws java.lang.IllegalArgumentException
filename - the name of the file containing luminance values for all pixels
from 2bits-1 to 0 in descending order.bits - number of bits of the system.
java.lang.IllegalArgumentException
public CLUT(double[] table,
int bits)
throws java.lang.IllegalArgumentException
table - the double array containing luminance values for all pixels
from 2bits-1 to 0 in descending order.bits - number of bits of the system.
java.lang.IllegalArgumentException| Method Detail |
|---|
public void setClut(double[] table)
table - new look-up tablepublic double getMaxLum()
public int lum2Pix(double lum)
lum - required Luminance (real number, i.e. double)
public int lum2Pix(int lum)
lum - required Luminance (whole number, integer)
public double pix2Lum(int pixel)
pixel - whose luminance is sought
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||