| javax.media.jai.ColormapOpImage com.sun.media.jai.opimage.XorConstOpImage
XorConstOpImage | final class XorConstOpImage extends ColormapOpImage (Code) | | An OpImage implementing the "XorConst" operation.
This OpImage logically "xors" the pixels of a rendered
image with a set of constants, one for each band of the source image.
The destination pixel values are calculated as:
for (int h = 0; h < dstHeight; h++) {
for (int w = 0; w < dstWidth; w++) {
for (int b = 0; b < dstNumBands; b++) {
if (constants.length < dstNumBands) {
dst[h][w][b] = srcs[h][w][b] ^ constants[0];
} else {
dst[h][w][b] = srcs[h][w][b] ^ constants[b];
}
}
}
}
See Also: javax.media.jai.operator.XorConstDescriptor See Also: XorConstCRIF since: EA2 |
Field Summary | |
protected int[] | constants The constants to be xored, one for each band. |
Method Summary | |
protected void | computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect) Logically "xors" a constant with the pixel values within a specified
rectangle. | public static void | main(String args) | protected void | transformColormap(byte[][] colormap) Transform the colormap according to the rescaling parameters. |
constants | protected int[] constants(Code) | | The constants to be xored, one for each band.
|
XorConstOpImage | public XorConstOpImage(RenderedImage source, Map config, ImageLayout layout, int[] constants)(Code) | | Constructor.
Parameters: source - The source image. Parameters: layout - The destination image layout. Parameters: constants - The constants to be xored, stored as reference. |
computeRect | protected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)(Code) | | Logically "xors" a constant with the pixel values within a specified
rectangle.
Parameters: sources - Cobbled sources, guaranteed to provide all thesource data necessary for computing the rectangle. Parameters: dest - The tile containing the rectangle to be computed. Parameters: destRect - The rectangle within the tile to be computed. |
transformColormap | protected void transformColormap(byte[][] colormap)(Code) | | Transform the colormap according to the rescaling parameters.
|
Methods inherited from javax.media.jai.ColormapOpImage | final protected void initializeColormapOperation()(Code)(Java Doc) final protected boolean isColormapOperation()(Code)(Java Doc) abstract protected void transformColormap(byte[][] colormap)(Code)(Java Doc)
|
|
|