public class ExtendedBandMergeOpImage
extends javax.media.jai.GeometricOpImage
OpImage
implementing the "BandMerge" operation as described in BandMergeDescriptor
. This version of the BandMergeOpImage
also supports a backward mapping from the destination image to each source image. The mapping is achieved by setting a List object containing the
affine transformations, each of them is associated to the related source image.
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 | Class and Description |
---|---|
static class |
ExtendedBandMergeOpImage.Transform
Enum used for implementing the various optional transformations on the input points
|
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
Quantity used for extending the input tile dimensions
|
backgroundValues, computableBounds, extender, intBackgroundValues, interp, setBackground
Constructor and Description |
---|
ExtendedBandMergeOpImage(List sources,
List<AffineTransform> transforms,
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 Rectangle |
backwardMapRect(Rectangle arg0,
int arg1) |
protected void |
computeRect(javax.media.jai.PlanarImage[] sources,
WritableRaster dest,
Rectangle destRect)
BandMerges the pixel values of multiple source images within a specified rectangle.
|
protected Rectangle |
forwardMapRect(Rectangle arg0,
int arg1) |
static ColorModel |
getDefaultColorModel(SampleModel sm,
boolean setAlpha)
Create a colormodel without an alpha band in the case that no alpha band is present.
|
computeTile, getBorderExtender, getInterpolation, mapDestPoint, mapDestRect, mapSourcePoint, mapSourceRect
addTileToCache, cancelTiles, computeRect, computesUniqueTiles, createTile, dispose, getExpandedNumBands, getFormatTags, getOperationComputeType, getTile, getTileCache, getTileCacheMetric, getTileDependencies, getTileFromCache, getTileRecycler, getTiles, hasExtender, 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 ExtendedBandMergeOpImage(List sources, List<AffineTransform> transforms, 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.transforms
- List of Affine transformations to use.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(javax.media.jai.PlanarImage[] sources, WritableRaster dest, Rectangle destRect)
computeRect
in class javax.media.jai.OpImage
sources
- Source images.dest
- The tile containing the rectangle to be computed.destRect
- The rectangle within the tile to be computed.protected Rectangle backwardMapRect(Rectangle arg0, int arg1)
backwardMapRect
in class javax.media.jai.GeometricOpImage
Copyright © 2006–2015 GeoSolutions. All rights reserved.