public class BorderOpImage
extends javax.media.jai.OpImage
OpImage
implementing the "border" operation.
It adds a border around a source image. The size of the border is specified by the left, right, top, and bottom padding parameters. The border may be filled in a variety of ways specified by the border type parameter:
When choosing the BORDER_CONST_FILL
option, an array of constants must be supplied to the extender. The array must have at least one
element, in which case this same constant is applied to all image bands. Or, it may have a different constant entry for each corresponding band.
For all other border types, this constants
parameter may be null
.
The layout information for this image may be specified via the layout
parameter. However, due to the nature of this operation, the
minX
, minY
, width
, and height
, if specified, will be ignored. They will be calculated based on
the source's dimensions and the padding values. Likewise, the SampleModel
and ColorModel hints will be ignored.
If No Data are present, an optional No Data Range and a double value for the output No Data can be provided for avoiding to fill the Borders with
No Data.
Modifier and Type | Field and Description |
---|---|
protected javax.media.jai.BorderExtender |
extender
The
BorderExtender object used to extend the source data. |
Constructor and Description |
---|
BorderOpImage(RenderedImage source,
Map config,
javax.media.jai.ImageLayout layout,
int leftPad,
int rightPad,
int topPad,
int bottomPad,
javax.media.jai.BorderExtender extender,
Range noData,
double destinationNoData)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Raster |
computeTile(int tileX,
int tileY)
Computes the pixel values for the specified tile.
|
Rectangle |
mapDestRect(Rectangle destRect,
int sourceIndex)
Returns a conservative estimate of the region of a specified source that is required in order to compute the pixels of a given destination
rectangle.
|
Rectangle |
mapSourceRect(Rectangle sourceRect,
int sourceIndex)
Returns an estimate of the destination region that can potentially be affected by the pixels of a rectangle of a given source.
|
addTileToCache, cancelTiles, computeRect, computeRect, computesUniqueTiles, createTile, dispose, 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
protected javax.media.jai.BorderExtender extender
BorderExtender
object used to extend the source data.public BorderOpImage(RenderedImage source, Map config, javax.media.jai.ImageLayout layout, int leftPad, int rightPad, int topPad, int bottomPad, javax.media.jai.BorderExtender extender, Range noData, double destinationNoData)
source
- The source image.layout
- The destination image layout.leftPad
- The amount of padding to the left of the source.rightPad
- The amount of padding to the right of the source.topPad
- The amount of padding to the top of the source.bottomPad
- The amount of padding to the bottom of the source.type
- The border type.noData
- optional NoData Range.destinationNoData
- value for replacing input No Data valuespublic Rectangle mapSourceRect(Rectangle sourceRect, int sourceIndex)
mapSourceRect
in class javax.media.jai.OpImage
sourceRect
- the Rectangle in source coordinates.sourceIndex
- the index of the source image.IllegalArgumentException
- if the source index is negative or greater than that of the last source.IllegalArgumentException
- if sourceRect is null.public Rectangle mapDestRect(Rectangle destRect, int sourceIndex)
mapDestRect
in class javax.media.jai.OpImage
destRect
- the Rectangle in destination coordinates.sourceIndex
- the index of the source image.IllegalArgumentException
- if the source index is negative or greater than that of the last source.IllegalArgumentException
- if destRect is null.public Raster computeTile(int tileX, int tileY)
computeTile
in class javax.media.jai.OpImage
Copyright © 2006–2017 GeoSolutions. All rights reserved.