Class Analyze75Image
- All Implemented Interfaces:
ReadableImage
,WritableImage
,AutoCloseable
,Cloneable
Analyze75Image
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, ensure that a multi-slice/multi-frame images have slices with a number of pixels that is a multiple of 8 (bits).
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.xinapse.image.ReadableImage
ReadableImage.Position
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The property value key for setting whether Analyze 7.5 images should be stored compressed, or uncompressed.static final boolean
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, BODY_PART_NAME, COLOUR_MAPPING_NAME, DW_B_MATRIX_NAME, DW_B_VALUE_NAME, DW_GRADIENT_VECTOR_NAME, ECHO_TIME_NAME, ECHO_TRAIN_LENGTH_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, LATERALITY_NAME, MODALITY_NAME, mode, PATIENT_ID_NAME, PATIENT_NAME_NAME, PATIENT_POSITION_NAME, PATIENT_SEX_NAME, pixArray, PIXEL_SPACING_NAME, PIXEL_X_SIZE_NAME, PIXEL_Y_SIZE_NAME, PIXEL_Z_SIZE_NAME, PULSE_SEQUENCE_NAME, randomAccessFile, REPETITION_TIME_NAME, SAT_PULSE_FREQ_OFFSET_PPM_NAME, SCAN_DATE_NAME, SCANNING_SEQUENCE_NAME, SEQUENCE_VARIANT_NAME, SERIES_DESCRIPTION_NAME, SERIES_INSTANCE_UID_NAME, SERIES_NUMBER_NAME, SLICE_THICKNESS_NAME, STORAGE_CLASS_UID_NAME, STUDY_ID_NAME, STUDY_INSTANCE_UID_NAME, TIME_BETWEEN_FRAMES_NAME, TRIGGER_DELAY_NAME
-
Constructor Summary
ConstructorDescriptionCreates an uninitialised instance of an Analyze75Image.Analyze75Image
(short nCols, short nRows, short nSlices, short nFrames, ANZPixFormat dataType) Creates a new in-memoryAnalyze75Image
.Creates a new in-memory Analyze75Image, using information from an existing Analyze75header.Analyze75Image
(ANZPixFormat dataType, Short... dims) Creates a new in-memory Analyze75Image.Analyze75Image
(File f, Analyze75Header header) Creates a new disk-based Analyze75Image, using an existing header as a template for the new image.Analyze75Image
(String fileName, short nCols, short nRows, short nSlices, short nFrames, ANZPixFormat dataType) Creates a new disk-basedAnalyze75Image
.Analyze75Image
(String fileName, Analyze75Header header) Creates a new disk-based Analyze75Image, using an existing header as a template for the new image.Analyze75Image
(String fileName, ANZPixFormat dataType, Short... dims) Creates a new disk-based Analyze75Image.Analyze75Image
(String fileName, String mode) Opens an existingAnalyze75Image
, with pixel data remaining on disk until requested. -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendAuditInfo
(String name, String value) This action is not supported by Analyze 7.5 format, so this method does nothing.static String
Returns the common name for this type of image.This action is not supported by the Analyze file format, so this method always returns null.This action is not supported by the Analyze file format, so this method always returns null.float[]
getFrameDWBMatrix
(int frame) This action is not supported by the Analyze file format, so this method always returnsnull
.getFrameDWbValue
(int frame) This action is not supported by the Analyze file format, so this method always returnsnull
.org.jogamp.vecmath.Vector3f
getFrameDWGradientVector
(int frame) This action is not supported by the Analyze file format, so this method always returnsnull
.getFrameTriggerDelayMS
(int frame) This action is not supported by the Analyze file format, so this method always returnsnull
.Returns the human readable name for this type of image.float[]
Intensity rescaling is not supported by Analyze 7.5 format, so this method always returns float[] [1.0f, 0.0f].getMax()
Returns the maximum pixel intensity in the image.getMin()
Returns the minimum pixel intensity in the image.int
For Analyze 7.5 images, all slices in a block are parallel and evenly-spaced.byte
Gets the orientation of thisAnalyze75Image
.Patient's Birth Date is not supported by Analyze 7.5 format.Returns the Patient ID set in the image header.Patient names are not supported by Analyze 7.5 format.This action is not supported by the Analyze file format, so this method always returns null.com.xinapse.dicom.Sex
Returns the patient sex for this image.static boolean
Returns the user's preference about whether Analyze 7.5 images should be stored compressed.static PreviewIcon
getPreviewIcon
(File f, boolean withImagePreview) Returns thePreviewIcon
for an Analyze75Image header, ornull
if the suppliedFile
does not represent an Analyze 7.5 image header.Pulse sequence names are not supported by Analyze 7.5 for,at.com.xinapse.dicom.RescaleUnits
Returns the output units of Intensity Rescale Slope and Intensity Rescale Intercept, retrieved bygetIntensityRescale()
.This action is not supported by the Analyze file format, so this method always returns null.getSaturationFreqOffsetPPM
(int index) This action is not supported by the Analyze file format, so this method always returns null.Scan dates are not supported by Analyze 7.5 format.Scan sequences are not supported by Analyze 7.5 format.This action is not supported by the Analyze file format, so this method always returns null.getScanTE
(int index) This action is not supported by the Analyze file format, so this method always returns null.This action is not supported by the Analyze 7.5 format, so this method always returns null.This action is not supported by the Analyze 7.5 format, so this method always returns null.Scanning sequence variants are not supported by Analyze 7.5 format.Series descriptions are not supported by Analyze 7.5 format.Series numbers are not supported by Analyze 7.5 format.float[]
getSliceDWBMatrix
(int slice) This action is not supported by the Analyze file format, so this method always returnsnull
.getSliceDWbValue
(int slice) This action is not supported by the Analyze file format, so this method always returnsnull
.org.jogamp.vecmath.Vector3f
getSliceDWGradientVector
(int slice) This action is not supported by the Analyze file format, so this method always returnsnull
.This action is not supported by the Analyze file format, so this method always returns null.getSliceTriggerDelayMS
(int slice) This action is not supported by the Analyze file format, so this method always returnsnull
.Study ID is not supported by Analyze 7.5 format.boolean
Returnstrue
if thisAnalyze75Image
is flipped.static void
Run the self-test for theAnalyze75Image
class.static void
savePreferredCompressed
(boolean compressed) Sets the user's preference about whether Analyze 7.5 images should be stored compressed.void
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
setFrameDWBMatrix
(float[] bMatrix, int frame) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setFrameDWbValue
(float bValue, int frame) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setFrameDWGradientVector
(org.jogamp.vecmath.Vector3f gradVec, int frame) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setFrameTriggerDelayMS
(float delay, int frame) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setImageOrientationPatient
(org.jogamp.vecmath.Vector3f[] orientation, int slice) This action is not supported by the Analyze 7.5 file format, so this method has no effect.void
setImagePositionPatient
(org.jogamp.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 rescaleSlope, float rescaleIntercept) Intensity rescaling is not supported by Analyze 7.5 format, so this method does nothing.void
setOrient
(byte orient) Sets the orientation of thisAnalyze75Image
.void
setPatientDoB
(Date patientDoB) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setPatientID
(String patientID) Sets the patient ID for this image.void
setPatientName
(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
setPatientSex
(com.xinapse.dicom.Sex sex) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setPulseSequence
(String seqName) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setRescaleUnits
(com.xinapse.dicom.RescaleUnits units) This action is not supported by the Analyze file format, so this method does nothing.void
setSaturationFreqOffsetPPM
(Float freqOffset) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setSaturationFreqOffsetPPM
(Float freqOffset, int slice) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setScanDate
(Date scanDate) This action is not supported by Analyze 7.5 format, so this method does nothing.void
This action is not supported by Analyze 7.5 format, so this method does nothing.void
This action is not supported by Analyze 7.5 format, so this method does nothing.void
This action is not supported by Analyze 7.5 format, so this method does nothing.void
This action is not supported by Analyze 7.5 format, so this method does nothing.void
This action is not supported by Analyze 7.5 format, so this method does nothing.void
This action is not supported by Analyze 7.5 format, so this method does nothing.void
setSeriesDescription
(String description) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setSeriesNumber
(Integer seriesNumber) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setSliceDWBMatrix
(float[] bMatrix, int slice) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setSliceDWbValue
(float bValue, int slice) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setSliceDWGradientVector
(org.jogamp.vecmath.Vector3f gradVec, int slice) 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.void
setSliceTriggerDelayMS
(float delay, int slice) This action is not supported by Analyze 7.5 format, so this method does nothing.void
setStudyID
(String studyID) This action is not supported by Analyze 7.5 format, so this method does nothing.boolean
Returnsfalse
because Analyze 7.5 images do not support intensity rescaling.Methods inherited from class com.xinapse.multisliceimage.Analyze.ANZImage
anonymise, close, disposeImageData, getByteOrder, getCopy, getDataType, getDescription, getDescription, getDims, getFileDataOffset, getHeader, getHTMLDescription, getHTMLDescription, getImageOrientationPatient, getImageOrientationPatient, getImagePositionPatient, getImagePositionPatient, getNativeColourMapping, getNativeHeader, getNCols, getNDim, getNFrames, getNRows, getNSlices, getPixelXSize, getPixelYSize, getPixelZSize, getStoredPixelDataType, getTimeBetweenFrames, getTitle, getTotalNSlices, imageExists, isCompressed, isOpen, setDBName, setDescription, setImageOrientationPositionPatient, setMinMax, setNativeColourMapping, setPixelSpacing, setPixelXSize, setPixelYSize, setPixelZSize, setTimeBetweenFrames, setTitle, stripExtension, toString, write
Methods inherited from class com.xinapse.multisliceimage.MultiSliceImage
clone, getBodyPart, getDateFormat, getFrameDim, getFrameOfReferenceUID, getLaterality, getModality, getMostLikePlane, getPix, getPix, getPix, getPix, getPix, getPresentationPixelDataType, getROIs, getScanDateFormat, getSlice, getSlice, getSliceDim, getStoredPix, getSuggestedFileName, isModified, parseMultiValuedString, putPix, putPix, putPix, putPix, putSlice, setBodyPart, setFrameOfReferenceUID, setIntensityRescale, setLaterality, setMinMax, setModality, setModified, setSeriesInstanceUID, setStudyInstanceUID, setSuggestedFileName
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.xinapse.image.ReadableImage
getAffineTransform, getAffineTransform
Methods inherited from interface com.xinapse.image.WritableImage
appendToTitle
-
Field Details
-
COMPRESSED_PROPERTY_KEY
The property value key for setting whether Analyze 7.5 images should be stored compressed, or uncompressed.- See Also:
-
DEFAULT_COMPRESSED
public static final boolean DEFAULT_COMPRESSEDWhether to store Analyze 7.5 images compressed by default.- See Also:
-
-
Constructor Details
-
Analyze75Image
public Analyze75Image()Creates an uninitialised instance of an Analyze75Image. Needed so that newInstance() method can be called on the class. -
Analyze75Image
public Analyze75Image(short nCols, short nRows, short nSlices, short nFrames, ANZPixFormat dataType) throws ANZException Creates a new in-memoryAnalyze75Image
. 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
- theANZPixFormat
for the image. If dataType is not one of the original Analyze 7.5 pixel formats, then anANZException
is thrown.- Throws:
ANZException
- if the image cannot be created.
-
Analyze75Image
Creates a new in-memory Analyze75Image. This image exists in memory, and will only be written with an explicit write() method call.- Parameters:
dataType
- an ANZPixFormat.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 header cannot be created.IOException
- if an I/O error occurs.
-
Analyze75Image
public Analyze75Image(String fileName, ANZPixFormat dataType, Short... dims) throws IOException, ANZException Creates a new disk-based Analyze75Image. After manipulation, a call to the close() method is necessary for any changes to be reflected on disk.- Parameters:
fileName
- the root of the Analyze file name (i.e. without any ".img" ".hdr", ".img.gz" or ".hdr.gz" extension). If the fileName does have an extension, then this will be handled gracefully.dims
- the number of samples in each of the image dimensions. The number of arguments supplied determines the dimensionality of the image.dataType
- an ANZPixFormat.- Throws:
ANZException
- if the header cannot be created.IOException
- if an I/O error occurs.
-
Analyze75Image
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
- if the header supplied is invalid.
-
Analyze75Image
public Analyze75Image(String fileName, short nCols, short nRows, short nSlices, short nFrames, ANZPixFormat dataType) throws IOException, ANZException Creates a new disk-basedAnalyze75Image
. After manipulation, a call to theANZImage.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, then 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
- theANZPixFormat
for the image. If dataType is not one of the original Analyze 7.5 pixel formats, then anANZException
is thrown.- Throws:
ANZException
- if theAnalyze75Image
cannot be instantiated.IOException
- if an I/O error occurs.
-
Analyze75Image
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, then this will be handled.header
- the Analyze75Header to use as the template.- Throws:
ANZException
- if the new image cannot be created on disk.IOException
- if an I/O error occurs.
-
Analyze75Image
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, then this will be handled.header
- the Analyze75Header to use as the template.- Throws:
ANZException
- if the new image cannot be created.IOException
- if an I/O error occurs.
-
Analyze75Image
public Analyze75Image(String fileName, String mode) throws InvalidImageException, IOException, FileNotFoundException Opens an existingAnalyze75Image
, 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:
InvalidImageException
- if the image cannot be opened or loaded, or if mode is invalid.FileNotFoundException
- if the image file doesn't exist.IOException
- if an I/O error occurs.
-
-
Method Details
-
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.
-
getPreviewIcon
Returns thePreviewIcon
for an Analyze75Image header, ornull
if the suppliedFile
does not represent an Analyze 7.5 image header.- Parameters:
f
- theFile
to be tested.withImagePreview
- whether a image preview is to be generated. Generating an image preview will take longer than not generating one.- Returns:
PreviewIcon
if the File produces anAnalyze75Image
header;null
otherwise.
-
isFlipped
public boolean isFlipped()Returnstrue
if thisAnalyze75Image
is flipped.- Returns:
true
if thisAnalyze75Image
is flipped;false
otherwise.
-
getOrient
Gets the orientation of thisAnalyze75Image
.- Returns:
- the orientation code, one of:
- Throws:
InvalidImageException
- if the orientation cannot be gotten.
-
getNSliceLocations
public int getNSliceLocations()For Analyze 7.5 images, all slices in a block are parallel and evenly-spaced. As long as the slice-separation is non-zero, the number of slice locations is equal to the dimensions of the slice dimension.- Specified by:
getNSliceLocations
in interfaceReadableImage
- Returns:
- 1 if the slice separation is zero; the size of the slice dimension otherwise.
-
setImagePositionPatient
public void setImagePositionPatient(org.jogamp.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 interfaceWritableImage
- Parameters:
position
- the position of the first pixel in the volume.slice
- the slice number in the volume.
-
setImageOrientationPatient
public void setImageOrientationPatient(org.jogamp.vecmath.Vector3f[] orientation, 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 interfaceWritableImage
- Specified by:
setImageOrientationPatient
in classMultiSliceImage
- Parameters:
orientation
- 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.
-
supportsIntensityRescaling
public boolean supportsIntensityRescaling()Returnsfalse
because Analyze 7.5 images do not support intensity rescaling.- Specified by:
supportsIntensityRescaling
in interfaceWritableImage
- Returns:
false
.
-
getIntensityRescale
public float[] getIntensityRescale()Intensity rescaling is not supported by Analyze 7.5 format, so this method always returns float[] [1.0f, 0.0f].- Specified by:
getIntensityRescale
in interfaceReadableImage
- Returns:
- the array [1.0f, 0.0f].
-
setIntensityRescale
public void setIntensityRescale(float rescaleSlope, float rescaleIntercept) throws InvalidImageException Intensity rescaling is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setIntensityRescale
in interfaceWritableImage
- Parameters:
rescaleSlope
- ignored.rescaleIntercept
- ignored.- Throws:
InvalidImageException
- if rescaling cannot be set for this image.
-
setRescaleUnits
public void setRescaleUnits(com.xinapse.dicom.RescaleUnits units) This action is not supported by the Analyze file format, so this method does nothing.- Specified by:
setRescaleUnits
in interfaceWritableImage
- Parameters:
units
- ignored.
-
setOrient
Sets the orientation of thisAnalyze75Image
.- Parameters:
orient
- the orientation code for the image. Must be one of:- Throws:
ANZException
- if the orient is invalid, or if the orientation cannot be set.
-
appendAuditInfo
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
appendAuditInfo
in interfaceWritableImage
- Parameters:
name
- the audit information name.value
- the audit information value.
-
getPatientPosition
This action is not supported by the Analyze file format, so this method always returns null.- Specified by:
getPatientPosition
in interfaceReadableImage
- Returns:
- null.
-
setPatientPosition
This action is not supported by the Analyze file format, so this method does nothing.- Specified by:
setPatientPosition
in interfaceWritableImage
- Parameters:
position
- the position in which the patient is lying in the scanning equipment. e.g.PatientPosition.HFS
(head-first supine).
-
setScanTR
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setScanTR
in interfaceWritableImage
- Parameters:
TR
- the scan repetition time.
-
setScanTI
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setScanTI
in interfaceWritableImage
- Parameters:
TI
- the scan inversion time.
-
setScanTE
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setScanTE
in interfaceWritableImage
- Parameters:
TE
- the scan echo time.
-
setScanTE
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setScanTE
in interfaceWritableImage
- Parameters:
TE
- the scan echo time.slice
- the slice number for which to set the TE.
-
setSaturationFreqOffsetPPM
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setSaturationFreqOffsetPPM
in interfaceWritableImage
- Parameters:
freqOffset
- the saturation frequency offset in PPM.
-
setSaturationFreqOffsetPPM
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setSaturationFreqOffsetPPM
in interfaceWritableImage
- Parameters:
freqOffset
- the saturation frequency offset in PPM.slice
- the slice number for which to set the saturation frequency offset.
-
setEchoTrainLength
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setEchoTrainLength
in interfaceWritableImage
- Parameters:
etl
- the echo train length.
-
setFlipAngle
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setFlipAngle
in interfaceWritableImage
- Parameters:
flipAngle
- the scan flip angle.
-
getSliceThickness
This action is not supported by the Analyze file format, so this method always returns null.- Specified by:
getSliceThickness
in interfaceReadableImage
- Returns:
- null;
-
setSliceThickness
This action is not supported by the Analyze file format, so this method does nothing.- Specified by:
setSliceThickness
in interfaceWritableImage
- Parameters:
thickness
- ignored.
-
getScanDate
Scan dates are not supported by Analyze 7.5 format.- Specified by:
getScanDate
in interfaceReadableImage
- Returns:
null
always.
-
setScanDate
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setScanDate
in interfaceWritableImage
- Parameters:
scanDate
- the new scan date/time.
-
getPulseSequence
Pulse sequence names are not supported by Analyze 7.5 for,at.- Specified by:
getPulseSequence
in interfaceReadableImage
- Returns:
null
always.
-
setPulseSequence
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setPulseSequence
in interfaceWritableImage
- Parameters:
seqName
- the new scanning sequence name.
-
getScanningSequence
Scan sequences are not supported by Analyze 7.5 format.- Specified by:
getScanningSequence
in interfaceReadableImage
- Returns:
null
.
-
setScanningSequence
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setScanningSequence
in interfaceWritableImage
- Parameters:
seq
- the new scanning sequence name.
-
getSequenceVariant
Scanning sequence variants are not supported by Analyze 7.5 format.- Specified by:
getSequenceVariant
in interfaceReadableImage
- Returns:
null
.
-
getSeriesDescription
Series descriptions are not supported by Analyze 7.5 format.- Specified by:
getSeriesDescription
in interfaceReadableImage
- Returns:
null
.
-
getSeriesNumber
Series numbers are not supported by Analyze 7.5 format.- Specified by:
getSeriesNumber
in interfaceReadableImage
- Returns:
null
.
-
setSequenceVariant
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setSequenceVariant
in interfaceWritableImage
- Parameters:
seqVar
- the new scanning sequence variant name.
-
setSeriesNumber
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setSeriesNumber
in interfaceWritableImage
- Parameters:
seriesNumber
- the new series number.
-
setSeriesDescription
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setSeriesDescription
in interfaceWritableImage
- Parameters:
description
- the new series description.
-
getPatientName
Patient names are not supported by Analyze 7.5 format.- Specified by:
getPatientName
in interfaceReadableImage
- Returns:
null
.
-
getPatientID
Returns the Patient ID set in the image header.- Specified by:
getPatientID
in interfaceReadableImage
- Returns:
- the Patient ID set in the image header.
-
getPatientDoB
Patient's Birth Date is not supported by Analyze 7.5 format.- Specified by:
getPatientDoB
in interfaceReadableImage
- Returns:
null
.
-
getPatientSex
public com.xinapse.dicom.Sex getPatientSex()Description copied from interface:ReadableImage
Returns the patient sex for this image.- Specified by:
getPatientSex
in interfaceReadableImage
- Returns:
- the patient's sex image, or
Sex.OTHER
if the patient's sex can't be found.
-
getStudyID
Study ID is not supported by Analyze 7.5 format.- Specified by:
getStudyID
in interfaceReadableImage
- Returns:
null
.
-
getScanTR
This action is not supported by the Analyze 7.5 format, so this method always returns null.- Specified by:
getScanTR
in interfaceReadableImage
- Returns:
- null always.
-
getScanTI
This action is not supported by the Analyze 7.5 format, so this method always returns null.- Specified by:
getScanTI
in interfaceReadableImage
- Returns:
- null always.
-
getScanTE
This action is not supported by the Analyze file format, so this method always returns null.- Specified by:
getScanTE
in interfaceReadableImage
- Returns:
- null always.
-
getScanTE
This action is not supported by the Analyze file format, so this method always returns null.- Specified by:
getScanTE
in interfaceReadableImage
- Parameters:
index
- the index for which to return the echo time.- Returns:
- null always.
-
getSaturationFreqOffsetPPM
This action is not supported by the Analyze file format, so this method always returns null.- Specified by:
getSaturationFreqOffsetPPM
in interfaceReadableImage
- Returns:
- null always.
-
getSaturationFreqOffsetPPM
This action is not supported by the Analyze file format, so this method always returns null.- Specified by:
getSaturationFreqOffsetPPM
in interfaceReadableImage
- Parameters:
index
- the index for which to return the saturation frequency offset.- Returns:
- null always.
-
getEchoTrainLength
This action is not supported by the Analyze file format, so this method always returns null.- Specified by:
getEchoTrainLength
in interfaceReadableImage
- Returns:
- null always.
-
getFlipAngle
This action is not supported by the Analyze file format, so this method always returns null.- Specified by:
getFlipAngle
in interfaceReadableImage
- Returns:
- null always.
-
getSliceDWbValue
This action is not supported by the Analyze file format, so this method always returnsnull
.- Specified by:
getSliceDWbValue
in interfaceReadableImage
- Parameters:
slice
- the slice number for which to get the b-value.- Returns:
null
always.
-
getFrameDWbValue
This action is not supported by the Analyze file format, so this method always returnsnull
.- Specified by:
getFrameDWbValue
in interfaceReadableImage
- Parameters:
frame
- the frame number for which to get the b-value.- Returns:
null
always.
-
setSliceDWbValue
public void setSliceDWbValue(float bValue, int slice) This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setSliceDWbValue
in interfaceWritableImage
- Parameters:
bValue
- the diffusion-weighting b-value.slice
- the slice number for which to set the b-value.
-
setFrameDWbValue
public void setFrameDWbValue(float bValue, int frame) This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setFrameDWbValue
in interfaceWritableImage
- Parameters:
bValue
- the diffusion-weighting b-value.frame
- the frame number for which to set the b-value.
-
getSliceDWGradientVector
public org.jogamp.vecmath.Vector3f getSliceDWGradientVector(int slice) This action is not supported by the Analyze file format, so this method always returnsnull
.- Specified by:
getSliceDWGradientVector
in interfaceReadableImage
- Parameters:
slice
- the slice number for which to return the gradient-vector.- Returns:
null
always.
-
getFrameDWGradientVector
public org.jogamp.vecmath.Vector3f getFrameDWGradientVector(int frame) This action is not supported by the Analyze file format, so this method always returnsnull
.- Specified by:
getFrameDWGradientVector
in interfaceReadableImage
- Parameters:
frame
- the frame number for which to return the gradient-vector.- Returns:
null
always.
-
setSliceDWGradientVector
public void setSliceDWGradientVector(org.jogamp.vecmath.Vector3f gradVec, int slice) This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setSliceDWGradientVector
in interfaceWritableImage
- Parameters:
gradVec
- the diffusion-weighting gradient vector.slice
- the slice number for which to set the gradient vector.
-
setFrameDWGradientVector
public void setFrameDWGradientVector(org.jogamp.vecmath.Vector3f gradVec, int frame) This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setFrameDWGradientVector
in interfaceWritableImage
- Parameters:
gradVec
- the diffusion-weighting gradient vector.frame
- the frame number for which to set the gradient vector.
-
getSliceDWBMatrix
public float[] getSliceDWBMatrix(int slice) This action is not supported by the Analyze file format, so this method always returnsnull
.- Specified by:
getSliceDWBMatrix
in interfaceReadableImage
- Parameters:
slice
- the slice number for which to get the b-matrix.- Returns:
null
always.
-
getFrameDWBMatrix
public float[] getFrameDWBMatrix(int frame) This action is not supported by the Analyze file format, so this method always returnsnull
.- Specified by:
getFrameDWBMatrix
in interfaceReadableImage
- Parameters:
frame
- the frame number for which to get the b-matrix.- Returns:
null
always.
-
setSliceDWBMatrix
public void setSliceDWBMatrix(float[] bMatrix, int slice) This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setSliceDWBMatrix
in interfaceWritableImage
- Parameters:
bMatrix
- the diffusion-weighting B-matrix.slice
- the slice number for which to set the B-matrix.
-
setFrameDWBMatrix
public void setFrameDWBMatrix(float[] bMatrix, int frame) This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setFrameDWBMatrix
in interfaceWritableImage
- Parameters:
bMatrix
- the diffusion-weighting B-matrix.frame
- the frame number for which to set the B-matrix.
-
getSliceTriggerDelayMS
This action is not supported by the Analyze file format, so this method always returnsnull
.- Specified by:
getSliceTriggerDelayMS
in interfaceReadableImage
- Parameters:
slice
- the slice number for which to get the trigger delay.- Returns:
null
always.
-
getFrameTriggerDelayMS
This action is not supported by the Analyze file format, so this method always returnsnull
.- Specified by:
getFrameTriggerDelayMS
in interfaceReadableImage
- Parameters:
frame
- the frame number for which to get the trigger delay.- Returns:
null
always.
-
setSliceTriggerDelayMS
public void setSliceTriggerDelayMS(float delay, int slice) This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setSliceTriggerDelayMS
in interfaceWritableImage
- Parameters:
delay
- the trigger delay (in milliseconds).slice
- the slice number for which to set the trigger delay.
-
setFrameTriggerDelayMS
public void setFrameTriggerDelayMS(float delay, int frame) This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setFrameTriggerDelayMS
in interfaceWritableImage
- Parameters:
delay
- the trigger delay (in milliseconds).frame
- the frame number for which to set the trigger delay.
-
getRescaleUnits
public com.xinapse.dicom.RescaleUnits getRescaleUnits()Description copied from interface:ReadableImage
Returns the output units of Intensity Rescale Slope and Intensity Rescale Intercept, retrieved bygetIntensityRescale()
.- Specified by:
getRescaleUnits
in interfaceReadableImage
- Overrides:
getRescaleUnits
in classANZImage
- Returns:
- the RescaleUnits describing the physical meaning of the pixel intensity units. Returns the RescaleUnits.US if the physical meaning is unknown, or arbitrary.
-
setPatientName
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setPatientName
in interfaceWritableImage
- Parameters:
patientName
- is ignored.
-
setPatientID
Description copied from interface:WritableImage
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 interfaceWritableImage
- Parameters:
patientID
- the new patient ID to be assigned to this image.
-
setPatientDoB
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setPatientDoB
in interfaceWritableImage
- Parameters:
patientDoB
- is ignored.
-
setPatientSex
public void setPatientSex(com.xinapse.dicom.Sex sex) This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setPatientSex
in interfaceWritableImage
- Parameters:
sex
- is ignored.
-
setStudyID
This action is not supported by Analyze 7.5 format, so this method does nothing.- Specified by:
setStudyID
in interfaceWritableImage
- Parameters:
studyID
- is ignored.
-
getMin
Description copied from interface:ReadableImage
Returns the minimum pixel intensity in the image.- Specified by:
getMin
in interfaceReadableImage
- Overrides:
getMin
in classANZImage
- Returns:
- the maximum pixel intensity as a
Double
, ornull
if the intensity min hasn't been calculated for this image. - Throws:
ANZException
-
getMax
Description copied from interface:ReadableImage
Returns the maximum pixel intensity in the image.- Specified by:
getMax
in interfaceReadableImage
- Overrides:
getMax
in classANZImage
- Returns:
- the maximum pixel intensity as a
Double
, ornull
if the intensity max hasn't been calculated for this image. - Throws:
ANZException
-
getImageTypeName
Returns the human readable name for this type of image.- Specified by:
getImageTypeName
in interfaceWritableImage
- Returns:
- the
String
"Analyze".
-
getCommonName
Returns the common name for this type of image.- Returns:
- the
String
"Analyze".
-
main
Run the self-test for theAnalyze75Image
class.- Parameters:
args
- an array of image file names to try to open.
-