Package gov.nih.mipav.model.file
Class FileInfoImageXML
java.lang.Object
gov.nih.mipav.model.structures.ModelSerialCloneable
gov.nih.mipav.model.file.FileInfoBase
gov.nih.mipav.model.file.FileInfoXML
gov.nih.mipav.model.file.FileInfoImageXML
- All Implemented Interfaces:
Serializable,Cloneable
This structure contains the information that describes how an XML image is stored on disk.
Notes:
- Should the matrix XML tag have a field to apply transformation matrix.
- toString should be added near the end of development ? or in FileXML.
- Version:
- 0.1 Sept 19, 2002
- Author:
- Neva Cherniavsky, Matthew J. McAuliffe, Ph.D.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTitle: InvestigatorclassTitle: SurfaceLinkclassTitle: VOILinkNested classes/interfaces inherited from class gov.nih.mipav.model.file.FileInfoBase
FileInfoBase.AxisOrientation, FileInfoBase.ImageOrientation, FileInfoBase.Modality, FileInfoBase.Unit, FileInfoBase.UnitType -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringDOCUMENT ME!private StringString for the current PSet description (for key).private StringUsed to keep track of the current surface.private StringUsed to keep track of the current VOI.private StringDOCUMENT ME!private StringDOCUMENT ME!private StringScan attributes.private intDOCUMENT ME!private StringThe image history.private boolean[]DOCUMENT ME!private FileInfoImageXML.Investigator[]Investigators (up to 3).private Stringlinked image path (optional).private TransMatrixTransformation matrix.private StringDOCUMENT ME!private StringDOCUMENT ME!private StringDOCUMENT ME!private StringDOCUMENT ME!private StringDOCUMENT ME!private static final longUse serialVersionUID for interoperability.Hashtable for holding sets of parameters.private StringDOCUMENT ME!private StringDOCUMENT ME!private StringSubject's information.private Hashtable<String, FileInfoImageXML.SurfaceLink> List of files which describe surfaces attached to this image.private Hashtable<String, FileInfoImageXML.VOILink> List of files which describe VOIs attached to this image.private intDOCUMENT ME!Fields inherited from class gov.nih.mipav.model.file.FileInfoXML
imageDataFileName, imageDescriptionFields inherited from class gov.nih.mipav.model.file.FileInfoBase
ANGSTROMS, ANGSTROMS_STRING, AXIAL, axisOrientation, axisOrientationStr, BIOMAGNETIC_IMAGING, cameraMake, cameraModel, CENTIMETERS, CENTIMETERS_STRING, COLOR_FLOW_DOPPLER, COMPRESSION_BZIP2, COMPRESSION_GZIP, COMPRESSION_NONE, COMPRESSION_ZIP, COMPUTED_RADIOGRAPHY, COMPUTED_TOMOGRAPHY, conversionSpaceTimeUnits, CORONAL, DEGREES, DEGREES_STRING, DIAPHANOGRAPHY, DIGITAL_RADIOGRAPHY, dtiParams, DUPLEX_DOPPLER, ENDOSCOPY, exposureTime, EXTERNAL_CAMERA_PHOTOGRAPHY, FA, fileName, fileSuffix, FNumber, focalLength, focalLength35, GENERAL_MICROSCOPY, HARDCOPY, HOURS, HOURS_STRING, HZ, HZ_STRING, ICG, imageOrientation, INCHES, INCHES_STRING, INTRAORAL_RADIOGRAPHY, ISOSpeedRating, KILOMETERS, KILOMETERS_STRING, LASER_SURFACE_SCAN, MAGNETIC_RESONANCE, MAGNETIC_RESONANCE_ANGIOGRAPHY, MAGNETIC_RESONANCE_SPECTROSCOPY, MAMMOGRAPHY, METERS, METERS_STRING, MICROMETERS, MICROMETERS_STRING, MICROSEC, MICROSEC_STRING, MILES, MILES_STRING, MILLIMETERS, MILLIMETERS_STRING, MILLISEC, MILLISEC_STRING, MILS, MILS_STRING, MINUTES, MINUTES_STRING, modality, NANOMETERS, NANOMETERS_STRING, NANOSEC, NANOSEC_STRING, NUCLEAR_MEDICINE, ORI_A2P_TYPE, ORI_I2S_TYPE, ORI_L2R_TYPE, ORI_P2A_TYPE, ORI_R2L_TYPE, ORI_S2I_TYPE, ORI_UNKNOWN_TYPE, origin, OTHER, PANORAMIC_XRAY, POSITRON_EMISSION_TOMOGRAPHY, PPM, PPM_STRING, RADIO_FLUOROSCOPY, RADIOGRAPHIC_IMAGING, RADIOTHERAPY_DOSE, RADIOTHERAPY_IMAGE, RADIOTHERAPY_PLAN, RADIOTHERAPY_RECORD, RADIOTHERAPY_STRUCTURE_SET, RADS, RADS_STRING, RED_FREE, SAGITTAL, SECONDS, SECONDS_STRING, SINGLE_PHOTON_EMISSION_COMPUTED_TOMOGRAPHY, SLIDE_MICROSCOPY, sUnits, tagDescription, tagName, THERMOGRAPHY, TRANSFORM_ANOTHER_DATASET, TRANSFORM_MNI_152, TRANSFORM_SCANNER_ANATOMICAL, TRANSFORM_TALAIRACH_TOURNOUX, TRANSFORM_UNKNOWN, tUnits, ULTRASOUND, unitsOfMeasure, UNKNOWN_MEASURE, UNKNOWN_MODALITY, UNKNOWN_ORIENT, UNKNOWN_STRING, XRAY_ANGIOGRAPHY -
Constructor Summary
ConstructorsConstructorDescriptionFileInfoImageXML(String name, String directory, int format) Main constructor for FileInfoXML. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddSurface(String path) Adds a surface path to the image's surface list.voidAdds a voi path to the image's VOI list.voidcreatePSet(String description) Creates a new parameter set with a description.voiddisplayAboutInfo(JDialogBase dlog, TransMatrix matrix) Displays the file information.voidfinalize()Prepares the class for cleanup.Get subject's body part (optional).Gets current parameter set.Returns the SurfaceLink object for the current surface.Get's the VOILink for the current VOI.Get diagnosis for subject (optional).getDOB()Get subject's date of birth (optional).Get the scan Equipment Model Name associated with image.intGet subject's height (optional).Gets the image history string.getInvestigator(int index) Gets the specified investigator.Gets an array (3) of Investigator data.boolean[]Get an array (3) of booleans that tell whether the investigator data for that index is complete.Gets the full path + name of the linked image.Gets the matrix associated with the FileInfo.intGets the # of parameter sets stored.intGets the number of surfaces attached to the image.intGet number of VOIs.Hashtable<?, ?> getParameterTable(String description) Gets the parameter table associated with a Parameter set with the given description.Get scan Protocol for equipment associated with image.Gets a parameter set from the hashtable using a description.Gets the hashtable that holds all sets of parameters.Gets an enumeration for the list of parameter set keys.getRace()Gets the subject's race.Get the date the image was taken.Gets the scan ID.Get the time the image was taken.getSex()Get subject's sex (optional).Get's the subject's ID.Get's the subject's name.getSurface(String path) Returns a SurfaceLink to a surface attached to this image.Gets paths to surface files for this image.Returns the surface hashtable for this image.Returns a VOILink to a VOI attached to this image.Gets paths to VOI files for this image.getVOIs()Returns the VOI hashtable for this image.intGets the subject's weight.voidparameterChanged(Vector<String> pData) Updates the FileInfo with new parameter data contained within the vector passed in [0] is the set description, [1] is the name of the parameter to be changed [2] is the description of the parameter [3] is the value type of the parameter [4] is the date for the parameter [5] is the time for the parameter.voidremovePSet(String description) Removes a specific Parameter Set using it's description.voidremoveSurface(String path) Removes a surface from the image's surface list.voidRemoves a voi from the image's VOI list.voidsetAffiliation(String affiliation, int num) Set the investigator's affiliation using an index.voidsetBodyPart(String bodyPart) Set the subject's body part.voidsetDiagnosis(String diagnosis) Sets the subject's diagonosis.voidSet subject's date of birth.voidSet the investigator's email using an index.voidsetEquipmentName(String equipmentName) Set the scan Equipment Model Name associated with image.voidsetHeight(int height) Sets the subject's height.voidsetHistory(String hist) Sets the history string.voidsetInvestigatorName(String investigatorName, int num) Create a new investigator using his/her name.voidsetInvestigators(FileInfoImageXML.Investigator[] investigators) Sets the array (3) of Investigator data.voidsetInvestigatorsComplete(boolean[] invest) Sets the array (3) of booleans that tell whether the investigator data for that index is complete.voidsetLinkedImagePath(String linkedImagePath) Sets the path for the linked image.voidsetMatrix(TransMatrix matrix) Sets the matrix associated with the FileInfo.voidSet the investigators phone # using an index.voidsetProtocol(String protocol) Sets scan Protocol for equipment associated with image.voidsetPSetHashtable(Hashtable<String, XMLPSet> setTable) Sets the hashtable that holds all sets of parameters.voidSets the subject's race.voidsetScanDate(String scanDate) Set the scan date.voidsetScanDateTime(String scanDateTime) Set the date invalid input: '&' time (date + T + time).voidSets the scan ID.voidsetScanTime(String scanTime) Set the scan time.voidSet subject's sex.voidsetSubjectID(String subjectID) Set the subject's ID.voidsetSubjectName(String subjectName) Sets the subject's name.voidsetSurfaces(Hashtable<String, FileInfoImageXML.SurfaceLink> _surfaces) Sets the Surface hashtable for this image.voidSet the investigator's title using an index.voidSets the VOI hashtable for this image.voidsetWeight(int weight) Sets the subject's weight.voidstateChanged(Vector ce) Updates the fileinfo with changes made within the JDialogs.voidupdateFileInfos(FileInfoXML fInfo) Used to propogate all fileInfoXML private variables to other fileinfos.Methods inherited from class gov.nih.mipav.model.file.FileInfoXML
appendImageDescription, getImageDataFileName, getImageDescription, setImageDataFileName, setImageDescriptionMethods inherited from class gov.nih.mipav.model.file.FileInfoBase
copyCoreInfo, copyCoreInfo, displayAboutInfo, displayPrimaryInfo, getAboutInfo, getAllSameDimUnits, getAreaUnitsOfMeasureStr, getAxisDirection, getAxisOrientation, getAxisOrientation, getAxisOrientationFromStr, getAxisOrientationStr, getCameraMake, getCameraModel, getCompressionType, getDataType, getDataTypeFromStr, getDTIParameters, getEndianess, getEndianessFromStr, getExposureTime, getExtents, getFileDirectory, getFileFormat, getFileName, getFileSuffix, getFNumber, getFocalLength, getFocalLength35, getImageOrientation, getImageOrientationFromStr, getImageOrientationStr, getIs2_5D, getISOSpeedRating, getLPSOrigin, getLUT, getMax, getMaxB, getMaxG, getMaxR, getMin, getMinB, getMinG, getMinR, getModality, getModalityFromStr, getModalityStr, getModalityStr, getMultiFile, getNumOfBytesPerPixel, getOffset, getOrigin, getOrigin, getOriginalEndianess, getOriginAtSlice, getPhotometric, getPixelPadValue, getPrimaryInfo, getRescaleIntercept, getRescaleSlope, getResolution, getResolutions, getSize, getSliceThickness, getUnitsOfMeasure, getUnitsOfMeasure, getUnitsOfMeasureAbbrevStr, getUnitsOfMeasureAbbrevStr, getUnitsOfMeasureFromStr, getUnitsOfMeasureStr, getUnitsOfMeasureStr, getVolumeUnitsOfMeasureStr, isDicomOrdered, oppositeOrient, sameAxis, setAxisOrientation, setAxisOrientation, setCameraMake, setCameraModel, setCompressionType, setDataType, setDTIParameters, setEndianess, setExposureTime, setExtents, setExtents, setFileDirectory, setFileFormat, setFileName, setFileSuffix, setFNumber, setFocalLength, setFocalLength35, setImageOrientation, setISOSpeedRating, setLUT, setMax, setMaxB, setMaxG, setMaxR, setMin, setMinB, setMinG, setMinR, setModality, setMultiFile, setOffset, setOrigin, setOrigin, setOriginalEndianess, setPhotometric, setPixelPadValue, setRescaleIntercept, setRescaleSlope, setResolutions, setResolutions, setSliceThickness, setTagDescription, setTagName, setUnitsOfMeasure, setUnitsOfMeasure, setUnitsOfMeasure, setUnitsOfMeasure, toStringMethods inherited from class gov.nih.mipav.model.structures.ModelSerialCloneable
clone, nativeClone
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
bodyPart
DOCUMENT ME! -
currentPSetDesc
String for the current PSet description (for key). -
currentSurfacePath
Used to keep track of the current surface. -
currentVOIPath
Used to keep track of the current VOI. -
diagnosis
DOCUMENT ME! -
DOB
DOCUMENT ME! -
equipmentName
Scan attributes. Optional XML tag. -
height
private int heightDOCUMENT ME! -
invest
private boolean[] investDOCUMENT ME! -
investigators
Investigators (up to 3). Optional XML tag. -
linkedImagePath
linked image path (optional). -
matrix
Transformation matrix. -
protocol
DOCUMENT ME! -
race
DOCUMENT ME! -
scanDate
DOCUMENT ME! -
scanID
DOCUMENT ME! -
scanTime
DOCUMENT ME! -
setTable
Hashtable for holding sets of parameters. -
sex
DOCUMENT ME! -
subjectID
DOCUMENT ME! -
subjectName
Subject's information. -
surfaces
List of files which describe surfaces attached to this image. -
VOIs
List of files which describe VOIs attached to this image. -
weight
private int weightDOCUMENT ME! -
history
The image history. Used by the NDAR meta-information generation dialog to write out the name of the zip file where the original data files are stored.
-
-
Constructor Details
-
FileInfoImageXML
Main constructor for FileInfoXML.- Parameters:
name- String file namedirectory- String file directoryformat- int file format (data type)
-
-
Method Details
-
addSurface
Adds a surface path to the image's surface list.- Parameters:
path- String path to a surface file
-
addVOI
Adds a voi path to the image's VOI list.- Parameters:
path- String path to a VOI file
-
createPSet
Creates a new parameter set with a description.- Parameters:
description- String desription
-
addPset
-
displayAboutInfo
Displays the file information.- Specified by:
displayAboutInfoin classFileInfoXML- Parameters:
dlog- JDialogBase dialog box that is written tomatrix- transformation matrix
-
finalize
public void finalize()Prepares the class for cleanup.- Overrides:
finalizein classFileInfoXML
-
getBodyPart
Get subject's body part (optional).- Returns:
- bodyPart subject's body part
-
getCurrentPSet
Gets current parameter set.- Returns:
- PSet current parameter set
-
getCurrentSurface
Returns the SurfaceLink object for the current surface.- Returns:
- SurfaceLink surfacelink object
-
getCurrentVOI
Get's the VOILink for the current VOI.- Returns:
- VOILink current voi link
-
getDiagnosis
Get diagnosis for subject (optional).- Returns:
- diagnosis subject's diagnosis
-
getDOB
Get subject's date of birth (optional).- Returns:
- DOB date of birth
-
getEquipmentName
Get the scan Equipment Model Name associated with image.- Returns:
- equipmentName equipment model name
-
getHeight
public int getHeight()Get subject's height (optional).- Returns:
- height subject's height
-
getInvestigator
Gets the specified investigator.- Parameters:
index- int index of investigator- Returns:
- Investigator investigator
-
getInvestigators
Gets an array (3) of Investigator data.- Returns:
- Investigator[] array of investigator data
-
getInvestigatorsComplete
public boolean[] getInvestigatorsComplete()Get an array (3) of booleans that tell whether the investigator data for that index is complete.- Returns:
- boolean[] array of investigator completeness
-
getLinkedImagePath
Gets the full path + name of the linked image.- Returns:
- full path of the linked image
-
getMatrix
Gets the matrix associated with the FileInfo.- Returns:
- TransMatrix the image orientation matrix
-
getNumPSets
public int getNumPSets()Gets the # of parameter sets stored.- Returns:
- int number of parameter sets
-
getNumSurfaces
public int getNumSurfaces()Gets the number of surfaces attached to the image.- Returns:
- int number of surfaces
-
getNumVOIs
public int getNumVOIs()Get number of VOIs.- Returns:
- int number of VOIs
-
getParameterTable
Gets the parameter table associated with a Parameter set with the given description.- Parameters:
description- String parameter set description- Returns:
- Hashtable parameter hashtable
-
getProtocol
Get scan Protocol for equipment associated with image.- Returns:
- protocol protocol
-
getPSet
Gets a parameter set from the hashtable using a description.- Parameters:
description- PSet description of parameter set- Returns:
- DOCUMENT ME!
-
getPSetHashtable
Gets the hashtable that holds all sets of parameters.- Returns:
- Hashtable set hashtable
-
getPSetKeys
Gets an enumeration for the list of parameter set keys.- Returns:
- Enumeration keys for parameter set hashtable
-
getRace
Gets the subject's race.- Returns:
- String subject's race
-
getScanDate
Get the date the image was taken.- Returns:
- scanDate scan date
-
getScanID
Gets the scan ID.- Returns:
- String scan ID
-
getScanTime
Get the time the image was taken.- Returns:
- scanTime scan time
-
getSex
Get subject's sex (optional).- Returns:
- sex subject's sex
-
getSubjectID
Get's the subject's ID.- Returns:
- String subject's ID
-
getSubjectName
Get's the subject's name.- Returns:
- String subject's name
-
getSurface
Returns a SurfaceLink to a surface attached to this image.- Parameters:
path- String filepath to the surface to be returned- Returns:
- SurfaceLink Surfacelink for the given path
-
getSurfaceKeys
Gets paths to surface files for this image.- Returns:
- Enumeration Enumeration of paths to surface files
-
getSurfaces
Returns the surface hashtable for this image.- Returns:
- Hashtable the surface hashtable
-
getVOI
Returns a VOILink to a VOI attached to this image.- Parameters:
path- String filepath to the VOI to be returned- Returns:
- VOILink VOILink for the given path
-
getVOIKeys
Gets paths to VOI files for this image.- Returns:
- Enumeration Enumeration of paths to VOI files
-
getVOIs
Returns the VOI hashtable for this image.- Returns:
- Hashtable VOI hashtable
-
getWeight
public int getWeight()Gets the subject's weight.- Returns:
- int subject's weight
-
getHistory
Gets the image history string. Used by the NDAR meta-information generation dialog to write out the name of the zip file where the original data files are stored.- Returns:
- The image history string.
-
parameterChanged
Updates the FileInfo with new parameter data contained within the vector passed in [0] is the set description, [1] is the name of the parameter to be changed [2] is the description of the parameter [3] is the value type of the parameter [4] is the date for the parameter [5] is the time for the parameter.- Parameters:
pData- Vector Vector of changed parameter data + set description
-
removePSet
Removes a specific Parameter Set using it's description.- Parameters:
description- String description of parameter set
-
removeSurface
Removes a surface from the image's surface list.- Parameters:
path- String path to the surface to be removed from the image
-
removeVOI
Removes a voi from the image's VOI list.- Parameters:
path- String path to the VOI to be removed from the image
-
setAffiliation
Set the investigator's affiliation using an index.- Parameters:
affiliation- String Investigator Affiliationnum- int index for investigator array
-
setBodyPart
Set the subject's body part.- Parameters:
bodyPart- String subject's body part
-
setDiagnosis
Sets the subject's diagonosis.- Parameters:
diagnosis- String subject's diagnosis
-
setDOB
Set subject's date of birth.- Parameters:
DOB- String date of birth
-
setEmail
Set the investigator's email using an index.- Parameters:
email- String Investigator Emailnum- int index for investigator array
-
setEquipmentName
Set the scan Equipment Model Name associated with image.- Parameters:
equipmentName- String equipment model name
-
setHeight
public void setHeight(int height) Sets the subject's height.- Parameters:
height- int subject's height
-
setInvestigatorName
Create a new investigator using his/her name.- Parameters:
investigatorName- String Investigator Namenum- int investigator # (not index)
-
setInvestigators
Sets the array (3) of Investigator data.- Parameters:
investigators- Investigator[] array of investigator data
-
setInvestigatorsComplete
public void setInvestigatorsComplete(boolean[] invest) Sets the array (3) of booleans that tell whether the investigator data for that index is complete.- Parameters:
invest- boolean[] boolean array for investigator completeness
-
setLinkedImagePath
Sets the path for the linked image.- Parameters:
linkedImagePath- path of linked image
-
setMatrix
Sets the matrix associated with the FileInfo.- Parameters:
matrix- TransMatrix the image orientation matrix
-
setPhone
Set the investigators phone # using an index.- Parameters:
phone- String investigator phone #num- int index for investigator array
-
setProtocol
Sets scan Protocol for equipment associated with image.- Parameters:
protocol- String protocol
-
setPSetHashtable
Sets the hashtable that holds all sets of parameters.- Parameters:
setTable- Hashtable set hashtable
-
setRace
Sets the subject's race.- Parameters:
race- String subject's race
-
setScanDate
Set the scan date.- Parameters:
scanDate- String scan date
-
setScanDateTime
Set the date invalid input: '&' time (date + T + time).- Parameters:
scanDateTime- String scan date invalid input: '&' time
-
setScanID
Sets the scan ID.- Parameters:
scanID- String scan ID
-
setScanTime
Set the scan time.- Parameters:
scanTime- String scan time
-
setSex
Set subject's sex.- Parameters:
sex- String subject's sex
-
setSubjectID
Set the subject's ID.- Parameters:
subjectID- String subject's ID
-
setSubjectName
Sets the subject's name.- Parameters:
subjectName- String subject's name
-
setSurfaces
Sets the Surface hashtable for this image.- Parameters:
_surfaces- Hashtable new surface hashtable
-
setTitle
Set the investigator's title using an index.- Parameters:
title- String Investigator Titlenum- int index for investigator array
-
setVOIs
Sets the VOI hashtable for this image.- Parameters:
_VOIs- Hashtable new VOI hashtable
-
setWeight
public void setWeight(int weight) Sets the subject's weight.- Parameters:
weight- int subject's weight
-
setHistory
Sets the history string. Used by the NDAR meta-information generation dialog to write out the name of the zip file where the original data files are stored.- Parameters:
hist- The history string for this image.
-
stateChanged
Updates the fileinfo with changes made within the JDialogs.- Parameters:
ce- Vector Vector of new data
-
updateFileInfos
Used to propogate all fileInfoXML private variables to other fileinfos.- Specified by:
updateFileInfosin classFileInfoXML- Parameters:
fInfo- FileInfoXML file info to be copied into
-