loci.formats.tiff

## Enum PhotoInterp

- java.lang.Object
- - java.lang.Enum<PhotoInterp>
  - - loci.formats.tiff.PhotoInterp

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<PhotoInterp>, loci.common.enumeration.CodedEnum

      public enum PhotoInterp
      extends java.lang.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 Summary

    Enum Constants
    Enum Constant and Description
    `BLACK_IS_ZERO`
    `CFA_ARRAY`
    `CIE_LAB`
    `CMYK`
    `RGB`
    `RGB_PALETTE`
    `TRANSPARENCY_MASK`
    `WHITE_IS_ZERO`
    `Y_CB_CR`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `code` Code for the IFD type in the actual TIFF file.
    `private static java.util.Map<java.lang.Integer,PhotoInterp>` | `lookup`
    `static float` | `LUMA_BLUE`
    `static float` | `LUMA_GREEN`
    `static float` | `LUMA_RED` Default luminance values for YCbCr data.
    `private java.lang.String` | `metadataType` Metadata type of the photometric interpretation.
    `private java.lang.String` | `name` Given name of the photometric interpretation.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static PhotoInterp` | `get(int code)` Retrieves a photometric interpretation by reverse lookup of its "code".
    `int` | `getCode()`
    `java.lang.String` | `getMetadataType()` Retrieves the metadata type of the photometric interpretation.
    `java.lang.String` | `getName()` Retrieves the given name of the photometric interpretation.
    `static PhotoInterp` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static PhotoInterp[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

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

- - ### Enum Constant Detail

    - #### WHITE_IS_ZERO

          public static final PhotoInterp WHITE_IS_ZERO

    - #### BLACK_IS_ZERO

          public static final PhotoInterp BLACK_IS_ZERO

    - #### RGB

          public static final PhotoInterp RGB

    - #### RGB_PALETTE

          public static final PhotoInterp RGB_PALETTE

    - #### TRANSPARENCY_MASK

          public static final PhotoInterp TRANSPARENCY_MASK

    - #### CMYK

          public static final PhotoInterp CMYK

    - #### Y_CB_CR

          public static final PhotoInterp Y_CB_CR

    - #### CIE_LAB

          public static final PhotoInterp CIE_LAB

    - #### CFA_ARRAY

          public static final PhotoInterp CFA_ARRAY

  - ### Field Detail

    - #### LUMA_RED

          public static final float LUMA_RED

      Default luminance values for YCbCr data.
      See Also:
        Constant Field Values

    - #### LUMA_GREEN

          public static final float LUMA_GREEN

      See Also:
        Constant Field Values

    - #### LUMA_BLUE

          public static final float LUMA_BLUE

      See Also:
        Constant Field Values

    - #### code

          private int code

      Code for the IFD type in the actual TIFF file.

    - #### name

          private java.lang.String name

      Given name of the photometric interpretation.

    - #### metadataType

          private java.lang.String metadataType

      Metadata type of the photometric interpretation.

    - #### lookup

          private static final java.util.Map<java.lang.Integer,PhotoInterp> lookup

  - ### Method Detail

    - #### values

          public static PhotoInterp[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (PhotoInterp c : PhotoInterp.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static PhotoInterp valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.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 java.lang.String getName()

      Retrieves the given name of the photometric interpretation.
      Returns:
        See above.

    - #### getMetadataType

          public java.lang.String getMetadataType()

      Retrieves the metadata type of the photometric interpretation.
      Returns:
        See above.

Copyright © 2026 Open Microscopy Environment