Class TiledFileOpImage

java.lang.Object
javax.media.jai.PlanarImage
javax.media.jai.OpImage
javax.media.jai.SourcelessOpImage
org.esa.snap.core.image.TiledFileOpImage
All Implemented Interfaces:
RenderedImage, javax.media.jai.ImageJAI, javax.media.jai.PropertyChangeEmitter, javax.media.jai.PropertySource, javax.media.jai.WritablePropertySource

public class TiledFileOpImage extends javax.media.jai.SourcelessOpImage
  • 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
  • Method Summary

    Modifier and Type
    Method
    Description
    computeTile(int tileX, int tileY)
    Computes a tile.
    create(VirtualDir imageDir, Properties defaultImageProperties)
     
    create(File imageDir, Properties defaultImageProperties)
     
    create(Path imageDir, Properties defaultImageProperties)
     
    void
     
    static Object
    Gets the data object from the data buffer of the given raster.
    static void
    Reads the data buffer of the given raster from the given image input stream.
    static void
    Writes the data buffer of the given raster to the given image output stream.

    Methods inherited from class javax.media.jai.SourcelessOpImage

    computesUniqueTiles, mapDestRect, mapSourceRect

    Methods inherited from class javax.media.jai.OpImage

    addTileToCache, cancelTiles, computeRect, computeRect, createTile, 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
  • Method Details

    • create

      public static TiledFileOpImage create(File imageDir, Properties defaultImageProperties) throws IOException
      Throws:
      IOException
    • create

      public static TiledFileOpImage create(VirtualDir imageDir, Properties defaultImageProperties) throws IOException
      Throws:
      IOException
    • create

      public static TiledFileOpImage create(Path imageDir, Properties defaultImageProperties) throws IOException
      Throws:
      IOException
    • computeTile

      public Raster computeTile(int tileX, int tileY)
      Computes a tile. Since the operation has no sources, there is no need to worry about cobbling.

      Subclasses should implement the computeRect(PlanarImage[], WritableRaster, Rectangle) method to perform the actual computation.

      Overrides:
      computeTile in class javax.media.jai.SourcelessOpImage
      Parameters:
      tileX - The X index of the tile.
      tileY - The Y index of the tile.
    • readRawDataTile

      public static void readRawDataTile(ImageInputStream stream, WritableRaster raster) throws IOException
      Reads the data buffer of the given raster from the given image input stream.
      Parameters:
      stream - The image input stream.
      raster - The raster.
      Throws:
      IOException - if an I/O error occurs
      IllegalArgumentException - if the raster's data arrays cannot be retrieved
      NullPointerException - if raster or stream is null
    • writeRawDataTile

      public static void writeRawDataTile(Raster raster, ImageOutputStream stream) throws IOException
      Writes the data buffer of the given raster to the given image output stream.
      Parameters:
      raster - The raster.
      stream - The image output stream.
      Throws:
      IOException - if an I/O error occurs
      IllegalArgumentException - if the raster's data arrays cannot be retrieved
      NullPointerException - if raster or stream is null
    • getDataObject

      public static Object getDataObject(Raster raster)
      Gets the data object from the data buffer of the given raster. The data object which will always be of a primitive array type.
      Parameters:
      raster - The raster.
      Returns:
      The data array.
      Throws:
      IllegalArgumentException - if the raster's data arrays cannot be retrieved
      NullPointerException - if raster is null
    • dispose

      public void dispose()
      Overrides:
      dispose in class javax.media.jai.OpImage