Class ANZHeader
java.lang.Object
com.xinapse.multisliceimage.analyze.ANZHeader
- Direct Known Subclasses:
Analyze75Header, NIFTIHeader
An abstract Analyze header representation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe file extension for Analyze header files in lower case form.static final StringThe file extension for Analyze header files in upper case form.static final StringThe file extension for Analyze header files in lower case form.static final intThe maximum dimensionality of an Analyze image.static final StringThe file extension for Analyze header files in upper case form. -
Method Summary
Modifier and TypeMethodDescriptionReturns the data base name for this Analyze image header.Returns the description for this Analyze image header.int[]Gets the glMin and glMax fields for this Analyze image header.voidSets the data base name for this Analyze image header.voidSets the number of samples in each dimension of this Analyze image header.voidSets the number of samples in each dimension of this Analyze image header.voidsetMinMax(int min, int max) Sets the glMin and glMax fields for this Analyze image header.voidsetNCols(short nc) Sets the number of columns in this Analyze image header.voidsetNFrames(short nF) Sets the number of frames in this Analyze image header.voidsetNRows(short nr) Sets the number of rows in this Analyze image header.voidsetNSlices(short ns) Sets the number of slices in this Analyze image header.toString()Returns the string representation of this Analyze image header.toString(boolean html) Returns the string representation of this Analyze image header, with optional presentation in HTML format.
-
Field Details
-
EXTENSION
The file extension for Analyze header files in lower case form.- See Also:
-
UPPERCASE_EXTENSION
The file extension for Analyze header files in upper case form. -
COMPRESSED_EXTENSION
The file extension for Analyze header files in lower case form.- See Also:
-
COMPRESSED_UPPERCASE_EXTENSION
The file extension for Analyze header files in upper case form. -
MAXDIM
public static final int MAXDIMThe maximum dimensionality of an Analyze image.- See Also:
-
-
Method Details
-
setNCols
public void setNCols(short nc) Sets the number of columns in 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 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 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 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
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.
-
setDims
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
Returns the data base name for this Analyze image header.- Returns:
- a String representing the data base name.
-
setDBName
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
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
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:
InvalidImageException- if the values supplied are unsuitable, or the values cannot be set.
-
toString
-
toString
-