public class BandCombineOpImage
extends javax.media.jai.PointOpImage
OpImage
implementing the "BandCombine" operation taking into account the presence of ROI and NoData.
This OpImage
performs the arbitrary interband linear combination of an image using the specified matrix. The width of the matrix must
be one larger that the number of bands in the source image. The height of the matrix must be equal to the number of bands in the destination image.
Because the matrix can be of arbitrary size, this function can be used to produce a destination image with a different number of bands from the
source image.
The destination image is formed by performing a matrix- multiply operation between the bands of the source image and the specified matrix. The extra column of values is a constant that is added after the matrix-multiply operation takes place. If an input sample is outside ROI or it is a NoData, it will be skipped during computation.
Modifier and Type | Field and Description |
---|---|
static boolean |
ARRAY_CALC
Constant indicating that the inner random iterators must pre-calculate an array of the image positions
|
static boolean |
TILE_CACHED
Constant indicating that the inner random iterators must cache the current tile position
|
Constructor and Description |
---|
BandCombineOpImage(RenderedImage source,
Map config,
javax.media.jai.ImageLayout layout,
double[][] matrix,
javax.media.jai.ROI roi,
Range noData,
double destinationNoData)
Constructs a new instance of the
BandCombineOpImage . |
Modifier and Type | Method and Description |
---|---|
protected void |
computeRect(Raster[] sources,
WritableRaster dest,
Rectangle destRect)
Performs linear combination of source image with matrix.
|
computeTile, dispose, isColormapOperation, mapDestRect, mapSourceRect, permitInPlaceOperation
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
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
public static final boolean ARRAY_CALC
public static final boolean TILE_CACHED
public BandCombineOpImage(RenderedImage source, Map config, javax.media.jai.ImageLayout layout, double[][] matrix, javax.media.jai.ROI roi, Range noData, double destinationNoData)
BandCombineOpImage
.source
- The source image.layout
- The destination image layout.matrix
- The matrix of values used to perform the linear combination.roi
- ROI objectdestinationNoData
- nodata
- No Data Range used for checking if a pixel is a NoData.destinationNoData
- value for replacing the source nodata valuesprotected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)
computeRect
in class javax.media.jai.OpImage
sources
- Cobbled sources, guaranteed to provide all the source data necessary for computing the rectangle.dest
- The tile containing the rectangle to be computed.destRect
- The rectangle within the tile to be computed.Copyright © 2006–2016 GeoSolutions. All rights reserved.