Class ANZHeader

java.lang.Object
com.xinapse.multisliceimage.analyze.ANZHeader
Direct Known Subclasses:
Analyze75Header, NIFTIHeader

public abstract class ANZHeader extends Object
An abstract Analyze header representation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The file extension for Analyze header files in lower case form.
    static final String
    The file extension for Analyze header files in upper case form.
    static final String
    The file extension for Analyze header files in lower case form.
    static final int
    The maximum dimensionality of an Analyze image.
    static final String
    The file extension for Analyze header files in upper case form.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns 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.
    void
    Sets the data base name for this Analyze image header.
    void
    setDims(Long... dims)
    Sets the number of samples in each dimension of this Analyze image header.
    void
    setDims(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 Analyze image header.
    void
    setNFrames(short nF)
    Sets the number of frames in this Analyze image header.
    void
    setNRows(short nr)
    Sets the number of rows in this Analyze image header.
    void
    setNSlices(short ns)
    Sets the number of slices in this Analyze image header.
    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.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • EXTENSION

      public static final String EXTENSION
      The file extension for Analyze header files in lower case form.
      See Also:
    • UPPERCASE_EXTENSION

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

      public static final String COMPRESSED_EXTENSION
      The file extension for Analyze header files in lower case form.
      See Also:
    • COMPRESSED_UPPERCASE_EXTENSION

      public static final 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:
  • 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

      public void setDims(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.
    • setDims

      public void setDims(Long... 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 String getDBName()
      Returns the data base name for this Analyze image header.
      Returns:
      a String representing the data base name.
    • setDBName

      public void setDBName(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 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 InvalidImageException
      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

      public String toString()
      Returns the string representation of this Analyze image header.
      Overrides:
      toString in class Object
      Returns:
      a String describing the header.
    • toString

      public 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.