com.xinapse.multisliceimage.UNC
Enum UNCPixFormat

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

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

This class represents the pixel formats (data types) that can be used in UNC images.


Enum Constant Summary
BYTE
          UNCPixFormat for unsigned byte (8-bit) pixel values.
COLOR
          UNCPixFormat for colour pixel (16-bit) values.
COLORPACKED
          UNCPixFormat for packed colour (r,g,b,n) (4x8-bit) pixel values.
COMPLEX
          UNCPixFormat for complex float pixel values.
DOUBLE
          UNCPixFormat for double-precision (64-bit) pixel values.
GREY
          UNCPixFormat for grey (aka short 16-bit) pixel values.
LONG
          UNCPixFormat for 32-bit signed int pixel values.
REAL
          UNCPixFormat for floating-point (32-bit) pixel values.
SHORT
          UNCPixFormat for short (16-bit) pixel values.
UNKNOWN
          UNCPixFormat for unknown type pixel values.
USERPACKED
          UNCPixFormat for int (32-bit) pixel values.
 
Method Summary
 int getBytesPerPixel()
          Returns the number of bytes per pixel for this UNCPixFormat.
static UNCPixFormat getInstance(PixelDataType fmt)
          Returns the UNCPixFormat corresponding to a PixelDataType.
 PixelDataType getPixelDataType()
          Returns the PixelDataType corresponding to this UNCPixFormat.
 java.lang.String toString()
          Returns a java.lang.String describing this data format.
static UNCPixFormat valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static UNCPixFormat[] 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 UNCPixFormat UNKNOWN
UNCPixFormat for unknown type pixel values.


BYTE

public static final UNCPixFormat BYTE
UNCPixFormat for unsigned byte (8-bit) pixel values.


SHORT

public static final UNCPixFormat SHORT
UNCPixFormat for short (16-bit) pixel values.


LONG

public static final UNCPixFormat LONG
UNCPixFormat for 32-bit signed int pixel values.


REAL

public static final UNCPixFormat REAL
UNCPixFormat for floating-point (32-bit) pixel values.


COMPLEX

public static final UNCPixFormat COMPLEX
UNCPixFormat for complex float pixel values.


DOUBLE

public static final UNCPixFormat 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

public static final UNCPixFormat GREY
UNCPixFormat for grey (aka short 16-bit) pixel values.


COLOR

public static final UNCPixFormat COLOR
UNCPixFormat for colour pixel (16-bit) values. N.B. This pixel format is unimplemented.


COLORPACKED

public static final UNCPixFormat COLORPACKED
UNCPixFormat for packed colour (r,g,b,n) (4x8-bit) pixel values.


USERPACKED

public static final UNCPixFormat USERPACKED
UNCPixFormat for int (32-bit) pixel values. N.B. This pixel format is unimplemented.

Method Detail

values

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

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

valueOf

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

getBytesPerPixel

public int getBytesPerPixel()
Returns the number of bytes per pixel for this UNCPixFormat.

Returns:
the number of bytes per pixel.

toString

public java.lang.String toString()
Returns a java.lang.String describing this data format.

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

getPixelDataType

public PixelDataType getPixelDataType()
Returns the PixelDataType corresponding to this UNCPixFormat.

Returns:
the PixelDataType corresponding to this UNCPixFormat.

getInstance

public static UNCPixFormat getInstance(PixelDataType fmt)
                                throws UNCException
Returns the UNCPixFormat corresponding to a PixelDataType.

Parameters:
fmt - a PixelDataType corresponding to the returned UNCPixFormat.
Returns:
the UNCPixFormat corresponding to the PixelDataType argument.
Throws:
UNCException - if there is no corresponding UNCPixFormat.


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