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

public abstract class RasterDataNodeOpImage extends SingleBandedOpImage
A base class for OpImages 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

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    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
    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
    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.
     

    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

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • getRasterDataNode

      public RasterDataNode getRasterDataNode()
      Returns:
      The target raster data node.
    • getGeophysicalProductData

      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).
      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 (see SingleBandedOpImage.getLevel()).
      Returns:
      The retrieved pixel data in geophysical units.
      See Also:
    • getRawProductData

      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).
      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 (see SingleBandedOpImage.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 class javax.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 be region.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

      public String toString()
      Overrides:
      toString in class javax.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)