| javax.media.jai.OpImage javax.media.jai.PointOpImage com.sun.media.jai.opimage.SubtractOpImage
SubtractOpImage | final class SubtractOpImage extends PointOpImage (Code) | | An OpImage implementing the "Subtract" operation as
described in javax.media.jai.operator.SubtractDescriptor .
This OpImage subtracts the pixel values of the second
source image from the first source images on a per-band basis. In case
the two source images have different number of bands, the number of
bands for the destination image is the smaller band number of the two
source images. That is
dstNumBands = Math.min(src1NumBands, src2NumBands) .
In case the two source images have different data types, the data type
for the destination image is the higher data type of the two source
images.
The value of the pixel (x, y) in the destination image is defined as:
for (b = 0; b < numBands; b++) {
dst[y][x][b] = src1[y][x][b] - src2[y][x][b];
}
If the result of the subtraction overflows/underflows the
maximum/minimum value supported by the destination image, then it
will be clamped to the maximum/minimum value respectively. The
data type byte is treated as unsigned, with maximum
value as 255 and minimum value as 0.
See Also: javax.media.jai.operator.SubtractDescriptor See Also: SubtractCRIF |
Constructor Summary | |
public | SubtractOpImage(RenderedImage source1, RenderedImage source2, Map config, ImageLayout layout) Constructs an SubtractOpImage .
The layout parameter may optionally contains the
tile grid layout, sample model, and/or color model. |
Method Summary | |
protected void | computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect) Subtracts the pixel values of two source images within a specified
rectangle. |
SubtractOpImage | public SubtractOpImage(RenderedImage source1, RenderedImage source2, Map config, ImageLayout layout)(Code) | | Constructs an SubtractOpImage .
The layout parameter may optionally contains the
tile grid layout, sample model, and/or color model. The image
dimension is determined by the intersection of the bounding boxes
of the two source images.
The image layout of the first source image, source1 ,
is used as the fall-back for the image layout of the destination
image. Any layout parameters not specified in the layout
argument are set to the same value as that of source1 .
Parameters: source1 - The first source image. Parameters: source2 - The second source image. Parameters: layout - The destination image layout. |
computeRect | protected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)(Code) | | Subtracts the pixel values of two source images 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. |
Methods inherited from javax.media.jai.OpImage | protected void addTileToCache(int tileX, int tileY, Raster tile)(Code)(Java Doc) public void cancelTiles(TileRequest request, Point[] tileIndices)(Code)(Java Doc) protected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)(Code)(Java Doc) protected void computeRect(PlanarImage[] sources, WritableRaster dest, Rectangle destRect)(Code)(Java Doc) public Raster computeTile(int tileX, int tileY)(Code)(Java Doc) public boolean computesUniqueTiles()(Code)(Java Doc) final protected WritableRaster createTile(int tileX, int tileY)(Code)(Java Doc) public synchronized void dispose()(Code)(Java Doc) public static int getExpandedNumBands(SampleModel sampleModel, ColorModel colorModel)(Code)(Java Doc) protected synchronized RasterFormatTag[] getFormatTags()(Code)(Java Doc) public int getOperationComputeType()(Code)(Java Doc) public Raster getTile(int tileX, int tileY)(Code)(Java Doc) public TileCache getTileCache()(Code)(Java Doc) public Object getTileCacheMetric()(Code)(Java Doc) public Point[] getTileDependencies(int tileX, int tileY, int sourceIndex)(Code)(Java Doc) protected Raster getTileFromCache(int tileX, int tileY)(Code)(Java Doc) public TileRecycler getTileRecycler()(Code)(Java Doc) public Raster[] getTiles(Point[] tileIndices)(Code)(Java Doc) public boolean hasExtender(int sourceIndex)(Code)(Java Doc) public Point2D mapDestPoint(Point2D destPt, int sourceIndex)(Code)(Java Doc) abstract public Rectangle mapDestRect(Rectangle destRect, int sourceIndex)(Code)(Java Doc) public Point2D mapSourcePoint(Point2D sourcePt, int sourceIndex)(Code)(Java Doc) abstract public Rectangle mapSourceRect(Rectangle sourceRect, int sourceIndex)(Code)(Java Doc) public void prefetchTiles(Point[] tileIndices)(Code)(Java Doc) public TileRequest queueTiles(Point[] tileIndices)(Code)(Java Doc) protected void recycleTile(Raster tile)(Code)(Java Doc) public void setTileCache(TileCache cache)(Code)(Java Doc) protected static Vector vectorize(RenderedImage image)(Code)(Java Doc) protected static Vector vectorize(RenderedImage image1, RenderedImage image2)(Code)(Java Doc) protected static Vector vectorize(RenderedImage image1, RenderedImage image2, RenderedImage image3)(Code)(Java Doc)
|
|
|