Enum Class ANZPixFormat
- All Implemented Interfaces:
Serializable
,Comparable<ANZPixFormat>
,Constable
This class represents the pixel formats (data types) that can be used in Analyze, and NIFTI
(extended Analyze) images.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionANZPixFormat for binary (1-bit) pixel values.ANZPixFormat for complex (2 x 32-bit float) pixel values.ANZPixFormat for double (64-bit) pixel values.ANZPixFormat for float pixel values.ANZPixFormat for signed int (32-bit) pixel values.ANZPixFormat NIFTI double complex (128-bit) pixel values.ANZPixFormat NIFTI long double complex (256-bit) pixel values.ANZPixFormat NIFTI long double (128-bit) pixel values.ANZPixFormat NIFTI signed long (64-bit) pixel values.ANZPixFormat for NIFTI signed byte (8-bit) pixel values.ANZPixFormat NIFTI unsigned short (16-bit) pixel values.ANZPixFormat NIFTI unsigned int (32-bit) pixel values.ANZPixFormat NIFTI unsigned long (64-bit) pixel values.ANZPixFormat for colour (r,g,b) (3 x 8-bit) pixel values.ANZPixFormat for short (16-bit) pixel values.ANZPixFormat for unsigned byte (8-bit) pixel values.ANZPixFormat for unknown type pixel values. -
Method Summary
Modifier and TypeMethodDescriptionstatic ANZPixFormat
getInstance
(PixelDataType dataType) Returns theANZPixFormat
corresponding to aPixelDataType
.Returns thePixelDataType
corresponding to thisANZPixFormat
.boolean
Indicates whether this is an original Analyze (not NIFTI) ANZPixFormat.static void
Run a self-test on the ANZPixFormat class.toString()
Returns a string describing this Analyze or NIFTI (extended Analyze) data format.static ANZPixFormat
Returns the enum constant of this class with the specified name.static ANZPixFormat[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
ANZPixFormat for unknown type pixel values. -
BINARY
ANZPixFormat for binary (1-bit) pixel values. -
UBYTE
ANZPixFormat for unsigned byte (8-bit) pixel values. -
SHORT
ANZPixFormat for short (16-bit) pixel values. -
INT
ANZPixFormat for signed int (32-bit) pixel values. -
FLOAT
ANZPixFormat for float pixel values. -
COMPLEX
ANZPixFormat for complex (2 x 32-bit float) pixel values. -
DOUBLE
ANZPixFormat for double (64-bit) pixel values. -
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
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_INT64
ANZPixFormat NIFTI signed long (64-bit) pixel values. -
NIFTI_UINT64
ANZPixFormat NIFTI unsigned long (64-bit) pixel values. -
NIFTI_FLOAT128
ANZPixFormat NIFTI long double (128-bit) pixel values. -
NIFTI_COMPLEX128
ANZPixFormat NIFTI double complex (128-bit) pixel values. -
NIFTI_COMPLEX256
ANZPixFormat NIFTI long double complex (256-bit) pixel values.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getPixelDataType
Returns thePixelDataType
corresponding to thisANZPixFormat
.- Returns:
- the
PixelDataType
corresponding to thisANZPixFormat
.
-
getInstance
Returns theANZPixFormat
corresponding to aPixelDataType
.- Parameters:
dataType
- aPixelDataType
corresponding to the returnedANZPixFormat
.- Returns:
- the
ANZPixFormat
corresponding to thePixelDataType
argument. - Throws:
ANZException
- if there is no correspondingANZPixFormat
.
-
isAnalyze
public boolean isAnalyze()Indicates whether this is an original Analyze (not NIFTI) ANZPixFormat.- Returns:
true
if this is an original Analyze ANZPixFormat.
-
toString
Returns a string describing this Analyze or NIFTI (extended Analyze) data format.- Overrides:
toString
in classEnum<ANZPixFormat>
- Returns:
- a string describing this data format.
-
main
Run a self-test on the ANZPixFormat class.- Parameters:
args
- ignored.
-