Package com.xinapse.multisliceimage.UNC
Enum Class UNCPixFormat
- All Implemented Interfaces:
Serializable
,Comparable<UNCPixFormat>
,Constable
This class represents the pixel formats (data types) that can be used in UNC images.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionUNCPixFormat
for unsigned byte (8-bit) pixel values.UNCPixFormat
for colour pixel (16-bit) values.UNCPixFormat
for packed colour (r,g,b,n) (4x8-bit) pixel values.UNCPixFormat
for complex float pixel values.UNCPixFormat
for double-precision (64-bit) pixel values.UNCPixFormat
for grey (aka short 16-bit) pixel values.UNCPixFormat
for 32-bit signed int pixel values.UNCPixFormat
for floating-point (32-bit) pixel values.UNCPixFormat
for short (16-bit) pixel values.UNCPixFormat
for unknown type pixel values.UNCPixFormat
for int (32-bit) pixel values. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of bytes per pixel for thisUNCPixFormat
.static UNCPixFormat
getInstance
(PixelDataType pixelDataType) Returns theUNCPixFormat
corresponding to aPixelDataType
.Returns thePixelDataType
corresponding to thisUNCPixFormat
.toString()
Returns aString
describing this data format.static UNCPixFormat
Returns the enum constant of this class with the specified name.static UNCPixFormat[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
UNCPixFormat
for unknown type pixel values. -
BYTE
UNCPixFormat
for unsigned byte (8-bit) pixel values. -
SHORT
UNCPixFormat
for short (16-bit) pixel values. -
LONG
UNCPixFormat
for 32-bit signed int pixel values. -
REAL
UNCPixFormat
for floating-point (32-bit) pixel values. -
COMPLEX
UNCPixFormat
for complex float pixel values. -
DOUBLE
UNCPixFormat
for double-precision (64-bit) pixel values. Note that this is a non-standard pixel data format for UNC images, and that this value is a Xinapse Systems extension. -
GREY
UNCPixFormat
for grey (aka short 16-bit) pixel values. -
COLOR
UNCPixFormat
for colour pixel (16-bit) values. N.B. This pixel format is unimplemented. -
COLORPACKED
UNCPixFormat
for packed colour (r,g,b,n) (4x8-bit) pixel values. -
USERPACKED
UNCPixFormat
for int (32-bit) pixel values. N.B. This pixel format is unimplemented.
-
-
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
-
getBytesPerPixel
public int getBytesPerPixel()Returns the number of bytes per pixel for thisUNCPixFormat
.- Returns:
- the number of bytes per pixel.
-
toString
Returns aString
describing this data format.- Overrides:
toString
in classEnum<UNCPixFormat>
- Returns:
- a
String
describing this data format.
-
getPixelDataType
Returns thePixelDataType
corresponding to thisUNCPixFormat
.- Returns:
- the
PixelDataType
corresponding to thisUNCPixFormat
.
-
getInstance
Returns theUNCPixFormat
corresponding to aPixelDataType
.- Parameters:
pixelDataType
- aPixelDataType
corresponding to the returnedUNCPixFormat
.- Returns:
- the
UNCPixFormat
corresponding to thePixelDataType
argument. - Throws:
UNCException
- if there is no correspondingUNCPixFormat
.
-