Class Subfile


  • public class Subfile
    extends java.lang.Object
    A representation of a Tiff subfile. This class maintains information provided by the Image File Directory and image data. This class is not thread safe.
    • Constructor Detail

      • Subfile

        public Subfile()
        Empty Subfile constructor. Will not provide parsed default values.
      • Subfile

        public Subfile​(Tiff tiff,
                       int offset)
    • Method Detail

      • getTiff

        public Tiff getTiff()
      • getFields

        public java.util.Map<java.lang.Integer,​Field> getFields()
      • getNewSubfileType

        public int getNewSubfileType()
      • getImageWidth

        public int getImageWidth()
      • getImageLength

        public int getImageLength()
      • getBitsPerSample

        public int[] getBitsPerSample()
      • getCompression

        public int getCompression()
      • getPhotometricInterpretation

        public int getPhotometricInterpretation()
      • getSamplesPerPixel

        public int getSamplesPerPixel()
      • getXResolution

        public double getXResolution()
      • getYResolution

        public double getYResolution()
      • getPlanarConfiguration

        public int getPlanarConfiguration()
      • getResolutionUnit

        public int getResolutionUnit()
      • getOffset

        public int getOffset()
      • getStripOffsets

        public int[] getStripOffsets()
      • getStripByteCounts

        public int[] getStripByteCounts()
      • getTileOffsets

        public int[] getTileOffsets()
      • getTileByteCounts

        public int[] getTileByteCounts()
      • getRowsPerStrip

        public int getRowsPerStrip()
      • getTileWidth

        public int getTileWidth()
      • getTileLength

        public int getTileLength()
      • getSampleFormat

        public int[] getSampleFormat()
      • getDataSize

        public int getDataSize()
        Calculates the uncompressed data size. Should be used when preparing the ByteBuffer for write Tiff data in the getData(ByteBuffer) method.
        Returns:
        the size in bytes of the uncompressed data
      • getData

        public java.nio.ByteBuffer getData​(java.nio.ByteBuffer result)
        Writes the uncompressed data from the Tiff data associated with the Subfile to the provided ByteBuffer. The data copied to the provided buffer will use the original datas byte order and may override the byte order specified by the provided buffer.
        Parameters:
        result - a ByteBuffer ready for the uncompressed Tiff data, should have a capacity of at least the return value of getDataSize()
        Returns:
        the populated provided ByteBuffer