loci.formats.tiff

## Class IFD

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap<java.lang.Integer,java.lang.Object>
    - - loci.formats.tiff.IFD

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Integer,java.lang.Object>

      public class IFD
      extends java.util.HashMap<java.lang.Integer,java.lang.Object>

  Data structure for working with TIFF Image File Directories (IFDs).
  Author:
    Curtis Rueden ctrueden at wisc.edu, Eric Kjellman egkjellman at wisc.edu, Melissa Linkert melissa at glencoesoftware.com, Chris Allan callan at blackcat.ca
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `java.util.Map.Entry<K,V>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `APERTURE_VALUE`
    `static int` | `ARTIST`
    `static int` | `BIG_TIFF`
    `static int` | `BITS_PER_SAMPLE`
    `static int` | `BRIGHTNESS_VALUE`
    `static int` | `CELL_LENGTH`
    `static int` | `CELL_WIDTH`
    `static int` | `CFA_PATTERN`
    `static int` | `COLOR_MAP`
    `static int` | `COLOR_SPACE`
    `static int` | `COMPONENTS_CONFIGURATION`
    `static int` | `COMPRESSED_BITS_PER_PIXEL`
    `static int` | `COMPRESSION`
    `static int` | `CONTRAST`
    `static int` | `COPYRIGHT`
    `static int` | `CUSTOM_RENDERED`
    `static int` | `DATE_TIME`
    `static int` | `DATE_TIME_DIGITIZED`
    `static int` | `DATE_TIME_ORIGINAL`
    `static int` | `DIGITAL_ZOOM_RATIO`
    `static int` | `DOCUMENT_NAME`
    `static int` | `DOT_RANGE`
    `static int` | `EXIF`
    `static int` | `EXIF_VERSION`
    `static int` | `EXPOSURE_BIAS_VALUE`
    `static int` | `EXPOSURE_INDEX`
    `static int` | `EXPOSURE_MODE`
    `static int` | `EXPOSURE_PROGRAM`
    `static int` | `EXPOSURE_TIME` EXIF tags.
    `static int` | `EXTRA_SAMPLES`
    `static int` | `F_NUMBER`
    `static int` | `FILE_SOURCE`
    `static int` | `FILL_ORDER`
    `static int` | `FLASH`
    `static int` | `FLASH_ENERGY`
    `static int` | `FLASH_PIX_VERSION`
    `static int` | `FOCAL_LENGTH`
    `static int` | `FOCAL_LENGTH_35MM_FILM`
    `static int` | `FOCAL_PLANE_RESOLUTION_UNIT`
    `static int` | `FOCAL_PLANE_X_RESOLUTION`
    `static int` | `FOCAL_PLANE_Y_RESOLUTION`
    `static int` | `FREE_BYTE_COUNTS`
    `static int` | `FREE_OFFSETS`
    `static int` | `GAIN_CONTROL`
    `static int` | `GRAY_RESPONSE_CURVE`
    `static int` | `GRAY_RESPONSE_UNIT`
    `static int` | `HALFTONE_HINTS`
    `static int` | `HOST_COMPUTER`
    `static int` | `IMAGE_DESCRIPTION`
    `static int` | `IMAGE_LENGTH`
    `static int` | `IMAGE_WIDTH`
    `static int` | `INK_NAMES`
    `static int` | `INK_SET`
    `static int` | `ISO_SPEED_RATINGS`
    `static int` | `JPEG_AC_TABLES`
    `static int` | `JPEG_DC_TABLES`
    `static int` | `JPEG_INTERCHANGE_FORMAT`
    `static int` | `JPEG_INTERCHANGE_FORMAT_LENGTH`
    `static int` | `JPEG_LOSSLESS_PREDICTORS`
    `static int` | `JPEG_POINT_TRANSFORMS`
    `static int` | `JPEG_PROC`
    `static int` | `JPEG_Q_TABLES`
    `static int` | `JPEG_RESTART_INTERVAL`
    `static int` | `JPEG_TABLES`
    `static int` | `LIGHT_SOURCE`
    `static int` | `LITTLE_ENDIAN`
    `private static org.slf4j.Logger` | `LOGGER`
    `static int` | `MAKE`
    `static int` | `MAKER_NOTE`
    `static int` | `MAX_APERTURE_VALUE`
    `static int` | `MAX_SAMPLE_VALUE`
    `static int` | `METERING_MODE`
    `static int` | `MIN_SAMPLE_VALUE`
    `static int` | `MODEL`
    `static int` | `NEW_SUBFILE_TYPE`
    `static int` | `NUMBER_OF_INKS`
    `static int` | `OECF`
    `static int` | `ORIENTATION`
    `static int` | `PAGE_NAME`
    `static int` | `PAGE_NUMBER`
    `static int` | `PHOTOMETRIC_INTERPRETATION`
    `static int` | `PIXEL_X_DIMENSION`
    `static int` | `PIXEL_Y_DIMENSION`
    `static int` | `PLANAR_CONFIGURATION`
    `static int` | `PREDICTOR`
    `static int` | `PRIMARY_CHROMATICITIES`
    `static int` | `REFERENCE_BLACK_WHITE`
    `static int` | `RELATED_SOUND_FILE`
    `static int` | `RESOLUTION_UNIT`
    `static int` | `REUSE`
    `static int` | `ROWS_PER_STRIP`
    `static int` | `S_MAX_SAMPLE_VALUE`
    `static int` | `S_MIN_SAMPLE_VALUE`
    `static int` | `SAMPLE_FORMAT`
    `static int` | `SAMPLES_PER_PIXEL`
    `static int` | `SATURATION`
    `static int` | `SCENE_CAPTURE_TYPE`
    `static int` | `SCENE_TYPE`
    `static int` | `SENSING_METHOD`
    `static int` | `SHARPNESS`
    `static int` | `SHUTTER_SPEED_VALUE`
    `static int` | `SOFTWARE`
    `static int` | `SPATIAL_FREQUENCY_RESPONSE`
    `static int` | `SPECTRAL_SENSITIVITY`
    `static int` | `STRIP_BYTE_COUNTS`
    `static int` | `STRIP_OFFSETS`
    `static int` | `SUB_IFD`
    `static int` | `SUB_SEC_TIME`
    `static int` | `SUB_SEC_TIME_DIGITIZED`
    `static int` | `SUB_SEC_TIME_ORIGINAL`
    `static int` | `SUBFILE_TYPE`
    `static int` | `SUBJECT_DISTANCE`
    `static int` | `SUBJECT_DISTANCE_RANGE`
    `static int` | `SUBJECT_LOCATION`
    `static int` | `T4_OPTIONS`
    `static int` | `T6_OPTIONS`
    `static int` | `TARGET_PRINTER`
    `static int` | `THRESHHOLDING`
    `static int` | `TILE_BYTE_COUNTS`
    `static int` | `TILE_LENGTH`
    `static int` | `TILE_OFFSETS`
    `static int` | `TILE_WIDTH`
    `static int` | `TRANSFER_FUNCTION`
    `static int` | `TRANSFER_RANGE`
    `static int` | `USER_COMMENT`
    `static int` | `WHITE_BALANCE`
    `static int` | `WHITE_POINT`
    `static int` | `X_POSITION`
    `static int` | `X_RESOLUTION`
    `static int` | `Y_CB_CR_COEFFICIENTS`
    `static int` | `Y_CB_CR_POSITIONING`
    `static int` | `Y_CB_CR_SUB_SAMPLING`
    `static int` | `Y_POSITION`
    `static int` | `Y_RESOLUTION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IFD()`
    `IFD(IFD ifd)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int[]` | `getBitsPerSample()` Retrieves the image's bits per sample (TIFF tag BitsPerSample) from a given TIFF IFD.
    `long` | `getByteCount(boolean bigTiff)` Get the maximum number of bytes needed to represent this IFD.
    `int[]` | `getBytesPerSample()` Retrieves the image's bytes per sample (derived from tag BitsPerSample) from this IFD.
    `java.lang.String` | `getComment()` Convenience method for obtaining the ImageDescription from this IFD.
    `TiffCompression` | `getCompression()` Retrieves the image's compression type (TIFF tag Compression) from this IFD.
    `static java.lang.String` | `getFieldName(int value)` This method uses reflection to scan the values of this class's static fields, returning the first matching field's name.
    `int[]` | `getIFDIntArray(int tag)` Gets the given directory entry values in int format from this IFD, performing some error checking.
    `int` | `getIFDIntValue(int tag)` Gets the given directory entry value in int format from this IFD, or -1 if the given directory does not exist.
    `int` | `getIFDIntValue(int tag, int defaultValue)` Gets the given directory entry value in int format from this IFD, performing some error checking.
    `long[]` | `getIFDLongArray(int tag)` Gets the given directory entry values in long format from this IFD, performing some error checking.
    `long` | `getIFDLongValue(int tag, long defaultValue)` Gets the given directory entry value in long format from this IFD, performing some error checking.
    `TiffRational` | `getIFDRationalValue(int tag)` Gets the given directory entry value in rational format from this IFD, performing some error checking.
    `short[]` | `getIFDShortArray(int tag)` Gets the given directory entry values in short format from this IFD, performing some error checking.
    `java.lang.String` | `getIFDStringValue(int tag)` Gets the given directory entry value as a string from this IFD, performing some error checking.
    `static java.lang.String` | `getIFDTagName(int tag)` Gets the name of the IFD tag encoded by the given number.
    `java.lang.String` | `getIFDTextValue(int tag)` Gets the given directory entry value as a string (regardless of type).
    `java.lang.Object` | `getIFDValue(int tag)` Gets the given directory entry value from this IFD.
    `java.lang.Object` | `getIFDValue(int tag, java.lang.Class checkClass)` Gets the given directory entry value from this IFD, performing some error checking.
    `long` | `getImageLength()` Retrieves the image's length (TIFF tag ImageLength) from a given TIFF IFD.
    `long` | `getImageWidth()` Retrieves the image's width (TIFF tag ImageWidth) from a given TIFF IFD.
    `OnDemandLongArray` | `getOnDemandStripOffsets()`
    `PhotoInterp` | `getPhotometricInterpretation()` Retrieves the image's photometric interpretation (TIFF tag PhotometricInterpretation) from this IFD.
    `int` | `getPixelType()` Retrieves the image's pixel type based on the BitsPerSample tag.
    `int` | `getPlanarConfiguration()` Retrieves the image's planar configuration (TIFF tag PlanarConfiguration) from this IFD.
    `int` | `getResolutionMultiplier()` Retrieve the value by which to multiply the X and Y resolution so that the resolutions are in microns per pixel.
    `long[]` | `getRowsPerStrip()` Retrieves the number of rows per strip for image (TIFF tag RowsPerStrip) from this IFD.
    `int` | `getSamplesPerPixel()` Retrieves the number of samples per pixel for the image (TIFF tag SamplesPerPixel) from this IFD.
    `long[]` | `getStripByteCounts()` Retrieves strip byte counts for the image (TIFF tag StripByteCounts) from this IFD.
    `long[]` | `getStripOffsets()` Retrieves the strip offsets for the image (TIFF tag StripOffsets) from this IFD.
    `long` | `getTileLength()` Returns the length of an image tile.
    `long` | `getTilesPerColumn()` Returns the number of image tiles per column.
    `long` | `getTilesPerRow()` Returns the number of image tiles per row.
    `long` | `getTileWidth()` Returns the width of an image tile.
    `double` | `getXResolution()` Retrieve the X resolution (TIFF tag XResolution) from this IFD.
    `double` | `getYResolution()` Retrieve the Y resolution (TIFF tag YResolution) from this IFD.
    `boolean` | `isBigTiff()` Gets whether this is a BigTIFF IFD.
    `boolean` | `isLittleEndian()` Gets whether the TIFF information in this IFD is little-endian.
    `boolean` | `isTiled()`
    `void` | `printIFD()` Prints the contents of this IFD.
    `void` | `putIFDValue(int tag, int value)` Adds a directory entry of type SHORT to this IFD.
    `void` | `putIFDValue(int tag, long value)` Adds a directory entry of type LONG to this IFD.
    `void` | `putIFDValue(int tag, java.lang.Object value)` Adds a directory entry to this IFD.
    `void` | `putIFDValue(int tag, short value)` Adds a directory entry of type BYTE to this IFD.

    - ### Methods inherited from class java.util.HashMap

      `clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `equals, hashCode`

- - ### Field Detail

    - #### LOGGER

          private static final org.slf4j.Logger LOGGER

    - #### LITTLE_ENDIAN

          public static final int LITTLE_ENDIAN

      See Also:
        Constant Field Values

    - #### BIG_TIFF

          public static final int BIG_TIFF

      See Also:
        Constant Field Values

    - #### REUSE

          public static final int REUSE

      See Also:
        Constant Field Values

    - #### NEW_SUBFILE_TYPE

          public static final int NEW_SUBFILE_TYPE

      See Also:
        Constant Field Values

    - #### SUBFILE_TYPE

          public static final int SUBFILE_TYPE

      See Also:
        Constant Field Values

    - #### IMAGE_WIDTH

          public static final int IMAGE_WIDTH

      See Also:
        Constant Field Values

    - #### IMAGE_LENGTH

          public static final int IMAGE_LENGTH

      See Also:
        Constant Field Values

    - #### BITS_PER_SAMPLE

          public static final int BITS_PER_SAMPLE

      See Also:
        Constant Field Values

    - #### COMPRESSION

          public static final int COMPRESSION

      See Also:
        Constant Field Values

    - #### PHOTOMETRIC_INTERPRETATION

          public static final int PHOTOMETRIC_INTERPRETATION

      See Also:
        Constant Field Values

    - #### THRESHHOLDING

          public static final int THRESHHOLDING

      See Also:
        Constant Field Values

    - #### CELL_WIDTH

          public static final int CELL_WIDTH

      See Also:
        Constant Field Values

    - #### CELL_LENGTH

          public static final int CELL_LENGTH

      See Also:
        Constant Field Values

    - #### FILL_ORDER

          public static final int FILL_ORDER

      See Also:
        Constant Field Values

    - #### DOCUMENT_NAME

          public static final int DOCUMENT_NAME

      See Also:
        Constant Field Values

    - #### IMAGE_DESCRIPTION

          public static final int IMAGE_DESCRIPTION

      See Also:
        Constant Field Values

    - #### MAKE

          public static final int MAKE

      See Also:
        Constant Field Values

    - #### MODEL

          public static final int MODEL

      See Also:
        Constant Field Values

    - #### STRIP_OFFSETS

          public static final int STRIP_OFFSETS

      See Also:
        Constant Field Values

    - #### ORIENTATION

          public static final int ORIENTATION

      See Also:
        Constant Field Values

    - #### SAMPLES_PER_PIXEL

          public static final int SAMPLES_PER_PIXEL

      See Also:
        Constant Field Values

    - #### ROWS_PER_STRIP

          public static final int ROWS_PER_STRIP

      See Also:
        Constant Field Values

    - #### STRIP_BYTE_COUNTS

          public static final int STRIP_BYTE_COUNTS

      See Also:
        Constant Field Values

    - #### MIN_SAMPLE_VALUE

          public static final int MIN_SAMPLE_VALUE

      See Also:
        Constant Field Values

    - #### MAX_SAMPLE_VALUE

          public static final int MAX_SAMPLE_VALUE

      See Also:
        Constant Field Values

    - #### X_RESOLUTION

          public static final int X_RESOLUTION

      See Also:
        Constant Field Values

    - #### Y_RESOLUTION

          public static final int Y_RESOLUTION

      See Also:
        Constant Field Values

    - #### PLANAR_CONFIGURATION

          public static final int PLANAR_CONFIGURATION

      See Also:
        Constant Field Values

    - #### PAGE_NAME

          public static final int PAGE_NAME

      See Also:
        Constant Field Values

    - #### X_POSITION

          public static final int X_POSITION

      See Also:
        Constant Field Values

    - #### Y_POSITION

          public static final int Y_POSITION

      See Also:
        Constant Field Values

    - #### FREE_OFFSETS

          public static final int FREE_OFFSETS

      See Also:
        Constant Field Values

    - #### FREE_BYTE_COUNTS

          public static final int FREE_BYTE_COUNTS

      See Also:
        Constant Field Values

    - #### GRAY_RESPONSE_UNIT

          public static final int GRAY_RESPONSE_UNIT

      See Also:
        Constant Field Values

    - #### GRAY_RESPONSE_CURVE

          public static final int GRAY_RESPONSE_CURVE

      See Also:
        Constant Field Values

    - #### T4_OPTIONS

          public static final int T4_OPTIONS

      See Also:
        Constant Field Values

    - #### T6_OPTIONS

          public static final int T6_OPTIONS

      See Also:
        Constant Field Values

    - #### RESOLUTION_UNIT

          public static final int RESOLUTION_UNIT

      See Also:
        Constant Field Values

    - #### PAGE_NUMBER

          public static final int PAGE_NUMBER

      See Also:
        Constant Field Values

    - #### TRANSFER_FUNCTION

          public static final int TRANSFER_FUNCTION

      See Also:
        Constant Field Values

    - #### SOFTWARE

          public static final int SOFTWARE

      See Also:
        Constant Field Values

    - #### DATE_TIME

          public static final int DATE_TIME

      See Also:
        Constant Field Values

    - #### ARTIST

          public static final int ARTIST

      See Also:
        Constant Field Values

    - #### HOST_COMPUTER

          public static final int HOST_COMPUTER

      See Also:
        Constant Field Values

    - #### PREDICTOR

          public static final int PREDICTOR

      See Also:
        Constant Field Values

    - #### WHITE_POINT

          public static final int WHITE_POINT

      See Also:
        Constant Field Values

    - #### PRIMARY_CHROMATICITIES

          public static final int PRIMARY_CHROMATICITIES

      See Also:
        Constant Field Values

    - #### COLOR_MAP

          public static final int COLOR_MAP

      See Also:
        Constant Field Values

    - #### HALFTONE_HINTS

          public static final int HALFTONE_HINTS

      See Also:
        Constant Field Values

    - #### TILE_WIDTH

          public static final int TILE_WIDTH

      See Also:
        Constant Field Values

    - #### TILE_LENGTH

          public static final int TILE_LENGTH

      See Also:
        Constant Field Values

    - #### TILE_OFFSETS

          public static final int TILE_OFFSETS

      See Also:
        Constant Field Values

    - #### TILE_BYTE_COUNTS

          public static final int TILE_BYTE_COUNTS

      See Also:
        Constant Field Values

    - #### SUB_IFD

          public static final int SUB_IFD

      See Also:
        Constant Field Values

    - #### INK_SET

          public static final int INK_SET

      See Also:
        Constant Field Values

    - #### INK_NAMES

          public static final int INK_NAMES

      See Also:
        Constant Field Values

    - #### NUMBER_OF_INKS

          public static final int NUMBER_OF_INKS

      See Also:
        Constant Field Values

    - #### DOT_RANGE

          public static final int DOT_RANGE

      See Also:
        Constant Field Values

    - #### TARGET_PRINTER

          public static final int TARGET_PRINTER

      See Also:
        Constant Field Values

    - #### EXTRA_SAMPLES

          public static final int EXTRA_SAMPLES

      See Also:
        Constant Field Values

    - #### SAMPLE_FORMAT

          public static final int SAMPLE_FORMAT

      See Also:
        Constant Field Values

    - #### S_MIN_SAMPLE_VALUE

          public static final int S_MIN_SAMPLE_VALUE

      See Also:
        Constant Field Values

    - #### S_MAX_SAMPLE_VALUE

          public static final int S_MAX_SAMPLE_VALUE

      See Also:
        Constant Field Values

    - #### TRANSFER_RANGE

          public static final int TRANSFER_RANGE

      See Also:
        Constant Field Values

    - #### JPEG_TABLES

          public static final int JPEG_TABLES

      See Also:
        Constant Field Values

    - #### JPEG_PROC

          public static final int JPEG_PROC

      See Also:
        Constant Field Values

    - #### JPEG_INTERCHANGE_FORMAT

          public static final int JPEG_INTERCHANGE_FORMAT

      See Also:
        Constant Field Values

    - #### JPEG_INTERCHANGE_FORMAT_LENGTH

          public static final int JPEG_INTERCHANGE_FORMAT_LENGTH

      See Also:
        Constant Field Values

    - #### JPEG_RESTART_INTERVAL

          public static final int JPEG_RESTART_INTERVAL

      See Also:
        Constant Field Values

    - #### JPEG_LOSSLESS_PREDICTORS

          public static final int JPEG_LOSSLESS_PREDICTORS

      See Also:
        Constant Field Values

    - #### JPEG_POINT_TRANSFORMS

          public static final int JPEG_POINT_TRANSFORMS

      See Also:
        Constant Field Values

    - #### JPEG_Q_TABLES

          public static final int JPEG_Q_TABLES

      See Also:
        Constant Field Values

    - #### JPEG_DC_TABLES

          public static final int JPEG_DC_TABLES

      See Also:
        Constant Field Values

    - #### JPEG_AC_TABLES

          public static final int JPEG_AC_TABLES

      See Also:
        Constant Field Values

    - #### Y_CB_CR_COEFFICIENTS

          public static final int Y_CB_CR_COEFFICIENTS

      See Also:
        Constant Field Values

    - #### Y_CB_CR_SUB_SAMPLING

          public static final int Y_CB_CR_SUB_SAMPLING

      See Also:
        Constant Field Values

    - #### Y_CB_CR_POSITIONING

          public static final int Y_CB_CR_POSITIONING

      See Also:
        Constant Field Values

    - #### REFERENCE_BLACK_WHITE

          public static final int REFERENCE_BLACK_WHITE

      See Also:
        Constant Field Values

    - #### COPYRIGHT

          public static final int COPYRIGHT

      See Also:
        Constant Field Values

    - #### EXIF

          public static final int EXIF

      See Also:
        Constant Field Values

    - #### EXPOSURE_TIME

          public static final int EXPOSURE_TIME

      EXIF tags.
      See Also:
        Constant Field Values

    - #### F_NUMBER

          public static final int F_NUMBER

      See Also:
        Constant Field Values

    - #### EXPOSURE_PROGRAM

          public static final int EXPOSURE_PROGRAM

      See Also:
        Constant Field Values

    - #### SPECTRAL_SENSITIVITY

          public static final int SPECTRAL_SENSITIVITY

      See Also:
        Constant Field Values

    - #### ISO_SPEED_RATINGS

          public static final int ISO_SPEED_RATINGS

      See Also:
        Constant Field Values

    - #### OECF

          public static final int OECF

      See Also:
        Constant Field Values

    - #### EXIF_VERSION

          public static final int EXIF_VERSION

      See Also:
        Constant Field Values

    - #### DATE_TIME_ORIGINAL

          public static final int DATE_TIME_ORIGINAL

      See Also:
        Constant Field Values

    - #### DATE_TIME_DIGITIZED

          public static final int DATE_TIME_DIGITIZED

      See Also:
        Constant Field Values

    - #### COMPONENTS_CONFIGURATION

          public static final int COMPONENTS_CONFIGURATION

      See Also:
        Constant Field Values

    - #### COMPRESSED_BITS_PER_PIXEL

          public static final int COMPRESSED_BITS_PER_PIXEL

      See Also:
        Constant Field Values

    - #### SHUTTER_SPEED_VALUE

          public static final int SHUTTER_SPEED_VALUE

      See Also:
        Constant Field Values

    - #### APERTURE_VALUE

          public static final int APERTURE_VALUE

      See Also:
        Constant Field Values

    - #### BRIGHTNESS_VALUE

          public static final int BRIGHTNESS_VALUE

      See Also:
        Constant Field Values

    - #### EXPOSURE_BIAS_VALUE

          public static final int EXPOSURE_BIAS_VALUE

      See Also:
        Constant Field Values

    - #### MAX_APERTURE_VALUE

          public static final int MAX_APERTURE_VALUE

      See Also:
        Constant Field Values

    - #### SUBJECT_DISTANCE

          public static final int SUBJECT_DISTANCE

      See Also:
        Constant Field Values

    - #### METERING_MODE

          public static final int METERING_MODE

      See Also:
        Constant Field Values

    - #### LIGHT_SOURCE

          public static final int LIGHT_SOURCE

      See Also:
        Constant Field Values

    - #### FLASH

          public static final int FLASH

      See Also:
        Constant Field Values

    - #### FOCAL_LENGTH

          public static final int FOCAL_LENGTH

      See Also:
        Constant Field Values

    - #### MAKER_NOTE

          public static final int MAKER_NOTE

      See Also:
        Constant Field Values

    - #### USER_COMMENT

          public static final int USER_COMMENT

      See Also:
        Constant Field Values

    - #### SUB_SEC_TIME

          public static final int SUB_SEC_TIME

      See Also:
        Constant Field Values

    - #### SUB_SEC_TIME_ORIGINAL

          public static final int SUB_SEC_TIME_ORIGINAL

      See Also:
        Constant Field Values

    - #### SUB_SEC_TIME_DIGITIZED

          public static final int SUB_SEC_TIME_DIGITIZED

      See Also:
        Constant Field Values

    - #### FLASH_PIX_VERSION

          public static final int FLASH_PIX_VERSION

      See Also:
        Constant Field Values

    - #### COLOR_SPACE

          public static final int COLOR_SPACE

      See Also:
        Constant Field Values

    - #### PIXEL_X_DIMENSION

          public static final int PIXEL_X_DIMENSION

      See Also:
        Constant Field Values

    - #### PIXEL_Y_DIMENSION

          public static final int PIXEL_Y_DIMENSION

      See Also:
        Constant Field Values

    - #### RELATED_SOUND_FILE

          public static final int RELATED_SOUND_FILE

      See Also:
        Constant Field Values

    - #### FLASH_ENERGY

          public static final int FLASH_ENERGY

      See Also:
        Constant Field Values

    - #### SPATIAL_FREQUENCY_RESPONSE

          public static final int SPATIAL_FREQUENCY_RESPONSE

      See Also:
        Constant Field Values

    - #### FOCAL_PLANE_X_RESOLUTION

          public static final int FOCAL_PLANE_X_RESOLUTION

      See Also:
        Constant Field Values

    - #### FOCAL_PLANE_Y_RESOLUTION

          public static final int FOCAL_PLANE_Y_RESOLUTION

      See Also:
        Constant Field Values

    - #### FOCAL_PLANE_RESOLUTION_UNIT

          public static final int FOCAL_PLANE_RESOLUTION_UNIT

      See Also:
        Constant Field Values

    - #### SUBJECT_LOCATION

          public static final int SUBJECT_LOCATION

      See Also:
        Constant Field Values

    - #### EXPOSURE_INDEX

          public static final int EXPOSURE_INDEX

      See Also:
        Constant Field Values

    - #### SENSING_METHOD

          public static final int SENSING_METHOD

      See Also:
        Constant Field Values

    - #### FILE_SOURCE

          public static final int FILE_SOURCE

      See Also:
        Constant Field Values

    - #### SCENE_TYPE

          public static final int SCENE_TYPE

      See Also:
        Constant Field Values

    - #### CFA_PATTERN

          public static final int CFA_PATTERN

      See Also:
        Constant Field Values

    - #### CUSTOM_RENDERED

          public static final int CUSTOM_RENDERED

      See Also:
        Constant Field Values

    - #### EXPOSURE_MODE

          public static final int EXPOSURE_MODE

      See Also:
        Constant Field Values

    - #### WHITE_BALANCE

          public static final int WHITE_BALANCE

      See Also:
        Constant Field Values

    - #### DIGITAL_ZOOM_RATIO

          public static final int DIGITAL_ZOOM_RATIO

      See Also:
        Constant Field Values

    - #### FOCAL_LENGTH_35MM_FILM

          public static final int FOCAL_LENGTH_35MM_FILM

      See Also:
        Constant Field Values

    - #### SCENE_CAPTURE_TYPE

          public static final int SCENE_CAPTURE_TYPE

      See Also:
        Constant Field Values

    - #### GAIN_CONTROL

          public static final int GAIN_CONTROL

      See Also:
        Constant Field Values

    - #### CONTRAST

          public static final int CONTRAST

      See Also:
        Constant Field Values

    - #### SATURATION

          public static final int SATURATION

      See Also:
        Constant Field Values

    - #### SHARPNESS

          public static final int SHARPNESS

      See Also:
        Constant Field Values

    - #### SUBJECT_DISTANCE_RANGE

          public static final int SUBJECT_DISTANCE_RANGE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### IFD

          public IFD()

    - #### IFD

          public IFD(IFD ifd)

  - ### Method Detail

    - #### getByteCount

          public long getByteCount(boolean bigTiff)
                            throws FormatException

      Get the maximum number of bytes needed to represent this IFD.
      Throws:
        `FormatException`

    - #### isBigTiff

          public boolean isBigTiff()
                            throws FormatException

      Gets whether this is a BigTIFF IFD.
      Throws:
        `FormatException`

    - #### isLittleEndian

          public boolean isLittleEndian()
                                 throws FormatException

      Gets whether the TIFF information in this IFD is little-endian.
      Throws:
        `FormatException`

    - #### getIFDValue

          public java.lang.Object getIFDValue(int tag)

      Gets the given directory entry value from this IFD.

    - #### getIFDValue

          public java.lang.Object getIFDValue(int tag,
                                              java.lang.Class checkClass)
                                       throws FormatException

      Gets the given directory entry value from this IFD, performing some error checking.
      Throws:
        `FormatException`

    - #### getIFDLongValue

          public long getIFDLongValue(int tag,
                                      long defaultValue)
                               throws FormatException

      Gets the given directory entry value in long format from this IFD, performing some error checking.
      Throws:
        `FormatException`

    - #### getIFDIntValue

          public int getIFDIntValue(int tag)

      Gets the given directory entry value in int format from this IFD, or -1 if the given directory does not exist.

    - #### getIFDIntValue

          public int getIFDIntValue(int tag,
                                    int defaultValue)
                             throws FormatException

      Gets the given directory entry value in int format from this IFD, performing some error checking.
      Throws:
        `FormatException`

    - #### getIFDRationalValue

          public TiffRational getIFDRationalValue(int tag)
                                           throws FormatException

      Gets the given directory entry value in rational format from this IFD, performing some error checking.
      Throws:
        `FormatException`

    - #### getIFDStringValue

          public java.lang.String getIFDStringValue(int tag)
                                             throws FormatException

      Gets the given directory entry value as a string from this IFD, performing some error checking.
      Throws:
        `FormatException`

    - #### getIFDTextValue

          public java.lang.String getIFDTextValue(int tag)

      Gets the given directory entry value as a string (regardless of type).

    - #### getIFDLongArray

          public long[] getIFDLongArray(int tag)
                                 throws FormatException

      Gets the given directory entry values in long format from this IFD, performing some error checking.
      Throws:
        `FormatException`

    - #### getIFDIntArray

          public int[] getIFDIntArray(int tag)
                               throws FormatException

      Gets the given directory entry values in int format from this IFD, performing some error checking.
      Throws:
        `FormatException`

    - #### getIFDShortArray

          public short[] getIFDShortArray(int tag)
                                   throws FormatException

      Gets the given directory entry values in short format from this IFD, performing some error checking.
      Throws:
        `FormatException`

    - #### getComment

          public java.lang.String getComment()

      Convenience method for obtaining the ImageDescription from this IFD.

    - #### getTileWidth

          public long getTileWidth()
                            throws FormatException

      Returns the width of an image tile.
      Throws:
        `FormatException`

    - #### getTileLength

          public long getTileLength()
                             throws FormatException

      Returns the length of an image tile.
      Throws:
        `FormatException`

    - #### getTilesPerRow

          public long getTilesPerRow()
                              throws FormatException

      Returns the number of image tiles per row.
      Throws:
        `FormatException`

    - #### getTilesPerColumn

          public long getTilesPerColumn()
                                 throws FormatException

      Returns the number of image tiles per column.
      Throws:
        `FormatException`

    - #### isTiled

          public boolean isTiled()
                          throws FormatException

      Throws:
        `FormatException`

    - #### getImageWidth

          public long getImageWidth()
                             throws FormatException

      Retrieves the image's width (TIFF tag ImageWidth) from a given TIFF IFD.
      Returns:
        the image's width.
      Throws:
        `FormatException` - if there is a problem parsing the IFD metadata.

    - #### getImageLength

          public long getImageLength()
                              throws FormatException

      Retrieves the image's length (TIFF tag ImageLength) from a given TIFF IFD.
      Returns:
        the image's length.
      Throws:
        `FormatException` - if there is a problem parsing the IFD metadata.

    - #### getBitsPerSample

          public int[] getBitsPerSample()
                                 throws FormatException

      Retrieves the image's bits per sample (TIFF tag BitsPerSample) from a given TIFF IFD.
      Returns:
        the image's bits per sample. The length of the array is equal to the number of samples per pixel.
      Throws:
        `FormatException` - if there is a problem parsing the IFD metadata.
      See Also:
        `getSamplesPerPixel()`

    - #### getPixelType

          public int getPixelType()
                           throws FormatException

      Retrieves the image's pixel type based on the BitsPerSample tag.
      Returns:
        the pixel type. This is one of:
    - FormatTools.INT8
    - FormatTools.UINT8
    - FormatTools.INT16
    - FormatTools.UINT16
    - FormatTools.INT32
    - FormatTools.UINT32
    - FormatTools.FLOAT
    - FormatTools.DOUBLE
    Throws:
      `FormatException` - if there is a problem parsing the IFD metadata.
    See Also:
      `getBitsPerSample()`

  - #### getBytesPerSample

        public int[] getBytesPerSample()
                                throws FormatException

    Retrieves the image's bytes per sample (derived from tag BitsPerSample) from this IFD.
    Returns:
      the image's bytes per sample. The length of the array is equal to the number of samples per pixel.
    Throws:
      `FormatException` - if there is a problem parsing the IFD metadata.
    See Also:
      `getSamplesPerPixel()`, `getBitsPerSample()`

  - #### getSamplesPerPixel

        public int getSamplesPerPixel()
                               throws FormatException

    Retrieves the number of samples per pixel for the image (TIFF tag SamplesPerPixel) from this IFD.
    Returns:
      the number of samples per pixel.
    Throws:
      `FormatException` - if there is a problem parsing the IFD metadata.

  - #### getCompression

        public TiffCompression getCompression()
                                       throws FormatException

    Retrieves the image's compression type (TIFF tag Compression) from this IFD.
    Returns:
      the image's compression type. As of TIFF 6.0 this is one of:
      - Uncompressed (1)
      - CCITT 1D (2)
      - Group 3 Fax (3)
      - Group 4 Fax (4)
      - LZW (5)
      - JPEG (6)
      - PackBits (32773)
      Other proprietary compression types are also possible; see `TiffCompression` for more details.
    Throws:
      `FormatException` - if there is a problem parsing the IFD metadata.

  - #### getPhotometricInterpretation

        public PhotoInterp getPhotometricInterpretation()
                                                 throws FormatException

    Retrieves the image's photometric interpretation (TIFF tag PhotometricInterpretation) from this IFD.
    Returns:
      the image's photometric interpretation. As of TIFF 6.0 this is one of:
      - WhiteIsZero (0)
      - BlackIsZero (1)
      - RGB (2)
      - RGB Palette (3)
      - Transparency mask (4)
      - CMYK (5)
      - YbCbCr (6)
      - CIELab (8)
    Throws:
      `FormatException` - if there is a problem parsing the IFD metadata.

  - #### getPlanarConfiguration

        public int getPlanarConfiguration()
                                   throws FormatException

    Retrieves the image's planar configuration (TIFF tag PlanarConfiguration) from this IFD.
    Returns:
      the image's planar configuration. As of TIFF 6.0 this is one of:
      - Chunky (1)
      - Planar (2)
    Throws:
      `FormatException` - if there is a problem parsing the IFD metadata.

  - #### getStripOffsets

        public long[] getStripOffsets()
                               throws FormatException

    Retrieves the strip offsets for the image (TIFF tag StripOffsets) from this IFD.
    Returns:
      the strip offsets for the image. The length of the array is equal to the number of strips per image. StripsPerImage = floor ((ImageLength + RowsPerStrip - 1) / RowsPerStrip).
    Throws:
      `FormatException` - if there is a problem parsing the IFD metadata.
    See Also:
      `getStripByteCounts()`, `getRowsPerStrip()`

  - #### getOnDemandStripOffsets

        public OnDemandLongArray getOnDemandStripOffsets()
                                                  throws FormatException

    Throws:
      `FormatException`

  - #### getStripByteCounts

        public long[] getStripByteCounts()
                                  throws FormatException

    Retrieves strip byte counts for the image (TIFF tag StripByteCounts) from this IFD.
    Returns:
      the byte counts for each strip. The length of the array is equal to the number of strips per image. StripsPerImage = floor((ImageLength + RowsPerStrip - 1) / RowsPerStrip).
    Throws:
      `FormatException` - if there is a problem parsing the IFD metadata.
    See Also:
      `getStripOffsets()`

  - #### getRowsPerStrip

        public long[] getRowsPerStrip()
                               throws FormatException

    Retrieves the number of rows per strip for image (TIFF tag RowsPerStrip) from this IFD.
    Returns:
      the number of rows per strip.
    Throws:
      `FormatException` - if there is a problem parsing the IFD metadata.

  - #### getResolutionMultiplier

        public int getResolutionMultiplier()

    Retrieve the value by which to multiply the X and Y resolution so that the resolutions are in microns per pixel.

  - #### getXResolution

        public double getXResolution()
                              throws FormatException

    Retrieve the X resolution (TIFF tag XResolution) from this IFD. The resolution will be normalized to microns per pixel.
    Returns:
      the X resolution, in microns per pixel
    Throws:
      `FormatException` - if there is a problem parsing the IFD metadata.

  - #### getYResolution

        public double getYResolution()
                              throws FormatException

    Retrieve the Y resolution (TIFF tag YResolution) from this IFD. The resolution will be normalized to microns per pixel.
    Returns:
      the Y resolution, in microns per pixel
    Throws:
      `FormatException` - if there is a problem parsing the IFD metadata.

  - #### putIFDValue

        public void putIFDValue(int tag,
                                java.lang.Object value)

    Adds a directory entry to this IFD.

  - #### putIFDValue

        public void putIFDValue(int tag,
                                short value)

    Adds a directory entry of type BYTE to this IFD.

  - #### putIFDValue

        public void putIFDValue(int tag,
                                int value)

    Adds a directory entry of type SHORT to this IFD.

  - #### putIFDValue

        public void putIFDValue(int tag,
                                long value)

    Adds a directory entry of type LONG to this IFD.

  - #### printIFD

        public void printIFD()

    Prints the contents of this IFD.

  - #### getIFDTagName

        public static java.lang.String getIFDTagName(int tag)

    Gets the name of the IFD tag encoded by the given number.

  - #### getFieldName

        public static java.lang.String getFieldName(int value)

    This method uses reflection to scan the values of this class's static fields, returning the first matching field's name. It is probably not very efficient, and is mainly intended for debugging.

Copyright © 2026 Open Microscopy Environment