Enum Class PhotoInterp

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

public enum PhotoInterp extends Enum<PhotoInterp> implements loci.common.enumeration.CodedEnum
Utility class for working with TIFF photometric interpretations.
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
  • Enum Constant Details

  • Field Details

    • LUMA_RED

      public static final float LUMA_RED
      Default luminance values for YCbCr data.
      See Also:
    • LUMA_GREEN

      public static final float LUMA_GREEN
      See Also:
    • LUMA_BLUE

      public static final float LUMA_BLUE
      See Also:
    • code

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

      private String name
      Given name of the photometric interpretation.
    • metadataType

      private String metadataType
      Metadata type of the photometric interpretation.
    • lookup

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

    • PhotoInterp

      private PhotoInterp(int code, String name, String metadataType)
      Default constructor.
      Parameters:
      code - Integer "code" for the photometric interpretation.
      name - Given name of the photometric interpretation.
      metadataType - Metadata type of the photometric interpretation.
  • Method Details

    • values

      public static PhotoInterp[] 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 PhotoInterp 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 PhotoInterp get(int code)
      Retrieves a photometric interpretation by reverse lookup of its "code".
      Parameters:
      code - The code to look up.
      Returns:
      The PhotoInterp instance for the code or null if it does not exist.
    • getCode

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

      public String getName()
      Retrieves the given name of the photometric interpretation.
      Returns:
      See above.
    • getMetadataType

      public String getMetadataType()
      Retrieves the metadata type of the photometric interpretation.
      Returns:
      See above.