Package gov.nih.mipav.model.file
Class FileInfoBase
java.lang.Object
gov.nih.mipav.model.structures.ModelSerialCloneable
gov.nih.mipav.model.file.FileInfoBase
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
FileInfoAfni,FileInfoAnalyze,FileInfoAvi,FileInfoBFLOAT,FileInfoBioRad,FileInfoBMP,FileInfoBRUKER,FileInfoCheshire,FileInfoCOR,FileInfoCZI,FileInfoDicom,FileInfoDM3,FileInfoFits,FileInfoGESigna4X,FileInfoGESigna5X,FileInfoICS,FileInfoInterfile,FileInfoJP2,FileInfoJPEG_LS,FileInfoJPEG_XL,FileInfoJSON,FileInfoLattice,FileInfoLIFF,FileInfoLSM,FileInfoMagnetomVision,FileInfoMATLAB,FileInfoMedVision,FileInfoMetaImage,FileInfoMGH,FileInfoMicroCat,FileInfoMinc,FileInfoMincHDF,FileInfoMRC,FileInfoNIFTI,FileInfoNRRD,FileInfoOME,FileInfoPARREC,FileInfoPGM,FileInfoPPM,FileInfoRaw,FileInfoSiemensText,FileInfoSPAR,FileInfoSPM,FileInfoSTK,FileInfoSVS,FileInfoTiff,FileInfoTMG,FileInfoTrackVis,FileInfoVista,FileInfoXML,FileInfoZVI
This structure contains the basic information that describes how the image is stored on disk.
Subclasses add additional information which is particular to that image-format.
This class needs work
1. fixing (making consistent what to do when null pointers encountered. see getStartLocation and getUnitsOfMeasure
- Version:
- 0.9 June 30, 1998
- Author:
- Matthew J. McAuliffe, Ph.D.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enumstatic enumstatic enumEach unit has a unit type with a given base. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intUnit of measurement angstroms.static final StringString version of units of measurement - angstroms.static final intAxial orientation.protected int[]axis orientation used to support image ordering and display for medical images.static final String[]Array of axis orientation strings.static final intImage modality biomagnetic imaging.protected Stringprotected Stringstatic final intUnit of measurement centimeters.static final StringString version of units of measurement - centimeters.static final intImage modality color flow doppler.static final intIndicates bzip2 compression of an image.static final intIndicates gzip compression of an image.static final intIndicates no compression.static final intIndicates zip compression of an image.private intUsed to indicate if the raw data was also compression (0 = no, 1 = zip).static final intImage modality CR.static final intImage modality CT.static final double[]Deprecated.should use enum conversionsstatic final intCoronal orientation.private intThe data type of the data (i.e. byte, short, float ...static final intstatic final StringString version of units of measurement - degrees.static final intImage modality diaphanography.static final intImage modality digital radiography.private float[]Pixel or voxel resolutions for each dimension - default = 1.0.protected DTIParametersstatic final intImage modality duplex doppler.private booleanThe Endianess of the data.static final intImage modality endoscopy.protected doubleprivate int[]Image extents as decribed by the image file format.static final intImage modality external camera photography.static final intImage modality Fluorescein Angiography.private intFile format as defined in the Filebase.protected StringThe file name which includes the path information.protected StringFile suffix (ex.protected doubleprotected doubleprotected doublestatic final intImage modality general microscopy.static final intImage modality hard copy.static final intUnit of measurement hours.static final StringString version of units of measurement - hours.static final intUnit of measurement hertz.static final StringString version of units of measurement - hertz.static final intImage modality IndoCyanine Green.protected intIndicates the image orientation (i.e.private static final String[]Array of image orientation strings.static final intUnit of measurement inches.static final StringString version of units of measurement - inches.static final intImage modality intraoral radiography.protected doublestatic final intUnit of measurement kilometers.static final StringString version of units of measurement - kilometers.static final intImage modality laser surface scan.private ModelLUTModelLUT associated with fileinfostatic final intImage modality MR.static final intImage modality MR angiography.static final intImage modality MR SPECT.static final intImage modality mammography.private doubleImage maximum intensity for single channel image.private doubleImage maximum intensity for the blue channel of an RGB image.private doubleImage maximum intensity for the green channel of an RGB image.private doubleImage maximum intensity for the red channel of an RGB image.static final intUnit of measurement meters.static final StringString version of units of measurement - meters.static final intUnit of measurement micrometers.static final StringString version of units of measurement - micrometers.static final intUnit of measurement microseconds.static final StringString version of units of measurement - microseconds.static final intUnit of measurement miles.static final StringString version of units of measurement - miles.static final intUnit of measurement millimeters.static final StringString version of units of measurement - millimeters.static final intUnit of measurement milliseconds.static final StringString version of units of measurement - milliseconds.static final intUnits of measurement mil (thousandth of an inch)static final StringString version of units of measurement - mils.private doubleImage minimum intensity for single channel image.private doubleImage minimum intensity for the blue channel of an RGB image.private doubleImage minimum intensity for the green channel of an RGB image.private doubleImage minimum intensity for the red channel of an RGB image.static final intUnit of measurement minutes.static final StringString version of units of measurement - minutes.protected intIndicates the modality (medical image type) of the dataset.private static final String[]Deprecated.No longer needed since enum works nowprivate booleanFlag that indicates whether or not the image is in multiple files (tiff).static final intUnit of measurement nanometers.static final StringString version of units of measurement - nanometers.static final intUnit of measurement nanoseconds.static final StringString version of units of measurement - nanoseconds.static final intImage modality nuclear medicine.private intNumber of bytes to the start the image data - ie. the header lengthstatic final intAxis orientation Anterior to Posterior.static final intAxis orientation Inferior to Superior.static final intAxis orientation Left to Right.static final intAxis orientation Posterior to Anterior.static final intAxis orientation Right to Left.static final intAxis orientation Superior to Inferior.static final intAxis orientation unknown.protected float[]The origin to support image locations (ie.private booleanUsed for checking for endianess changes in the ModelImage.reallocate(final int type) function.static final intImage modality other.static final intImage modality panoramtic X ray.private shortImage minimum intensity for single channel image.private ShortSome file formats have a pad value for pixels outside the acquisition domain.static final intImage modality PET.static final intUnit of measurement part-per-million.static final StringString version of units of measurement - part-per-million.static final intImage modality radio fluoroscopy.static final intImage modality radiographic imaging.static final intImage modality radiotherapy dose.static final intImage modality radiotherapy image.static final intImage modality radiotherapy plan.static final intImage modality radiotherapy record.static final intImage modality radiotherapy structure set.static final intRadians per second.static final StringString version of units of measurement - radians per second.static final intImage modality Red Free.private doubleDICOM images have a rescale y-intercept value that we have also kept in the base.private doubleDICOM images have a rescale slope value that we have also kept in the base.static final intSagittal orientation.static final intUnit of measurement seconds.static final StringString version of units of measurement - seconds.private static final longUse serialVersionUID for interoperability.static final intImage modality SPECT.private floatThe thickness of individual slices in the image volume.static final intImage modality slide microscopy.static final String[]Deprecated.static final intImage modality thermography.static final intAnother Dataset transform ID.static final intMNI 152 transform ID.static final intScanner Anatomical transform ID.static final intTalairach Tournoux transform ID.static final intUnknown transform ID.static final String[]Deprecated.static final intImage modality ultrasound.protected FileInfoBase.Unit[]Describes the units of measure for the dataset.static final intUnit of measurement unknown.static final intImage modality unknown.static final intUnknown orientation.static final StringString version of units of measurement - unknown.static final intImage modality X ray angiography. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFileInfoBase(FileInfoBase copy) Internal constructor for clone usage.FileInfoBase(String name, String directory, int format) fileInfo constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyCoreInfo(FileInfoBase[] originalInfo, FileInfoBase[] newInfo) Helper method to copy important file info type to another file info type.static voidcopyCoreInfo(FileInfoBase[] originalInfo, FileInfoBase[] newInfo, boolean[] listNoCopy) Helper method to copy core information from one fileinfo into another, this method also has a list of fileinfos NOT to copy (used by JDialogRemoveSlices).voiddisplayAboutInfo(JDialogBase dialog) Displays the file information.abstract voiddisplayAboutInfo(JDialogBase dialog, TransMatrix matrix) Abstract method which is used by the extending class to display information about the window.voiddisplayPrimaryInfo(JDialogText dialog, TransMatrix matrix) Method called by many extending classes to display basic information in the dialog common to all images.voidfinalize()Prepares this class for cleanup.getAboutInfo(TransMatrix matrix) Abstract method which is used by the extending class to return information about the file header.static int[]getAllSameDimUnits(int measure) Deprecated.should now use enumReturns the area unit for the data.int[]Get the direction for accessing each axis of data.int[]Returns orientation of each axis.intgetAxisOrientation(int axis) Returns orientation of entered axis.static intReturns the axis orientation associated with a string.static StringgetAxisOrientationStr(int m) Return the string associated with an axis orientation.intGets the compression type.final intReturns data type.static intReturns the image data type associated with a string.final booleanDescibes file endianess.static booleanReturns the endianess associated with a string.doublefinal int[]Returns the dimensionality of the image.final StringReturns counter to start of image data.final intReturns file format.final StringReturns the file name.final StringReturns the file suffix.doubledoubledoublefinal intReturns the image orientation.static intReturns the image orientation associated with a string.static StringgetImageOrientationStr(int m) Return the string associated with an image orientation.final booleanReturn whether or not the image's slices are time based.doublefloat[]DOCUMENT ME!getLUT()Returns the LUT.final doublegetMax()Returns max pixel value of the image.final doublegetMaxB()Returns max blue pixel value of the image.final doublegetMaxG()Returns max green pixel value of the image.final doublegetMaxR()Returns max red pixel value of the image.final doublegetMin()Returns min pixel value of the image.final doublegetMinB()Returns min blue pixel value of the image.final doublegetMinG()Returns min green pixel value of the image.final doublegetMinR()Returns min red pixel value of the image.final intReturns the modality.static intReturns the modality associated with a string.static String[]Return all the modality strings as an array.static StringgetModalityStr(int m) Return the string associated with a modality.final booleanReturns whether or not the image is in multiple files (tiff).static intgetNumOfBytesPerPixel(int dataType) Returns the number of bytes per pixel based on the data type.final intReturns the header offset.float[]Returns the origin.floatgetOrigin(int axis) Returns the origin value of the requested axis.final booleanfloat[]getOriginAtSlice(int slice) Gets the origin of a particular slice; resets for the z dimension.final shortPhotometric interpretion.final ShortReturns pixel pad value.getPrimaryInfo(TransMatrix matrix) Method called by many extending classes to return basic information in the dialog common to all images.final doubleReturns the intercept.final doubleReturns the slope.final floatgetResolution(int dim) Returns the resolution of the requested dimension.final float[]Returns each dimension's resolution.intgetSize()Returns the size of the slice image in byte which represented by this object.final floatReturns the thickness of the image slices.final int[]Returns the units of measure.intgetUnitsOfMeasure(int dim) Returns the units of measure for the given dimension.static String[]Deprecated.should now use enumstatic StringgetUnitsOfMeasureAbbrevStr(int i) Deprecated.should now use enumstatic intgetUnitsOfMeasureFromStr(String selectedOutput) Deprecated.should now use enumstatic String[]Deprecated.should use enumstatic StringgetUnitsOfMeasureStr(int xUnits) Deprecated.should now use enumReturns the volume unit for the data.booleanisDicomOrdered() returns true if the file is in dicom order, false otherwise.static intoppositeOrient(int orient) Helper method that returns the opposite axis orientation of the one sent in; that is, R2L for L2R, A2P for P2A, etc.static booleansameAxis(int axisA, int axisB) Helper method to determine if axis A and axis B are the same axis: that is, if both are the patient x-axis, they will be either R2L or L2R.voidsetAxisOrientation(int[] axOrient) Sets (copies) orientation of each axis.voidsetAxisOrientation(int axOrient, int axis) Sets the image orientation in the specified axis.voidsetCameraMake(String cameraMake) voidsetCameraModel(String cameraModel) voidsetCompressionType(int type) Sets the compression type.final voidsetDataType(int type) Sets format of image data.voidsetDTIParameters(DTIParameters dtiParams) voidsetEndianess(boolean endness) Describes file endianess.voidsetExposureTime(double exposureTime) final voidsetExtents(int[] dims) Sets dimensionality of the images.voidsetExtents(int extent, int dim) Sets dimensionality for image, on a per dimension basis.final voidsetFileDirectory(String directory) DOCUMENT ME!final voidsetFileFormat(int format) Sets the file format.voidsetFileName(String fname) Sets the file name.final voidsetFileSuffix(String suffix) Sets the file suffix.voidsetFNumber(double FNumber) voidsetFocalLength(double focalLength) voidsetFocalLength35(double focalLength35) voidsetImageOrientation(int orient) Sets the image orientation.voidsetISOSpeedRating(double ISOSpeedRating) voidSets the model lutvoidsetMax(double Max) Sets max pixel value of image.final voidsetMaxB(double Max) Sets max blue pixel value of image.voidsetMaxG(double Max) Sets max green pixel value of image.voidsetMaxR(double Max) Sets max red pixel value of image.final voidsetMin(double Min) Sets min pixel value of image.final voidsetMinB(double Min) Sets min blue pixel value of image.final voidsetMinG(double Min) Sets min green pixel value of image.final voidsetMinR(double Min) Sets min red pixel value of image.final voidsetModality(int mod) Sets the modality.final voidsetMultiFile(boolean flag) Sets the flag for multiple files.final voidsetOffset(int off) Sets the header offset.voidsetOrigin(float[] originlocat) Sets the origin.voidsetOrigin(float originCoord, int axis) Sets the start location in the specified axis. creates the startLocations if the arrray has not yet been created.voidsetOriginalEndianess(boolean originalEndness) voidsetPhotometric(short value) Sets photometric interpretation.final voidsetPixelPadValue(Short value) Sets pixel pad value: used in some Dicom images.final voidsetRescaleIntercept(double intercept) Sets the rescale intercept.final voidsetRescaleSlope(double slope) Sets the rescale slope.final voidsetResolutions(float[] resolutions) Sets the resolutions of the image.final voidsetResolutions(float resolution, int dim) Sets the resolutions of the image, on a per dimension basis.voidsetSliceThickness(float thickness) Sets the thickness of the image slices.voidsetTagDescription(Vector<String> tagDescription) voidsetTagName(Vector<String> tagName) final voidsetUnitsOfMeasure(int[] unitMeasure) Sets (copies) units of measure for image.final voidsetUnitsOfMeasure(int unitMeasure, int dim) Sets units of measure for image, on a per dimension basis.final voidsetUnitsOfMeasure(FileInfoBase.Unit[] unitMeasure) Sets (copies) units of measure for image.final voidsetUnitsOfMeasure(FileInfoBase.Unit unitMeasure, int dim) Sets units of measure for image, on a per dimension basis.toString()Gives the information contained in FileInfo in a string.Methods inherited from class gov.nih.mipav.model.structures.ModelSerialCloneable
clone, nativeClone
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
sUnits
Deprecated.Array of space units: inches, mm, etc. -
tUnits
Deprecated.Array of time units: seconds, minutes, etc. -
UNKNOWN_MEASURE
public static final int UNKNOWN_MEASUREUnit of measurement unknown.- See Also:
-
INCHES
public static final int INCHESUnit of measurement inches.- See Also:
-
MILS
public static final int MILSUnits of measurement mil (thousandth of an inch)- See Also:
-
CENTIMETERS
public static final int CENTIMETERSUnit of measurement centimeters.- See Also:
-
ANGSTROMS
public static final int ANGSTROMSUnit of measurement angstroms.- See Also:
-
NANOMETERS
public static final int NANOMETERSUnit of measurement nanometers.- See Also:
-
MICROMETERS
public static final int MICROMETERSUnit of measurement micrometers.- See Also:
-
MILLIMETERS
public static final int MILLIMETERSUnit of measurement millimeters.- See Also:
-
METERS
public static final int METERSUnit of measurement meters.- See Also:
-
KILOMETERS
public static final int KILOMETERSUnit of measurement kilometers.- See Also:
-
MILES
public static final int MILESUnit of measurement miles.- See Also:
-
NANOSEC
public static final int NANOSECUnit of measurement nanoseconds.- See Also:
-
MICROSEC
public static final int MICROSECUnit of measurement microseconds.- See Also:
-
MILLISEC
public static final int MILLISECUnit of measurement milliseconds.- See Also:
-
SECONDS
public static final int SECONDSUnit of measurement seconds.- See Also:
-
MINUTES
public static final int MINUTESUnit of measurement minutes.- See Also:
-
HOURS
public static final int HOURSUnit of measurement hours.- See Also:
-
HZ
public static final int HZUnit of measurement hertz.- See Also:
-
PPM
public static final int PPMUnit of measurement part-per-million.- See Also:
-
RADS
public static final int RADSRadians per second.- See Also:
-
DEGREES
public static final int DEGREES- See Also:
-
UNKNOWN_STRING
String version of units of measurement - unknown.- See Also:
-
INCHES_STRING
String version of units of measurement - inches.- See Also:
-
MILS_STRING
String version of units of measurement - mils.- See Also:
-
CENTIMETERS_STRING
String version of units of measurement - centimeters.- See Also:
-
ANGSTROMS_STRING
String version of units of measurement - angstroms.- See Also:
-
NANOMETERS_STRING
String version of units of measurement - nanometers.- See Also:
-
MICROMETERS_STRING
String version of units of measurement - micrometers.- See Also:
-
MILLIMETERS_STRING
String version of units of measurement - millimeters.- See Also:
-
METERS_STRING
String version of units of measurement - meters.- See Also:
-
KILOMETERS_STRING
String version of units of measurement - kilometers.- See Also:
-
MILES_STRING
String version of units of measurement - miles.- See Also:
-
NANOSEC_STRING
String version of units of measurement - nanoseconds.- See Also:
-
MICROSEC_STRING
String version of units of measurement - microseconds.- See Also:
-
MILLISEC_STRING
String version of units of measurement - milliseconds.- See Also:
-
SECONDS_STRING
String version of units of measurement - seconds.- See Also:
-
MINUTES_STRING
String version of units of measurement - minutes.- See Also:
-
HOURS_STRING
String version of units of measurement - hours.- See Also:
-
HZ_STRING
String version of units of measurement - hertz.- See Also:
-
PPM_STRING
String version of units of measurement - part-per-million.- See Also:
-
RADS_STRING
String version of units of measurement - radians per second.- See Also:
-
DEGREES_STRING
String version of units of measurement - degrees.- See Also:
-
conversionSpaceTimeUnits
public static final double[] conversionSpaceTimeUnitsDeprecated.should use enum conversionsConverting between space units. Conversion is to millimeters (the default). Table converts to mm by multiplication. Converts from mm by division. Example: inches * 25.4f = mm mm / 25.4f = inches. Converting between time units. Conversion is to seconds(the default). Table converts to seconds by multiplication. Converts from seconds by division. Example: minutes * 0.01667 = seconds seconds / 0.01667 = minutes. Hertz and radians per second convert to/from hz. parts-per-million does not convert. -
UNKNOWN_MODALITY
public static final int UNKNOWN_MODALITYImage modality unknown.- See Also:
-
BIOMAGNETIC_IMAGING
public static final int BIOMAGNETIC_IMAGINGImage modality biomagnetic imaging.- See Also:
-
COLOR_FLOW_DOPPLER
public static final int COLOR_FLOW_DOPPLERImage modality color flow doppler.- See Also:
-
COMPUTED_RADIOGRAPHY
public static final int COMPUTED_RADIOGRAPHYImage modality CR.- See Also:
-
COMPUTED_TOMOGRAPHY
public static final int COMPUTED_TOMOGRAPHYImage modality CT.- See Also:
-
DUPLEX_DOPPLER
public static final int DUPLEX_DOPPLERImage modality duplex doppler.- See Also:
-
DIAPHANOGRAPHY
public static final int DIAPHANOGRAPHYImage modality diaphanography.- See Also:
-
DIGITAL_RADIOGRAPHY
public static final int DIGITAL_RADIOGRAPHYImage modality digital radiography.- See Also:
-
ENDOSCOPY
public static final int ENDOSCOPYImage modality endoscopy.- See Also:
-
GENERAL_MICROSCOPY
public static final int GENERAL_MICROSCOPYImage modality general microscopy.- See Also:
-
HARDCOPY
public static final int HARDCOPYImage modality hard copy.- See Also:
-
INTRAORAL_RADIOGRAPHY
public static final int INTRAORAL_RADIOGRAPHYImage modality intraoral radiography.- See Also:
-
LASER_SURFACE_SCAN
public static final int LASER_SURFACE_SCANImage modality laser surface scan.- See Also:
-
MAGNETIC_RESONANCE_ANGIOGRAPHY
public static final int MAGNETIC_RESONANCE_ANGIOGRAPHYImage modality MR angiography.- See Also:
-
MAMMOGRAPHY
public static final int MAMMOGRAPHYImage modality mammography.- See Also:
-
MAGNETIC_RESONANCE
public static final int MAGNETIC_RESONANCEImage modality MR.- See Also:
-
MAGNETIC_RESONANCE_SPECTROSCOPY
public static final int MAGNETIC_RESONANCE_SPECTROSCOPYImage modality MR SPECT.- See Also:
-
NUCLEAR_MEDICINE
public static final int NUCLEAR_MEDICINEImage modality nuclear medicine.- See Also:
-
OTHER
public static final int OTHERImage modality other.- See Also:
-
POSITRON_EMISSION_TOMOGRAPHY
public static final int POSITRON_EMISSION_TOMOGRAPHYImage modality PET.- See Also:
-
PANORAMIC_XRAY
public static final int PANORAMIC_XRAYImage modality panoramtic X ray.- See Also:
-
RADIO_FLUOROSCOPY
public static final int RADIO_FLUOROSCOPYImage modality radio fluoroscopy.- See Also:
-
RADIOGRAPHIC_IMAGING
public static final int RADIOGRAPHIC_IMAGINGImage modality radiographic imaging.- See Also:
-
RADIOTHERAPY_DOSE
public static final int RADIOTHERAPY_DOSEImage modality radiotherapy dose.- See Also:
-
RADIOTHERAPY_IMAGE
public static final int RADIOTHERAPY_IMAGEImage modality radiotherapy image.- See Also:
-
RADIOTHERAPY_PLAN
public static final int RADIOTHERAPY_PLANImage modality radiotherapy plan.- See Also:
-
RADIOTHERAPY_RECORD
public static final int RADIOTHERAPY_RECORDImage modality radiotherapy record.- See Also:
-
RADIOTHERAPY_STRUCTURE_SET
public static final int RADIOTHERAPY_STRUCTURE_SETImage modality radiotherapy structure set.- See Also:
-
SLIDE_MICROSCOPY
public static final int SLIDE_MICROSCOPYImage modality slide microscopy.- See Also:
-
SINGLE_PHOTON_EMISSION_COMPUTED_TOMOGRAPHY
public static final int SINGLE_PHOTON_EMISSION_COMPUTED_TOMOGRAPHYImage modality SPECT.- See Also:
-
THERMOGRAPHY
public static final int THERMOGRAPHYImage modality thermography.- See Also:
-
ULTRASOUND
public static final int ULTRASOUNDImage modality ultrasound.- See Also:
-
XRAY_ANGIOGRAPHY
public static final int XRAY_ANGIOGRAPHYImage modality X ray angiography.- See Also:
-
EXTERNAL_CAMERA_PHOTOGRAPHY
public static final int EXTERNAL_CAMERA_PHOTOGRAPHYImage modality external camera photography.- See Also:
-
RED_FREE
public static final int RED_FREEImage modality Red Free.- See Also:
-
FA
public static final int FAImage modality Fluorescein Angiography.- See Also:
-
ICG
public static final int ICGImage modality IndoCyanine Green.- See Also:
-
modalityStr
Deprecated.No longer needed since enum works nowArray of modality strings -- again, numbering starts at 1, not 0. -
ORI_UNKNOWN_TYPE
public static final int ORI_UNKNOWN_TYPEAxis orientation unknown.- See Also:
-
ORI_R2L_TYPE
public static final int ORI_R2L_TYPEAxis orientation Right to Left.- See Also:
-
ORI_L2R_TYPE
public static final int ORI_L2R_TYPEAxis orientation Left to Right.- See Also:
-
ORI_P2A_TYPE
public static final int ORI_P2A_TYPEAxis orientation Posterior to Anterior.- See Also:
-
ORI_A2P_TYPE
public static final int ORI_A2P_TYPEAxis orientation Anterior to Posterior.- See Also:
-
ORI_I2S_TYPE
public static final int ORI_I2S_TYPEAxis orientation Inferior to Superior.- See Also:
-
ORI_S2I_TYPE
public static final int ORI_S2I_TYPEAxis orientation Superior to Inferior.- See Also:
-
axisOrientationStr
Array of axis orientation strings. -
AXIAL
public static final int AXIALAxial orientation.- See Also:
-
CORONAL
public static final int CORONALCoronal orientation.- See Also:
-
SAGITTAL
public static final int SAGITTALSagittal orientation.- See Also:
-
UNKNOWN_ORIENT
public static final int UNKNOWN_ORIENTUnknown orientation.- See Also:
-
imageOrientationStr
Array of image orientation strings. -
TRANSFORM_UNKNOWN
public static final int TRANSFORM_UNKNOWNUnknown transform ID.- See Also:
-
TRANSFORM_SCANNER_ANATOMICAL
public static final int TRANSFORM_SCANNER_ANATOMICALScanner Anatomical transform ID.- See Also:
-
TRANSFORM_ANOTHER_DATASET
public static final int TRANSFORM_ANOTHER_DATASETAnother Dataset transform ID.- See Also:
-
TRANSFORM_TALAIRACH_TOURNOUX
public static final int TRANSFORM_TALAIRACH_TOURNOUXTalairach Tournoux transform ID.- See Also:
-
TRANSFORM_MNI_152
public static final int TRANSFORM_MNI_152MNI 152 transform ID.- See Also:
-
COMPRESSION_NONE
public static final int COMPRESSION_NONEIndicates no compression.- See Also:
-
COMPRESSION_ZIP
public static final int COMPRESSION_ZIPIndicates zip compression of an image.- See Also:
-
COMPRESSION_GZIP
public static final int COMPRESSION_GZIPIndicates gzip compression of an image.- See Also:
-
COMPRESSION_BZIP2
public static final int COMPRESSION_BZIP2Indicates bzip2 compression of an image.- See Also:
-
axisOrientation
protected int[] axisOrientationaxis orientation used to support image ordering and display for medical images. We support the right hand rule where the origin is the upper left hand of the image with the positive axis.x - left to right y - top to botton z - into the screen
-
fileName
The file name which includes the path information. -
fileSuffix
File suffix (ex. "jpg") -
imageOrientation
protected int imageOrientationIndicates the image orientation (i.e. Axial, Coronal, ...) -
modality
protected int modalityIndicates the modality (medical image type) of the dataset. -
origin
protected float[] originThe origin to support image locations (ie. DICOM, MINC ...) it is relative to the image origin. the positive axis are right hand rule.x - left to right y - top to botton z - into the screen
-
compressionType
private int compressionTypeUsed to indicate if the raw data was also compression (0 = no, 1 = zip). -
dataType
private int dataTypeThe data type of the data (i.e. byte, short, float ... -
dimResolutions
private float[] dimResolutionsPixel or voxel resolutions for each dimension - default = 1.0. The z-dim resolution should be the spacing between the centers of adjacent slices; sometimes this will match the slice thickness, but not always. -
endianess
private boolean endianessThe Endianess of the data. Intel, DEC Alpha ***** LSB first byte LITTLE_ENDIAN (false) Motorola (MAC), SPARC (SUN), SGI IRIX MSB first byte BIG_ENDIAN (true) -
originalEndianess
private boolean originalEndianessUsed for checking for endianess changes in the ModelImage.reallocate(final int type) function. -
extents
private int[] extentsImage extents as decribed by the image file format. -
fileFormat
private int fileFormatFile format as defined in the Filebase. -
max
private double maxImage maximum intensity for single channel image. -
maxB
private double maxBImage maximum intensity for the blue channel of an RGB image. -
maxG
private double maxGImage maximum intensity for the green channel of an RGB image. -
maxR
private double maxRImage maximum intensity for the red channel of an RGB image. -
min
private double minImage minimum intensity for single channel image. -
minB
private double minBImage minimum intensity for the blue channel of an RGB image. -
minG
private double minGImage minimum intensity for the green channel of an RGB image. -
minR
private double minRImage minimum intensity for the red channel of an RGB image. -
lut
ModelLUT associated with fileinfo -
multiFile
private boolean multiFileFlag that indicates whether or not the image is in multiple files (tiff). -
offset
private int offsetNumber of bytes to the start the image data - ie. the header length -
photometric
private short photometricImage minimum intensity for single channel image. -
pixelPadValue
Some file formats have a pad value for pixels outside the acquisition domain. -
rescaleIntercept
private double rescaleInterceptDICOM images have a rescale y-intercept value that we have also kept in the base. -
rescaleSlope
private double rescaleSlopeDICOM images have a rescale slope value that we have also kept in the base. -
sliceThickness
private float sliceThicknessThe thickness of individual slices in the image volume. Stored in dicom tag 0018,0050 and various other places in other file formats. -
unitsOfMeasure
Describes the units of measure for the dataset. -
tagName
-
tagDescription
-
focalLength
protected double focalLength -
focalLength35
protected double focalLength35 -
cameraMake
-
cameraModel
-
exposureTime
protected double exposureTime -
FNumber
protected double FNumber -
ISOSpeedRating
protected double ISOSpeedRating -
dtiParams
-
-
Constructor Details
-
FileInfoBase
fileInfo constructor.- Parameters:
name- name of filedirectory- file directoryformat- file storage format -- see FileBase.java
-
FileInfoBase
Internal constructor for clone usage.
-
-
Method Details
-
displayAboutInfo
Abstract method which is used by the extending class to display information about the window.- Parameters:
dialog- Area where image information is to be displayed.matrix- Transformation matrix
-
getAboutInfo
Abstract method which is used by the extending class to return information about the file header.- Parameters:
matrix- Transformation matrix- Returns:
- A string containing information from the image header.
-
copyCoreInfo
Helper method to copy important file info type to another file info type.- Parameters:
originalInfo- source file info.newInfo- destination file info.
-
copyCoreInfo
public static void copyCoreInfo(FileInfoBase[] originalInfo, FileInfoBase[] newInfo, boolean[] listNoCopy) Helper method to copy core information from one fileinfo into another, this method also has a list of fileinfos NOT to copy (used by JDialogRemoveSlices).- Parameters:
originalInfo- FileInfoBase[] original file infos (longer list)newInfo- FileInfoBase[] new file infos (shorter list)listNoCopy- boolean[] boolean array of indices into the original fileinfos that should not be copied
-
getAxisOrientationFromStr
Returns the axis orientation associated with a string.- Parameters:
s- String to test- Returns:
- axis orientation
-
getAxisOrientationStr
Return the string associated with an axis orientation.- Parameters:
m- int representing the axis orientation (see the static definitions)- Returns:
- String representing the string associated with the axis orientation.
-
getDataTypeFromStr
Returns the image data type associated with a string.- Parameters:
s- String to test- Returns:
- data type
-
getEndianessFromStr
Returns the endianess associated with a string.- Parameters:
s- String to test- Returns:
- Big endian or little endian
-
getImageOrientationFromStr
Returns the image orientation associated with a string.- Parameters:
s- String to test- Returns:
- image orientation
-
getImageOrientationStr
Return the string associated with an image orientation.- Parameters:
m- the orientation (see the static definitions)- Returns:
- the string associated with the orientation.
-
getModalityFromStr
Returns the modality associated with a string.- Parameters:
s- String to test- Returns:
- modality
-
getModalityStr
Return all the modality strings as an array.- Returns:
- String[] - array containing the strings associated with modalities.
-
getModalityStr
Return the string associated with a modality.- Parameters:
m- the modality (see the static definitions)- Returns:
- the string associated with the modality.
-
getNumOfBytesPerPixel
public static int getNumOfBytesPerPixel(int dataType) Returns the number of bytes per pixel based on the data type.- Parameters:
dataType- the data type.- Returns:
- the number of bytes per pixel.
- Throws:
IllegalArgumentException- DOCUMENT ME!
-
oppositeOrient
public static int oppositeOrient(int orient) Helper method that returns the opposite axis orientation of the one sent in; that is, R2L for L2R, A2P for P2A, etc.- Parameters:
orient- DOCUMENT ME!- Returns:
- int Opposite image orientation
-
sameAxis
public static boolean sameAxis(int axisA, int axisB) Helper method to determine if axis A and axis B are the same axis: that is, if both are the patient x-axis, they will be either R2L or L2R.- Parameters:
axisA- Axis A: one of the defined ORI_ types.axisB- Axis B: one of the defined ORI_ types.- Returns:
- boolean
trueif axis A and axis B are the same axis
-
displayAboutInfo
Displays the file information.- Parameters:
dialog- dialog box that is written to
-
displayPrimaryInfo
Method called by many extending classes to display basic information in the dialog common to all images.- Parameters:
dialog- Area where image information is to be displayed.matrix- Transformation matrix
-
getPrimaryInfo
Method called by many extending classes to return basic information in the dialog common to all images.- Parameters:
matrix- Transformation matrix- Returns:
- The basic image header infomation.
-
finalize
public void finalize()Prepares this class for cleanup. -
getAxisDirection
public int[] getAxisDirection()Get the direction for accessing each axis of data. This is based on the values in the axisOrientation array.- Returns:
- int[] Array of +/-1 values with one entry for each axis. A -1 indicates that the direction is reversed.
-
getAxisOrientation
public int[] getAxisOrientation()Returns orientation of each axis.- Returns:
- int[] orientation of each axis
- See Also:
-
getAxisOrientation
public int getAxisOrientation(int axis) Returns orientation of entered axis.- Parameters:
axis- Axis to get orientation for- Returns:
- int orientation of specified axis
- See Also:
-
getCompressionType
public int getCompressionType()Gets the compression type.- Returns:
- the compression type
-
getDataType
public final int getDataType()Returns data type.- Returns:
- int type of data in file
-
getEndianess
public final boolean getEndianess()Descibes file endianess.- Returns:
- boolean
false= litteEndian formattrue= bigEndian format
-
getOriginalEndianess
public final boolean getOriginalEndianess() -
getExtents
public final int[] getExtents()Returns the dimensionality of the image.- Returns:
- int[] units (Inches or millimeters);
-
getFileDirectory
Returns counter to start of image data.- Returns:
- String that indicates location of the file
-
getFileFormat
public final int getFileFormat()Returns file format.- Returns:
- int file format (TIFF, raw, Analyze...)
-
getFileName
Returns the file name.- Returns:
- String indicating file name
-
getFileSuffix
Returns the file suffix.- Returns:
- String representing the filename suffix
-
getImageOrientation
public final int getImageOrientation()Returns the image orientation.- Returns:
- int representing orientation
-
getIs2_5D
public final boolean getIs2_5D()Return whether or not the image's slices are time based.- Returns:
- boolean is 2.5 D
-
getLPSOrigin
public float[] getLPSOrigin()DOCUMENT ME!- Returns:
- float[] LPSOrigin
-
getLUT
Returns the LUT. -
getMax
public final double getMax()Returns max pixel value of the image.- Returns:
- double Returns double max pixel value of the image
-
getMaxB
public final double getMaxB()Returns max blue pixel value of the image.- Returns:
- double Returns double blue max pixel value of the image
-
getMaxG
public final double getMaxG()Returns max green pixel value of the image.- Returns:
- double Returns double green max pixel value of the image
-
getMaxR
public final double getMaxR()Returns max red pixel value of the image.- Returns:
- double Returns double red max pixel value of the image
-
getMin
public final double getMin()Returns min pixel value of the image.- Returns:
- double Returns double min pixel value of the image
-
getMinB
public final double getMinB()Returns min blue pixel value of the image.- Returns:
- double Returns double blue min pixel value of the image
-
getMinG
public final double getMinG()Returns min green pixel value of the image.- Returns:
- couble Returns double green min pixel value of the image
-
getMinR
public final double getMinR()Returns min red pixel value of the image.- Returns:
- couble Returns double red min pixel value of the image
-
getModality
public final int getModality()Returns the modality.- Returns:
- int indicating modality
-
getMultiFile
public final boolean getMultiFile()Returns whether or not the image is in multiple files (tiff).- Returns:
- boolean true indicates multiple files, false o.w.
-
getOffset
public final int getOffset()Returns the header offset.- Returns:
- int header offset
-
getOrigin
public float[] getOrigin()Returns the origin.- Returns:
- float[] the origin
-
getOrigin
public float getOrigin(int axis) Returns the origin value of the requested axis.- Parameters:
axis- requested axis; x is 0, y is 1, z is 2- Returns:
- float orientation of axis
-
getOriginAtSlice
public float[] getOriginAtSlice(int slice) Gets the origin of a particular slice; resets for the z dimension.- Parameters:
slice- Z-dimension slice.- Returns:
- float[] New start locations
-
getPhotometric
public final short getPhotometric()Photometric interpretion.1 indicates 0 is black 0 indicates 0 is white 2 RGB 3 indexed color LUT is saved with image 4 Transparency Mask - Returns:
- short Returns interpretation
-
getPixelPadValue
Returns pixel pad value.- Returns:
- Short Returns pixel pad value
-
getRescaleIntercept
public final double getRescaleIntercept()Returns the intercept.- Returns:
- double rescale intercept
-
getRescaleSlope
public final double getRescaleSlope()Returns the slope.- Returns:
- double rescale slope
-
getResolution
public final float getResolution(int dim) Returns the resolution of the requested dimension.- Parameters:
dim- The dimension to return the resolution of.- Returns:
- The resolution of one of the image dimensions.
-
getResolutions
public final float[] getResolutions()Returns each dimension's resolution.- Returns:
- float[] dimension resolutions
-
getSize
public int getSize()Returns the size of the slice image in byte which represented by this object.- Returns:
- the size of the slice image in byte which represented by this object.
-
getSliceThickness
public final float getSliceThickness()Returns the thickness of the image slices.- Returns:
- slice thickness
-
getUnitsOfMeasure
public final int[] getUnitsOfMeasure()Returns the units of measure.- Returns:
- int[] units (Inches or millimeters);
-
getUnitsOfMeasure
public int getUnitsOfMeasure(int dim) Returns the units of measure for the given dimension.- Parameters:
dim- dimension index- Returns:
- int units (Inches or millimeters);
-
getVolumeUnitsOfMeasureStr
Returns the volume unit for the data. Assumes all three dimensions are the same units.- Returns:
- String associated volume unit of measure.
-
getAreaUnitsOfMeasureStr
Returns the area unit for the data. Assumes both dimensions are the same units.- Returns:
- String associated volume unit of measure.
-
isDicomOrdered
public boolean isDicomOrdered()isDicomOrdered() returns true if the file is in dicom order, false otherwise.- Returns:
- true if the file is in dicom order, false otherwise
-
setAxisOrientation
public void setAxisOrientation(int[] axOrient) Sets (copies) orientation of each axis.- Parameters:
axOrient- axis orientation array- See Also:
-
setAxisOrientation
public void setAxisOrientation(int axOrient, int axis) Sets the image orientation in the specified axis. Creates the axisOrientation if the array has not yet been created.- Parameters:
axOrient- orientationaxis- axis of orientation; x is 0, y is 1, z is 2.
-
setCompressionType
public void setCompressionType(int type) Sets the compression type.- Parameters:
type- compression type
-
setDataType
public final void setDataType(int type) Sets format of image data.- Parameters:
type- data type defined in ModelStorageBase
-
setEndianess
public void setEndianess(boolean endness) Describes file endianess.- Parameters:
endness- endianess of the file format
-
setOriginalEndianess
public void setOriginalEndianess(boolean originalEndness) -
setExtents
public final void setExtents(int[] dims) Sets dimensionality of the images.- Parameters:
dims- dimensionality for x,y, and z ... dimensions
-
setExtents
public void setExtents(int extent, int dim) Sets dimensionality for image, on a per dimension basis.- Parameters:
extent- Extent of this dimensiondim- Dimension to set extent in
-
setFileDirectory
DOCUMENT ME!- Parameters:
directory- DOCUMENT ME!
-
setFileFormat
public final void setFileFormat(int format) Sets the file format.- Parameters:
format- File format
-
setFileName
Sets the file name.- Parameters:
fname- image file name
-
setFileSuffix
Sets the file suffix.- Parameters:
suffix- file suffix
-
setImageOrientation
public void setImageOrientation(int orient) Sets the image orientation.- Parameters:
orient- Orientation.
-
setLUT
Sets the model lut- Parameters:
reference- to the model lut for this file info (often shared between file infos to conserve space
-
setMax
public void setMax(double Max) Sets max pixel value of image.- Parameters:
Max- max pixel value
-
setMaxB
public final void setMaxB(double Max) Sets max blue pixel value of image.- Parameters:
Max- max blue pixel value
-
setMaxG
public void setMaxG(double Max) Sets max green pixel value of image.- Parameters:
Max- max green pixel value
-
setMaxR
public void setMaxR(double Max) Sets max red pixel value of image.- Parameters:
Max- max red pixel value
-
setMin
public final void setMin(double Min) Sets min pixel value of image.- Parameters:
Min- Min pixel value
-
setMinB
public final void setMinB(double Min) Sets min blue pixel value of image.- Parameters:
Min- min blue pixel value
-
setMinG
public final void setMinG(double Min) Sets min green pixel value of image.- Parameters:
Min- min green pixel value
-
setMinR
public final void setMinR(double Min) Sets min red pixel value of image.- Parameters:
Min- min red pixel value
-
setModality
public final void setModality(int mod) Sets the modality.- Parameters:
mod- modality
-
setMultiFile
public final void setMultiFile(boolean flag) Sets the flag for multiple files.- Parameters:
flag-trueindicates multiple files for image,falseo.w.
-
setOffset
public final void setOffset(int off) Sets the header offset.- Parameters:
off- the header offset
-
setOrigin
public void setOrigin(float[] originlocat) Sets the origin.- Parameters:
originlocat- origin location array- See Also:
-
setOrigin
public void setOrigin(float originCoord, int axis) Sets the start location in the specified axis. creates the startLocations if the arrray has not yet been created.- Parameters:
originCoord- start locationaxis- axis of orientation; x is 0, y is 1, z is 2- See Also:
-
setPhotometric
public void setPhotometric(short value) Sets photometric interpretation.1 indicates 0 is black 0 indicates 0 is white 2 RGB 3 indexed color LUT is saved with image - Parameters:
value- photometric value
-
setPixelPadValue
Sets pixel pad value: used in some Dicom images.- Parameters:
value- pixel pad value
-
setRescaleIntercept
public final void setRescaleIntercept(double intercept) Sets the rescale intercept.- Parameters:
intercept- the intercept
-
setRescaleSlope
public final void setRescaleSlope(double slope) Sets the rescale slope.- Parameters:
slope- the slope
-
setResolutions
public final void setResolutions(float[] resolutions) Sets the resolutions of the image.- Parameters:
resolutions- resolution object
-
setResolutions
public final void setResolutions(float resolution, int dim) Sets the resolutions of the image, on a per dimension basis.- Parameters:
resolution- Resolution for the dimensiondim- Dimension to set resolution in
-
setSliceThickness
public void setSliceThickness(float thickness) Sets the thickness of the image slices.- Parameters:
thickness- The slice thickness.
-
setUnitsOfMeasure
Sets (copies) units of measure for image.- Parameters:
unitMeasure- unit of measure for a specified dimension
-
setUnitsOfMeasure
public final void setUnitsOfMeasure(int[] unitMeasure) Sets (copies) units of measure for image.- Parameters:
unitMeasure- unit of measure for a specified dimension
-
setUnitsOfMeasure
Sets units of measure for image, on a per dimension basis.- Parameters:
unitMeasure- Unit of measure for the dimensiondim- Dimension to set unit of measure in
-
setUnitsOfMeasure
public final void setUnitsOfMeasure(int unitMeasure, int dim) Sets units of measure for image, on a per dimension basis.- Parameters:
unitMeasure- Unit of measure for the dimensiondim- Dimension to set unit of measure in
-
setTagName
-
setTagDescription
-
setFocalLength
public void setFocalLength(double focalLength) -
getFocalLength
public double getFocalLength() -
setFocalLength35
public void setFocalLength35(double focalLength35) -
getFocalLength35
public double getFocalLength35() -
setCameraMake
-
getCameraMake
-
setCameraModel
-
getCameraModel
-
setExposureTime
public void setExposureTime(double exposureTime) -
getExposureTime
public double getExposureTime() -
setFNumber
public void setFNumber(double FNumber) -
getFNumber
public double getFNumber() -
setISOSpeedRating
public void setISOSpeedRating(double ISOSpeedRating) -
getISOSpeedRating
public double getISOSpeedRating() -
toString
Gives the information contained in FileInfo in a string. -
getUnitsOfMeasureAbbrevStr
Deprecated.should now use enum- Parameters:
i-- Returns:
-
getUnitsOfMeasureStr
Deprecated.should now use enum- Parameters:
xUnits-- Returns:
-
getUnitsOfMeasureFromStr
Deprecated.should now use enum- Parameters:
selectedOutput-- Returns:
-
getAllSameDimUnits
public static int[] getAllSameDimUnits(int measure) Deprecated.should now use enum- Parameters:
selectedOutput-- Returns:
-
getUnitsOfMeasureAbbrevStr
Deprecated.should now use enumReturn all the abbreviated units of measure strings as an array.- Returns:
- String[] - array containing the abbreviated strings associated with units of measure.
-
getUnitsOfMeasureStr
Deprecated.should use enumReturn all the units of measure strings as an array.- Returns:
- String[] - array containing the strings associated with units of measure.
-
getDTIParameters
- Returns:
- the dtiParams
-
setDTIParameters
- Parameters:
dtiParams- the dtiParams to set
-