public class BandMergeOpImage
extends javax.media.jai.PointOpImage
OpImage
implementing the "BandMerge" operation as described in BandMergeDescriptor
.
This OpImage
merges the pixel values of two or more source images.
The data type byte
is treated as unsigned, with maximum value as 255 and minimum value as 0.
There is no attempt to rescale binary images to the approapriate gray levels, such as 255 or 0. A lookup should be performed first if so desired.
If No Data are present, they can be handled if the user provides an array of No Data Range objects and a double value for the destination No Data.
Modifier and Type | Field and Description |
---|---|
protected boolean |
caseA
Boolean indicating if No Data and ROI are not used
|
protected boolean |
caseB
Boolean indicating if only the ROI is used
|
protected boolean |
caseC
Boolean indicating if only the No Data are used
|
static int |
TILE_EXTENDER |
Constructor and Description |
---|
BandMergeOpImage(List sources,
Map config,
Range[] noData,
javax.media.jai.ROI roi,
double destinationNoData,
boolean setAlpha,
javax.media.jai.ImageLayout layout)
Constructs a
BandMergeOpImage . |
Modifier and Type | Method and Description |
---|---|
protected void |
computeRect(Raster[] sources,
WritableRaster dest,
Rectangle destRect)
BandMerges the pixel values of multiple source images within a specified rectangle.
|
static ColorModel |
getDefaultColorModel(SampleModel sm,
boolean setAlpha)
Create a colormodel without an alpha band in the case that no alpha band is present.
|
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 int TILE_EXTENDER
protected boolean caseA
protected boolean caseB
protected boolean caseC
public BandMergeOpImage(List sources, Map config, Range[] noData, javax.media.jai.ROI roi, double destinationNoData, boolean setAlpha, javax.media.jai.ImageLayout layout)
BandMergeOpImage
.
The layout
parameter may optionally contain the tile grid layout, sample model, and/or color model. The image dimension is
determined by the intersection of the bounding boxes of the source images.
The image layout of the first source image, source1
, is used as the fallback for the image layout of the destination image. The
destination number of bands is the sum of all source image bands.
sources
- List
of sources.config
- Configurable attributes of the image including configuration variables indexed by RenderingHints.Key
s and image
properties indexed by String
s or CaselessStringKey
s. This is simply forwarded to the superclass constructor.noData
- Array of No Data Range.roi
- Input ROI to use for the calculations.destinationNoData
- output value for No Data.layout
- The destination image layout.setAlpha
- public static ColorModel getDefaultColorModel(SampleModel sm, boolean setAlpha)
sm
- setAlpha
- protected 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–2015 GeoSolutions. All rights reserved.