Enum Class ANZPixFormat

java.lang.Object
java.lang.Enum<ANZPixFormat>
com.xinapse.multisliceimage.Analyze.ANZPixFormat
All Implemented Interfaces:
Serializable, Comparable<ANZPixFormat>, Constable

public enum ANZPixFormat extends Enum<ANZPixFormat>
This class represents the pixel formats (data types) that can be used in Analyze, and NIFTI (extended Analyze) images.
  • Enum Constant Details

    • UNKNOWN

      public static final ANZPixFormat UNKNOWN
      ANZPixFormat for unknown type pixel values.
    • BINARY

      public static final ANZPixFormat BINARY
      ANZPixFormat for binary (1-bit) pixel values.
    • UBYTE

      public static final ANZPixFormat UBYTE
      ANZPixFormat for unsigned byte (8-bit) pixel values.
    • SHORT

      public static final ANZPixFormat SHORT
      ANZPixFormat for short (16-bit) pixel values.
    • INT

      public static final ANZPixFormat INT
      ANZPixFormat for signed int (32-bit) pixel values.
    • FLOAT

      public static final ANZPixFormat FLOAT
      ANZPixFormat for float pixel values.
    • COMPLEX

      public static final ANZPixFormat COMPLEX
      ANZPixFormat for complex (2 x 32-bit float) pixel values.
    • DOUBLE

      public static final ANZPixFormat DOUBLE
      ANZPixFormat for double (64-bit) pixel values.
    • RGB

      public static final ANZPixFormat RGB
      ANZPixFormat for colour (r,g,b) (3 x 8-bit) pixel values. N.B. the way in which RGB images are stored internally and written differs from standard Analyze format. In this implementation, R, G, and B values are stored "by-plane", as does Analyze. However, in this implementation all red values are stored before the green value, before the blue values. In the Analyze implementation, all red values for one slice are stored before all the green values for that slice, before all the blue values for that slice. The Analyze implementation then moves onto the next slice. These two implementations coincide for single-slice images, but multi-slice or multi-frame images created with this implementation will not be viewable with the Analyze program.
    • NIFTI_INT8

      public static final ANZPixFormat NIFTI_INT8
      ANZPixFormat for NIFTI signed byte (8-bit) pixel values.
    • NIFTI_UINT16

      public static final ANZPixFormat NIFTI_UINT16
      ANZPixFormat NIFTI unsigned short (16-bit) pixel values.
    • NIFTI_UINT32

      public static final ANZPixFormat NIFTI_UINT32
      ANZPixFormat NIFTI unsigned int (32-bit) pixel values.
    • NIFTI_INT64

      public static final ANZPixFormat NIFTI_INT64
      ANZPixFormat NIFTI signed long (64-bit) pixel values.
    • NIFTI_UINT64

      public static final ANZPixFormat NIFTI_UINT64
      ANZPixFormat NIFTI unsigned long (64-bit) pixel values.
    • NIFTI_FLOAT128

      public static final ANZPixFormat NIFTI_FLOAT128
      ANZPixFormat NIFTI long double (128-bit) pixel values.
    • NIFTI_COMPLEX128

      public static final ANZPixFormat NIFTI_COMPLEX128
      ANZPixFormat NIFTI double complex (128-bit) pixel values.
    • NIFTI_COMPLEX256

      public static final ANZPixFormat NIFTI_COMPLEX256
      ANZPixFormat NIFTI long double complex (256-bit) pixel values.
  • Method Details

    • values

      public static ANZPixFormat[] 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 ANZPixFormat 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
    • getPixelDataType

      public PixelDataType getPixelDataType()
      Returns the PixelDataType corresponding to this ANZPixFormat.
      Returns:
      the PixelDataType corresponding to this ANZPixFormat.
    • getInstance

      public static ANZPixFormat getInstance(PixelDataType dataType) throws ANZException
      Returns the ANZPixFormat corresponding to a PixelDataType.
      Parameters:
      dataType - a PixelDataType corresponding to the returned ANZPixFormat.
      Returns:
      the ANZPixFormat corresponding to the PixelDataType argument.
      Throws:
      ANZException - if there is no corresponding ANZPixFormat.
    • isAnalyze

      public boolean isAnalyze()
      Indicates whether this is an original Analyze (not NIFTI) ANZPixFormat.
      Returns:
      true if this is an original Analyze ANZPixFormat.
    • toString

      public String toString()
      Returns a string describing this Analyze or NIFTI (extended Analyze) data format.
      Overrides:
      toString in class Enum<ANZPixFormat>
      Returns:
      a string describing this data format.
    • main

      public static void main(String[] args)
      Run a self-test on the ANZPixFormat class.
      Parameters:
      args - ignored.