com.xinapse.multisliceimage
Enum PixelDataType

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

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

An enumeration of the pixel formats (data types) that can be used in MultiSliceImage images. These pixel formats are a super-set of the pixel formats used in sub-classes of MultiSliceImage.
The class contains many methods for performing operations on pixels of these different data types.


Enum Constant Summary
BINARY
          PixelDataType for 1-bit per pixel.
BYTE
          PixelDataType for signed byte.
COLOURPACKED
          PixelDataType for colour packed (UNC).
COMPLEX
          PixelDataType for complex (2x32-bit float in real/imaginary interlaced pairs).
DOUBLE
          PixelDataType for double (64-bit).
DOUBLECOMPLEX
          PixelDataType for double complex (2x64-bit double in real/imaginary interlaced pairs).
DOUBLEDOUBLE
          PixelDataType for double double (128-bit) - not implemented.
DOUBLEDOUBLECOMPLEX
          PixelDataType for double double complex (2x128-bit double in real/imaginary interlaced pairs) - not implemented.
FLOAT
          PixelDataType for float (32-bit).
INT
          PixelDataType for signed int (32-bit).
LONG
          PixelDataType for signed long (64-bit integer).
RGB_BY_PLANE
          PixelDataType for RGB (24-bit) - red plane followed by the green plane followed by the blue plane (non-interlaced).
RGB_INTERLACED
          PixelDataType for RGB (24-bit) with one red value followed by one blue value followed by one green value, etc.
SHORT
          PixelDataType for signed short (16-bit).
UBYTE
          PixelDataType for unsigned byte.
UINT
          PixelDataType for unsigned int (32-bit).
ULONG
          PixelDataType for unsigned long (64-bit integer).
UNDEFINED
          PixelDataType for a type that hasn't been set.
USHORT
          PixelDataType for signed short (16-bit).
 
Method Summary
 java.lang.Object coerce(java.lang.Object primitiveValues, PixelDataType toType, boolean clipIfNecessary)
          Coerce pixels of this PixelDataType to a new PixelDataType.
 java.lang.Object coerce(java.lang.Object primitiveValues, PixelDataType toType, ComplexMode complexMode, boolean clipIfNecessary)
          Coerce pixels of this PixelDataType to a new PixelDataType.
 java.lang.Object coerce(java.lang.Object primitiveValues, PixelDataType toType, int pixStart, int nPixels, ComplexMode complexMode, boolean clipIfNecessary)
          Coerce pixels of this PixelDataType to a new PixelDataType.
 java.lang.Object copyPixels(java.lang.Object array)
          Copies the pixel samples to a new array of the correct type for this type of pixel.
 java.lang.Object copyPixels(java.lang.Object sourceArray, int pixelOffset, java.lang.Object dstArray)
          Copies the pixel samples to an array of the correct type for this type of pixel.
 java.lang.Object copyPixels(java.lang.Object sourceArray, java.lang.Object dstArray)
          Copies the pixel samples to an array of the correct type for this type of pixel.
 java.lang.Object copyPixels(java.lang.Object sourceArray, java.lang.Object dstArray, int pixelOffset)
          Copies the pixel samples to an array of the correct type for this type of pixel.
 void flipX(java.lang.Object pixArray, int nCols, int nRows)
          Flips an array of pixels in-place about the x-axis (ie, flips top to bottom).
 void flipY(java.lang.Object pixArray, int nCols)
          Flips an array of pixels in-place about the y-axis (ie flips left-right).
 int getArrayElementsPerPixel()
          Returns the number of array elements of a primitive type needed to store a single pixel value.
 int getBitsPerPixel()
          Returns the number of bits used to store one pixel for this data type.
 int getNPixels(java.lang.Object array)
          Returns the number of pixels in the supplied array of pixel samples.
 java.lang.Object getPixels(java.lang.Object sourceArray, int nPixels)
          Gets an array of pixel samples, large enough to hold a specified number of pixels.
 float[] getPixelsAsFloat(java.lang.Object array)
          Returns a set of pixel samples as an array of float values.
 float[] getPixelsAsFloat(java.lang.Object array, int pixStart, int nPixels)
          Returns a set of pixel samples as an array of float values.
 double getRangeMax()
          Returns the maximum value that a pixel of this PixelDataType can take.
 double getRangeMin()
          Returns the minimum value that a pixel of this PixelDataType can take.
 double getValue(java.lang.Object array, int index)
          Gets a single pixel value from an array of pixels.
 boolean isColourType()
          Tests whether this PixelDataType specifies explicitly the red,green,blue colour components to display, rather than needing a ColourMapping to display.
 boolean isComplex()
          Returns true if this PixelDataType is a complex (real/imaginary) data type.
 boolean isIntegerType()
          Tests whether a sample of this PixelDataType can be represented by a single int value (Note: not integer).
 void scale(java.lang.Object pixels, double scaleFactor)
          Scale pixel intensities "in-place".
 void scale(java.lang.Object pixels, double scaleFactor, int pixStart, int nPixels)
          Scale pixel intensities "in-place".
 void setPixels(java.lang.Object sourceArray, java.lang.Object dstArray)
          Sets the values of an array of the pixel samples, copying the values from another array.
 void setValue(java.lang.Object array, int index, double value)
          Sets a single pixel value in an array of pixels to the given value.
static short toLuminance(byte red, byte green, byte blue)
          Converts three (unsigned) byte values, representing the red, green and blue components of a colour to a luminance.
 java.lang.String toString()
          Returns a String describing this PixelDataType.
 void transpose(java.lang.Object pixArray, int nCols, int nRows)
          Transposes (slice-by-slice) an array of pixels in-place (ie flips top-right to bottom-left).
static PixelDataType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PixelDataType[] 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

UNDEFINED

public static final PixelDataType UNDEFINED
PixelDataType for a type that hasn't been set.


BINARY

public static final PixelDataType BINARY
PixelDataType for 1-bit per pixel.


BYTE

public static final PixelDataType BYTE
PixelDataType for signed byte.


UBYTE

public static final PixelDataType UBYTE
PixelDataType for unsigned byte.


SHORT

public static final PixelDataType SHORT
PixelDataType for signed short (16-bit).


USHORT

public static final PixelDataType USHORT
PixelDataType for signed short (16-bit).


INT

public static final PixelDataType INT
PixelDataType for signed int (32-bit).


UINT

public static final PixelDataType UINT
PixelDataType for unsigned int (32-bit).


FLOAT

public static final PixelDataType FLOAT
PixelDataType for float (32-bit).


DOUBLE

public static final PixelDataType DOUBLE
PixelDataType for double (64-bit).


COMPLEX

public static final PixelDataType COMPLEX
PixelDataType for complex (2x32-bit float in real/imaginary interlaced pairs).


COLOURPACKED

public static final PixelDataType COLOURPACKED
PixelDataType for colour packed (UNC).


RGB_BY_PLANE

public static final PixelDataType RGB_BY_PLANE
PixelDataType for RGB (24-bit) - red plane followed by the green plane followed by the blue plane (non-interlaced).


RGB_INTERLACED

public static final PixelDataType RGB_INTERLACED
PixelDataType for RGB (24-bit) with one red value followed by one blue value followed by one green value, etc. (interlaced).


LONG

public static final PixelDataType LONG
PixelDataType for signed long (64-bit integer).


ULONG

public static final PixelDataType ULONG
PixelDataType for unsigned long (64-bit integer).


DOUBLECOMPLEX

public static final PixelDataType DOUBLECOMPLEX
PixelDataType for double complex (2x64-bit double in real/imaginary interlaced pairs).


DOUBLEDOUBLE

public static final PixelDataType DOUBLEDOUBLE
PixelDataType for double double (128-bit) - not implemented.


DOUBLEDOUBLECOMPLEX

public static final PixelDataType DOUBLEDOUBLECOMPLEX
PixelDataType for double double complex (2x128-bit double in real/imaginary interlaced pairs) - not implemented.

Method Detail

values

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

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

valueOf

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

getRangeMin

public double getRangeMin()
Returns the minimum value that a pixel of this PixelDataType can take. In the case of PixelDataType that have more than one primitive data element per pixel, (e.g., RGB_BY_PLANE, COMPLEX etc.) this method returns the minimum value for one of the data elements.

Returns:
the minimum value that a pixel can take.

getRangeMax

public double getRangeMax()
Returns the maximum value that a pixel of this PixelDataType can take. In the case of PixelDataType that have more than one primitive data element per pixel, (e.g., RGB_BY_PLANE, COMPLEX etc.) this method returns the maximum value for one of the primitive data elements.

Returns:
the maximum value that a pixel can take.

isColourType

public boolean isColourType()
Tests whether this PixelDataType specifies explicitly the red,green,blue colour components to display, rather than needing a ColourMapping to display.

Returns:
true if this PixelDataType specifies the red,green,blue colour components; false otherwise.

isIntegerType

public boolean isIntegerType()
Tests whether a sample of this PixelDataType can be represented by a single int value (Note: not integer). UINT, LONG and ULONG cannot, in general, be represented by an int.

Returns:
true if this PixelDataType can be represented by a single integer value; false otherwise.

toString

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

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

getBitsPerPixel

public int getBitsPerPixel()
Returns the number of bits used to store one pixel for this data type.

Returns:
the number of bits used to store one pixel of this data type.

getArrayElementsPerPixel

public int getArrayElementsPerPixel()
Returns the number of array elements of a primitive type needed to store a single pixel value. For PixelDataType.BINARY, it returns 1.

Returns:
the number of array elements of a primitive type needed to store a single pixel value of this data type.

isComplex

public boolean isComplex()
Returns true if this PixelDataType is a complex (real/imaginary) data type.

Returns:
true if this is a complex data type; false otherwise.

getNPixels

public int getNPixels(java.lang.Object array)
               throws java.lang.IllegalArgumentException
Returns the number of pixels in the supplied array of pixel samples. The number of pixels is the number of primitive array elements divided by the number of samples per pixel.

Returns:
the number of pixels in the supplied array of pixel samples.
Throws:
java.lang.IllegalArgumentException - if the PixelDataType is not supported, or if the supplied array is not of the correct type for this PixelDataType.

getPixels

public java.lang.Object getPixels(java.lang.Object sourceArray,
                                  int nPixels)
                           throws MultiSliceImageException
Gets an array of pixel samples, large enough to hold a specified number of pixels. If the source array is null, a new array is created. Otherwise the sourceArray is returned.

Parameters:
sourceArray - the array of pixel samples to be re-used, if possible.
nPixels - the number of pixels requested.
Returns:
either sourceArray (if it is reusable) or a new array of the correct type for this PixelDataType, just long enough to hold the requested number of pixels.
Throws:
MultiSliceImageException - if the PixelDataType is not supported, or the sourceArray is of the wrong data type, or is not of the correct size to hold the requested number of pixels.

copyPixels

public java.lang.Object copyPixels(java.lang.Object array)
                            throws MultiSliceImageException
Copies the pixel samples to a new array of the correct type for this type of pixel.

Parameters:
array - the array of pixel samples to be copied.
Returns:
a copy of the array of supplied pixel samples.
Throws:
MultiSliceImageException - if the PixelDataType is not supported, or if the supplied array is not of the correct type for this PixelDataType.

copyPixels

public java.lang.Object copyPixels(java.lang.Object sourceArray,
                                   java.lang.Object dstArray)
                            throws MultiSliceImageException
Copies the pixel samples to an array of the correct type for this type of pixel.

Parameters:
sourceArray - the array of pixel samples to be copied.
dstArray - the array into which the pixel samples will be copied. If dstArray is null, or if dstArray is not of the correct type for this PixelDataType, or if it is of the wrong length, then a new array will be created.
Returns:
a copy of the array of supplied pixel samples. If dstArray is null, or if dstArray is not of the correct type for this PixelDataType, or if it is of the wrong length, then a new array will be returned; otherwise dstArray is returned.
Throws:
MultiSliceImageException - if the PixelDataType is not supported, or if the supplied array to be copied is not of the correct type for this PixelDataType.

copyPixels

public java.lang.Object copyPixels(java.lang.Object sourceArray,
                                   int pixelOffset,
                                   java.lang.Object dstArray)
                            throws MultiSliceImageException
Copies the pixel samples to an array of the correct type for this type of pixel. The number of pixels copied is determined by the size of dstArray.

Parameters:
sourceArray - the array of pixel samples to be copied.
pixelOffset - an offset (in pixels) into the sourceArray from which pixel values are copied. Copying will start from a point pixelOffset into the array (of pixels).
dstArray - the array into which the pixel samples will be copied. The number of pixels copied is determined by the length of this array.
Returns:
dstArray containing a copy of the array of supplied pixel samples.
Throws:
MultiSliceImageException - if the PixelDataType is not supported, or if the supplied array to be copied is not of the correct type for this PixelDataType.

copyPixels

public java.lang.Object copyPixels(java.lang.Object sourceArray,
                                   java.lang.Object dstArray,
                                   int pixelOffset)
                            throws MultiSliceImageException
Copies the pixel samples to an array of the correct type for this type of pixel.

Parameters:
sourceArray - the array of pixel samples to be copied.
dstArray - the array into which the pixel samples will be copied. If dstArray is null, or if it is of the wrong length, then a new array will be created.
pixelOffset - an offset (in pixels) into the dstArray into which pixel values are copied. Copying will start at a point pixelOffset into the array.
Returns:
a copy of the array of supplied pixel samples. If dstArray is null, then a new array will be returned; otherwise dstArray is returned.
Throws:
MultiSliceImageException - if the PixelDataType is not supported, or if the supplied array to be copied is not of the correct type for this PixelDataType.

setPixels

public void setPixels(java.lang.Object sourceArray,
                      java.lang.Object dstArray)
               throws MultiSliceImageException
Sets the values of an array of the pixel samples, copying the values from another array. The source and destination array must both be of the same type, and of the same length. The type must be the correct type for this PixelDataType.

Parameters:
sourceArray - an array of pixel values to be copied.
dstArray - an array of pixel data primitives into which the pixel values are to be copied.
Throws:
MultiSliceImageException - if the PixelDataType is not supported.

getPixelsAsFloat

public float[] getPixelsAsFloat(java.lang.Object array)
                         throws MultiSliceImageException
Returns a set of pixel samples as an array of float values. The length of the array returned is the number of pixels.

For pixel data types where the number of samples per pixel is greater than 1, the following coersions take place:

Parameters:
array - the array of pixels values to be returned as an array of float.
Returns:
a copy of the array of supplied pixel samples, with each pixel samples converted to a float.
Throws:
MultiSliceImageException - if the PixelDataType is not supported, or if the supplied array to be copied is not of the correct type for this PixelDataType.

getPixelsAsFloat

public float[] getPixelsAsFloat(java.lang.Object array,
                                int pixStart,
                                int nPixels)
                         throws MultiSliceImageException
Returns a set of pixel samples as an array of float values. The length of the array returned is the number of pixels.

For pixel data types where the number of samples per pixel is greater than 1, the following coersions take place:

Parameters:
array - the array of pixels values to be returned as an array of float.
pixStart - the index of the first pixel in the array of pixels that should be converted.
nPixels - the number of pixels to convert.
Returns:
a copy of the array of supplied pixel samples, with each pixel samples converted to a float.
Throws:
MultiSliceImageException - if the PixelDataType is not supported, or if the supplied array to be copied is not of the correct type for this PixelDataType.

getValue

public double getValue(java.lang.Object array,
                       int index)
                throws MultiSliceImageException
Gets a single pixel value from an array of pixels. The number of array primitives required to hold a pixel value must be unity, so this method does not work for colour or complex pixel types.

Parameters:
array - the array of pixels from within which the pixel value will be gotten.
index - the index (offset) to the pixel value to get.
Throws:
MultiSliceImageException - if the a sample of this PixelDataType is not stored as a single value, or if the supplied array is of the wrong primitive type for this PixelDataType.
java.lang.IndexOutOfBoundsException - if the supplied index is bad.

setValue

public void setValue(java.lang.Object array,
                     int index,
                     double value)
              throws MultiSliceImageException
Sets a single pixel value in an array of pixels to the given value. For colour pixel types, each of the colour channels is set to the supplied value, so that the resulting colour will be monochrome. For complex pixel types, the real component will be set to the value, and the imaginary channel will be set to zero.

Parameters:
array - the array of pixels within which the pixel value will be set.
index - the index (offset) to the pixel value to set.
value - the value to set into the array.
Throws:
MultiSliceImageException - if the a sample of this PixelDataType is not stored as a single value, or if the supplied array is of the wrong type for this PixelDataType.
java.lang.IndexOutOfBoundsException - if the supplied index is bad.

coerce

public java.lang.Object coerce(java.lang.Object primitiveValues,
                               PixelDataType toType,
                               boolean clipIfNecessary)
                        throws java.lang.IllegalArgumentException
Coerce pixels of this PixelDataType to a new PixelDataType.

When a colour (R,G,B) data type is coerced to a non-colour data type, the new data type contains the luminance values of the colours, where the luminance is (0.299*red) + (0.587*green) + (0.114*blue). When a non-colour data type is coerced to a colour data types, the colours will always be grey.

If this is a complex data type, then ComplexMode.MAGNITUDE is used in the coersion.

Parameters:
primitiveValues - the set of primitive values that are the pixel values to coerce.
toType - the new PixelDataType of the coerced pixels.
clipIfNecessary - a flag to indicate whether clipping should be performed if necessary. If clipIfNecessary is false, then an InvalidArgumentException will be thrown should any of the pixels to be coerced have a value outside the range that can be stored in the toType PixelDataType.
Returns:
a new array of primitive values that are the coerced pixel values.
Throws:
java.lang.IllegalArgumentException - if this PixelDataType cannot be coerced to the toType PixelDataType.

coerce

public java.lang.Object coerce(java.lang.Object primitiveValues,
                               PixelDataType toType,
                               ComplexMode complexMode,
                               boolean clipIfNecessary)
                        throws java.lang.IllegalArgumentException
Coerce pixels of this PixelDataType to a new PixelDataType.

When a colour (R,G,B) data type is coerced to a non-colour data type, the new data type contains the luminance values of the colours, where the luminance is (0.299*red) + (0.587*green) + (0.114*blue). When a non-colour data type is coerced to a colour data types, the colours will always be grey.

When a complex data type is coerced to a real data type, the conversion depends on the argument complexMode. When a non-complex data type is coerced to a complex data type, the imaginary channel will always be zero.

Parameters:
primitiveValues - the set of primitive values that are the pixel values to coerce.
toType - the new PixelDataType of the coerced pixels.
complexMode - the ComplexMode for conversion from complex data types to real data types. Ignored for non-complex data types.
clipIfNecessary - a flag to indicate whether clipping should be performed if necessary. If clipIfNecessary is false, then an InvalidArgumentException will be thrown should any of the pixels to be coerced have a value outside the range that can be stored in the toType PixelDataType.
Returns:
a new array of primitive values that are the coerced pixel values.
Throws:
java.lang.IllegalArgumentException - if this PixelDataType cannot be coerced to the toType PixelDataType.

coerce

public java.lang.Object coerce(java.lang.Object primitiveValues,
                               PixelDataType toType,
                               int pixStart,
                               int nPixels,
                               ComplexMode complexMode,
                               boolean clipIfNecessary)
                        throws java.lang.IllegalArgumentException
Coerce pixels of this PixelDataType to a new PixelDataType.

When a colour (R,G,B) data type is coerced to a non-colour data type, the new data type contains the luminance values of the colours, where the luminance is (0.299*red) + (0.587*green) + (0.114*blue). When a non-colour data type is coerced to a colour data types, the colours will always be grey.

When a complex data type is coerced to a real data type, the conversion depends on the argument complexMode. When a non-complex data type is coerced to a complex data type, the imaginary channel will always be zero.

Parameters:
primitiveValues - the set of primitive values that are the pixel values to coerce.
toType - the new PixelDataType of the coerced pixels.
pixStart - the index of the first pixel in the array of pixels that should be coerced.
nPixels - the number of pixels to coerce.
complexMode - the ComplexMode for conversion from complex data types to real data types. Ignored for non-complex data types.
clipIfNecessary - a flag to indicate whether clipping should be performed if necessary. If clipIfNecessary is false, then an InvalidArgumentException will be thrown should any of the pixels to be coerced have a value outside the range that can be stored in the toType PixelDataType.
Returns:
a new array of primitive values that are the coerced pixel values.
Throws:
java.lang.IllegalArgumentException - if this PixelDataType cannot be coerced to the toType PixelDataType.

scale

public void scale(java.lang.Object pixels,
                  double scaleFactor)
           throws java.lang.IllegalArgumentException
Scale pixel intensities "in-place". If the rescaled pixel intensities do not fit into the data range for this PixelDataType, they will be clipped.

Parameters:
pixels - the set of pixel values to scale.
scaleFactor - the intensity scaling factor.
Throws:
java.lang.IllegalArgumentException - if the intensties cannot be rescaled.

scale

public void scale(java.lang.Object pixels,
                  double scaleFactor,
                  int pixStart,
                  int nPixels)
           throws java.lang.IllegalArgumentException
Scale pixel intensities "in-place". If the rescaled pixel intensities do not fit into the data range for this PixelDataType, they will be clipped.

Parameters:
pixels - the pixel values to scale.
scaleFactor - the intensity scaling factor.
pixStart - the index of the first pixel in the array of pixels that should be rescaled.
nPixels - the number of pixels to rescale.
Throws:
java.lang.IllegalArgumentException - if the intensties cannot be rescaled.

toLuminance

public static short toLuminance(byte red,
                                byte green,
                                byte blue)
Converts three (unsigned) byte values, representing the red, green and blue components of a colour to a luminance.

Parameters:
red - the red component of the colour, as an unsigned byte value, stored in a byte.
green - the green component of the colour, as an unsigned byte value, stored in a byte.
blue - the blue component of the colour, as an unsigned byte value, stored in a byte.
Returns:
the luminance value, which is (0.299*red) + (0.587*green) + (0.114*blue), rounded to a short value.

flipX

public void flipX(java.lang.Object pixArray,
                  int nCols,
                  int nRows)
           throws MultiSliceImageException
Flips an array of pixels in-place about the x-axis (ie, flips top to bottom). The array of pixels is over-written by the flipped pixels.

Parameters:
pixArray - the array of pixels to flip. This array must contain enough pixel samples for a whole number of slices.
nCols - the number of image columns.
nRows - the number of image rows.
Throws:
MultiSliceImageException - if pixels of the supplied type cannot be handled, or if the array does not contain enough pixel samples for a whole number of slices.

flipY

public void flipY(java.lang.Object pixArray,
                  int nCols)
           throws MultiSliceImageException
Flips an array of pixels in-place about the y-axis (ie flips left-right). The array of pixels is over-written by the flipped pixels.

Parameters:
pixArray - the array of pixels to flip. This array must contain enough pixel samples for a whole number of image rows.
nCols - the number of image columns.
Throws:
MultiSliceImageException - if pixels of the supplied type cannot be handled, or if the array does not contain enough pixel samples for a whole number of rows.

transpose

public void transpose(java.lang.Object pixArray,
                      int nCols,
                      int nRows)
               throws MultiSliceImageException
Transposes (slice-by-slice) an array of pixels in-place (ie flips top-right to bottom-left).
N.B. if the number of rows is not equal to the number of columns, then there is a implict interchange of the number of rows and columns in the transposed array.

Parameters:
pixArray - the array of pixels to transpose. This array must contain enough pixel samples for a whole number of image slices.
nCols - the number of image columns.
nRows - the number of image rows.
Throws:
MultiSliceImageException - if pixels of the supplied type cannot be handled, or if the array does not contain enough pixel samples for a whole number of slices.


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