com.xinapse.multisliceimage.Analyze
Class Analyze75Image

java.lang.Object
  extended by com.xinapse.multisliceimage.MultiSliceImage
      extended by com.xinapse.multisliceimage.Analyze.ANZImage
          extended by com.xinapse.multisliceimage.Analyze.Analyze75Image
All Implemented Interfaces:
LoadableImage, java.lang.Cloneable

public class Analyze75Image
extends ANZImage

This class is a representation of a multi-dimensional image in the Analyze 7.5 format. An Analayze75Image object can be created from two data sources (one for the header, the other for the image data), or it can be created afresh.

Image data for images loaded from disk remain on disk, and have their pixel loaded as required; image data loaded from streams or created afresh reside in memory.

Both big-endian and little-endian byte ordering are implemented and supported. When reading existing images, the byte order is auto detected from the header file. When existing images are copied or modified, the original byte order is retained. For images newly-created from scratch by this package, the byte ordering is the native byte order.

N.B. The Analyze format requires that for BINARY images, individual slices must begin on a byte boundary. In this implementation, that restriction is removed. If you wish to maintain compatibility with Analyze and other programs that maintain this restriction, please ensure that a multi-slice/multi-frame images have slices with a number of pixels that is a multiple of 8 (bits).


Field Summary
static java.lang.String COMPRESSED_PROPERTY_KEY
          The property value key for setting whether Analyze 7.5 images should be stored compressed, or uncompressed.
static boolean DEFAULT_COMPRESSED
          Whether to store Analyze 7.5 images compressed by default.
 
Fields inherited from class com.xinapse.multisliceimage.Analyze.ANZImage
COMPRESSED_EXTENSION, COMPRESSED_UPPERCASE_EXTENSION, EXTENSION, UPPERCASE_EXTENSION
 
Fields inherited from class com.xinapse.multisliceimage.MultiSliceImage
AUDIT_TRAIL_ACTION_TEXT, BIRTH_DATE_NAME, COLOUR_MAPPING_NAME, DEFAULT_IMAGE_CLASS, DW_B_MATRIX_NAME, DW_B_VALUE_NAME, DW_GRADIENT_VECTOR_NAME, ECHO_TIME_NAME, FLIP_ANGLE_NAME, FRAME_OF_REFERENCE_UID_NAME, IMAGE_ORIENTATION_PATIENT_NAME, IMAGE_POSITION_PATIENT_NAME, INTENSITY_RESCALE_INTERCEPT_NAME, INTENSITY_RESCALE_SLOPE_NAME, INTENSITY_RESCALE_UNITS_NAME, INVERSION_TIME_NAME, MAXDIM, MODALITY_NAME, mode, PATIENT_ID_NAME, PATIENT_NAME_NAME, PATIENT_POSITION_NAME, pixArray, PIXEL_SPACING_NAME, PIXEL_X_SIZE_NAME, PIXEL_Y_SIZE_NAME, PIXEL_Z_SIZE_NAME, PULSE_SEQUENCE_NAME, randomAccessFile, REPETITION_TIME_NAME, SCAN_DATE_NAME, SCANNING_SEQUENCE_NAME, SEQUENCE_VARIANT_NAME, SLICE_THICKNESS_NAME, TIME_BETWEEN_FRAMES_NAME
 
Constructor Summary
Analyze75Image(Analyze75Header hdr)
          Creates a new in-memory Analyze75Image, using information from an existing Analyze75header.
Analyze75Image(java.io.File f, Analyze75Header header)
          Creates a new disk-based Analyze75Image, using an existing header as a template for the new image.
Analyze75Image(short nCols, short nRows, short nSlices, short nFrames, ANZPixFormat dataType)
          Creates a new in-memory Analyze75Image.
Analyze75Image(java.lang.String filename, Analyze75Header header)
          Creates a new disk-based Analyze75Image, using an existing header as a template for the new image.
Analyze75Image(java.lang.String filename, short nCols, short nRows, short nSlices, short nFrames, ANZPixFormat dataType)
          Creates a new disk-based Analyze75Image.
Analyze75Image(java.lang.String filename, java.lang.String mode)
          Opens an existing Analyze75Image, with pixel data remaining on disk until requested.
 
Method Summary
 void appendAuditInfo(java.lang.String name, java.lang.String value)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
static java.lang.String getCommonName()
          Returns the common name for this type of image.
 float[] getDWBMatrix(int slice)
          This action is not supported by the Analyze file format, so this method always throws a ParameterNotSetException always.
 float getDWbValue(int slice)
          This action is not supported by the Analyze file format, so this method always throws a ParameterNotSetException always.
 javax.vecmath.Vector3f getDWGradientVector(int slice)
          This action is not supported by the Analyze file format, so this method always throws a ParameterNotSetException always.
 float getFlipAngle()
          This action is not supported by the Analyze file format, so this method always throws a ParameterNotSetException always.
 MultiSliceImage getInstance(java.lang.Class cl, int nSlices)
          Creates a new in-memory MultiSliceImage with the MultiSliceImage class given by the argument, possibly changing the number of slices in the image.
 float[] getIntensityRescale()
          Intensity rescaling is not supported by Analyze 7.5 format, so this method always the float[] [1.0f, 0.0f].
 java.lang.Double getMax()
          Returns the maximum pixel intensity in the image.
 java.lang.Double getMin()
          Returns the minimum pixel intensity in the image.
 Modality getModality()
          Modality recording is not supported by the Analyze file format, so this method always returns Modality.UNKNOWN
 byte getOrient()
          Gets the orientation of this Analyze75Image.
 java.util.Date getPatientDoB()
          Patient's Birth Date is not supported by Analyze 7.5 format.
 java.lang.String getPatientID()
          Returns the Patient ID set in the image header.
 java.lang.String getPatientName()
          Patient names are not supported by Analyze 7.5 format.
 PatientPosition getPatientPosition()
          This action is not supported by the Analyze file format, so this method always returns PatientPosition.UNKNOWN;
static boolean getPreferredCompressed()
          Returns the user's preference about whether Analyze 7.5 images should be stored compressed.
static PreviewIcon getPreviewIcon(java.io.File f)
          Returns the PreviewIcon for an Analyze75Image header, or null if the supplied File does not represent an Analyze 7.5 image header.
 java.lang.String getPulseSequence()
          Pulse sequence names are not supported by Analyze 7.5 for,at.
 java.lang.String getRescaleUnits()
          Specifies the output units of Intensity Rescale Slope and Intensity Rescale Intercept, retrieved by getIntensityRescale().
 java.util.Date getScanDate()
          Scan dates are not supported by Analyze 7.5 format.
 PulseSequenceType getScanningSequence()
          Scan sequences are not supported by Analyze 7.5 format.
 float getScanTE()
          This action is not supported by the Analyze file format, so this method always throws a ParameterNotSetException.
 float getScanTE(int slice)
          This action is not supported by the Analyze file format, so this method always throws a ParameterNotSetException.
 float getScanTI()
          This action is not supported by the Analyze 7.5 format, so this method always throws a ParameterNotSetException.
 float getScanTR()
          This action is not supported by the Analyze 7.5 format, so this method always throws a ParameterNotSetException.
 PulseSequenceVariant getSequenceVariant()
          Scan sequence variants are not supported by Analyze 7.5 format.
 java.lang.String getSimpleName()
          Returns the simple name for this type of image - the String that should be seen by the users to identify this type of image.
 float getSliceThickness()
          This action is not supported by the Analyze file format, so this method always throws ParameterNotSetException
 boolean isFlipped()
          Returns true if this Analyze75Image is flipped.
static void main(java.lang.String[] args)
          Run the self-test for the Analyze75Image class.
static void savePreferredCompressed(boolean compressed)
          Sets the user's preference about whether Analyze 7.5 images should be stored compressed.
 void setDWBMatrix(float[] bMatrix, int slice)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setDWbValue(float bValue, int slice)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setDWGradientVector(javax.vecmath.Vector3f gradVec, int slice)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setFlipAngle(float flipAngle)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setImageOrientationPatient(javax.vecmath.Vector3f[] dirCos, int slice)
          This action is not supported by the Analyze 7.5 file format, so this method has no effect.
 void setImagePositionPatient(javax.vecmath.Point3f position, int slice)
          This action is not supported by the Analyze 7.5 file format, so this method has no effect.
 void setIntensityRescale(float[] rescale)
          Intensity rescaling is not supported by Analyze 7.5 format, so this method always throws a MultiSliceImageException.
 void setModality(Modality modality)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setOrient(byte orient)
          Sets the orientation of this Analyze75Image.
 void setPatientDoB(java.util.Date patientDoB)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setPatientID(java.lang.String patientID)
          Sets the patient ID for this image.
 void setPatientName(java.lang.String patientName)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setPatientPosition(PatientPosition position)
          This action is not supported by the Analyze file format, so this method does nothing.
 void setPulseSequence(java.lang.String seqName)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setRescaleUnits(java.lang.String unitsString)
          This action is not supported by the Analyze file format, so this method does nothing.
 void setScanDate(java.util.Date scanDate)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setScanningSequence(PulseSequenceType seq)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setScanTE(float TE)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setScanTE(float TE, int slice)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setScanTI(float TI)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setScanTR(float TR)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setSequenceVariant(PulseSequenceVariant seqVar)
          This action is not supported by Analyze 7.5 format, so this method does nothing.
 void setSliceThickness(float thickness)
          This action is not supported by the Analyze file format, so this method does nothing.
 
Methods inherited from class com.xinapse.multisliceimage.Analyze.ANZImage
clone, close, getByteOrder, getDataType, getDescription, getDescription, getDims, getFileDataOffset, getHeader, getHTMLDescription, getHTMLDescription, getImageOrientationPatient, getImageOrientationPatient, getImagePositionPatient, getImagePositionPatient, getIntensityRescale, getNativeColourMapping, getNCols, getNDim, getNFrames, getNRows, getNSlices, getPixelDataType, getPixelXSize, getPixelYSize, getPixelZSize, getTimeBetweenFrames, getTitle, getTotalNSlices, imageExists, isCompressed, isOpen, setDBName, setDescription, setImageOrientationPositionPatient, setIntensityRescale, setMinMax, setNativeColourMapping, setPixelSpacing, setPixelXSize, setPixelYSize, setPixelZSize, setTimeBetweenFrames, setTitle, toString, write, write
 
Methods inherited from class com.xinapse.multisliceimage.MultiSliceImage
autoResample, checkMinMax, crop, deleteImage, exists, export, export, export, getClasses, getDateFormat, getFrameOfReferenceUID, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getMostLikePlane, getNPixels, getPix, getPix, getPix, getPix, getPix, getPreferredImageClass, getPreview, getROIs, getScanDateFormat, getSlice, getSlice, getSliceDim, getSuggestedFileName, isImage, isModified, pad, parseMultiValuedString, putPix, putPix, putPix, putPix, putSlice, reorient, reorientRadiological, reSample, reSample, savePreferredImageClass, set3DBlockParameters, setMinMax, setModified, setOrientationPositionRadiological, setSuggestedFileName, toBufferedImage
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMPRESSED_PROPERTY_KEY

public static final java.lang.String COMPRESSED_PROPERTY_KEY
The property value key for setting whether Analyze 7.5 images should be stored compressed, or uncompressed.

See Also:
Constant Field Values

DEFAULT_COMPRESSED

public static final boolean DEFAULT_COMPRESSED
Whether to store Analyze 7.5 images compressed by default.

See Also:
Constant Field Values
Constructor Detail

Analyze75Image

public Analyze75Image(short nCols,
                      short nRows,
                      short nSlices,
                      short nFrames,
                      ANZPixFormat dataType)
               throws ANZException
Creates a new in-memory Analyze75Image. This image exists in memory, and will only be written with an explicit write() method call.

Parameters:
nCols - the number of columns in the image x-direction.
nRows - the number of rows in the image y-direction.
nSlices - the number of slice in the image.
nFrames - the number of frames (time points) in the image.
dataType - the ANZPixFormat for the image. If dataType is not one of the original Analyze 7.5 pixel formats, then an ANZException is thrown.
Throws:
ANZException - if the image cannot be created.

Analyze75Image

public Analyze75Image(Analyze75Header hdr)
               throws ANZException
Creates a new in-memory Analyze75Image, using information from an existing Analyze75header. This image exists in memory, and will only be written with an explicit write() method call. The supplied Analyze75Header object is cloned and can therefore be re-used.

Parameters:
hdr - the Analyze75Header that will be used for dimensional information etc.
Throws:
ANZException

Analyze75Image

public Analyze75Image(java.lang.String filename,
                      short nCols,
                      short nRows,
                      short nSlices,
                      short nFrames,
                      ANZPixFormat dataType)
               throws java.io.IOException,
                      ANZException
Creates a new disk-based Analyze75Image. After manipulation, a call to the close() method is necessary for any changes to the header to be reflected on disk.

Parameters:
filename - the root of the Analyze file name (i.e. without the ".img" or ".hdr" extension). If the filename does have an extension, this this will be handled.
nCols - the number of columns in the image x-direction.
nRows - the number of rows in the image y-direction.
nSlices - the number of slice in the image.
nFrames - the number of frames (time points) in the image.
dataType - the ANZPixFormat for the image. If dataType is not one of the original Analyze 7.5 pixel formats, then an ANZException is thrown.
Throws:
ANZException - if the Analyze75Image cannot be instantiated.
java.io.IOException - if an I/O error occurs.

Analyze75Image

public Analyze75Image(java.io.File f,
                      Analyze75Header header)
               throws java.io.IOException,
                      ANZException
Creates a new disk-based Analyze75Image, using an existing header as a template for the new image. After manipulation, a call to the close() method is necessary for any changes to the header to be reflected on disk.

Parameters:
f - the File object that will form the root of the Analyze file name (i.e. without the ".img" or ".hdr" extension). If f's name does have an extension, this this will be handled.
header - the Analyze75Header to use as the template.
Throws:
ANZException - if the new image cannot be created on disk.
java.io.IOException - if an I/O error occurs.

Analyze75Image

public Analyze75Image(java.lang.String filename,
                      Analyze75Header header)
               throws ANZException,
                      java.io.IOException
Creates a new disk-based Analyze75Image, using an existing header as a template for the new image. After manipulation, a call to the close() method is necessary for any changes to the header to be reflected on disk.

Parameters:
filename - the root of the Analyze file name (i.e. without the ".img" or ".hdr" extension). If the filename does have an extension, this this will be handled.
header - the Analyze75Header to use as the template.
Throws:
ANZException - if the new image cannot be created.
java.io.IOException - if an I/O error occurs.

Analyze75Image

public Analyze75Image(java.lang.String filename,
                      java.lang.String mode)
               throws MultiSliceImageException,
                      java.io.IOException,
                      java.io.FileNotFoundException
Opens an existing Analyze75Image, with pixel data remaining on disk until requested.

Parameters:
filename - the name of the image file.
mode - the open mode. Can be either "r" (read-only) or "rw" (read-write).
Throws:
MultiSliceImageException - if the image cannot be opened or loaded, or if mode is invalid.
java.io.FileNotFoundException - if the image file doesn't exist.
java.io.IOException - if an I/O error occurs.
Method Detail

getPreferredCompressed

public static boolean getPreferredCompressed()
Returns the user's preference about whether Analyze 7.5 images should be stored compressed.

If the system property "analyze.compressed" exists, and the property value is either "true" or "false", then the user's preference is overridden by the property value.

Returns:
true if the user prefers to store Analyze 7.5 images compressed; false otherwise.

savePreferredCompressed

public static void savePreferredCompressed(boolean compressed)
Sets the user's preference about whether Analyze 7.5 images should be stored compressed.

Parameters:
compressed - true if the user prefers to store Analyze 7.5 images compressed.

getInstance

public MultiSliceImage getInstance(java.lang.Class cl,
                                   int nSlices)
                            throws java.io.IOException,
                                   MultiSliceImageException
Description copied from class: MultiSliceImage
Creates a new in-memory MultiSliceImage with the MultiSliceImage class given by the argument, possibly changing the number of slices in the image. If the number of slices requested for the new image is is less than the original, only the first slices will be copied to the new image. If the number of slices requested for the new image is more than the original, the additional slices will be filled with zero pixel values, and the slice-specific information will be empty.

Specified by:
getInstance in class ANZImage
Parameters:
cl - the class of image to be written (e.g. com.xinapse.multisliceimage.UNC.UNCImage.class).
nSlices - the number of slices in the image that is to be written.
Returns:
the new MultiSliceImage that is created.
Throws:
java.io.IOException - if an I/O error occurs.
MultiSliceImageException - if the image cannot be written.

getPreviewIcon

public static PreviewIcon getPreviewIcon(java.io.File f)
Returns the PreviewIcon for an Analyze75Image header, or null if the supplied File does not represent an Analyze 7.5 image header.

Parameters:
f - the File to be tested.
Returns:
PreviewInfo if the File produces an Analyze75Image header; null otherwise.

isFlipped

public boolean isFlipped()
Returns true if this Analyze75Image is flipped.

Returns:
true if this Analyze75Image is flipped, false otherwise.

getOrient

public byte getOrient()
               throws MultiSliceImageException
Gets the orientation of this Analyze75Image.

Returns:
the orientation code, one of:
  • Analyze75Header.ORIENT_AXIAL
  • Analyze75Header.ORIENT_CORONAL
  • Analyze75Header.ORIENT_SAGITTAL
  • Analyze75Header.ORIENT_AXIAL_FLIPPED
  • Analyze75Header.ORIENT_CORONAL_FLIPPED
  • Analyze75Header.ORIENT_SAGITTAL_FLIPPED
Throws:
MultiSliceImageException - if the orientation cannot be gotten.

setImagePositionPatient

public void setImagePositionPatient(javax.vecmath.Point3f position,
                                    int slice)
This action is not supported by the Analyze 7.5 file format, so this method has no effect. All slices are parallel in a block, and the position of individual slices may not be set.

Specified by:
setImagePositionPatient in class MultiSliceImage
Parameters:
position - the position of the first pixel in the volume.
slice - the slice number in the volume.

setImageOrientationPatient

public void setImageOrientationPatient(javax.vecmath.Vector3f[] dirCos,
                                       int slice)
This action is not supported by the Analyze 7.5 file format, so this method has no effect. All slices are parallel in a block, and the position of individual slices may not be set.

Specified by:
setImageOrientationPatient in class MultiSliceImage
Parameters:
dirCos - the direction cosines of the image row, column and (optionally) slice directions respectively in Left,Posterior,Superior (LPS) coordinates.
slice - the slice number in the volume.

getIntensityRescale

public float[] getIntensityRescale()
Intensity rescaling is not supported by Analyze 7.5 format, so this method always the float[] [1.0f, 0.0f].

Returns:
the array [1.0f, 0.0f].

setIntensityRescale

public void setIntensityRescale(float[] rescale)
                         throws MultiSliceImageException
Intensity rescaling is not supported by Analyze 7.5 format, so this method always throws a MultiSliceImageException.

Specified by:
setIntensityRescale in class MultiSliceImage
Parameters:
rescale - ignored.
Throws:
MultiSliceImageException - always.

setRescaleUnits

public void setRescaleUnits(java.lang.String unitsString)
This action is not supported by the Analyze file format, so this method does nothing.

Specified by:
setRescaleUnits in class MultiSliceImage
Parameters:
unitsString - a String describing the physical meaning of the pixel intensity units. If the unitsString is null, future calls to getRescaleUnits() will return the String "arbitrary units".

setOrient

public void setOrient(byte orient)
               throws MultiSliceImageException
Sets the orientation of this Analyze75Image.

Parameters:
orient - the orientation code for the image. Must be one of:
  • Analyze75Header.ORIENT_AXIAL
  • Analyze75Header.ORIENT_CORONAL
  • Analyze75Header.ORIENT_SAGITTAL
  • Analyze75Header.ORIENT_AXIAL_FLIPPED
  • Analyze75Header.ORIENT_CORONAL_FLIPPED
  • Analyze75Header.ORIENT_SAGITTAL_FLIPPED
Throws:
MultiSliceImageException - if the orient is invalid, or if the orientation cannot be set.

appendAuditInfo

public void appendAuditInfo(java.lang.String name,
                            java.lang.String value)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Parameters:
name - the audit information name.
value - the audit information value.

getPatientPosition

public PatientPosition getPatientPosition()
This action is not supported by the Analyze file format, so this method always returns PatientPosition.UNKNOWN;

Returns:
the position in which the patient is lying in the scanning equipment.
Throws:
MultiSliceImageException - always.

setPatientPosition

public void setPatientPosition(PatientPosition position)
This action is not supported by the Analyze file format, so this method does nothing.

Specified by:
setPatientPosition in class MultiSliceImage
Parameters:
position - the position in which the patient is lying in the scanning equipment. e.g. PatientPosition.HFS (head-first supine).

setScanTR

public void setScanTR(float TR)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setScanTR in class MultiSliceImage
Parameters:
TR - the scan repetition time.

setScanTI

public void setScanTI(float TI)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setScanTI in class MultiSliceImage
Parameters:
TI - the scan inversion time.

setScanTE

public void setScanTE(float TE)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setScanTE in class MultiSliceImage
Parameters:
TE - the scan echo time.

setScanTE

public void setScanTE(float TE,
                      int slice)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setScanTE in class MultiSliceImage
Parameters:
TE - the scan echo time.
slice - the slice number for which to set the TE.

setFlipAngle

public void setFlipAngle(float flipAngle)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setFlipAngle in class MultiSliceImage
Parameters:
flipAngle - the scan flip angle.

getSliceThickness

public float getSliceThickness()
                        throws ParameterNotSetException
This action is not supported by the Analyze file format, so this method always throws ParameterNotSetException

Returns:
the slice thickness in mm (but this is never returned).
Throws:
ParameterNotSetException - if the slice thickness is not set, or its value is corrupt.

setSliceThickness

public void setSliceThickness(float thickness)
This action is not supported by the Analyze file format, so this method does nothing.

Specified by:
setSliceThickness in class MultiSliceImage
Parameters:
thickness - the slice thickness in mm.

getScanDate

public java.util.Date getScanDate()
Scan dates are not supported by Analyze 7.5 format.

Returns:
null.

setScanDate

public void setScanDate(java.util.Date scanDate)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setScanDate in class MultiSliceImage
Parameters:
scanDate - the new scan date/time.

getPulseSequence

public java.lang.String getPulseSequence()
                                  throws ParameterNotSetException
Pulse sequence names are not supported by Analyze 7.5 for,at.

Returns:
never.
Throws:
ParameterNotSetException - always.

setPulseSequence

public void setPulseSequence(java.lang.String seqName)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setPulseSequence in class MultiSliceImage
Parameters:
seqName - the new scanning sequence name.

getScanningSequence

public PulseSequenceType getScanningSequence()
                                      throws ParameterNotSetException
Scan sequences are not supported by Analyze 7.5 format.

Returns:
never.
Throws:
ParameterNotSetException - always.

setScanningSequence

public void setScanningSequence(PulseSequenceType seq)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setScanningSequence in class MultiSliceImage
Parameters:
seq - the new scanning sequence name.

getSequenceVariant

public PulseSequenceVariant getSequenceVariant()
                                        throws ParameterNotSetException
Scan sequence variants are not supported by Analyze 7.5 format.

Returns:
never.
Throws:
ParameterNotSetException - always.

setSequenceVariant

public void setSequenceVariant(PulseSequenceVariant seqVar)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setSequenceVariant in class MultiSliceImage
Parameters:
seqVar - the new scanning sequence variant name.

getModality

public Modality getModality()
Modality recording is not supported by the Analyze file format, so this method always returns Modality.UNKNOWN

Specified by:
getModality in interface LoadableImage
Specified by:
getModality in class MultiSliceImage
Returns:
Modality.UNKNOWN.

setModality

public void setModality(Modality modality)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setModality in class MultiSliceImage
Parameters:
modality - the imaging modality.

getPatientName

public java.lang.String getPatientName()
Patient names are not supported by Analyze 7.5 format.

Returns:
null.

getPatientID

public java.lang.String getPatientID()
Returns the Patient ID set in the image header.

Returns:
the Patient ID set in the image header.

getPatientDoB

public java.util.Date getPatientDoB()
Patient's Birth Date is not supported by Analyze 7.5 format.

Returns:
null.

getScanTR

public float getScanTR()
                throws ParameterNotSetException
This action is not supported by the Analyze 7.5 format, so this method always throws a ParameterNotSetException.

Returns:
never.
Throws:
ParameterNotSetException - always.

getScanTI

public float getScanTI()
                throws ParameterNotSetException
This action is not supported by the Analyze 7.5 format, so this method always throws a ParameterNotSetException.

Returns:
never.
Throws:
ParameterNotSetException - always.

getScanTE

public float getScanTE()
                throws ParameterNotSetException
This action is not supported by the Analyze file format, so this method always throws a ParameterNotSetException.

Returns:
the scan TE for this image.
Throws:
ParameterNotSetException - always.

getScanTE

public float getScanTE(int slice)
                throws ParameterNotSetException
This action is not supported by the Analyze file format, so this method always throws a ParameterNotSetException.

Parameters:
slice - the slice number for which to return the echo time.
Returns:
the scan TE for the specified slice of this image.
Throws:
ParameterNotSetException - always.

getFlipAngle

public float getFlipAngle()
                   throws ParameterNotSetException
This action is not supported by the Analyze file format, so this method always throws a ParameterNotSetException always.

Returns:
the excitation pulse flip angle for this image.
Throws:
ParameterNotSetException - always.

getDWbValue

public float getDWbValue(int slice)
                  throws ParameterNotSetException
This action is not supported by the Analyze file format, so this method always throws a ParameterNotSetException always.

Parameters:
slice - the slice number for which to return the b-value.
Returns:
the diffusion-weighting b-value for the specified slice of this image.
Throws:
ParameterNotSetException - always.

setDWbValue

public void setDWbValue(float bValue,
                        int slice)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setDWbValue in class MultiSliceImage
Parameters:
bValue - the diffusion-weighting b-value.
slice - the slice number for which to set the b-value.

getDWGradientVector

public javax.vecmath.Vector3f getDWGradientVector(int slice)
                                           throws ParameterNotSetException
This action is not supported by the Analyze file format, so this method always throws a ParameterNotSetException always.

Parameters:
slice - the slice number for which to return the gradient-vector.
Returns:
the diffusion-weighting gradient-vector for the specified slice of this image.
Throws:
ParameterNotSetException - always.

setDWGradientVector

public void setDWGradientVector(javax.vecmath.Vector3f gradVec,
                                int slice)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setDWGradientVector in class MultiSliceImage
Parameters:
gradVec - the diffusion-weighting gradient vector.
slice - the slice number for which to set the gradient vector.

getDWBMatrix

public float[] getDWBMatrix(int slice)
                     throws ParameterNotSetException
This action is not supported by the Analyze file format, so this method always throws a ParameterNotSetException always.

Parameters:
slice - the slice number for which to get the b-matrix.
Returns:
the diffusion-weighting b-matrix for this image if it is a magnetic resonance image. The 6 unique matrix elements are returned as a float[] with elements in the order bXX, bXY, bXZ, bYY, bYZ, bZZ
Throws:
ParameterNotSetException - always.

setDWBMatrix

public void setDWBMatrix(float[] bMatrix,
                         int slice)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setDWBMatrix in class MultiSliceImage
Parameters:
bMatrix - the diffusion-weighting B-matrix.
slice - the slice number for which to set the B-matrix.

getRescaleUnits

public java.lang.String getRescaleUnits()
Description copied from interface: LoadableImage
Specifies the output units of Intensity Rescale Slope and Intensity Rescale Intercept, retrieved by getIntensityRescale().

Specified by:
getRescaleUnits in interface LoadableImage
Overrides:
getRescaleUnits in class ANZImage
Returns:
a String describing the physical meaning of the pixel intensity units. Returns the String "arbitrary units" if the physical meaning is unknown, or arbitrary.

setPatientName

public void setPatientName(java.lang.String patientName)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setPatientName in class MultiSliceImage
Parameters:
patientName - is ignored.

setPatientID

public void setPatientID(java.lang.String patientID)
Description copied from class: MultiSliceImage
Sets the patient ID for this image. If the new patient ID String is longer than is allowed by the image format, then it is truncated before being applied. No exception occurs if the image format does not support patient ID recording.
N.B. For disk-based images, the changes in the patient ID will not be reflected on disk unless the close() method is called.

Specified by:
setPatientID in class MultiSliceImage
Parameters:
patientID - the new patient ID to be assigned to this image.

setPatientDoB

public void setPatientDoB(java.util.Date patientDoB)
This action is not supported by Analyze 7.5 format, so this method does nothing.

Specified by:
setPatientDoB in class MultiSliceImage
Parameters:
patientDoB - is ignored.

getMin

public java.lang.Double getMin()
                        throws MultiSliceImageException
Description copied from interface: LoadableImage
Returns the minimum pixel intensity in the image.

Specified by:
getMin in interface LoadableImage
Overrides:
getMin in class ANZImage
Returns:
the maximum pixel intensity as a Double, or null if the intensity min hasn't been calculated for this image.
Throws:
MultiSliceImageException

getMax

public java.lang.Double getMax()
                        throws MultiSliceImageException
Description copied from interface: LoadableImage
Returns the maximum pixel intensity in the image.

Specified by:
getMax in interface LoadableImage
Overrides:
getMax in class ANZImage
Returns:
the maximum pixel intensity as a Double, or null if the intensity max hasn't been calculated for this image.
Throws:
MultiSliceImageException

getSimpleName

public java.lang.String getSimpleName()
Description copied from class: MultiSliceImage
Returns the simple name for this type of image - the String that should be seen by the users to identify this type of image.

Specified by:
getSimpleName in class MultiSliceImage
Returns:
a simple name for the image type.

getCommonName

public static java.lang.String getCommonName()
Returns the common name for this type of image.

Returns:
the String "Analyze".

main

public static void main(java.lang.String[] args)
Run the self-test for the Analyze75Image class.

Parameters:
args - a list of images to try to open.


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