Package loci.formats
Interface ICompressedTileReader
- All Known Subinterfaces:
IFormatReader
- All Known Implementing Classes:
DelegateReader,FormatReader,ImageReader,ReaderWrapper,SubResolutionFormatReader,WrappedReader
public interface ICompressedTileReader
Interface for reading pre-compressed image tiles.
-
Method Summary
Modifier and TypeMethodDescriptiondefault loci.common.RegiongetTileBoundingBox(int no, int x, int y) Get a bounding box describing the tile's size and position.default CodecgetTileCodec(int no) Retrieve a codec that can be used to decompress compressed tiles.default CodecOptionsgetTileCodecOptions(int no, int x, int y) Retrieve codec options that can be used to decompressed the specified tile.default intgetTileColumns(int no) Get the number of columns of tiles in the specified plane in the current series.default intgetTileRows(int no) Get the number of rows of tiles in the specified plane in the current series.default byte[]openCompressedBytes(int no, byte[] buf, int x, int y) Retrieve the specified tile without performing any decompression.default byte[]openCompressedBytes(int no, int x, int y) Retrieve the specified tile without performing any decompression.
-
Method Details
-
getTileRows
default int getTileRows(int no) Get the number of rows of tiles in the specified plane in the current series.- Parameters:
no- plane index- Returns:
- tile row count
-
getTileColumns
default int getTileColumns(int no) Get the number of columns of tiles in the specified plane in the current series.- Parameters:
no- plane index- Returns:
- tile column count
-
getTileBoundingBox
default loci.common.Region getTileBoundingBox(int no, int x, int y) Get a bounding box describing the tile's size and position. This allows for tiles which are mostly on a grid, but where some shift or overlap is possible between tiles.- Parameters:
no- plane indexx- tile X index (indexed from 0, @see getTileColumns(int))y- tile Y index (indexed from 0, @see getTileRows(int))- Returns:
- bounding box for the specified tile
-
openCompressedBytes
Retrieve the specified tile without performing any decompression. If the tile is undefined in the original file(s), then null may be returned.- Parameters:
no- plane indexx- tile X index (indexed from 0, @see getTileColumns(int))y- tile Y index (indexed from 0, @see getTileRows(int))- Returns:
- compressed tile bytes
- Throws:
FormatExceptionIOException
-
openCompressedBytes
default byte[] openCompressedBytes(int no, byte[] buf, int x, int y) throws FormatException, IOException Retrieve the specified tile without performing any decompression. If the tile is undefined in the original file(s), then the provided buffer will be returned unmodified.- Parameters:
no- plane indexbuf- pre-allocated buffer in which to store compressed bytesx- tile X index (indexed from 0, @see getTileColumns(int))y- tile Y index (indexed from 0, @see getTileRows(int))- Returns:
- compressed tile bytes
- Throws:
FormatExceptionIOException
-
getTileCodec
Retrieve a codec that can be used to decompress compressed tiles.- Parameters:
no- plane index- Returns:
- codec that can be used for compressed tiles in the specified plane
- Throws:
FormatExceptionIOException- See Also:
-
getTileCodecOptions
Retrieve codec options that can be used to decompressed the specified tile.- Parameters:
no- plane indexx- tile X index (indexed from 0, @see getTileColumns(int))y- tile Y index (indexed from 0, @see getTileRows(int))- Returns:
- codec options
- Throws:
FormatExceptionIOException- See Also:
-