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 Type
    Method
    Description
    default loci.common.Region
    getTileBoundingBox(int no, int x, int y)
    Get a bounding box describing the tile's size and position.
    default Codec
    getTileCodec(int no)
    Retrieve a codec that can be used to decompress compressed tiles.
    default CodecOptions
    getTileCodecOptions(int no, int x, int y)
    Retrieve codec options that can be used to decompressed the specified tile.
    default int
    Get the number of columns of tiles in the specified plane in the current series.
    default int
    getTileRows(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 index
      x - 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

      default byte[] openCompressedBytes(int no, 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 null may be returned.
      Parameters:
      no - plane index
      x - tile X index (indexed from 0, @see getTileColumns(int))
      y - tile Y index (indexed from 0, @see getTileRows(int))
      Returns:
      compressed tile bytes
      Throws:
      FormatException
      IOException
    • 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 index
      buf - pre-allocated buffer in which to store compressed bytes
      x - tile X index (indexed from 0, @see getTileColumns(int))
      y - tile Y index (indexed from 0, @see getTileRows(int))
      Returns:
      compressed tile bytes
      Throws:
      FormatException
      IOException
    • getTileCodec

      default Codec getTileCodec(int no) throws FormatException, IOException
      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:
      FormatException
      IOException
      See Also:
    • getTileCodecOptions

      default CodecOptions getTileCodecOptions(int no, int x, int y) throws FormatException, IOException
      Retrieve codec options that can be used to decompressed the specified tile.
      Parameters:
      no - plane index
      x - tile X index (indexed from 0, @see getTileColumns(int))
      y - tile Y index (indexed from 0, @see getTileRows(int))
      Returns:
      codec options
      Throws:
      FormatException
      IOException
      See Also: