Package org.esa.snap.core.image
Class RasterDataNodeOpImage
java.lang.Object
javax.media.jai.PlanarImage
javax.media.jai.OpImage
javax.media.jai.SourcelessOpImage
org.esa.snap.core.image.SingleBandedOpImage
org.esa.snap.core.image.RasterDataNodeOpImage
- All Implemented Interfaces:
RenderedImage
,javax.media.jai.ImageJAI
,javax.media.jai.PropertyChangeEmitter
,javax.media.jai.PropertySource
,javax.media.jai.WritablePropertySource
- Direct Known Subclasses:
BandOpImage
,RasterDataNodeSampleOpImage
,TiePointGridOpImage
A base class for
OpImage
s acting as source image for
a RasterDataNode
.- See Also:
-
Field Summary
Fields inherited from class javax.media.jai.OpImage
cache, cobbleSources, OP_COMPUTE_BOUND, OP_IO_BOUND, OP_NETWORK_BOUND, tileCacheMetric, tileRecycler
Fields inherited from class javax.media.jai.PlanarImage
colorModel, eventManager, height, minX, minY, properties, sampleModel, tileFactory, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, width
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
RasterDataNodeOpImage
(RasterDataNode rasterDataNode, ResolutionLevel level) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
computeProductData
(ProductData productData, Rectangle region) Computes the target pixel data for this level image.protected void
computeRect
(javax.media.jai.PlanarImage[] sourceImages, WritableRaster tile, Rectangle destRect) protected static void
copyLine
(int y, int destWidth, ProductData src, ProductData dest, int[] sourceCoords) protected ProductData
getGeophysicalProductData
(RasterDataNode band, Rectangle region) Utility method that allows to retrieve data from a raster data node whose geophysical image shares the same multi-level model (aka image pyramid model).protected ProductData
getRawProductData
(RasterDataNode band, Rectangle region) Utility method that allows to retrieve data from a raster data node whose source image shares the same multi-level model (aka image pyramid model).protected int[]
getSourceCoords
(int sourceLength, int targetLength) Utility method which computes source (offset) coordinates for a given source and target lengths.toString()
Methods inherited from class org.esa.snap.core.image.SingleBandedOpImage
computeRect, createNoDataRaster, getLevel, getLevelImageSupport, getScale, getSourceCoord, getSourceHeight, getSourceWidth, getSourceX, getSourceY
Methods inherited from class javax.media.jai.SourcelessOpImage
computesUniqueTiles, computeTile, mapDestRect, mapSourceRect
Methods inherited from class javax.media.jai.OpImage
addTileToCache, cancelTiles, createTile, dispose, getExpandedNumBands, getFormatTags, getOperationComputeType, getTile, getTileCache, getTileCacheMetric, getTileDependencies, getTileFromCache, getTileRecycler, getTiles, hasExtender, mapDestPoint, mapSourcePoint, prefetchTiles, queueTiles, recycleTile, setTileCache, vectorize, vectorize, vectorize
Methods inherited from class javax.media.jai.PlanarImage
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, wrapRenderedImage, XToTileX, XToTileX, YToTileY, YToTileY
-
Constructor Details
-
RasterDataNodeOpImage
Constructor.- Parameters:
rasterDataNode
- The target raster data node.level
- The resolution level.- See Also:
-
-
Method Details
-
getRasterDataNode
- Returns:
- The target raster data node.
-
getGeophysicalProductData
Utility method that allows to retrieve data from a raster data node whose geophysical image shares the same multi-level model (aka image pyramid model).- Parameters:
band
- A raster data node whose geophysical image shares the same multi-level model.region
- The region in pixel coordinates of the given resolution level (seeSingleBandedOpImage.getLevel()
).- Returns:
- The retrieved pixel data in geophysical units.
- See Also:
-
getRawProductData
Utility method that allows to retrieve data from a raster data node whose source image shares the same multi-level model (aka image pyramid model).- Parameters:
band
- A raster data node whose source image shares the same multi-level model.region
- The region in pixel coordinates of the given resolution level (seeSingleBandedOpImage.getLevel()
).- Returns:
- The retrieved, raw and unscaled source pixel data.
- See Also:
-
computeRect
protected void computeRect(javax.media.jai.PlanarImage[] sourceImages, WritableRaster tile, Rectangle destRect) - Overrides:
computeRect
in classjavax.media.jai.OpImage
-
computeProductData
protected abstract void computeProductData(ProductData productData, Rectangle region) throws IOException Computes the target pixel data for this level image.- Parameters:
productData
- The target pixel buffer to write to. The number of elements in this buffer will always beregion.width * region.height
.region
- The target region in pixel coordinates valid for this image level.- Throws:
IOException
- May be thrown if an I/O error occurs during the computation.
-
toString
- Overrides:
toString
in classjavax.media.jai.PlanarImage
-
getSourceCoords
protected int[] getSourceCoords(int sourceLength, int targetLength) Utility method which computes source (offset) coordinates for a given source and target lengths.- Parameters:
sourceLength
- The source length in source pixel units.targetLength
- The target length in target pixel units.- Returns:
- An array of size
targetLength
containing source (offset) coordinates.
-
copyLine
protected static void copyLine(int y, int destWidth, ProductData src, ProductData dest, int[] sourceCoords)
-