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 ConstantsEnum ConstantDescriptionUNCPixFormatfor unsigned byte (8-bit) pixel values.UNCPixFormatfor colour pixel (16-bit) values.UNCPixFormatfor packed colour (r,g,b,n) (4x8-bit) pixel values.UNCPixFormatfor complex float pixel values.UNCPixFormatfor double-precision (64-bit) pixel values.UNCPixFormatfor grey (aka short 16-bit) pixel values.UNCPixFormatfor 32-bit signed int pixel values.UNCPixFormatfor floating-point (32-bit) pixel values.UNCPixFormatfor short (16-bit) pixel values.UNCPixFormatfor unknown type pixel values.UNCPixFormatfor int (32-bit) pixel values. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of bytes per pixel for thisUNCPixFormat.static UNCPixFormatgetInstance(PixelDataType pixelDataType) Returns theUNCPixFormatcorresponding to aPixelDataType.Returns thePixelDataTypecorresponding to thisUNCPixFormat.toString()Returns aStringdescribing this data format.static UNCPixFormatReturns 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
UNCPixFormatfor unknown type pixel values. -
BYTE
UNCPixFormatfor unsigned byte (8-bit) pixel values. -
SHORT
UNCPixFormatfor short (16-bit) pixel values. -
LONG
UNCPixFormatfor 32-bit signed int pixel values. -
REAL
UNCPixFormatfor floating-point (32-bit) pixel values. -
COMPLEX
UNCPixFormatfor complex float pixel values. -
DOUBLE
UNCPixFormatfor 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
UNCPixFormatfor grey (aka short 16-bit) pixel values. -
COLOR
UNCPixFormatfor colour pixel (16-bit) values. N.B. This pixel format is unimplemented. -
COLORPACKED
UNCPixFormatfor packed colour (r,g,b,n) (4x8-bit) pixel values. -
USERPACKED
UNCPixFormatfor 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 aStringdescribing this data format.- Overrides:
toStringin classEnum<UNCPixFormat>- Returns:
- a
Stringdescribing this data format.
-
getPixelDataType
Returns thePixelDataTypecorresponding to thisUNCPixFormat.- Returns:
- the
PixelDataTypecorresponding to thisUNCPixFormat.
-
getInstance
Returns theUNCPixFormatcorresponding to aPixelDataType.- Parameters:
pixelDataType- aPixelDataTypecorresponding to the returnedUNCPixFormat.- Returns:
- the
UNCPixFormatcorresponding to thePixelDataTypeargument. - Throws:
UNCException- if there is no correspondingUNCPixFormat.
-