Class 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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Raster computeTile​(int tileX, int tileY)
      Computes a tile.
      static TiledFileOpImage create​(VirtualDir imageDir, Properties defaultImageProperties)  
      static TiledFileOpImage create​(File imageDir, Properties defaultImageProperties)  
      static TiledFileOpImage create​(Path imageDir, Properties defaultImageProperties)  
      void dispose()  
      static Object getDataObject​(Raster raster)
      Gets the data object from the data buffer of the given raster.
      static void readRawDataTile​(ImageInputStream stream, WritableRaster raster)
      Reads the data buffer of the given raster from the given image input stream.
      static void writeRawDataTile​(Raster raster, ImageOutputStream stream)
      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
    • Method Detail

      • 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.
      • 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