Class NIFTI2Image
java.lang.Object
com.xinapse.multisliceimage.MultiSliceImage
com.xinapse.multisliceimage.analyze.ANZImage
com.xinapse.multisliceimage.analyze.NIFTIImage
com.xinapse.multisliceimage.analyze.NIFTI2Image
- All Implemented Interfaces:
ReadableImage, WritableImage, InfoStorer, AutoCloseable
This class is a representation of a multi-dimensional image in the NIFTI-2 format,
the updated NIFTI format.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ReadableImage
ReadableImage.Position -
Field Summary
Fields inherited from class NIFTIImage
COMPRESSED_EXTENSION, DEFAULT_COMPRESSED, DEFAULT_NIFTI_ONE_FILE, EXTENSION, UPPERCASE_COMPRESSED_EXTENSION, UPPERCASE_EXTENSIONFields inherited from class ANZImage
COMPRESSED_UPPERCASE_EXTENSIONFields inherited from class MultiSliceImage
ACCESSION_NUMBER_NAME, 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, IMAGE_TYPE_NAME, INTENSITY_RESCALE_INTERCEPT_NAME, INTENSITY_RESCALE_SLOPE_NAME, INTENSITY_RESCALE_UNITS_NAME, INVERSION_TIME_NAME, LATERALITY_NAME, MODALITY_NAME, PATIENT_ID_NAME, PATIENT_NAME_NAME, PATIENT_POSITION_NAME, PATIENT_SEX_NAME, PIXEL_SPACING_NAME, PIXEL_X_SIZE_NAME, PIXEL_Y_SIZE_NAME, PIXEL_Z_SIZE_NAME, PULSE_SEQUENCE_NAME, 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
ConstructorsConstructorDescriptionCreates an uninitialised instance of a NIFTI2Image.NIFTI2Image(long nCols, long nRows, long nSlices, long nFrames, ANZPixFormat dataType) Creates a new in-memory NIFTI2Image.NIFTI2Image(ANZPixFormat dataType, Long... dims) Creates a new in-memory NIFTI2Image.NIFTI2Image(String fileName, FileAccessMode mode) Opens an existing NIFTI2Image. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the common name for this type of image.static voidRun the self-test for the NIFTI2Image class.Methods inherited from class NIFTIImage
addExtendedData, anonymise, appendAuditInfo, appendInfoList, appendInfoList, getBodyPart, getCopy, getDICOMImageType, getEchoTrainLength, getExtendedData, getFlatSliceDescription, getFlipAngle, getFrameDICOMImageType, getFrameDWBMatrix, getFrameDWbValue, getFrameDWGradientVector, getFrameInfo, getFrameInfoList, getFrameSaturationFreqOffsetPPM, getFrameTE, getFrameTriggerDelayMS, getImageOrientationPatient, getImagePositionPatient, getImageTypeName, getInfo, getInfo, getInfoList, getInfoList, getIntensityRescale, getIntent, getLaterality, getNIFTIOneFile, getPatientDoB, getPatientID, getPatientName, getPatientPosition, getPatientSex, getPreferredCompressed, getPreferredNIFTIOneFile, getPreviewIcon, getPulseSequence, getQForm, getRescaleUnits, getSaturationFreqOffsetPPM, getSaveCompressed, getScanDate, getScanningSequence, getScanTE, getScanTI, getScanTR, getSequenceVariant, getSeriesDescription, getSeriesNumber, getSForm, getSFormAffineTransform, getSliceInfo, getSliceInfoList, getSliceThickness, getStudyID, imageExists, putFrameInfo, putFrameInfo, putInfo, putInfo, putInfo, putInfo, putInfo, putInfo, putSliceInfo, putSliceInfo, removeExtendedData, removeInfo, removeInfo, savePreferredCompressed, savePreferredNIFTIOneFile, setBodyPart, setDICOMImageType, setEchoTrainLength, setFlipAngle, setFrameDICOMImageType, setFrameDWBMatrix, setFrameDWbValue, setFrameDWGradientVector, setFrameInfoList, setFrameSaturationFreqOffsetPPM, setFrameTE, setFrameTriggerDelayMS, setImageOrientationPatient, setImagePositionPatient, setInfoList, setInfoList, setIntensityRescale, setIntent, setLaterality, setPatientDoB, setPatientID, setPatientName, setPatientPosition, setPatientSex, setPulseSequence, setQForm, setRescaleUnits, setSaturationFreqOffsetPPM, setScanDate, setScanningSequence, setScanTE, setScanTI, setScanTR, setSequenceVariant, setSeriesDescription, setSeriesNumber, setSForm, setSFormAffineTransform, setSliceInfoList, setSliceThickness, setStudyID, stripExtension, supportsIntensityRescaling, writeMethods inherited from class ANZImage
close, getByteOrder, getDataType, getDescription, getDims, getFileDataOffset, getHeader, getImageOrientationPatient, getImagePositionPatient, getMax, getMin, getNativeColourMapping, getNativeHeader, getNCols, getNDim, getNFrames, getNRows, getNSlices, getPixelXSize, getPixelYSize, getPixelZSize, getStoredPixelDataType, getTimeBetweenFrames, getTitle, getTotalNSlices, isCompressed, isOpen, setDBName, setDescription, setImageOrientationPositionPatient, setMinMax, setNativeColourMapping, setPixelSpacing, setPixelXSize, setPixelYSize, setPixelZSize, setTimeBetweenFrames, setTitle, toStringMethods inherited from class MultiSliceImage
clearModified, disposeImageData, doRescale, doUnRescale, getAccessionNumber, getDateFormat, getFrameOfReferenceUID, getModality, getMostLikePlane, getPix, getPix, getPix, getPix, getPresentationPixelDataType, getRawPix, getROIs, getScanDateFormat, getSlice, getSlice, getStudyInstanceUID, getSuggestedFileName, isModified, putPix, putPix, putPix, putPix, putSlice, setAccessionNumber, setFrameOfReferenceUID, setIntensityRescale, setMinMax, setModality, setModified, setSeriesInstanceUID, setStudyInstanceUID, setSuggestedFileNameMethods inherited from interface InfoStorer
appendInfoList, appendInfoList, getFloatInfo, getFloatInfo, getFrameInfo, getFrameInfoList, getInfo, getInfo, getInfoList, getInfoList, getIntegerInfo, getSliceInfo, getSliceInfoList, getVectorInfo, putFrameInfo, putFrameInfo, putInfo, putInfo, putInfo, putInfo, putInfo, putInfo, putSliceInfo, putSliceInfo, removeInfo, removeInfo, setFrameInfoList, setInfoList, setInfoList, setSliceInfoListMethods inherited from interface ReadableImage
getAffineTransform, getAffineTransform, getDescription, getFlatSliceDescription, getFlatSliceHTMLDescription, getHTMLDescription, getNSliceLocations, getPixelSpacingOrDefaultsMethods inherited from interface WritableImage
addBasicAudit, addBasicAudit, appendToTitle
-
Constructor Details
-
NIFTI2Image
public NIFTI2Image()Creates an uninitialised instance of a NIFTI2Image. Needed so that newInstance() method can be called on the class. -
NIFTI2Image
public NIFTI2Image(long nCols, long nRows, long nSlices, long nFrames, ANZPixFormat dataType) throws ANZException Creates a new in-memory NIFTI2Image. 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- theANZPixFormatfor the image.- Throws:
ANZException- if the image cannot be created.
-
NIFTI2Image
Creates a new in-memory NIFTI2Image. 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 image cannot be created.
-
NIFTI2Image
Opens an existing NIFTI2Image.- Parameters:
fileName- the name of the image file.mode- the access mode for the image.- 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
-
getCommonName
-
main
Run the self-test for the NIFTI2Image class.- Parameters:
args- a list of images to try to open.
-