| org.geotools.image.jai.Combine
Combine | public class Combine extends PointOpImage (Code) | | 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; 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
"
BandCombineDescriptor BandCombine " operation.
since: 2.1 version: $Id: Combine.java 23211 2006-12-05 00:38:41Z desruisseaux $ author: Martin Desruisseaux author: Remi Eve
|
Inner Class :final static class Dyadic extends Combine | |
Field Summary | |
final int[][] | bands The band to use for each elements in
Combine.matrix . | final double[][] | matrix The linear combinaison coefficients as a matrix. | final int | numSamples The number of source samples. | final int[][] | sources The source to use for each elements in
Combine.matrix . | final protected CombineTransform | transform The transform to apply on sample values before the linear combinaison,
or
null if none. |
Method Summary | |
public void | computeRect(PlanarImage[] images, WritableRaster dest, Rectangle destRect) Compute one tile. |
bands | final int[][] bands(Code) | | The band to use for each elements in
Combine.matrix .
This matrix size must be the same than
matrix .
|
matrix | final double[][] matrix(Code) | | The linear combinaison coefficients as a matrix. This matrix may not be the same
than the one specified to the constructor, in that the zero coefficients may have
been purged (and
Combine.sources and
Combine.bands arrays adjusted accordingly})
for performance reason.
|
numSamples | final int numSamples(Code) | | The number of source samples. This is the sum of the number of bands in
all source images. Each
Combine.matrix row must have this length plus 1.
|
sources | final int[][] sources(Code) | | The source to use for each elements in
Combine.matrix .
This matrix size must be the same than
matrix .
|
transform | final protected CombineTransform transform(Code) | | The transform to apply on sample values before the linear combinaison,
or
null if none.
|
Combine | public Combine(Vector images, double[][] matrix, CombineTransform transform, RenderingHints hints) throws MismatchedSizeException(Code) | | Construct an image with the specified matrix.
Parameters: images - The rendered sources. Parameters: matrix - The linear combinaison coefficients as a matrix. Parameters: transform - The transform to apply on sample values before the linear combinaison,or null if none. Parameters: hints - The rendering hints. throws: MismatchedSizeException - if some rows in the matrix argument doesn'thave the expected length. |
computeRect | public void computeRect(PlanarImage[] images, WritableRaster dest, Rectangle destRect)(Code) | | Compute one tile.
Parameters: images - An array of PlanarImage sources. Parameters: dest - A WritableRaster to be filled in. Parameters: destRect - The Rectangle within the destination to be written. |
|
|