Enum Class IFDType

java.lang.Object
java.lang.Enum<IFDType>
loci.formats.tiff.IFDType
All Implemented Interfaces:
Serializable, Comparable<IFDType>, java.lang.constant.Constable, loci.common.enumeration.CodedEnum

public enum IFDType extends Enum<IFDType> implements loci.common.enumeration.CodedEnum
An enumeration of IFD types.
  • Enum Constant Details

    • BYTE

      public static final IFDType BYTE
    • ASCII

      public static final IFDType ASCII
    • SHORT

      public static final IFDType SHORT
    • LONG

      public static final IFDType LONG
    • RATIONAL

      public static final IFDType RATIONAL
    • SBYTE

      public static final IFDType SBYTE
    • UNDEFINED

      public static final IFDType UNDEFINED
    • SSHORT

      public static final IFDType SSHORT
    • SLONG

      public static final IFDType SLONG
    • SRATIONAL

      public static final IFDType SRATIONAL
    • FLOAT

      public static final IFDType FLOAT
    • DOUBLE

      public static final IFDType DOUBLE
    • IFD

      public static final IFDType IFD
    • LONG8

      public static final IFDType LONG8
    • SLONG8

      public static final IFDType SLONG8
    • IFD8

      public static final IFDType IFD8
  • Field Details

    • code

      private int code
      Code for the IFD type in the actual TIFF file.
    • bytesPerElement

      private int bytesPerElement
      Number of bytes per element of this type.
    • lookup

      private static final Map<Integer,IFDType> lookup
  • Constructor Details

    • IFDType

      private IFDType(int code, int bytesPerElement)
      Default constructor.
      Parameters:
      code - Integer "code" for the IFD type.
      bytesPerElement - Number of bytes per element.
  • Method Details

    • values

      public static IFDType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IFDType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      public static IFDType get(int code)
      Retrieves a IFD type by reverse lookup of its "code".
      Parameters:
      code - The code to look up.
      Returns:
      The IFDType instance for the code or null if it does not exist.
    • getCode

      public int getCode()
      Specified by:
      getCode in interface loci.common.enumeration.CodedEnum
    • getBytesPerElement

      public int getBytesPerElement()
      Retrieves the number of bytes per element.
      Returns:
      See above.
    • getType

      public static IFDType getType(Object value, boolean bigTiff) throws FormatException
      Get the type corresponding to the given value.
      Parameters:
      value - IFD value
      bigTiff - true if BigTIFF will be written (impacts long values)
      Returns:
      appropriate IFDType for the given value
      Throws:
      FormatException - if an appropriate IFDType cannot be determined