Class ANZImage
- All Implemented Interfaces:
ReadableImage, WritableImage, AutoCloseable
- Direct Known Subclasses:
Analyze75Image, NIFTIImage
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).
N.B. For colour (R,G,B) Analyze/NIFTI images, the data are ordered by colour plane, (i.e., all red values are followed by all green values followed by all blue values). However, the specification is unclear, and two formats are implemented here:
- All red values for all slices are followed by all green values for all slices, followed by all blue values for all slices. This is the default format.
- All red values for the first slice are followed by all green values for the first slice, followed by all blue values for the first slice. Subsequent slices follow in the same fashion. This format seems to be implemented by other programs that create colour Analyze/NIFTI images.
analyze.strictrgb. The System Property overrides the preferences
setting, and when set to true, will use the second data format above.-
Nested Class Summary
Nested classes/interfaces inherited from interface ReadableImage
ReadableImage.Position -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe file extension for Analyze image files in lower case form.static final StringThe file extension for Analyze image files in upper case form.static final StringThe file extension for Analyze image files in lower case form.static final StringThe file extension for Analyze image files in upper case form.Fields 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidanonymise(String patientName, String patientID, Date birthDate, boolean patSex, String patAddr, String patInsurancePlanID, String accessionNumber, boolean patOther, String physicianName, String physicianAddr, String institutionName, String institutionAddr, String deptName, String stationName, String telNumber, boolean removePrivateElements) Anonymise this WritableImage.voidclose()Closes anANZImageand frees up resources.Returns the data type (ANZPixFormat) of this image.getDescription(boolean html) Returns a String description of this image in HTML format.int[]getDims()Returns the dimensions (numbers of samples in each image dimension) of this image.intgetFlatSliceDescription(int index, boolean html) Returns a String description of a slice of this image in HTML format.Returns the ANZHeader image header for this image.org.jogamp.vecmath.Vector3f[]Returns the direction cosines of the row, column and slice directions (for increasing row, column and slice) of the image, in patient (L,P,S) coordinates.org.jogamp.vecmath.Vector3f[]getImageOrientationPatient(int slice) Returns the direction cosines of the row, column and slice directions (for increasing row, column and slice) of the image, in patient coordinates.org.jogamp.vecmath.Point3fReturns the coordinates of the center of the first pixel of the image, in mm, in patient coordinates.org.jogamp.vecmath.Point3fgetImagePositionPatient(int slice) Returns the coordinates of the center of the first pixel of the specified slice of this image, in mm, in patient coordinates.getMax()Returns the maximum pixel intensity in the image.getMin()Returns the minimum pixel intensity in the image.Returns aColourMappingif this Analyze image has an associated colour mapping.Returns a String showing the 'native' header for this image.intgetNCols()Returns the number of image columns in this image.intgetNDim()Returns the dimensionality of this image.intReturns the number of frames in a multi-frame image.intgetNRows()Returns the number of image rows in this image.intReturns the number of physical slice locations in this image.Returns the pixel size in the x (horizontal) direction for this image.Returns the pixel size in the y (vertical) direction for this image.Returns the separation between the centres of image planes for this image.com.xinapse.dicom.RescaleUnitsReturns the output units of Intensity Rescale Slope and Intensity Rescale Intercept, retrieved bygetIntensityRescale().Returns aPixelDataTyperepresenting the data type of this image, as the pixel values are stored on disk.Returns the time between frames in a 4- or higher dimensional image.getTitle()Returns the title of this image.intReturns the total number of slices in this image.static booleanimageExists(String filename) Tests whether anANZImagewith the given name already exists on disk.booleanTests whether thisANZImageis compressed when on disk.booleanisOpen()Tests whether this image is still open.voidSets the data base name for this ANZImage.voidsetDescription(String descripstr) Sets the description for this ANZImage.voidsetImageOrientationPositionPatient(org.jogamp.vecmath.Vector3f[] dirCos, org.jogamp.vecmath.Point3f position, boolean force) Sets the direction cosines of the row, column and slice directions of the image, the coordinates of the center of the first pixel of the image, in patient (LPS) coordinates.voidsetMinMax(int min, int max) Sets the glMin and glMax fields for this ANZImage.voidsetNativeColourMapping(ColourMapping colourMapping) Sets theColourMappingfor this image.voidsetPixelSpacing(Float[] spacing) Sets the distance (in mm) between pixel centres in the row, column and slice directions of the image, and the time between movie frames (for 4-D images) in seconds.voidsetPixelXSize(float width) Sets the pixel size in the x (horizontal) direction for this image.voidsetPixelYSize(float height) Sets the pixel size in the y (vertical) direction for this image.voidsetPixelZSize(float thickness) Sets the pixel size in the z (slice) direction for this image.voidsetTimeBetweenFrames(float deltaT) Sets the time between frames in a 4- or higher dimensional image.voidSets the title for this WritableImage, if the image format can handle titles.static StringstripExtension(String filename) Strips any ".img", ".hdr", ".img.gz" or ".hdr.gz" extension (in either upper or lower case) from a file name.toString()Writes this ANZImage to disk.Methods inherited from class MultiSliceImage
clearModified, disposeImageData, doRescale, doUnRescale, getAccessionNumber, getBodyPart, getDateFormat, getFrameOfReferenceUID, getLaterality, getModality, getMostLikePlane, getPix, getPix, getPix, getPix, getPresentationPixelDataType, getRawPix, getROIs, getScanDateFormat, getSlice, getSlice, getStudyInstanceUID, getSuggestedFileName, isModified, main, putPix, putPix, putPix, putPix, putSlice, setAccessionNumber, setBodyPart, setFrameOfReferenceUID, setImageOrientationPatient, setIntensityRescale, setLaterality, setMinMax, setModality, setModified, setSeriesInstanceUID, setStudyInstanceUID, setSuggestedFileNameMethods inherited from interface ReadableImage
getAffineTransform, getAffineTransform, getDescription, getDICOMImageType, getEchoTrainLength, getFlatSliceDescription, getFlatSliceHTMLDescription, getFlipAngle, getFrameDICOMImageType, getFrameDWBMatrix, getFrameDWbValue, getFrameDWGradientVector, getFrameSaturationFreqOffsetPPM, getFrameTE, getFrameTriggerDelayMS, getHTMLDescription, getIntensityRescale, getNSliceLocations, getPatientDoB, getPatientID, getPatientName, getPatientPosition, getPatientSex, getPixelSpacingOrDefaults, getPulseSequence, getSaturationFreqOffsetPPM, getScanDate, getScanningSequence, getScanTE, getScanTI, getScanTR, getSequenceVariant, getSeriesDescription, getSeriesNumber, getSliceThickness, getStudyIDMethods inherited from interface WritableImage
addBasicAudit, addBasicAudit, appendAuditInfo, appendToTitle, getCopy, getImageTypeName, setDICOMImageType, setEchoTrainLength, setFlipAngle, setFrameDICOMImageType, setFrameDWBMatrix, setFrameDWbValue, setFrameDWGradientVector, setFrameSaturationFreqOffsetPPM, setFrameTE, setFrameTriggerDelayMS, setImagePositionPatient, setIntensityRescale, setPatientDoB, setPatientID, setPatientName, setPatientPosition, setPatientSex, setPulseSequence, setRescaleUnits, setSaturationFreqOffsetPPM, setScanDate, setScanningSequence, setScanTE, setScanTI, setScanTR, setSequenceVariant, setSeriesDescription, setSeriesNumber, setSliceThickness, setStudyID, supportsIntensityRescaling
-
Field Details
-
EXTENSION
The file extension for Analyze image files in lower case form.- See Also:
-
UPPERCASE_EXTENSION
The file extension for Analyze image files in upper case form. -
COMPRESSED_EXTENSION
The file extension for Analyze image files in lower case form.- See Also:
-
COMPRESSED_UPPERCASE_EXTENSION
The file extension for Analyze image files in upper case form.
-
-
Method Details
-
getByteOrder
-
imageExists
Tests whether anANZImagewith the given name already exists on disk. File extensions are handled in a smart and case-insensitive way.- Parameters:
filename- the name of the image file to test for existence.- Returns:
trueif a pair of ANZImage .img and .hdr with the specified name exist on disk;falseotherwise.
-
write
Writes this ANZImage to disk.- Specified by:
writein interfaceWritableImage- Parameters:
filename- the root of the Analyze filename. Will be appended with ".img" and ".hdr" to create the appropriate full filenames.- Returns:
- the actual file name used to write the image, including any added extension.
- Throws:
InvalidImageException- if the image cannot be written.IOException- if an I/O error occurs.
-
close
Closes anANZImageand frees up resources. If the close() method is not applied to an image opened read/write from disk, then any changes will be lost. Any further operations to a closedANZImageare not possible, and may cause an exception to be thrown.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceReadableImage- Overrides:
closein classMultiSliceImage- Throws:
InvalidImageException- if the image cannot be written because it is invalid.IOException- if an I/O error occurs.
-
isOpen
public boolean isOpen()Description copied from interface:ReadableImageTests whether this image is still open.- Specified by:
isOpenin interfaceReadableImage- Returns:
trueif the image is still open for reading and (if opened read/write) writing;falseotherwise.
-
isCompressed
public boolean isCompressed()Tests whether thisANZImageis compressed when on disk.- Returns:
trueif compressed;falseotherwise.
-
getNativeHeader
Description copied from interface:ReadableImageReturns a String showing the 'native' header for this image.- Specified by:
getNativeHeaderin interfaceReadableImage- Returns:
- a String describing the 'native' header for this image.
-
toString
-
getDataType
Returns the data type (ANZPixFormat) of this image.- Returns:
- an
ANZPixFormatrepresenting a particular pixel data type.
-
setDBName
Sets the data base name for this ANZImage.- Parameters:
name- a String representing the name data base name.- Throws:
ANZException- if the data base name cannot be set for this image.
-
setDescription
Sets the description for this ANZImage.- Parameters:
descripstr- a String representing the name description.- Throws:
ANZException- if the description cannot be set for the image header.
-
setMinMax
Sets the glMin and glMax fields for this ANZImage.- Specified by:
setMinMaxin interfaceWritableImage- 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.
-
getHeader
Returns the ANZHeader image header for this image. Warning! If this header is manipulated, then accessing the image pixel data may cause errors.- Returns:
- the Analyze image header for this image.
-
getNCols
public int getNCols()Description copied from interface:ReadableImageReturns the number of image columns in this image.- Specified by:
getNColsin interfaceReadableImage- Returns:
- the number of image columns.
-
getNRows
public int getNRows()Description copied from interface:ReadableImageReturns the number of image rows in this image.- Specified by:
getNRowsin interfaceReadableImage- Returns:
- the number of image rows.
-
getNSlices
public int getNSlices()Description copied from interface:ReadableImageReturns the number of physical slice locations in this image. If the image dimensionality is greater than or equal to three, then this method returns the number of samples in the third dimension. If the dimensionality is less than 3 two, it returns 1.- Specified by:
getNSlicesin interfaceReadableImage- Returns:
- the number of physical slice locations.
-
getNFrames
public int getNFrames()Description copied from interface:ReadableImageReturns the number of frames in a multi-frame image. If the image dimensionality is greater than or equal to four, then this method returns the number of samples in the fourth dimension. If the dimensionality is less than 4, it returns 1.- Specified by:
getNFramesin interfaceReadableImage- Returns:
- the number of image (movie) frames.
-
getTotalNSlices
public int getTotalNSlices()Description copied from interface:ReadableImageReturns the total number of slices in this image. If the image is less than 3-dimensional, this method returns 1; if it is 3-dimensional, it returns the number of slices; if it is 4- or more dimensional, it sums up the total number of planar slices in each dimension and returns the total. For example a 4-dimensional image with 4 slices and 10 frames, the total number of slices is 40.- Specified by:
getTotalNSlicesin interfaceReadableImage- Returns:
- the number of planar image slices.
-
getNDim
Description copied from interface:ReadableImageReturns the dimensionality of this image.- Specified by:
getNDimin interfaceReadableImage- Returns:
- the image dimensionality.
- Throws:
IllegalStateException
-
getDims
Description copied from interface:ReadableImageReturns the dimensions (numbers of samples in each image dimension) of this image.- Specified by:
getDimsin interfaceReadableImage- Returns:
- an array with length equal to the image dimensionality, containing the
numbers of pixels (samples) in each dimension of the image.
By convention, element (nDim-1) contains the number of columns,
element (nDim-2) the number of rows, etc. For example, in a 4-dimensional image,
dims[0]is the number of frames,dims[1]the number of slices,dims[2]the number of rows anddims[3]the number of columns. - Throws:
IllegalStateException
-
getStoredPixelDataType
Description copied from interface:ReadableImageReturns aPixelDataTyperepresenting the data type of this image, as the pixel values are stored on disk.- Specified by:
getStoredPixelDataTypein interfaceReadableImage- Returns:
- the
PixelDataTyperepresenting the data type of this image as stored on disk.
-
getFileDataOffset
public int getFileDataOffset() -
getPixelXSize
Description copied from interface:ReadableImageReturns the pixel size in the x (horizontal) direction for this image.- Specified by:
getPixelXSizein interfaceReadableImage- Returns:
- the pixel size in the x (horizontal) direction in mm, or
nullif the pixel size can't be found.
-
setPixelXSize
Description copied from class:MultiSliceImageSets the pixel size in the x (horizontal) direction for this image.- Specified by:
setPixelXSizein classMultiSliceImage- Parameters:
width- the width of a pixel.- Throws:
IllegalArgumentException- if the pixel width is not positive.
-
getPixelYSize
Description copied from interface:ReadableImageReturns the pixel size in the y (vertical) direction for this image.- Specified by:
getPixelYSizein interfaceReadableImage- Returns:
- the pixel size in the y (vertical) direction in mm, or
nullif the pixel size can't be found.
-
setPixelYSize
Description copied from class:MultiSliceImageSets the pixel size in the y (vertical) direction for this image.- Specified by:
setPixelYSizein classMultiSliceImage- Parameters:
height- the height of a pixel.- Throws:
IllegalArgumentException- ifheightis not positive.
-
getPixelZSize
Description copied from interface:ReadableImageReturns the separation between the centres of image planes for this image.- Specified by:
getPixelZSizein interfaceReadableImage- Returns:
- the pixel size in the z (slice) direction in mm, or
nullif the pixel size can't be found.
-
setPixelZSize
Description copied from class:MultiSliceImageSets the pixel size in the z (slice) direction for this image.- Specified by:
setPixelZSizein classMultiSliceImage- Parameters:
thickness- the thickness of a pixel.- Throws:
IllegalArgumentException- ifthicknessis not positive.
-
getTimeBetweenFrames
Description copied from interface:ReadableImageReturns the time between frames in a 4- or higher dimensional image.- Specified by:
getTimeBetweenFramesin interfaceReadableImage- Returns:
- the time between frames in seconds, or
nullif the the between frames can't be found.
-
setTimeBetweenFrames
Description copied from class:MultiSliceImageSets the time between frames in a 4- or higher dimensional image.- Specified by:
setTimeBetweenFramesin classMultiSliceImage- Parameters:
deltaT- the time between frames (in seconds).- Throws:
IllegalArgumentException- ifdeltaTis negative.
-
getImageOrientationPatient
public org.jogamp.vecmath.Vector3f[] getImageOrientationPatient()Description copied from interface:ReadableImageReturns the direction cosines of the row, column and slice directions (for increasing row, column and slice) of the image, in patient (L,P,S) coordinates.- Specified by:
getImageOrientationPatientin interfaceReadableImage- Returns:
- a
Vector3f[], corresponding to the direction cosines of the image row, column and slice directions in Left,Posterior,Superior (LPS) coordinates. Returnsnullif the direction cosines cannot be retrieved from this image.
-
getImageOrientationPatient
public org.jogamp.vecmath.Vector3f[] getImageOrientationPatient(int slice) throws IndexOutOfBoundsException Description copied from interface:ReadableImageReturns the direction cosines of the row, column and slice directions (for increasing row, column and slice) of the image, in patient coordinates.- Specified by:
getImageOrientationPatientin interfaceReadableImage- Parameters:
slice- the slice for which to return the image orientation.- Returns:
- a
Vector3f[], corresponding to the direction cosines of the image row, column and slice directions in Left,Posterior,Superior (LPS) coordinates. Returnsnullif the direction cosines cannot be retrieved from this image. - Throws:
IndexOutOfBoundsException- if the image does not have the right dimensionality or the slice number is inappropriate for this image.
-
getImagePositionPatient
public org.jogamp.vecmath.Point3f getImagePositionPatient()Description copied from interface:ReadableImageReturns the coordinates of the center of the first pixel of the image, in mm, in patient coordinates. This method will only return a value if the image pixels form a regular array of pixels with parallel image planes; otherwise null is returned.- Specified by:
getImagePositionPatientin interfaceReadableImage- Returns:
- the Left,Posterior,Superior (LPS) coordinates of the first pixel
in the image data matrix. Returns
nullif the position cannot be retrieved from this image.
-
getImagePositionPatient
public org.jogamp.vecmath.Point3f getImagePositionPatient(int slice) throws IndexOutOfBoundsException Description copied from interface:ReadableImageReturns the coordinates of the center of the first pixel of the specified slice of this image, in mm, in patient coordinates.- Specified by:
getImagePositionPatientin interfaceReadableImage- Parameters:
slice- the slice number (indexed from 0) for which to return the pixel coordinates.- Returns:
- the Left,Posterior,Superior (LPS) coordinates of the first pixel
in the specified slice of this image. Returns
nullif the position cannot be retrieved from this image. - Throws:
IndexOutOfBoundsException- if the slice number is bad for this image.
-
setImageOrientationPositionPatient
public void setImageOrientationPositionPatient(org.jogamp.vecmath.Vector3f[] dirCos, org.jogamp.vecmath.Point3f position, boolean force) Description copied from class:MultiSliceImageSets the direction cosines of the row, column and slice directions of the image, the coordinates of the center of the first pixel of the image, in patient (LPS) coordinates.N.B. the actual position and orientation set by this method may not be those specified. For example, for NIFTI-1 images, the actual orientation and position may depend on the user
Preferencesfor whether to put pixel values in an order that is compatible with SPM. After using this method, you should use theReadableImage.getImageOrientationPatient()andReadableImage.getImagePositionPatient()methods to obtain the real orientation and positions set.If the orientation or position cannot be set for this image, this method does not report an error.
- Specified by:
setImageOrientationPositionPatientin interfaceWritableImage- Specified by:
setImageOrientationPositionPatientin classMultiSliceImage- Parameters:
dirCos- the direction cosines of the image row, column and (optionally) slice directions respectively in Left,Posterior,Superior (LPS) coordinates. If orientation isnull, this method will attempt to clear any orientation information, if that is supported by the image format.position- the Left,Posterior,Superior (LPS) coordinates of the centre of the first pixel in the image data matrix. If position isnull, this method will attempt to clear any positional information, if that is supported by the image format.force- iftrue, this method will force the orientation and position to be set as requested, regardless of the userPreferences. This can be useful if you read the orientation from an existing image, and you want to set the orientation exactly the same in a new image.
-
setPixelSpacing
public void setPixelSpacing(Float[] spacing) throws IndexOutOfBoundsException, IllegalArgumentException Description copied from interface:WritableImageSets the distance (in mm) between pixel centres in the row, column and slice directions of the image, and the time between movie frames (for 4-D images) in seconds. The distances and time should always be positive values.- Specified by:
setPixelSpacingin interfaceWritableImage- Parameters:
spacing- a Float[] of length up to 4, corresponding to the distance between pixel centres in the row, column, slice and time directions, respectively. Spacing values will only be set for image dimensions where the spacing array is long enough and the array element is non-null. The first element of the array indicates the horizontal pixel size; the second is the vertical pixel size; the third is the pixel depth; fourth is the time between frames.- Throws:
IndexOutOfBoundsException- ifspacingdoes not have the correct dimensions.IllegalArgumentException
-
getRescaleUnits
public com.xinapse.dicom.RescaleUnits getRescaleUnits()Description copied from interface:ReadableImageReturns the output units of Intensity Rescale Slope and Intensity Rescale Intercept, retrieved bygetIntensityRescale().- Specified by:
getRescaleUnitsin interfaceReadableImage- Returns:
- the RescaleUnits describing the physical meaning of the pixel intensity units. Returns the RescaleUnits.US if the physical meaning is unknown, or arbitrary.
-
setTitle
Description copied from interface:WritableImageSets the title for this WritableImage, if the image format can handle titles.- Specified by:
setTitlein interfaceWritableImage- Parameters:
title- the new title.
-
anonymise
public void anonymise(String patientName, String patientID, Date birthDate, boolean patSex, String patAddr, String patInsurancePlanID, String accessionNumber, boolean patOther, String physicianName, String physicianAddr, String institutionName, String institutionAddr, String deptName, String stationName, String telNumber, boolean removePrivateElements) Description copied from interface:WritableImageAnonymise this WritableImage.- Specified by:
anonymisein interfaceWritableImage- Parameters:
patientName- if non-null, the patient name to substitute.patientID- if non-null, the patient ID to substitute.birthDate- if non-null, the birth date to substitute.patSex- if true, set the sex to "OTHER".patAddr- if non-null, the address to substitute.patInsurancePlanID- if non-null, the insurance plan ID to substitute.accessionNumber- if non-null, the accession number to substitute.patOther- if true, other patient-related items will be anonymised.physicianName- if non-null, the physician name to substitute.physicianAddr- if non-null, the physician's address to substitute.institutionName- if non-null, the institution name to substitute.institutionAddr- if non-null, the institution address to substitute.deptName- if non-null, the department name to substitute.stationName- if non-null, the station name to substitute.telNumber- if non-null, the telephone number to substitute for all telephone numbers.removePrivateElements- if true, all private DICOM elements will be removed.
-
getTitle
Description copied from interface:ReadableImageReturns the title of this image.- Specified by:
getTitlein interfaceReadableImage- Returns:
- the title of this image.
-
getDescription
Description copied from interface:ReadableImageReturns a String description of this image in HTML format.- Specified by:
getDescriptionin interfaceReadableImage- Parameters:
html- whether in HTML format.- Returns:
- a String describing this image.
-
getFlatSliceDescription
Description copied from interface:ReadableImageReturns a String description of a slice of this image in HTML format.- Specified by:
getFlatSliceDescriptionin interfaceReadableImage- Parameters:
index- the flat slice number to describe. The flat slice number is (frame * nSlices) + slice.For single-frame images, the flat slice number is just the slice number.html- whether in HTML format.- Returns:
- a String describing this image slice.
-
getNativeColourMapping
Returns aColourMappingif this Analyze image has an associated colour mapping. Colour mappings are kept in a file with an extension ".lkup" and with the same name root as the Analyze image.- Specified by:
getNativeColourMappingin interfaceReadableImage- Returns:
- a
ColourMappingif this image has an associated colour mapping. Returnsnullif it does not.
-
setNativeColourMapping
Description copied from interface:WritableImageSets theColourMappingfor this image. No exception occurs if the image format does not support a colour mapping.
N.B. the changes in the ColourMapping may not be reflected on disk unless the close() method is called.- Specified by:
setNativeColourMappingin interfaceWritableImage- Parameters:
colourMapping- the new ColourMapping to be assigned to this image.
-
getMin
Description copied from interface:ReadableImageReturns the minimum pixel intensity in the image.- Specified by:
getMinin interfaceReadableImage- Returns:
- the maximum pixel intensity as a
Double, ornullif the intensity min hasn't been calculated for this image. - Throws:
InvalidImageException- if the intensity cannot be returned as a Double.
-
getMax
Description copied from interface:ReadableImageReturns the maximum pixel intensity in the image.- Specified by:
getMaxin interfaceReadableImage- Returns:
- the maximum pixel intensity as a
Double, ornullif the intensity max hasn't been calculated for this image. - Throws:
InvalidImageException- if the intensity cannot be returned as a Double.
-
stripExtension
-