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:
java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
FileInfoAfni
,FileInfoAnalyze
,FileInfoAvi
,FileInfoBFLOAT
,FileInfoBioRad
,FileInfoBMP
,FileInfoBRUKER
,FileInfoCheshire
,FileInfoCOR
,FileInfoCZI
,FileInfoDicom
,FileInfoDM3
,FileInfoFits
,FileInfoGESigna4X
,FileInfoGESigna5X
,FileInfoICS
,FileInfoInterfile
,FileInfoJP2
,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
public abstract class FileInfoBase extends ModelSerialCloneable
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:
FileBase
, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FileInfoBase.AxisOrientation
static class
FileInfoBase.ImageOrientation
static class
FileInfoBase.Modality
static class
FileInfoBase.Unit
static class
FileInfoBase.UnitType
Each unit has a unit type with a given base.
-
Field Summary
Fields Modifier and Type Field Description static int
ANGSTROMS
Unit of measurement angstroms.static java.lang.String
ANGSTROMS_STRING
String version of units of measurement - angstroms.static int
AXIAL
Axial orientation.protected int[]
axisOrientation
axis orientation used to support image ordering and display for medical images.static java.lang.String[]
axisOrientationStr
Array of axis orientation strings.static int
BIOMAGNETIC_IMAGING
Image modality biomagnetic imaging.protected java.lang.String
cameraMake
protected java.lang.String
cameraModel
static int
CENTIMETERS
Unit of measurement centimeters.static java.lang.String
CENTIMETERS_STRING
String version of units of measurement - centimeters.static int
COLOR_FLOW_DOPPLER
Image modality color flow doppler.static int
COMPRESSION_BZIP2
Indicates bzip2 compression of an image.static int
COMPRESSION_GZIP
Indicates gzip compression of an image.static int
COMPRESSION_NONE
Indicates no compression.static int
COMPRESSION_ZIP
Indicates zip compression of an image.private int
compressionType
Used to indicate if the raw data was also compression (0 = no, 1 = zip).static int
COMPUTED_RADIOGRAPHY
Image modality CR.static int
COMPUTED_TOMOGRAPHY
Image modality CT.static double[]
conversionSpaceTimeUnits
Deprecated.should use enum conversionsstatic int
CORONAL
Coronal orientation.private int
dataType
The data type of the data (i.e. byte, short, float ...static int
DEGREES
static java.lang.String
DEGREES_STRING
String version of units of measurement - degrees.static int
DIAPHANOGRAPHY
Image modality diaphanography.static int
DIGITAL_RADIOGRAPHY
Image modality digital radiography.private float[]
dimResolutions
Pixel or voxel resolutions for each dimension - default = 1.0.static int
DUPLEX_DOPPLER
Image modality duplex doppler.private boolean
endianess
The Endianess of the data.static int
ENDOSCOPY
Image modality endoscopy.protected double
exposureTime
private int[]
extents
Image extents as decribed by the image file format.static int
EXTERNAL_CAMERA_PHOTOGRAPHY
Image modality external camera photography.static int
FA
Image modality Fluorescein Angiography.private int
fileFormat
File format as defined in the Filebase.protected java.lang.String
fileName
The file name which includes the path information.protected java.lang.String
fileSuffix
File suffix (ex.protected double
FNumber
protected double
focalLength
protected double
focalLength35
static int
GENERAL_MICROSCOPY
Image modality general microscopy.static int
HARDCOPY
Image modality hard copy.static int
HOURS
Unit of measurement hours.static java.lang.String
HOURS_STRING
String version of units of measurement - hours.static int
HZ
Unit of measurement hertz.static java.lang.String
HZ_STRING
String version of units of measurement - hertz.static int
ICG
Image modality IndoCyanine Green.protected int
imageOrientation
Indicates the image orientation (i.e.private static java.lang.String[]
imageOrientationStr
Array of image orientation strings.static int
INCHES
Unit of measurement inches.static java.lang.String
INCHES_STRING
String version of units of measurement - inches.static int
INTRAORAL_RADIOGRAPHY
Image modality intraoral radiography.protected double
ISOSpeedRating
static int
KILOMETERS
Unit of measurement kilometers.static java.lang.String
KILOMETERS_STRING
String version of units of measurement - kilometers.static int
LASER_SURFACE_SCAN
Image modality laser surface scan.private ModelLUT
lut
ModelLUT associated with fileinfostatic int
MAGNETIC_RESONANCE
Image modality MR.static int
MAGNETIC_RESONANCE_ANGIOGRAPHY
Image modality MR angiography.static int
MAGNETIC_RESONANCE_SPECTROSCOPY
Image modality MR SPECT.static int
MAMMOGRAPHY
Image modality mammography.private double
max
Image maximum intensity for single channel image.private double
maxB
Image maximum intensity for the blue channel of an RGB image.private double
maxG
Image maximum intensity for the green channel of an RGB image.private double
maxR
Image maximum intensity for the red channel of an RGB image.static int
METERS
Unit of measurement meters.static java.lang.String
METERS_STRING
String version of units of measurement - meters.static int
MICROMETERS
Unit of measurement micrometers.static java.lang.String
MICROMETERS_STRING
String version of units of measurement - micrometers.static int
MICROSEC
Unit of measurement microseconds.static java.lang.String
MICROSEC_STRING
String version of units of measurement - microseconds.static int
MILES
Unit of measurement miles.static java.lang.String
MILES_STRING
String version of units of measurement - miles.static int
MILLIMETERS
Unit of measurement millimeters.static java.lang.String
MILLIMETERS_STRING
String version of units of measurement - millimeters.static int
MILLISEC
Unit of measurement milliseconds.static java.lang.String
MILLISEC_STRING
String version of units of measurement - milliseconds.static int
MILS
Units of measurement mil (thousandth of an inch)static java.lang.String
MILS_STRING
String version of units of measurement - mils.private double
min
Image minimum intensity for single channel image.private double
minB
Image minimum intensity for the blue channel of an RGB image.private double
minG
Image minimum intensity for the green channel of an RGB image.private double
minR
Image minimum intensity for the red channel of an RGB image.static int
MINUTES
Unit of measurement minutes.static java.lang.String
MINUTES_STRING
String version of units of measurement - minutes.protected int
modality
Indicates the modality (medical image type) of the dataset.private static java.lang.String[]
modalityStr
Deprecated.No longer needed since enum works nowprivate boolean
multiFile
Flag that indicates whether or not the image is in multiple files (tiff).static int
NANOMETERS
Unit of measurement nanometers.static java.lang.String
NANOMETERS_STRING
String version of units of measurement - nanometers.static int
NANOSEC
Unit of measurement nanoseconds.static java.lang.String
NANOSEC_STRING
String version of units of measurement - nanoseconds.static int
NUCLEAR_MEDICINE
Image modality nuclear medicine.private int
offset
Number of bytes to the start the image data - ie. the header lengthstatic int
ORI_A2P_TYPE
Axis orientation Anterior to Posterior.static int
ORI_I2S_TYPE
Axis orientation Inferior to Superior.static int
ORI_L2R_TYPE
Axis orientation Left to Right.static int
ORI_P2A_TYPE
Axis orientation Posterior to Anterior.static int
ORI_R2L_TYPE
Axis orientation Right to Left.static int
ORI_S2I_TYPE
Axis orientation Superior to Inferior.static int
ORI_UNKNOWN_TYPE
Axis orientation unknown.protected float[]
origin
The origin to support image locations (ie.private boolean
originalEndianess
Used for checking for endianess changes in the ModelImage.reallocate(final int type) function.static int
OTHER
Image modality other.static int
PANORAMIC_XRAY
Image modality panoramtic X ray.private short
photometric
Image minimum intensity for single channel image.private java.lang.Short
pixelPadValue
Some file formats have a pad value for pixels outside the acquisition domain.static int
POSITRON_EMISSION_TOMOGRAPHY
Image modality PET.static int
PPM
Unit of measurement part-per-million.static java.lang.String
PPM_STRING
String version of units of measurement - part-per-million.static int
RADIO_FLUOROSCOPY
Image modality radio fluoroscopy.static int
RADIOGRAPHIC_IMAGING
Image modality radiographic imaging.static int
RADIOTHERAPY_DOSE
Image modality radiotherapy dose.static int
RADIOTHERAPY_IMAGE
Image modality radiotherapy image.static int
RADIOTHERAPY_PLAN
Image modality radiotherapy plan.static int
RADIOTHERAPY_RECORD
Image modality radiotherapy record.static int
RADIOTHERAPY_STRUCTURE_SET
Image modality radiotherapy structure set.static int
RADS
Radians per second.static java.lang.String
RADS_STRING
String version of units of measurement - radians per second.static int
RED_FREE
Image modality Red Free.private double
rescaleIntercept
DICOM images have a rescale y-intercept value that we have also kept in the base.private double
rescaleSlope
DICOM images have a rescale slope value that we have also kept in the base.static int
SAGITTAL
Sagittal orientation.static int
SECONDS
Unit of measurement seconds.static java.lang.String
SECONDS_STRING
String version of units of measurement - seconds.private static long
serialVersionUID
Use serialVersionUID for interoperability.static int
SINGLE_PHOTON_EMISSION_COMPUTED_TOMOGRAPHY
Image modality SPECT.private float
sliceThickness
The thickness of individual slices in the image volume.static int
SLIDE_MICROSCOPY
Image modality slide microscopy.static java.lang.String[]
sUnits
Deprecated.protected java.util.Vector<java.lang.String>
tagDescription
protected java.util.Vector<java.lang.String>
tagName
static int
THERMOGRAPHY
Image modality thermography.static int
TRANSFORM_ANOTHER_DATASET
Another Dataset transform ID.static int
TRANSFORM_MNI_152
MNI 152 transform ID.static int
TRANSFORM_SCANNER_ANATOMICAL
Scanner Anatomical transform ID.static int
TRANSFORM_TALAIRACH_TOURNOUX
Talairach Tournoux transform ID.static int
TRANSFORM_UNKNOWN
Unknown transform ID.static java.lang.String[]
tUnits
Deprecated.static int
ULTRASOUND
Image modality ultrasound.protected FileInfoBase.Unit[]
unitsOfMeasure
Describes the units of measure for the dataset.static int
UNKNOWN_MEASURE
Unit of measurement unknown.static int
UNKNOWN_MODALITY
Image modality unknown.static int
UNKNOWN_ORIENT
Unknown orientation.static java.lang.String
UNKNOWN_STRING
String version of units of measurement - unknown.static int
XRAY_ANGIOGRAPHY
Image modality X ray angiography.
-
Constructor Summary
Constructors Modifier Constructor Description protected
FileInfoBase(FileInfoBase copy)
Internal constructor for clone usage.FileInfoBase(java.lang.String name, java.lang.String directory, int format)
fileInfo constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
copyCoreInfo(FileInfoBase[] originalInfo, FileInfoBase[] newInfo)
Helper method to copy important file info type to another file info type.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).void
displayAboutInfo(JDialogBase dialog)
Displays the file information.abstract void
displayAboutInfo(JDialogBase dialog, TransMatrix matrix)
Abstract method which is used by the extending class to display information about the window.void
displayPrimaryInfo(JDialogText dialog, TransMatrix matrix)
Method called by many extending classes to display basic information in the dialog common to all images.void
finalize()
Prepares this class for cleanup.java.lang.String
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 enumjava.lang.String
getAreaUnitsOfMeasureStr()
Returns the area unit for the data.int[]
getAxisDirection()
Get the direction for accessing each axis of data.int[]
getAxisOrientation()
Returns orientation of each axis.int
getAxisOrientation(int axis)
Returns orientation of entered axis.static int
getAxisOrientationFromStr(java.lang.String s)
Returns the axis orientation associated with a string.static java.lang.String
getAxisOrientationStr(int m)
Return the string associated with an axis orientation.java.lang.String
getCameraMake()
java.lang.String
getCameraModel()
int
getCompressionType()
Gets the compression type.int
getDataType()
Returns data type.static int
getDataTypeFromStr(java.lang.String s)
Returns the image data type associated with a string.boolean
getEndianess()
Descibes file endianess.static boolean
getEndianessFromStr(java.lang.String s)
Returns the endianess associated with a string.double
getExposureTime()
int[]
getExtents()
Returns the dimensionality of the image.java.lang.String
getFileDirectory()
Returns counter to start of image data.int
getFileFormat()
Returns file format.java.lang.String
getFileName()
Returns the file name.java.lang.String
getFileSuffix()
Returns the file suffix.double
getFNumber()
double
getFocalLength()
double
getFocalLength35()
int
getImageOrientation()
Returns the image orientation.static int
getImageOrientationFromStr(java.lang.String s)
Returns the image orientation associated with a string.static java.lang.String
getImageOrientationStr(int m)
Return the string associated with an image orientation.boolean
getIs2_5D()
Return whether or not the image's slices are time based.double
getISOSpeedRating()
float[]
getLPSOrigin()
DOCUMENT ME!ModelLUT
getLUT()
Returns the LUT.double
getMax()
Returns max pixel value of the image.double
getMaxB()
Returns max blue pixel value of the image.double
getMaxG()
Returns max green pixel value of the image.double
getMaxR()
Returns max red pixel value of the image.double
getMin()
Returns min pixel value of the image.double
getMinB()
Returns min blue pixel value of the image.double
getMinG()
Returns min green pixel value of the image.double
getMinR()
Returns min red pixel value of the image.int
getModality()
Returns the modality.static int
getModalityFromStr(java.lang.String s)
Returns the modality associated with a string.static java.lang.String[]
getModalityStr()
Return all the modality strings as an array.static java.lang.String
getModalityStr(int m)
Return the string associated with a modality.boolean
getMultiFile()
Returns whether or not the image is in multiple files (tiff).static int
getNumOfBytesPerPixel(int dataType)
Returns the number of bytes per pixel based on the data type.int
getOffset()
Returns the header offset.float[]
getOrigin()
Returns the origin.float
getOrigin(int axis)
Returns the origin value of the requested axis.boolean
getOriginalEndianess()
float[]
getOriginAtSlice(int slice)
Gets the origin of a particular slice; resets for the z dimension.short
getPhotometric()
Photometric interpretion.java.lang.Short
getPixelPadValue()
Returns pixel pad value.java.lang.String
getPrimaryInfo(TransMatrix matrix)
Method called by many extending classes to return basic information in the dialog common to all images.double
getRescaleIntercept()
Returns the intercept.double
getRescaleSlope()
Returns the slope.float
getResolution(int dim)
Returns the resolution of the requested dimension.float[]
getResolutions()
Returns each dimension's resolution.int
getSize()
Returns the size of the slice image in byte which represented by this object.float
getSliceThickness()
Returns the thickness of the image slices.int[]
getUnitsOfMeasure()
Returns the units of measure.int
getUnitsOfMeasure(int dim)
Returns the units of measure for the given dimension.static java.lang.String[]
getUnitsOfMeasureAbbrevStr()
Deprecated.should now use enumstatic java.lang.String
getUnitsOfMeasureAbbrevStr(int i)
Deprecated.should now use enumstatic int
getUnitsOfMeasureFromStr(java.lang.String selectedOutput)
Deprecated.should now use enumstatic java.lang.String[]
getUnitsOfMeasureStr()
Deprecated.should use enumstatic java.lang.String
getUnitsOfMeasureStr(int xUnits)
Deprecated.should now use enumjava.lang.String
getVolumeUnitsOfMeasureStr()
Returns the volume unit for the data.boolean
isDicomOrdered()
isDicomOrdered() returns true if the file is in dicom order, false otherwise.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.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.void
setAxisOrientation(int[] axOrient)
Sets (copies) orientation of each axis.void
setAxisOrientation(int axOrient, int axis)
Sets the image orientation in the specified axis.void
setCameraMake(java.lang.String cameraMake)
void
setCameraModel(java.lang.String cameraModel)
void
setCompressionType(int type)
Sets the compression type.void
setDataType(int type)
Sets format of image data.void
setEndianess(boolean endness)
Describes file endianess.void
setExposureTime(double exposureTime)
void
setExtents(int[] dims)
Sets dimensionality of the images.void
setExtents(int extent, int dim)
Sets dimensionality for image, on a per dimension basis.void
setFileDirectory(java.lang.String directory)
DOCUMENT ME!void
setFileFormat(int format)
Sets the file format.void
setFileName(java.lang.String fname)
Sets the file name.void
setFileSuffix(java.lang.String suffix)
Sets the file suffix.void
setFNumber(double FNumber)
void
setFocalLength(double focalLength)
void
setFocalLength35(double focalLength35)
void
setImageOrientation(int orient)
Sets the image orientation.void
setISOSpeedRating(double ISOSpeedRating)
void
setLUT(ModelLUT lut)
Sets the model lutvoid
setMax(double Max)
Sets max pixel value of image.void
setMaxB(double Max)
Sets max blue pixel value of image.void
setMaxG(double Max)
Sets max green pixel value of image.void
setMaxR(double Max)
Sets max red pixel value of image.void
setMin(double Min)
Sets min pixel value of image.void
setMinB(double Min)
Sets min blue pixel value of image.void
setMinG(double Min)
Sets min green pixel value of image.void
setMinR(double Min)
Sets min red pixel value of image.void
setModality(int mod)
Sets the modality.void
setMultiFile(boolean flag)
Sets the flag for multiple files.void
setOffset(int off)
Sets the header offset.void
setOrigin(float[] originlocat)
Sets the origin.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.void
setOriginalEndianess(boolean originalEndness)
void
setPhotometric(short value)
Sets photometric interpretation.void
setPixelPadValue(java.lang.Short value)
Sets pixel pad value: used in some Dicom images.void
setRescaleIntercept(double intercept)
Sets the rescale intercept.void
setRescaleSlope(double slope)
Sets the rescale slope.void
setResolutions(float[] resolutions)
Sets the resolutions of the image.void
setResolutions(float resolution, int dim)
Sets the resolutions of the image, on a per dimension basis.void
setSliceThickness(float thickness)
Sets the thickness of the image slices.void
setTagDescription(java.util.Vector<java.lang.String> tagDescription)
void
setTagName(java.util.Vector<java.lang.String> tagName)
void
setUnitsOfMeasure(int[] unitMeasure)
Sets (copies) units of measure for image.void
setUnitsOfMeasure(int unitMeasure, int dim)
Sets units of measure for image, on a per dimension basis.void
setUnitsOfMeasure(FileInfoBase.Unit[] unitMeasure)
Sets (copies) units of measure for image.void
setUnitsOfMeasure(FileInfoBase.Unit unitMeasure, int dim)
Sets units of measure for image, on a per dimension basis.java.lang.String
toString()
Gives the information contained in FileInfo in a string.-
Methods inherited from class gov.nih.mipav.model.structures.ModelSerialCloneable
clone, nativeClone
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
sUnits
public static final java.lang.String[] sUnits
Deprecated.Array of space units: inches, mm, etc.
-
tUnits
public static final java.lang.String[] tUnits
Deprecated.Array of time units: seconds, minutes, etc.
-
UNKNOWN_MEASURE
public static final int UNKNOWN_MEASURE
Unit of measurement unknown.- See Also:
- Constant Field Values
-
INCHES
public static final int INCHES
Unit of measurement inches.- See Also:
- Constant Field Values
-
MILS
public static final int MILS
Units of measurement mil (thousandth of an inch)- See Also:
- Constant Field Values
-
CENTIMETERS
public static final int CENTIMETERS
Unit of measurement centimeters.- See Also:
- Constant Field Values
-
ANGSTROMS
public static final int ANGSTROMS
Unit of measurement angstroms.- See Also:
- Constant Field Values
-
NANOMETERS
public static final int NANOMETERS
Unit of measurement nanometers.- See Also:
- Constant Field Values
-
MICROMETERS
public static final int MICROMETERS
Unit of measurement micrometers.- See Also:
- Constant Field Values
-
MILLIMETERS
public static final int MILLIMETERS
Unit of measurement millimeters.- See Also:
- Constant Field Values
-
METERS
public static final int METERS
Unit of measurement meters.- See Also:
- Constant Field Values
-
KILOMETERS
public static final int KILOMETERS
Unit of measurement kilometers.- See Also:
- Constant Field Values
-
MILES
public static final int MILES
Unit of measurement miles.- See Also:
- Constant Field Values
-
NANOSEC
public static final int NANOSEC
Unit of measurement nanoseconds.- See Also:
- Constant Field Values
-
MICROSEC
public static final int MICROSEC
Unit of measurement microseconds.- See Also:
- Constant Field Values
-
MILLISEC
public static final int MILLISEC
Unit of measurement milliseconds.- See Also:
- Constant Field Values
-
SECONDS
public static final int SECONDS
Unit of measurement seconds.- See Also:
- Constant Field Values
-
MINUTES
public static final int MINUTES
Unit of measurement minutes.- See Also:
- Constant Field Values
-
HOURS
public static final int HOURS
Unit of measurement hours.- See Also:
- Constant Field Values
-
HZ
public static final int HZ
Unit of measurement hertz.- See Also:
- Constant Field Values
-
PPM
public static final int PPM
Unit of measurement part-per-million.- See Also:
- Constant Field Values
-
RADS
public static final int RADS
Radians per second.- See Also:
- Constant Field Values
-
DEGREES
public static final int DEGREES
- See Also:
- Constant Field Values
-
UNKNOWN_STRING
public static final java.lang.String UNKNOWN_STRING
String version of units of measurement - unknown.- See Also:
- Constant Field Values
-
INCHES_STRING
public static final java.lang.String INCHES_STRING
String version of units of measurement - inches.- See Also:
- Constant Field Values
-
MILS_STRING
public static final java.lang.String MILS_STRING
String version of units of measurement - mils.- See Also:
- Constant Field Values
-
CENTIMETERS_STRING
public static final java.lang.String CENTIMETERS_STRING
String version of units of measurement - centimeters.- See Also:
- Constant Field Values
-
ANGSTROMS_STRING
public static final java.lang.String ANGSTROMS_STRING
String version of units of measurement - angstroms.- See Also:
- Constant Field Values
-
NANOMETERS_STRING
public static final java.lang.String NANOMETERS_STRING
String version of units of measurement - nanometers.- See Also:
- Constant Field Values
-
MICROMETERS_STRING
public static final java.lang.String MICROMETERS_STRING
String version of units of measurement - micrometers.- See Also:
- Constant Field Values
-
MILLIMETERS_STRING
public static final java.lang.String MILLIMETERS_STRING
String version of units of measurement - millimeters.- See Also:
- Constant Field Values
-
METERS_STRING
public static final java.lang.String METERS_STRING
String version of units of measurement - meters.- See Also:
- Constant Field Values
-
KILOMETERS_STRING
public static final java.lang.String KILOMETERS_STRING
String version of units of measurement - kilometers.- See Also:
- Constant Field Values
-
MILES_STRING
public static final java.lang.String MILES_STRING
String version of units of measurement - miles.- See Also:
- Constant Field Values
-
NANOSEC_STRING
public static final java.lang.String NANOSEC_STRING
String version of units of measurement - nanoseconds.- See Also:
- Constant Field Values
-
MICROSEC_STRING
public static final java.lang.String MICROSEC_STRING
String version of units of measurement - microseconds.- See Also:
- Constant Field Values
-
MILLISEC_STRING
public static final java.lang.String MILLISEC_STRING
String version of units of measurement - milliseconds.- See Also:
- Constant Field Values
-
SECONDS_STRING
public static final java.lang.String SECONDS_STRING
String version of units of measurement - seconds.- See Also:
- Constant Field Values
-
MINUTES_STRING
public static final java.lang.String MINUTES_STRING
String version of units of measurement - minutes.- See Also:
- Constant Field Values
-
HOURS_STRING
public static final java.lang.String HOURS_STRING
String version of units of measurement - hours.- See Also:
- Constant Field Values
-
HZ_STRING
public static final java.lang.String HZ_STRING
String version of units of measurement - hertz.- See Also:
- Constant Field Values
-
PPM_STRING
public static final java.lang.String PPM_STRING
String version of units of measurement - part-per-million.- See Also:
- Constant Field Values
-
RADS_STRING
public static final java.lang.String RADS_STRING
String version of units of measurement - radians per second.- See Also:
- Constant Field Values
-
DEGREES_STRING
public static final java.lang.String DEGREES_STRING
String version of units of measurement - degrees.- See Also:
- Constant Field Values
-
conversionSpaceTimeUnits
public static final double[] conversionSpaceTimeUnits
Deprecated.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_MODALITY
Image modality unknown.- See Also:
- Constant Field Values
-
BIOMAGNETIC_IMAGING
public static final int BIOMAGNETIC_IMAGING
Image modality biomagnetic imaging.- See Also:
- Constant Field Values
-
COLOR_FLOW_DOPPLER
public static final int COLOR_FLOW_DOPPLER
Image modality color flow doppler.- See Also:
- Constant Field Values
-
COMPUTED_RADIOGRAPHY
public static final int COMPUTED_RADIOGRAPHY
Image modality CR.- See Also:
- Constant Field Values
-
COMPUTED_TOMOGRAPHY
public static final int COMPUTED_TOMOGRAPHY
Image modality CT.- See Also:
- Constant Field Values
-
DUPLEX_DOPPLER
public static final int DUPLEX_DOPPLER
Image modality duplex doppler.- See Also:
- Constant Field Values
-
DIAPHANOGRAPHY
public static final int DIAPHANOGRAPHY
Image modality diaphanography.- See Also:
- Constant Field Values
-
DIGITAL_RADIOGRAPHY
public static final int DIGITAL_RADIOGRAPHY
Image modality digital radiography.- See Also:
- Constant Field Values
-
ENDOSCOPY
public static final int ENDOSCOPY
Image modality endoscopy.- See Also:
- Constant Field Values
-
GENERAL_MICROSCOPY
public static final int GENERAL_MICROSCOPY
Image modality general microscopy.- See Also:
- Constant Field Values
-
HARDCOPY
public static final int HARDCOPY
Image modality hard copy.- See Also:
- Constant Field Values
-
INTRAORAL_RADIOGRAPHY
public static final int INTRAORAL_RADIOGRAPHY
Image modality intraoral radiography.- See Also:
- Constant Field Values
-
LASER_SURFACE_SCAN
public static final int LASER_SURFACE_SCAN
Image modality laser surface scan.- See Also:
- Constant Field Values
-
MAGNETIC_RESONANCE_ANGIOGRAPHY
public static final int MAGNETIC_RESONANCE_ANGIOGRAPHY
Image modality MR angiography.- See Also:
- Constant Field Values
-
MAMMOGRAPHY
public static final int MAMMOGRAPHY
Image modality mammography.- See Also:
- Constant Field Values
-
MAGNETIC_RESONANCE
public static final int MAGNETIC_RESONANCE
Image modality MR.- See Also:
- Constant Field Values
-
MAGNETIC_RESONANCE_SPECTROSCOPY
public static final int MAGNETIC_RESONANCE_SPECTROSCOPY
Image modality MR SPECT.- See Also:
- Constant Field Values
-
NUCLEAR_MEDICINE
public static final int NUCLEAR_MEDICINE
Image modality nuclear medicine.- See Also:
- Constant Field Values
-
OTHER
public static final int OTHER
Image modality other.- See Also:
- Constant Field Values
-
POSITRON_EMISSION_TOMOGRAPHY
public static final int POSITRON_EMISSION_TOMOGRAPHY
Image modality PET.- See Also:
- Constant Field Values
-
PANORAMIC_XRAY
public static final int PANORAMIC_XRAY
Image modality panoramtic X ray.- See Also:
- Constant Field Values
-
RADIO_FLUOROSCOPY
public static final int RADIO_FLUOROSCOPY
Image modality radio fluoroscopy.- See Also:
- Constant Field Values
-
RADIOGRAPHIC_IMAGING
public static final int RADIOGRAPHIC_IMAGING
Image modality radiographic imaging.- See Also:
- Constant Field Values
-
RADIOTHERAPY_DOSE
public static final int RADIOTHERAPY_DOSE
Image modality radiotherapy dose.- See Also:
- Constant Field Values
-
RADIOTHERAPY_IMAGE
public static final int RADIOTHERAPY_IMAGE
Image modality radiotherapy image.- See Also:
- Constant Field Values
-
RADIOTHERAPY_PLAN
public static final int RADIOTHERAPY_PLAN
Image modality radiotherapy plan.- See Also:
- Constant Field Values
-
RADIOTHERAPY_RECORD
public static final int RADIOTHERAPY_RECORD
Image modality radiotherapy record.- See Also:
- Constant Field Values
-
RADIOTHERAPY_STRUCTURE_SET
public static final int RADIOTHERAPY_STRUCTURE_SET
Image modality radiotherapy structure set.- See Also:
- Constant Field Values
-
SLIDE_MICROSCOPY
public static final int SLIDE_MICROSCOPY
Image modality slide microscopy.- See Also:
- Constant Field Values
-
SINGLE_PHOTON_EMISSION_COMPUTED_TOMOGRAPHY
public static final int SINGLE_PHOTON_EMISSION_COMPUTED_TOMOGRAPHY
Image modality SPECT.- See Also:
- Constant Field Values
-
THERMOGRAPHY
public static final int THERMOGRAPHY
Image modality thermography.- See Also:
- Constant Field Values
-
ULTRASOUND
public static final int ULTRASOUND
Image modality ultrasound.- See Also:
- Constant Field Values
-
XRAY_ANGIOGRAPHY
public static final int XRAY_ANGIOGRAPHY
Image modality X ray angiography.- See Also:
- Constant Field Values
-
EXTERNAL_CAMERA_PHOTOGRAPHY
public static final int EXTERNAL_CAMERA_PHOTOGRAPHY
Image modality external camera photography.- See Also:
- Constant Field Values
-
RED_FREE
public static final int RED_FREE
Image modality Red Free.- See Also:
- Constant Field Values
-
FA
public static final int FA
Image modality Fluorescein Angiography.- See Also:
- Constant Field Values
-
ICG
public static final int ICG
Image modality IndoCyanine Green.- See Also:
- Constant Field Values
-
modalityStr
private static final java.lang.String[] 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_TYPE
Axis orientation unknown.- See Also:
- Constant Field Values
-
ORI_R2L_TYPE
public static final int ORI_R2L_TYPE
Axis orientation Right to Left.- See Also:
- Constant Field Values
-
ORI_L2R_TYPE
public static final int ORI_L2R_TYPE
Axis orientation Left to Right.- See Also:
- Constant Field Values
-
ORI_P2A_TYPE
public static final int ORI_P2A_TYPE
Axis orientation Posterior to Anterior.- See Also:
- Constant Field Values
-
ORI_A2P_TYPE
public static final int ORI_A2P_TYPE
Axis orientation Anterior to Posterior.- See Also:
- Constant Field Values
-
ORI_I2S_TYPE
public static final int ORI_I2S_TYPE
Axis orientation Inferior to Superior.- See Also:
- Constant Field Values
-
ORI_S2I_TYPE
public static final int ORI_S2I_TYPE
Axis orientation Superior to Inferior.- See Also:
- Constant Field Values
-
axisOrientationStr
public static final java.lang.String[] axisOrientationStr
Array of axis orientation strings.
-
AXIAL
public static final int AXIAL
Axial orientation.- See Also:
- Constant Field Values
-
CORONAL
public static final int CORONAL
Coronal orientation.- See Also:
- Constant Field Values
-
SAGITTAL
public static final int SAGITTAL
Sagittal orientation.- See Also:
- Constant Field Values
-
UNKNOWN_ORIENT
public static final int UNKNOWN_ORIENT
Unknown orientation.- See Also:
- Constant Field Values
-
imageOrientationStr
private static final java.lang.String[] imageOrientationStr
Array of image orientation strings.
-
TRANSFORM_UNKNOWN
public static final int TRANSFORM_UNKNOWN
Unknown transform ID.- See Also:
- Constant Field Values
-
TRANSFORM_SCANNER_ANATOMICAL
public static final int TRANSFORM_SCANNER_ANATOMICAL
Scanner Anatomical transform ID.- See Also:
- Constant Field Values
-
TRANSFORM_ANOTHER_DATASET
public static final int TRANSFORM_ANOTHER_DATASET
Another Dataset transform ID.- See Also:
- Constant Field Values
-
TRANSFORM_TALAIRACH_TOURNOUX
public static final int TRANSFORM_TALAIRACH_TOURNOUX
Talairach Tournoux transform ID.- See Also:
- Constant Field Values
-
TRANSFORM_MNI_152
public static final int TRANSFORM_MNI_152
MNI 152 transform ID.- See Also:
- Constant Field Values
-
COMPRESSION_NONE
public static final int COMPRESSION_NONE
Indicates no compression.- See Also:
- Constant Field Values
-
COMPRESSION_ZIP
public static final int COMPRESSION_ZIP
Indicates zip compression of an image.- See Also:
- Constant Field Values
-
COMPRESSION_GZIP
public static final int COMPRESSION_GZIP
Indicates gzip compression of an image.- See Also:
- Constant Field Values
-
COMPRESSION_BZIP2
public static final int COMPRESSION_BZIP2
Indicates bzip2 compression of an image.- See Also:
- Constant Field Values
-
axisOrientation
protected int[] axisOrientation
axis 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
protected java.lang.String fileName
The file name which includes the path information.
-
fileSuffix
protected java.lang.String fileSuffix
File suffix (ex. "jpg")
-
imageOrientation
protected int imageOrientation
Indicates the image orientation (i.e. Axial, Coronal, ...)
-
modality
protected int modality
Indicates the modality (medical image type) of the dataset.
-
origin
protected float[] origin
The 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 compressionType
Used to indicate if the raw data was also compression (0 = no, 1 = zip).
-
dataType
private int dataType
The data type of the data (i.e. byte, short, float ...
-
dimResolutions
private float[] dimResolutions
Pixel 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 endianess
The 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 originalEndianess
Used for checking for endianess changes in the ModelImage.reallocate(final int type) function.
-
extents
private int[] extents
Image extents as decribed by the image file format.
-
fileFormat
private int fileFormat
File format as defined in the Filebase.
-
max
private double max
Image maximum intensity for single channel image.
-
maxB
private double maxB
Image maximum intensity for the blue channel of an RGB image.
-
maxG
private double maxG
Image maximum intensity for the green channel of an RGB image.
-
maxR
private double maxR
Image maximum intensity for the red channel of an RGB image.
-
min
private double min
Image minimum intensity for single channel image.
-
minB
private double minB
Image minimum intensity for the blue channel of an RGB image.
-
minG
private double minG
Image minimum intensity for the green channel of an RGB image.
-
minR
private double minR
Image minimum intensity for the red channel of an RGB image.
-
lut
private ModelLUT lut
ModelLUT associated with fileinfo
-
multiFile
private boolean multiFile
Flag that indicates whether or not the image is in multiple files (tiff).
-
offset
private int offset
Number of bytes to the start the image data - ie. the header length
-
photometric
private short photometric
Image minimum intensity for single channel image.
-
pixelPadValue
private java.lang.Short pixelPadValue
Some file formats have a pad value for pixels outside the acquisition domain.
-
rescaleIntercept
private double rescaleIntercept
DICOM images have a rescale y-intercept value that we have also kept in the base.
-
rescaleSlope
private double rescaleSlope
DICOM images have a rescale slope value that we have also kept in the base.
-
sliceThickness
private float sliceThickness
The thickness of individual slices in the image volume. Stored in dicom tag 0018,0050 and various other places in other file formats.
-
unitsOfMeasure
protected FileInfoBase.Unit[] unitsOfMeasure
Describes the units of measure for the dataset.
-
tagName
protected java.util.Vector<java.lang.String> tagName
-
tagDescription
protected java.util.Vector<java.lang.String> tagDescription
-
focalLength
protected double focalLength
-
focalLength35
protected double focalLength35
-
cameraMake
protected java.lang.String cameraMake
-
cameraModel
protected java.lang.String cameraModel
-
exposureTime
protected double exposureTime
-
FNumber
protected double FNumber
-
ISOSpeedRating
protected double ISOSpeedRating
-
-
Constructor Detail
-
FileInfoBase
public FileInfoBase(java.lang.String name, java.lang.String directory, int format)
fileInfo constructor.- Parameters:
name
- name of filedirectory
- file directoryformat
- file storage format -- see FileBase.java
-
FileInfoBase
protected FileInfoBase(FileInfoBase copy)
Internal constructor for clone usage.
-
-
Method Detail
-
displayAboutInfo
public abstract void displayAboutInfo(JDialogBase dialog, TransMatrix matrix)
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
public java.lang.String getAboutInfo(TransMatrix matrix)
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
public static void copyCoreInfo(FileInfoBase[] originalInfo, FileInfoBase[] newInfo)
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
public static int getAxisOrientationFromStr(java.lang.String s)
Returns the axis orientation associated with a string.- Parameters:
s
- String to test- Returns:
- axis orientation
-
getAxisOrientationStr
public static java.lang.String getAxisOrientationStr(int m)
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
public static int getDataTypeFromStr(java.lang.String s)
Returns the image data type associated with a string.- Parameters:
s
- String to test- Returns:
- data type
-
getEndianessFromStr
public static boolean getEndianessFromStr(java.lang.String s)
Returns the endianess associated with a string.- Parameters:
s
- String to test- Returns:
- Big endian or little endian
-
getImageOrientationFromStr
public static int getImageOrientationFromStr(java.lang.String s)
Returns the image orientation associated with a string.- Parameters:
s
- String to test- Returns:
- image orientation
-
getImageOrientationStr
public static java.lang.String getImageOrientationStr(int m)
Return the string associated with an image orientation.- Parameters:
m
- the orientation (see the static definitions)- Returns:
- the string associated with the orientation.
-
getModalityFromStr
public static int getModalityFromStr(java.lang.String s)
Returns the modality associated with a string.- Parameters:
s
- String to test- Returns:
- modality
-
getModalityStr
public static java.lang.String[] getModalityStr()
Return all the modality strings as an array.- Returns:
- String[] - array containing the strings associated with modalities.
-
getModalityStr
public static java.lang.String getModalityStr(int m)
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:
java.lang.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
true
if axis A and axis B are the same axis
-
displayAboutInfo
public void displayAboutInfo(JDialogBase dialog)
Displays the file information.- Parameters:
dialog
- dialog box that is written to
-
displayPrimaryInfo
public void displayPrimaryInfo(JDialogText dialog, TransMatrix matrix)
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
public java.lang.String getPrimaryInfo(TransMatrix matrix)
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.- Overrides:
finalize
in classjava.lang.Object
-
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:
setAxisOrientation(int[])
-
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:
setAxisOrientation(int, int)
-
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
public final java.lang.String 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
public final java.lang.String getFileName()
Returns the file name.- Returns:
- String indicating file name
-
getFileSuffix
public final java.lang.String 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
public ModelLUT 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
public final java.lang.Short 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
public java.lang.String getVolumeUnitsOfMeasureStr()
Returns the volume unit for the data. Assumes all three dimensions are the same units.- Returns:
- String associated volume unit of measure.
-
getAreaUnitsOfMeasureStr
public java.lang.String 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:
getAxisOrientation()
-
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
public final void setFileDirectory(java.lang.String directory)
DOCUMENT ME!- Parameters:
directory
- DOCUMENT ME!
-
setFileFormat
public final void setFileFormat(int format)
Sets the file format.- Parameters:
format
- File format
-
setFileName
public void setFileName(java.lang.String fname)
Sets the file name.- Parameters:
fname
- image file name
-
setFileSuffix
public final void setFileSuffix(java.lang.String suffix)
Sets the file suffix.- Parameters:
suffix
- file suffix
-
setImageOrientation
public void setImageOrientation(int orient)
Sets the image orientation.- Parameters:
orient
- Orientation.
-
setLUT
public void setLUT(ModelLUT lut)
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
-true
indicates multiple files for image,false
o.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:
#getStartLocations()
-
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:
#getStartLocations(int)
-
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
public final void setPixelPadValue(java.lang.Short value)
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
public final void setUnitsOfMeasure(FileInfoBase.Unit[] unitMeasure)
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
public final void setUnitsOfMeasure(FileInfoBase.Unit 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
-
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
public void setTagName(java.util.Vector<java.lang.String> tagName)
-
setTagDescription
public void setTagDescription(java.util.Vector<java.lang.String> tagDescription)
-
setFocalLength
public void setFocalLength(double focalLength)
-
getFocalLength
public double getFocalLength()
-
setFocalLength35
public void setFocalLength35(double focalLength35)
-
getFocalLength35
public double getFocalLength35()
-
setCameraMake
public void setCameraMake(java.lang.String cameraMake)
-
getCameraMake
public java.lang.String getCameraMake()
-
setCameraModel
public void setCameraModel(java.lang.String cameraModel)
-
getCameraModel
public java.lang.String 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
public java.lang.String toString()
Gives the information contained in FileInfo in a string.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String information contained in the FileInfo object
-
getUnitsOfMeasureAbbrevStr
public static java.lang.String getUnitsOfMeasureAbbrevStr(int i)
Deprecated.should now use enum- Parameters:
i
-- Returns:
-
getUnitsOfMeasureStr
public static java.lang.String getUnitsOfMeasureStr(int xUnits)
Deprecated.should now use enum- Parameters:
xUnits
-- Returns:
-
getUnitsOfMeasureFromStr
public static int getUnitsOfMeasureFromStr(java.lang.String selectedOutput)
Deprecated.should now use enum- Parameters:
selectedOutput
-- Returns:
-
getAllSameDimUnits
public static int[] getAllSameDimUnits(int measure)
Deprecated.should now use enum- Parameters:
selectedOutput
-- Returns:
-
getUnitsOfMeasureAbbrevStr
public static java.lang.String[] 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
public static java.lang.String[] 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.
-
-