Package org.apache.sis.internal.storage
Class TiledDeferredImage
java.lang.Object
org.apache.sis.image.PlanarImage
org.apache.sis.image.ComputedImage
org.apache.sis.internal.coverage.j2d.BatchComputedImage
org.apache.sis.internal.storage.TiledDeferredImage
- All Implemented Interfaces:
RenderedImage,Disposable
A rendered image where tiles are loaded only when first needed.
Used for
RasterLoadingStrategy.AT_GET_TILE_TIME.
Other loading strategies should not instantiate this class.- Since:
- 1.2
- Version:
- 1.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intNumber of pixels along X or Y axis in the whole rendered image.private final TiledGridCoverage.AOIIterator over tiles.private final intIndex of the first tile in the image.private final intIndex of the first tile in the image.private final intNumber of pixels along X or Y axis in the whole rendered image.Fields inherited from class org.apache.sis.image.ComputedImage
sampleModel, SOURCE_PADDING_KEYFields inherited from class org.apache.sis.image.PlanarImage
GRID_GEOMETRY_KEY, MASK_KEY, POSITIONAL_ACCURACY_KEY, SAMPLE_RESOLUTIONS_KEY, STATISTICS_KEY -
Constructor Summary
ConstructorsConstructorDescriptionTiledDeferredImage(int[] imageSize, int[] tileLower, Map<String, Object> properties, TiledGridCoverage.AOI iterator) Creates a new tiled image. -
Method Summary
Modifier and TypeMethodDescriptionprotected Raster[]computeTiles(Rectangle tiles) Loads immediately and returns all tiles in the given ranges of tile indices.Returns the color model, ornullif none.final intReturns the number of pixels along Y axis in the whole rendered image.final intReturns the minimum tile index in the X direction.final intReturns the minimum tile index in the Y direction.final intgetMinX()Returns the minimum x coordinate (inclusive) of this image.final intgetMinY()Returns the minimum y coordinate (inclusive) of this image.final intgetWidth()Returns the number of pixels along X axis in the whole rendered image.Methods inherited from class org.apache.sis.internal.coverage.j2d.BatchComputedImage
computeTile, getProperty, getPropertyNames, prefetchMethods inherited from class org.apache.sis.image.ComputedImage
clearErrorFlags, createTile, dispose, getSampleModel, getSource, getSources, getTile, getTileHeight, getTileWidth, getWritableTileIndices, hasTileWriters, isTileWritable, markDirtyTiles, markTileWritable, sourceTileChangedMethods inherited from class org.apache.sis.image.PlanarImage
copyData, getBounds, getData, getData, getNumXTiles, getNumYTiles, getTileGridXOffset, getTileGridYOffset, toString, verify
-
Field Details
-
width
private final int widthNumber of pixels along X or Y axis in the whole rendered image. -
height
private final int heightNumber of pixels along X or Y axis in the whole rendered image. -
minTileX
private final int minTileXIndex of the first tile in the image. -
minTileY
private final int minTileYIndex of the first tile in the image. -
iterator
Iterator over tiles. The iterator position should not be modified; instead subsets of this iterator will be created when needed.
-
-
Constructor Details
-
TiledDeferredImage
TiledDeferredImage(int[] imageSize, int[] tileLower, Map<String, Object> properties, TiledGridCoverage.AOI iterator) Creates a new tiled image.- Parameters:
imageSize- full image size, after subsampling.tileLower- indices of first tile to read, inclusive.properties- image properties, ornullif none.
-
-
Method Details
-
getColorModel
Returns the color model, ornullif none. -
getMinX
public final int getMinX()Returns the minimum x coordinate (inclusive) of this image.- Specified by:
getMinXin interfaceRenderedImage- Overrides:
getMinXin classPlanarImage- Returns:
- the minimum x coordinate (column) of this image.
-
getMinY
public final int getMinY()Returns the minimum y coordinate (inclusive) of this image.- Specified by:
getMinYin interfaceRenderedImage- Overrides:
getMinYin classPlanarImage- Returns:
- the minimum y coordinate (row) of this image.
-
getWidth
public final int getWidth()Returns the number of pixels along X axis in the whole rendered image. -
getHeight
public final int getHeight()Returns the number of pixels along Y axis in the whole rendered image. -
getMinTileX
public final int getMinTileX()Returns the minimum tile index in the X direction.- Specified by:
getMinTileXin interfaceRenderedImage- Overrides:
getMinTileXin classPlanarImage- Returns:
- the minimum tile index in the x direction.
-
getMinTileY
public final int getMinTileY()Returns the minimum tile index in the Y direction.- Specified by:
getMinTileYin interfaceRenderedImage- Overrides:
getMinTileYin classPlanarImage- Returns:
- the minimum tile index in the y direction.
-
computeTiles
Loads immediately and returns all tiles in the given ranges of tile indices.- Specified by:
computeTilesin classBatchComputedImage- Parameters:
tiles- range of tile indices for which to load tiles.- Returns:
- loaded tiles for the given indices, in row-major fashion.
- Throws:
Exception- if an error occurred when computing tiles.
-