|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.image.palette.EfficientInverseColorMapComputation
public final class EfficientInverseColorMapComputation
This class is responsible for computing efficiently an inverse color map for a given color map.
This algorithm is adapted from the algorithm found in Graphics Gems volume 2 by Spencer W. Thomas "Efficient Inverse Color Map Computation".
Field Summary | |
---|---|
protected int |
bits
Number of most significant bits we are going to use from the input color in order to quantize them. |
protected int |
blueQuantizationMask
|
protected byte[][] |
colorMap
Forward color map. |
protected int |
greenQuantizationMask
|
protected byte[] |
mapBuf
inverse rgb color map |
protected int |
redQuantizationMask
|
protected int |
truncationBits
|
Constructor Summary | |
---|---|
EfficientInverseColorMapComputation(byte[][] rgbColorMap,
int quantizationBits)
EfficientInverseColorMapComputation that allows us to specify the
number of bits we are going to save from the quantization. |
Method Summary | |
---|---|
int |
getIndexNearest(int red,
int green,
int blue)
This method is responsible for doing the actual lookup that given an rgb triple returns the best, taking into account quantization, index in the forward color map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final int bits
protected final int truncationBits
protected final int blueQuantizationMask
protected final int greenQuantizationMask
protected final int redQuantizationMask
protected final byte[][] colorMap
protected final byte[] mapBuf
Constructor Detail |
---|
public EfficientInverseColorMapComputation(byte[][] rgbColorMap, int quantizationBits)
EfficientInverseColorMapComputation
that allows us to specify the
number of bits we are going to save from the quantization.
rgbColorMap
- quantizationBits
- Method Detail |
---|
public int getIndexNearest(int red, int green, int blue)
red
- component.green
- component.blue
- component.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |