Class Combine

              extended byorg.geotools.image.jai.Combine
All Implemented Interfaces:,,, java.awt.image.RenderedImage,

public class Combine

Computes a set of arbitrary linear combinations of the bands of many rendered source images, using a specified matrix. The matrix size (×) must be equals to the following:

The number of source bands used to determine the matrix dimensions is given by the following code regardless of the type of ColorModel the sources have:

 int sourceBands = 0;
 for (int i=0; i
The extra column in the matrix contains constant values each of which is added to the respective band of the destination. The transformation is therefore defined by the pseudocode:
 // s = source pixel (not all from the same source image)
 // d = destination pixel
 for (int i=0; i
In the special case where there is only one source, this method is equivalent to JAI's "BandCombine" operation.

$Id: 17672 2006-01-19 00:25:55Z desruisseaux $
Martin Desruisseaux, Remi Eve

Field Summary
protected  CombineTransform transform
          The transform to apply on sample values before the linear combinaison, or if none.
Fields inherited from class
cache, cobbleSources, OP_COMPUTE_BOUND, OP_IO_BOUND, OP_NETWORK_BOUND, tileCacheMetric, tileRecycler
Fields inherited from class
colorModel, eventManager, height, minX, minY, properties, sampleModel, tileFactory, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, width
Constructor Summary
Combine(java.util.Vector images, double[][] matrix, CombineTransform transform, java.awt.RenderingHints hints)
          Construct an image with the specified matrix.
Method Summary
 void computeRect([] images, java.awt.image.WritableRaster dest, java.awt.Rectangle destRect)
          Compute one tile.
Methods inherited from class
computeTile, dispose, isColormapOperation, mapDestRect, mapSourceRect, permitInPlaceOperation
Methods inherited from class
addTileToCache, cancelTiles, computeRect, computesUniqueTiles, createTile, getExpandedNumBands, getFormatTags, getOperationComputeType, getTile, getTileCache, getTileCacheMetric, getTileDependencies, getTileFromCache, getTileRecycler, getTiles, hasExtender, mapDestPoint, mapSourcePoint, prefetchTiles, queueTiles, recycleTile, setTileCache, vectorize, vectorize, vectorize
Methods inherited from class
addPropertyChangeListener, addPropertyChangeListener, addSink, addSink, addSource, addTileComputationListener, copyData, copyData, copyExtendedData, createColorModel, createSnapshot, createWritableRaster, finalize, getAsBufferedImage, getAsBufferedImage, getBounds, getColorModel, getData, getData, getDefaultColorModel, getExtendedData, getGraphics, getHeight, getImageID, getMaxTileX, getMaxTileY, getMaxX, getMaxY, getMinTileX, getMinTileY, getMinX, getMinY, getNumBands, getNumSources, getNumXTiles, getNumYTiles, getProperties, getProperty, getPropertyClass, getPropertyNames, getPropertyNames, getSampleModel, getSinks, getSource, getSourceImage, getSourceObject, getSources, getSplits, getTileComputationListeners, getTileFactory, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileIndices, getTileRect, getTiles, getTileWidth, getWidth, overlapsMultipleTiles, removeProperty, removePropertyChangeListener, removePropertyChangeListener, removeSink, removeSink, removeSinks, removeSource, removeSources, removeTileComputationListener, setImageLayout, setProperties, setProperty, setSource, setSources, tileXToX, tileXToX, tileYToY, tileYToY, toString, wrapRenderedImage, XToTileX, XToTileX, YToTileY, YToTileY
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


protected final CombineTransform transform
The transform to apply on sample values before the linear combinaison, or if none.

Constructor Detail


public Combine(java.util.Vector images,
               double[][] matrix,
               CombineTransform transform,
               java.awt.RenderingHints hints)
        throws javax.vecmath.MismatchedSizeException
Construct an image with the specified matrix.

images - The rendered sources.
matrix - The linear combinaison coefficients as a matrix.
transform - The transform to apply on sample values before the linear combinaison, or if none.
hints - The rendering hints.
javax.vecmath.MismatchedSizeException - if some rows in the argument doesn't have the expected length.
Method Detail


public void computeRect([] images,
                        java.awt.image.WritableRaster dest,
                        java.awt.Rectangle destRect)
Compute one tile.

images - An array of PlanarImage sources.
dest - A WritableRaster to be filled in.
destRect - The Rectangle within the destination to be written.

Copyright © GeoTools. All Rights Reserved.