|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface LoadableImage
LoadableImage defines the requests that an image class has to handle if it is to be "loadable" into a general image analysis and display program.
The methods define the dimensionality, dimensions, pixel sizes, pixel data type, basic MR scan parameters, basic patient information, scan positioning of the image. It also allows the pixel intensity information to be retrieved either as a whole, or slice-by-slice.
| Method Summary | |
|---|---|
void |
appendAuditInfo(java.lang.String name,
java.lang.String value)
Appends audit trail information to this image. |
void |
close()
Closes an image and frees up resources. |
java.lang.String |
getDescription()
Returns a String description of this image. |
java.lang.String |
getDescription(int slice)
Returns a description of a slice of this image. |
float |
getFlipAngle()
Returns the excitation pulse flip angle for this image. |
java.lang.String |
getHTMLDescription()
Returns a String description of this image in HTML format. |
java.lang.String |
getHTMLDescription(int slice)
Returns a String description of a slice of this image in HTML format. |
float[][] |
getImageOrientationPatient()
Returns the direction cosines of the row, column and slice directions (for increasing row, column and slice) of the image, in patient coordinates. |
float[][] |
getImageOrientationPatient(int slice)
Returns the direction cosines of the row, column and (possiblly) slice directions (for increasing row, column and slice) of the image, in patient coordinates. |
float[] |
getImagePositionPatient()
Returns the coordinates of the center of the first pixel of the image, in mm, in patient coordinates. |
float[] |
getImagePositionPatient(int slice)
Returns the coordinates of the center of the first pixel of the specified slice of this image, in mm, in patient coordinates. |
float[] |
getIntensityRescale()
Returns the values m and b in the relationship between pixel intensity (I) values and the output units specified in getRescaleUnits() in the expression: Output units = m*I + b. |
float[] |
getIntensityRescale(int slice)
Returns the values m and b in the relationship between pixel intensity (I) values and the output units specified in getRescaleUnits() in the expression: Output units = m*I + b for a particular slice. |
java.lang.Double |
getMax()
Returns the maximum pixel intensity in the image. |
java.lang.Double |
getMin()
Returns the minimum pixel intensity in the image. |
com.xinapse.dicom.Modality |
getModality()
Returns the imaging modality with which this image was collected. |
MostLikePlane |
getMostLikePlane()
Returns the imaging plane that this image is "most like". |
ColourMapping |
getNativeColourMapping()
Returns a ColourMapping if this image has an associated colour mapping. |
int |
getNCols()
Returns the number of image columns in this image. |
int |
getNDim()
Returns the dimensionality of this image. |
int |
getNFrames()
Returns the number of frames in a multi-frame image. |
int |
getNRows()
Returns the number of image rows in this image. |
int |
getNSlices()
Returns the number of physical slice locations in this image. |
java.util.Date |
getPatientDoB()
Returns the patient date of birth for this image. |
java.lang.String |
getPatientID()
Returns the patient ID for this image. |
java.lang.String |
getPatientName()
Returns the patient name for this image. |
com.xinapse.dicom.PatientPosition |
getPatientPosition()
Returns the position in which the patient is lying in the scanning equipment. |
java.lang.Object |
getPix()
Returns all the pixel values for this image in the order in which they are stored internally. |
java.lang.Object |
getPix(boolean radiological)
Returns all the pixel values for this image, optionally returning them in the correct order in which they will be presented, where the first pixel should be presented at the top left corner of the display device. |
PixelDataType |
getPixelDataType()
Returns a PixelDataType representing the data type of this image. |
float |
getPixelXSize()
Returns the pixel size in the x (horizontal) direction for this image. |
float |
getPixelYSize()
Returns the pixel size in the y (vertical) direction for this image. |
float |
getPixelZSize()
Returns the separation between the centres of image planes for this image. |
java.lang.String |
getPulseSequence()
Returns the name of the pulse sequence with which this image was collected. |
java.lang.String |
getRescaleUnits()
Specifies the output units of Intensity Rescale Slope and Intensity Rescale Intercept, retrieved by getIntensityRescale(). |
java.util.List<ROI> |
getROIs()
Returns a List of ROIs that are stored with the image. |
java.util.Date |
getScanDate()
Returns the scan Date for this image. |
com.xinapse.dicom.PulseSequenceType |
getScanningSequence()
Returns the DICOM Scanning Sequence with which this image was collected. |
float |
getScanTE()
Returns the scan echo time for this image if it has a single echo-time. |
float |
getScanTE(int slice)
Returns the scan echo time for one slice of this image. |
float |
getScanTI()
Returns the scan inversion time for this image. |
float |
getScanTR()
Returns the scan repetition time for this image. |
com.xinapse.dicom.PulseSequenceVariant |
getSequenceVariant()
Returns the DICOM Scanning Sequence Variant with which this image was collected. |
java.lang.Object |
getSlice(int slice)
Returns the pixel values for one slice of an n-dimensional image, where n > 1. |
float |
getSliceThickness()
Returns the slice thickness (in mm). |
java.lang.String |
getSuggestedFileName()
Returns the suggested file name for in-memory images that are to be saved to disk. |
float |
getTimeBetweenFrames()
Returns the time between frames in a 4- or higher dimensional image. |
java.lang.String |
getTitle()
Returns the title of this image. |
int |
getTotalNSlices()
Returns the total number of slices in this image. |
boolean |
isOpen()
Tests whether this image is still open. |
| Method Detail |
|---|
PixelDataType getPixelDataType()
throws InvalidImageException
InvalidImageException - if the PixelDataType cannot be determined.
int getNDim()
throws InvalidImageException
InvalidImageException - if not a valid image.
int getNRows()
throws InvalidImageException
InvalidImageException - if not a valid image.
int getNCols()
throws InvalidImageException
InvalidImageException - if not a valid image.
int getNSlices()
throws InvalidImageException
InvalidImageException - if not a valid planar image.
int getNFrames()
throws InvalidImageException
InvalidImageException - if not a valid multi-frame image.
int getTotalNSlices()
throws InvalidImageException
InvalidImageException - if not a valid image with at least 2 dimensions.
java.lang.Object getPix()
throws InvalidImageException
InvalidImageException - if there is a problem accessing the pixel values.
java.lang.Object getPix(boolean radiological)
throws InvalidImageException
radiological - trueif the pixels are to be returned in the correct order
for presentation, where the first returned pixel is to be presented at the top left,
and the last at the bottom right of the display device; false if the are to be
return in the order in which they are stored
internally.
InvalidImageException - if there is a problem accessing the pixel values.
java.lang.Object getSlice(int slice)
throws InvalidImageException,
java.lang.IndexOutOfBoundsException
N.B.The pixel values are always returned in a standard radiological orientation. Standard radiological orientation is:
slice - the slice number. Must be 0 for a 2-dimensional
image or from 0 to dims[0]-1 for a 3-dimensional image. For images of higher
dimensionality, each extra dimension multiplies the number of available slices
by the size in that dimension, so all images of higher dimensionality that 1
look like multi-slice images.
InvalidImageException - if there is a problem accessing the pixel values.
java.lang.IndexOutOfBoundsException - if the image does not have the right dimensionality
or the slice number is inappropriate for this image.MostLikePlane getMostLikePlane()
void appendAuditInfo(java.lang.String name,
java.lang.String value)
name - a String describing the name of the action that was performed on this image.value - a String describing the value of the action that was performed on this image.
java.lang.Double getMin()
throws InvalidImageException
InvalidImageException - if the intensity cannot be returned as a Double.
java.lang.Double getMax()
throws InvalidImageException
InvalidImageException - if the intensity cannot be returned as a Double.
ColourMapping getNativeColourMapping()
throws InvalidColourMappingException
InvalidColourMappingException - if this image has an associated ColourMapping, but
the ColourMapping cannot be successfully retrieved.java.lang.String getSuggestedFileName()
void close()
throws java.io.IOException,
InvalidImageException
InvalidImageException - if the image cannot be written or closed.
java.io.IOException - if an I/O error occurs.boolean isOpen()
java.lang.String getTitle()
float getPixelXSize()
throws ParameterNotSetException
ParameterNotSetException - if the pixel size can't be found.
float getPixelYSize()
throws ParameterNotSetException
ParameterNotSetException - if the pixel size can't be found.
float getPixelZSize()
throws ParameterNotSetException
ParameterNotSetException - if the pixel size can't be found.
float getTimeBetweenFrames()
throws ParameterNotSetException
ParameterNotSetException - if the time between frames is not set, or if this
image doesn't have a dimensionality of at least 4.
float getSliceThickness()
throws ParameterNotSetException
ParameterNotSetException - if the slice thickness is not set, or its value is corrupt.com.xinapse.dicom.Modality getModality()
java.lang.String getPulseSequence()
throws ParameterNotSetException
ParameterNotSetException
com.xinapse.dicom.PulseSequenceType getScanningSequence()
throws ParameterNotSetException
ParameterNotSetException
com.xinapse.dicom.PulseSequenceVariant getSequenceVariant()
throws ParameterNotSetException
ParameterNotSetException
float getFlipAngle()
throws ParameterNotSetException
ParameterNotSetException - if the flip angle is not set.
float getScanTR()
throws ParameterNotSetException
ParameterNotSetException - if the TR is not set.
float getScanTI()
throws ParameterNotSetException
ParameterNotSetException - if the TI is not set.
float getScanTE()
throws ParameterNotSetException
ParameterNotSetException - if the TE is not set.
float getScanTE(int slice)
throws ParameterNotSetException,
java.lang.IndexOutOfBoundsException
slice - the slice number for which to return the echo time.
ParameterNotSetException - if the TE is not set.
java.lang.IndexOutOfBoundsException - if the slice number is bad for this image.java.lang.String getPatientName()
java.lang.String getPatientID()
java.util.Date getPatientDoB()
java.util.Date getScanDate()
com.xinapse.dicom.PatientPosition getPatientPosition()
java.lang.String getDescription()
java.lang.String getDescription(int slice)
throws java.lang.IndexOutOfBoundsException
slice - the slice number.
o
java.lang.IndexOutOfBoundsException - if the slice number is bad for this image.java.lang.String getHTMLDescription()
java.lang.String getHTMLDescription(int slice)
throws java.lang.IndexOutOfBoundsException
slice - the slice number.
java.lang.IndexOutOfBoundsException - if the slice is bad for this image.java.lang.String getRescaleUnits()
float[] getIntensityRescale()
throws ParameterNotSetException
ParameterNotSetException - if a single rescaling has not been set for
the whole image.
float[] getIntensityRescale(int slice)
throws ParameterNotSetException,
java.lang.IndexOutOfBoundsException
slice - a slice number for which to retrieve the rescaling values.
ParameterNotSetException - if a single rescaling has not been set for
the image slice.
java.lang.IndexOutOfBoundsException - the slice number is bad for this image.float[][] getImageOrientationPatient()
float[][] getImageOrientationPatient(int slice)
throws java.lang.IndexOutOfBoundsException
slice - the slice for which to return the image orientation.
java.lang.IndexOutOfBoundsException - if the image does not have the right dimensionality
or the slice number is inappropriate for this image.float[] getImagePositionPatient()
float[] getImagePositionPatient(int slice)
throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException - if the slice number is bad for this image.
java.util.List<ROI> getROIs()
throws java.io.IOException
java.io.IOException - if an I/O error occurs while reading the ROIs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||