| javax.media.jai.ColormapOpImage com.sun.media.jai.opimage.AddConstOpImage
AddConstOpImage | final class AddConstOpImage extends ColormapOpImage (Code) | | An OpImage implementing the "AddConst" operation.
This OpImage adds a set of constants, one for each
band of the source image, to the pixels of a rendered 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.AddConstDescriptor See Also: AddConstCRIF |
Field Summary | |
protected double[] | constants The constants to be added, one for each band. |
Method Summary | |
protected void | computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect) Adds a constant to the pixel values within a specified rectangle. | protected void | transformColormap(byte[][] colormap) Transform the colormap according to the rescaling parameters. |
constants | protected double[] constants(Code) | | The constants to be added, one for each band.
|
AddConstOpImage | public AddConstOpImage(RenderedImage source, Map config, ImageLayout layout, double[] constants)(Code) | | Constructor.
Parameters: source - The source image. Parameters: layout - The destination image layout. Parameters: constants - The constants to be added, stored as reference. |
computeRect | protected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)(Code) | | Adds a constant to 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)
|
|
|