public class IFD
extends java.util.HashMap<java.lang.Integer,java.lang.Object>
Modifier and Type | Method and Description |
---|---|
int[] |
getBitsPerSample()
Retrieves the image's bits per sample (TIFF tag BitsPerSample) from a given
TIFF 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.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
private static final org.slf4j.Logger LOGGER
public static final int LITTLE_ENDIAN
public static final int BIG_TIFF
public static final int REUSE
public static final int NEW_SUBFILE_TYPE
public static final int SUBFILE_TYPE
public static final int IMAGE_WIDTH
public static final int IMAGE_LENGTH
public static final int BITS_PER_SAMPLE
public static final int COMPRESSION
public static final int PHOTOMETRIC_INTERPRETATION
public static final int THRESHHOLDING
public static final int CELL_WIDTH
public static final int CELL_LENGTH
public static final int FILL_ORDER
public static final int DOCUMENT_NAME
public static final int IMAGE_DESCRIPTION
public static final int MAKE
public static final int MODEL
public static final int STRIP_OFFSETS
public static final int ORIENTATION
public static final int SAMPLES_PER_PIXEL
public static final int ROWS_PER_STRIP
public static final int STRIP_BYTE_COUNTS
public static final int MIN_SAMPLE_VALUE
public static final int MAX_SAMPLE_VALUE
public static final int X_RESOLUTION
public static final int Y_RESOLUTION
public static final int PLANAR_CONFIGURATION
public static final int PAGE_NAME
public static final int X_POSITION
public static final int Y_POSITION
public static final int FREE_OFFSETS
public static final int FREE_BYTE_COUNTS
public static final int GRAY_RESPONSE_UNIT
public static final int GRAY_RESPONSE_CURVE
public static final int T4_OPTIONS
public static final int T6_OPTIONS
public static final int RESOLUTION_UNIT
public static final int PAGE_NUMBER
public static final int TRANSFER_FUNCTION
public static final int SOFTWARE
public static final int DATE_TIME
public static final int ARTIST
public static final int HOST_COMPUTER
public static final int PREDICTOR
public static final int WHITE_POINT
public static final int PRIMARY_CHROMATICITIES
public static final int COLOR_MAP
public static final int HALFTONE_HINTS
public static final int TILE_WIDTH
public static final int TILE_LENGTH
public static final int TILE_OFFSETS
public static final int TILE_BYTE_COUNTS
public static final int SUB_IFD
public static final int INK_SET
public static final int INK_NAMES
public static final int NUMBER_OF_INKS
public static final int DOT_RANGE
public static final int TARGET_PRINTER
public static final int EXTRA_SAMPLES
public static final int SAMPLE_FORMAT
public static final int S_MIN_SAMPLE_VALUE
public static final int S_MAX_SAMPLE_VALUE
public static final int TRANSFER_RANGE
public static final int JPEG_TABLES
public static final int JPEG_PROC
public static final int JPEG_INTERCHANGE_FORMAT
public static final int JPEG_INTERCHANGE_FORMAT_LENGTH
public static final int JPEG_RESTART_INTERVAL
public static final int JPEG_LOSSLESS_PREDICTORS
public static final int JPEG_POINT_TRANSFORMS
public static final int JPEG_Q_TABLES
public static final int JPEG_DC_TABLES
public static final int JPEG_AC_TABLES
public static final int Y_CB_CR_COEFFICIENTS
public static final int Y_CB_CR_SUB_SAMPLING
public static final int Y_CB_CR_POSITIONING
public static final int REFERENCE_BLACK_WHITE
public static final int COPYRIGHT
public static final int EXIF
public static final int EXPOSURE_TIME
public static final int F_NUMBER
public static final int EXPOSURE_PROGRAM
public static final int SPECTRAL_SENSITIVITY
public static final int ISO_SPEED_RATINGS
public static final int OECF
public static final int EXIF_VERSION
public static final int DATE_TIME_ORIGINAL
public static final int DATE_TIME_DIGITIZED
public static final int COMPONENTS_CONFIGURATION
public static final int COMPRESSED_BITS_PER_PIXEL
public static final int SHUTTER_SPEED_VALUE
public static final int APERTURE_VALUE
public static final int BRIGHTNESS_VALUE
public static final int EXPOSURE_BIAS_VALUE
public static final int MAX_APERTURE_VALUE
public static final int SUBJECT_DISTANCE
public static final int METERING_MODE
public static final int LIGHT_SOURCE
public static final int FLASH
public static final int FOCAL_LENGTH
public static final int MAKER_NOTE
public static final int USER_COMMENT
public static final int SUB_SEC_TIME
public static final int SUB_SEC_TIME_ORIGINAL
public static final int SUB_SEC_TIME_DIGITIZED
public static final int FLASH_PIX_VERSION
public static final int COLOR_SPACE
public static final int PIXEL_X_DIMENSION
public static final int PIXEL_Y_DIMENSION
public static final int RELATED_SOUND_FILE
public static final int FLASH_ENERGY
public static final int SPATIAL_FREQUENCY_RESPONSE
public static final int FOCAL_PLANE_X_RESOLUTION
public static final int FOCAL_PLANE_Y_RESOLUTION
public static final int FOCAL_PLANE_RESOLUTION_UNIT
public static final int SUBJECT_LOCATION
public static final int EXPOSURE_INDEX
public static final int SENSING_METHOD
public static final int FILE_SOURCE
public static final int SCENE_TYPE
public static final int CFA_PATTERN
public static final int CUSTOM_RENDERED
public static final int EXPOSURE_MODE
public static final int WHITE_BALANCE
public static final int DIGITAL_ZOOM_RATIO
public static final int FOCAL_LENGTH_35MM_FILM
public static final int SCENE_CAPTURE_TYPE
public static final int GAIN_CONTROL
public static final int CONTRAST
public static final int SATURATION
public static final int SHARPNESS
public static final int SUBJECT_DISTANCE_RANGE
public IFD()
public IFD(IFD ifd)
public boolean isBigTiff() throws FormatException
FormatException
public boolean isLittleEndian() throws FormatException
FormatException
public java.lang.Object getIFDValue(int tag)
public java.lang.Object getIFDValue(int tag, java.lang.Class checkClass) throws FormatException
FormatException
public long getIFDLongValue(int tag, long defaultValue) throws FormatException
FormatException
public int getIFDIntValue(int tag)
public int getIFDIntValue(int tag, int defaultValue) throws FormatException
FormatException
public TiffRational getIFDRationalValue(int tag) throws FormatException
FormatException
public java.lang.String getIFDStringValue(int tag) throws FormatException
FormatException
public java.lang.String getIFDTextValue(int tag)
public long[] getIFDLongArray(int tag) throws FormatException
FormatException
public int[] getIFDIntArray(int tag) throws FormatException
FormatException
public short[] getIFDShortArray(int tag) throws FormatException
FormatException
public java.lang.String getComment()
public long getTileWidth() throws FormatException
FormatException
public long getTileLength() throws FormatException
FormatException
public long getTilesPerRow() throws FormatException
FormatException
public long getTilesPerColumn() throws FormatException
FormatException
public boolean isTiled() throws FormatException
FormatException
public long getImageWidth() throws FormatException
FormatException
- if there is a problem parsing the IFD metadata.public long getImageLength() throws FormatException
FormatException
- if there is a problem parsing the IFD metadata.public int[] getBitsPerSample() throws FormatException
FormatException
- if there is a problem parsing the IFD metadata.getSamplesPerPixel()
public int getPixelType() throws FormatException
FormatException
- if there is a problem parsing the IFD metadata.getBitsPerSample()
public int[] getBytesPerSample() throws FormatException
FormatException
- if there is a problem parsing the IFD metadata.getSamplesPerPixel()
,
getBitsPerSample()
public int getSamplesPerPixel() throws FormatException
FormatException
- if there is a problem parsing the IFD metadata.public TiffCompression getCompression() throws FormatException
TiffCompression
for more details.FormatException
- if there is a problem parsing the IFD metadata.public PhotoInterp getPhotometricInterpretation() throws FormatException
FormatException
- if there is a problem parsing the IFD metadata.public int getPlanarConfiguration() throws FormatException
FormatException
- if there is a problem parsing the IFD metadata.public long[] getStripOffsets() throws FormatException
FormatException
- if there is a problem parsing the IFD metadata.getStripByteCounts()
,
getRowsPerStrip()
public OnDemandLongArray getOnDemandStripOffsets() throws FormatException
FormatException
public long[] getStripByteCounts() throws FormatException
FormatException
- if there is a problem parsing the IFD metadata.getStripOffsets()
public long[] getRowsPerStrip() throws FormatException
FormatException
- if there is a problem parsing the IFD metadata.public int getResolutionMultiplier()
public double getXResolution() throws FormatException
FormatException
- if there is a problem parsing the IFD metadata.public double getYResolution() throws FormatException
FormatException
- if there is a problem parsing the IFD metadata.public void putIFDValue(int tag, java.lang.Object value)
public void putIFDValue(int tag, short value)
public void putIFDValue(int tag, int value)
public void putIFDValue(int tag, long value)
public void printIFD()
public static java.lang.String getIFDTagName(int tag)
public static java.lang.String getFieldName(int value)
Copyright © 2023 Open Microscopy Environment