|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectPlanarImage
OpImage
PointOpImage
Combine
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 (numRows
×numColumns
) must be
equals to the following:
numRows
: the number of desired destination bands.numColumns
: the total number of source bands (i.e. the
sum of the number of source bands in all source images) plus one.
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; iThe 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; iIn the special case where there is only one source, this method is equivalent to JAI's "BandCombine
" operation.
- Since:
- 2.1
- Author:
- Martin Desruisseaux (IRD), Remi Eve
- Module:
Field Summary protected CombineTransform
transform
The transform to apply on sample values before the linear combinaison, ornull
if none.
Fields inherited from class OpImage cache, cobbleSources, OP_COMPUTE_BOUND, OP_IO_BOUND, OP_NETWORK_BOUND, tileCacheMetric, tileRecycler
Fields inherited from class PlanarImage colorModel, eventManager, height, minX, minY, properties, sampleModel, tileFactory, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, width
Constructor Summary Combine(Vector images, double[][] matrix, CombineTransform transform, RenderingHints hints)
Construct an image with the specified matrix.
Method Summary void
computeRect(PlanarImage[] images, WritableRaster dest, Rectangle destRect)
Compute one tile.
Methods inherited from class PointOpImage computeTile, dispose, isColormapOperation, mapDestRect, mapSourceRect, permitInPlaceOperation
Methods inherited from class Object clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail transform
protected final CombineTransform transform
- The transform to apply on sample values before the linear combinaison, or
null
if none.
Constructor Detail Combine
public Combine(Vector images, double[][] matrix, CombineTransform transform, RenderingHints hints) throws MismatchedSizeException
- Construct an image with the specified matrix.
- Parameters:
images
- The rendered sources.matrix
- The linear combinaison coefficients as a matrix.transform
- The transform to apply on sample values before the linear combinaison, ornull
if none.hints
- The rendering hints.- Throws:
MismatchedSizeException
- if some rows in thematrix
argument doesn't have the expected length.
Method Detail computeRect
public void computeRect(PlanarImage[] images, WritableRaster dest, Rectangle destRect)
- Compute one tile.
- Overrides:
computeRect
in classOpImage
- Parameters:
images
- An array of PlanarImage sources.dest
- A WritableRaster to be filled in.destRect
- The Rectangle within the destination to be written.
Overview Package Class Use Tree Deprecated Index Help PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
Copyright © 1996-2009 Geotools. All Rights Reserved.