com.xinapse.multisliceimage.Analyze
Class ANZHeader

java.lang.Object
  extended by com.xinapse.multisliceimage.Analyze.ANZHeader
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Analyze75Header, NIFTIHeader

public abstract class ANZHeader
extends java.lang.Object
implements java.lang.Cloneable

An abstract Analyze header representation.


Field Summary
static java.lang.String COMPRESSED_EXTENSION
          The file extension for Analyze header files in lower case form.
static java.lang.String COMPRESSED_UPPERCASE_EXTENSION
          The file extension for Analyze header files in upper case form.
static java.lang.String EXTENSION
          The file extension for Analyze header files in lower case form.
static int MAXDIM
          The maximum dimensionality of an Analyze image.
static java.lang.String UPPERCASE_EXTENSION
          The file extension for Analyze header files in upper case form.
protected  java.lang.Float voxOffset
          The offset from the start of the file to start of the image data.
 
Method Summary
 ANZHeader clone()
          Creates a deep copy of this Analyze header.
 java.lang.String getDBName()
          Returns the data base name for this Analyze image header.
 java.lang.String getDescription()
          Returns the description for this Analyze image header.
 int[] getMinMax()
          Gets the glMin and glMax fields for this Analyze image header.
 void setDBName(java.lang.String name)
          Sets the data base name for this Analyze image header.
 void setDims(java.lang.Short... dims)
          Sets the number of samples in each dimension of this Analyze image header.
 void setMinMax(int min, int max)
          Sets the glMin and glMax fields for this Analyze image header.
 void setNCols(short nc)
          Sets the number of columns in this this Analyze image header.
 void setNFrames(short nF)
          Sets the number of frames in this this Analyze image header.
 void setNRows(short nr)
          Sets the number of rows in this this Analyze image header.
 void setNSlices(short ns)
          Sets the number of slices in this this Analyze image header.
 java.lang.String toString()
          Returns the string representation of this Analyze image header.
 java.lang.String toString(boolean html)
          Returns the string representation of this Analyze image header, with optional presentation in HTML format.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXTENSION

public static final java.lang.String EXTENSION
The file extension for Analyze header files in lower case form.

See Also:
Constant Field Values

UPPERCASE_EXTENSION

public static final java.lang.String UPPERCASE_EXTENSION
The file extension for Analyze header files in upper case form.


COMPRESSED_EXTENSION

public static final java.lang.String COMPRESSED_EXTENSION
The file extension for Analyze header files in lower case form.

See Also:
Constant Field Values

COMPRESSED_UPPERCASE_EXTENSION

public static final java.lang.String COMPRESSED_UPPERCASE_EXTENSION
The file extension for Analyze header files in upper case form.


MAXDIM

public static final int MAXDIM
The maximum dimensionality of an Analyze image.

See Also:
Constant Field Values

voxOffset

protected java.lang.Float voxOffset
The offset from the start of the file to start of the image data. A null value means that the voxOffset has not been read/calculated yet. For a disk-based image, once voxOffset has been set, it may not be modified, since the pixel data may have been written to disk starting at voxOffset.

Method Detail

clone

public ANZHeader clone()
Creates a deep copy of this Analyze header.

Overrides:
clone in class java.lang.Object

setNCols

public void setNCols(short nc)
Sets the number of columns in this this Analyze image header. Warning! If this image header is associated with a set of pixel values in an ANZImage object, then manipulating the number of columns in this way will cause errors.

Parameters:
nc - the number of columns.

setNRows

public void setNRows(short nr)
Sets the number of rows in this this Analyze image header. Warning! If this image header is associated with a set of pixel values in an ANZImage object, then manipulating the number of rows in this way will cause errors.

Parameters:
nr - the number of rows.

setNSlices

public void setNSlices(short ns)
Sets the number of slices in this this Analyze image header. Warning! If this image header is associated with a set of pixel values into an ANZImage object, then manipulating the number of slices in this way will cause errors.

Parameters:
ns - the number of slices.

setNFrames

public void setNFrames(short nF)
Sets the number of frames in this this Analyze image header. Warning! If this image header is associated with a set of pixel values in an ANZImage object, then manipulating the number of frames in this way will cause errors.

Parameters:
nF - the number of frames.

setDims

public void setDims(java.lang.Short... dims)
             throws ANZException
Sets the number of samples in each dimension of this Analyze image header. Warning! If this image header is associated with a set of pixel values in an ANZImage object, then manipulating the number of samples in this way will cause errors.

Parameters:
dims - the number of samples in each of the image dimensions. The number of arguments supplied determines the dimensionality of the image.
Throws:
ANZException - if the dimensionality or numbers of samples are illegal.

getDBName

public java.lang.String getDBName()
Returns the data base name for this Analyze image header.

Returns:
a String representing the data base name.

setDBName

public void setDBName(java.lang.String name)
Sets the data base name for this Analyze image header. A suppiled name that is too long will be truncated.

Parameters:
name - a String representing the name data base name.

getDescription

public java.lang.String getDescription()
Returns the description for this Analyze image header.

Returns:
a String representing the description.

getMinMax

public int[] getMinMax()
Gets the glMin and glMax fields for this Analyze image header. If the min / max fields have not been set, then the min / max values will both be zero.

Returns:
an int array of length 2, where the first element is the minimum pixel value in the image, and second element is the maximum pixel value in the image.

setMinMax

public void setMinMax(int min,
                      int max)
               throws MultiSliceImageException
Sets the glMin and glMax fields for this Analyze image header.

Parameters:
min - the minimum pixel value in the image.
max - the maximum pixel value in the image.
Throws:
MultiSliceImageException - if the values supplied are unsuitable, or the values cannot be set.

toString

public java.lang.String toString()
Returns the string representation of this Analyze image header.

Overrides:
toString in class java.lang.Object
Returns:
a String describing the header.

toString

public java.lang.String toString(boolean html)
Returns the string representation of this Analyze image header, with optional presentation in HTML format.

Parameters:
html - if true, then the string will contain HTML tags.
Returns:
a String describing the header, optionally in HTML format.


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