Class SingleBandedOpImage

java.lang.Object
javax.media.jai.PlanarImage
javax.media.jai.OpImage
javax.media.jai.SourcelessOpImage
org.esa.snap.core.image.SingleBandedOpImage
All Implemented Interfaces:
RenderedImage, javax.media.jai.ImageJAI, javax.media.jai.PropertyChangeEmitter, javax.media.jai.PropertySource, javax.media.jai.WritablePropertySource
Direct Known Subclasses:
PlacemarkMaskOpImage, RasterDataNodeOpImage, ShapeMaskOpImage, VectorDataMaskOpImage, VirtualBandOpImage

public abstract class SingleBandedOpImage extends javax.media.jai.SourcelessOpImage
A base class for single-band OpImages retrieving data at a given pyramid level.
  • 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
    SingleBandedOpImage(int dataBufferType, int sourceWidth, int sourceHeight, Dimension tileSize, Map configuration, ResolutionLevel level)
    Constructor.
    protected
    SingleBandedOpImage(int dataBufferType, Point sourcePos, int sourceWidth, int sourceHeight, Dimension tileSize, Map configuration, ResolutionLevel level)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final void
    computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)
    Empty implementation.
    protected NoDataRaster
    createNoDataRaster(double noDataValue)
    Creates a new raster containing solely no-data (non-interpretable data, missing data) samples.
    final int
     
     
    protected final double
     
    protected final int
    getSourceCoord(double targetCoord, int min, int max)
     
    protected final int
    getSourceHeight(int targetHeight)
     
    protected final int
    getSourceWidth(int targetWidth)
     
    protected final int
    getSourceX(int targetX)
     
    protected final int
    getSourceY(int targetY)
     

    Methods inherited from class javax.media.jai.SourcelessOpImage

    computesUniqueTiles, computeTile, mapDestRect, mapSourceRect

    Methods inherited from class javax.media.jai.OpImage

    addTileToCache, cancelTiles, computeRect, 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, toString, wrapRenderedImage, XToTileX, XToTileX, YToTileY, YToTileY

    Methods inherited from class java.lang.Object

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

    • SingleBandedOpImage

      protected SingleBandedOpImage(int dataBufferType, int sourceWidth, int sourceHeight, Dimension tileSize, Map configuration, ResolutionLevel level)
      Constructor.
      Parameters:
      dataBufferType - The data type.
      sourceWidth - The width of the level 0 image.
      sourceHeight - The height of the level 0 image.
      tileSize - The tile size for this image.
      configuration - The configuration map. May be null.
      level - The resolution level.
    • SingleBandedOpImage

      protected SingleBandedOpImage(int dataBufferType, Point sourcePos, int sourceWidth, int sourceHeight, Dimension tileSize, Map configuration, ResolutionLevel level)
      Constructor.
      Parameters:
      dataBufferType - The data type.
      sourcePos - The position of the level 0 image. May be null.
      sourceWidth - The width of the level 0 image.
      sourceHeight - The height of the level 0 image.
      tileSize - The tile size for this image.
      configuration - The configuration map. May be null.
      level - The resolution level.
  • Method Details

    • getLevel

      public final int getLevel()
    • getScale

      protected final double getScale()
    • getSourceX

      protected final int getSourceX(int targetX)
    • getSourceY

      protected final int getSourceY(int targetY)
    • getSourceWidth

      protected final int getSourceWidth(int targetWidth)
    • getSourceHeight

      protected final int getSourceHeight(int targetHeight)
    • getSourceCoord

      protected final int getSourceCoord(double targetCoord, int min, int max)
    • getLevelImageSupport

      protected LevelImageSupport getLevelImageSupport()
    • createNoDataRaster

      protected NoDataRaster createNoDataRaster(double noDataValue)
      Creates a new raster containing solely no-data (non-interpretable data, missing data) samples. The raster's data buffer is filled with the given no-data value.

      The raster's origin is (0, 0). In order to translate the raster, use Raster.createTranslatedChild(int x, int y).

      Parameters:
      noDataValue - The no-data value used to fill the data buffer of the raster created.
      Returns:
      the raster created.
      See Also:
    • computeRect

      protected final void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)
      Empty implementation. Used to prevent clients from overriding it, since they shall implement OpImage.computeRect(javax.media.jai.PlanarImage[], java.awt.image.WritableRaster, java.awt.Rectangle).
      Overrides:
      computeRect in class javax.media.jai.OpImage
      Parameters:
      sources - The sources.
      dest - The destination raster.
      destRect - The destination rectangle.