com.xinapse.multisliceimage.Analyze
Enum ANZPixFormat

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

public enum ANZPixFormat
extends java.lang.Enum<ANZPixFormat>

This class represents the pixel formats (data types) that can be used in Analyze, and NIFTI (extended Analyze) images.


Enum Constant Summary
BINARY
          ANZPixFormat for binary (1-bit) pixel values.
COMPLEX
          ANZPixFormat for complex (2 x 32-bit float) pixel values.
DOUBLE
          ANZPixFormat for double (64-bit) pixel values.
FLOAT
          ANZPixFormat for float pixel values.
INT
          ANZPixFormat for signed int (32-bit) pixel values.
NIFTI_COMPLEX128
          ANZPixFormat NIFTI double complex (128-bit) pixel values.
NIFTI_COMPLEX256
          ANZPixFormat NIFTI long double complex (256-bit) pixel values.
NIFTI_FLOAT128
          ANZPixFormat NIFTI long double (128-bit) pixel values.
NIFTI_INT64
          ANZPixFormat NIFTI signed long (64-bit) pixel values.
NIFTI_INT8
          ANZPixFormat for NIFTI signed byte (8-bit) pixel values.
NIFTI_UINT16
          ANZPixFormat NIFTI unsigned short (16-bit) pixel values.
NIFTI_UINT32
          ANZPixFormat NIFTI unsigned int (32-bit) pixel values.
NIFTI_UINT64
          ANZPixFormat NIFTI unsigned long (64-bit) pixel values.
RGB
          ANZPixFormat for colour (r,g,b) (3 x 8-bit) pixel values.
SHORT
          ANZPixFormat for short (16-bit) pixel values.
UBYTE
          ANZPixFormat for unsigned byte (8-bit) pixel values.
UNKNOWN
          ANZPixFormat for unknown type pixel values.
 
Method Summary
static ANZPixFormat getInstance(PixelDataType dataType)
          Returns the ANZPixFormat corresponding to a PixelDataType.
 PixelDataType getPixelDataType()
          Returns the PixelDataType corresponding to this ANZPixFormat.
 boolean isAnalyze()
          Indicates whether this is an original Analyze (not NIFTI) ANZPixFormat.
static void main(java.lang.String[] args)
          Run a self-test on the ANZPixFormat class.
 java.lang.String toString()
          Returns a string describing this Analyze or NIFTI (extended Analyze) data format.
static ANZPixFormat valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ANZPixFormat[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

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 Detail

values

public static ANZPixFormat[] 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 (ANZPixFormat c : ANZPixFormat.values())
    System.out.println(c);

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

valueOf

public static ANZPixFormat 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

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 java.lang.String toString()
Returns a string describing this Analyze or NIFTI (extended Analyze) data format.

Overrides:
toString in class java.lang.Enum<ANZPixFormat>
Returns:
a string describing this data format.

main

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

Parameters:
args - ignored.


Copyright 2006-2011 Xinapse Systems Limited. All Rights Reserved.