Class FileInfoImageXML

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class FileInfoImageXML
    extends FileInfoXML
    This structure contains the information that describes how an XML image is stored on disk.

    Notes:

    1. Should the matrix XML tag have a field to apply transformation matrix.
    2. 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:
    FileIO, FileInfoXML, Serialized Form
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • bodyPart

        private java.lang.String bodyPart
        DOCUMENT ME!
      • currentPSetDesc

        private java.lang.String currentPSetDesc
        String for the current PSet description (for key).
      • currentSurfacePath

        private java.lang.String currentSurfacePath
        Used to keep track of the current surface.
      • currentVOIPath

        private java.lang.String currentVOIPath
        Used to keep track of the current VOI.
      • diagnosis

        private java.lang.String diagnosis
        DOCUMENT ME!
      • DOB

        private java.lang.String DOB
        DOCUMENT ME!
      • equipmentName

        private java.lang.String equipmentName
        Scan attributes. Optional XML tag.
      • height

        private int height
        DOCUMENT ME!
      • invest

        private boolean[] invest
        DOCUMENT ME!
      • linkedImagePath

        private java.lang.String linkedImagePath
        linked image path (optional).
      • matrix

        private TransMatrix matrix
        Transformation matrix.
      • protocol

        private java.lang.String protocol
        DOCUMENT ME!
      • race

        private java.lang.String race
        DOCUMENT ME!
      • scanDate

        private java.lang.String scanDate
        DOCUMENT ME!
      • scanID

        private java.lang.String scanID
        DOCUMENT ME!
      • scanTime

        private java.lang.String scanTime
        DOCUMENT ME!
      • setTable

        private java.util.Hashtable<java.lang.String,​XMLPSet> setTable
        Hashtable for holding sets of parameters.
      • sex

        private java.lang.String sex
        DOCUMENT ME!
      • subjectID

        private java.lang.String subjectID
        DOCUMENT ME!
      • subjectName

        private java.lang.String subjectName
        Subject's information.
      • surfaces

        private java.util.Hashtable<java.lang.String,​FileInfoImageXML.SurfaceLink> surfaces
        List of files which describe surfaces attached to this image.
      • VOIs

        private java.util.Hashtable<java.lang.String,​FileInfoImageXML.VOILink> VOIs
        List of files which describe VOIs attached to this image.
      • weight

        private int weight
        DOCUMENT ME!
      • history

        private java.lang.String 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 Detail

      • FileInfoImageXML

        public FileInfoImageXML​(java.lang.String name,
                                java.lang.String directory,
                                int format)
        Main constructor for FileInfoXML.
        Parameters:
        name - String file name
        directory - String file directory
        format - int file format (data type)
    • Method Detail

      • addSurface

        public void addSurface​(java.lang.String path)
        Adds a surface path to the image's surface list.
        Parameters:
        path - String path to a surface file
      • addVOI

        public void addVOI​(java.lang.String path)
        Adds a voi path to the image's VOI list.
        Parameters:
        path - String path to a VOI file
      • createPSet

        public void createPSet​(java.lang.String description)
        Creates a new parameter set with a description.
        Parameters:
        description - String desription
      • addPset

        public void addPset​(java.lang.String description,
                            XMLPSet pset)
      • displayAboutInfo

        public void displayAboutInfo​(JDialogBase dlog,
                                     TransMatrix matrix)
        Displays the file information.
        Specified by:
        displayAboutInfo in class FileInfoXML
        Parameters:
        dlog - JDialogBase dialog box that is written to
        matrix - transformation matrix
      • finalize

        public void finalize()
        Prepares the class for cleanup.
        Overrides:
        finalize in class FileInfoXML
      • getBodyPart

        public java.lang.String getBodyPart()
        Get subject's body part (optional).
        Returns:
        bodyPart subject's body part
      • getCurrentPSet

        public XMLPSet getCurrentPSet()
        Gets current parameter set.
        Returns:
        PSet current parameter set
      • getCurrentSurface

        public FileInfoImageXML.SurfaceLink getCurrentSurface()
        Returns the SurfaceLink object for the current surface.
        Returns:
        SurfaceLink surfacelink object
      • getCurrentVOI

        public FileInfoImageXML.VOILink getCurrentVOI()
        Get's the VOILink for the current VOI.
        Returns:
        VOILink current voi link
      • getDiagnosis

        public java.lang.String getDiagnosis()
        Get diagnosis for subject (optional).
        Returns:
        diagnosis subject's diagnosis
      • getDOB

        public java.lang.String getDOB()
        Get subject's date of birth (optional).
        Returns:
        DOB date of birth
      • getEquipmentName

        public java.lang.String 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

        public FileInfoImageXML.Investigator getInvestigator​(int index)
        Gets the specified investigator.
        Parameters:
        index - int index of investigator
        Returns:
        Investigator investigator
      • getInvestigators

        public FileInfoImageXML.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

        public java.lang.String getLinkedImagePath()
        Gets the full path + name of the linked image.
        Returns:
        full path of the linked image
      • getMatrix

        public TransMatrix 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

        public java.util.Hashtable<?,​?> getParameterTable​(java.lang.String description)
        Gets the parameter table associated with a Parameter set with the given description.
        Parameters:
        description - String parameter set description
        Returns:
        Hashtable parameter hashtable
      • getProtocol

        public java.lang.String getProtocol()
        Get scan Protocol for equipment associated with image.
        Returns:
        protocol protocol
      • getPSet

        public XMLPSet getPSet​(java.lang.String description)
        Gets a parameter set from the hashtable using a description.
        Parameters:
        description - PSet description of parameter set
        Returns:
        DOCUMENT ME!
      • getPSetHashtable

        public java.util.Hashtable<java.lang.String,​XMLPSet> getPSetHashtable()
        Gets the hashtable that holds all sets of parameters.
        Returns:
        Hashtable set hashtable
      • getPSetKeys

        public java.util.Enumeration<java.lang.String> getPSetKeys()
        Gets an enumeration for the list of parameter set keys.
        Returns:
        Enumeration keys for parameter set hashtable
      • getRace

        public java.lang.String getRace()
        Gets the subject's race.
        Returns:
        String subject's race
      • getScanDate

        public java.lang.String getScanDate()
        Get the date the image was taken.
        Returns:
        scanDate scan date
      • getScanID

        public java.lang.String getScanID()
        Gets the scan ID.
        Returns:
        String scan ID
      • getScanTime

        public java.lang.String getScanTime()
        Get the time the image was taken.
        Returns:
        scanTime scan time
      • getSex

        public java.lang.String getSex()
        Get subject's sex (optional).
        Returns:
        sex subject's sex
      • getSubjectID

        public java.lang.String getSubjectID()
        Get's the subject's ID.
        Returns:
        String subject's ID
      • getSubjectName

        public java.lang.String getSubjectName()
        Get's the subject's name.
        Returns:
        String subject's name
      • getSurface

        public FileInfoImageXML.SurfaceLink getSurface​(java.lang.String path)
        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

        public java.util.Enumeration<java.lang.String> getSurfaceKeys()
        Gets paths to surface files for this image.
        Returns:
        Enumeration Enumeration of paths to surface files
      • getSurfaces

        public java.util.Hashtable<java.lang.String,​FileInfoImageXML.SurfaceLink> getSurfaces()
        Returns the surface hashtable for this image.
        Returns:
        Hashtable the surface hashtable
      • getVOI

        public FileInfoImageXML.VOILink getVOI​(java.lang.String path)
        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

        public java.util.Enumeration<java.lang.String> getVOIKeys()
        Gets paths to VOI files for this image.
        Returns:
        Enumeration Enumeration of paths to VOI files
      • getVOIs

        public java.util.Hashtable<java.lang.String,​FileInfoImageXML.VOILink> 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

        public java.lang.String 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

        public void parameterChanged​(java.util.Vector<java.lang.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.
        Parameters:
        pData - Vector Vector of changed parameter data + set description
      • removePSet

        public void removePSet​(java.lang.String description)
        Removes a specific Parameter Set using it's description.
        Parameters:
        description - String description of parameter set
      • removeSurface

        public void removeSurface​(java.lang.String path)
        Removes a surface from the image's surface list.
        Parameters:
        path - String path to the surface to be removed from the image
      • removeVOI

        public void removeVOI​(java.lang.String path)
        Removes a voi from the image's VOI list.
        Parameters:
        path - String path to the VOI to be removed from the image
      • setAffiliation

        public void setAffiliation​(java.lang.String affiliation,
                                   int num)
        Set the investigator's affiliation using an index.
        Parameters:
        affiliation - String Investigator Affiliation
        num - int index for investigator array
      • setBodyPart

        public void setBodyPart​(java.lang.String bodyPart)
        Set the subject's body part.
        Parameters:
        bodyPart - String subject's body part
      • setDiagnosis

        public void setDiagnosis​(java.lang.String diagnosis)
        Sets the subject's diagonosis.
        Parameters:
        diagnosis - String subject's diagnosis
      • setDOB

        public void setDOB​(java.lang.String DOB)
        Set subject's date of birth.
        Parameters:
        DOB - String date of birth
      • setEmail

        public void setEmail​(java.lang.String email,
                             int num)
        Set the investigator's email using an index.
        Parameters:
        email - String Investigator Email
        num - int index for investigator array
      • setEquipmentName

        public void setEquipmentName​(java.lang.String equipmentName)
        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

        public void setInvestigatorName​(java.lang.String investigatorName,
                                        int num)
        Create a new investigator using his/her name.
        Parameters:
        investigatorName - String Investigator Name
        num - int investigator # (not index)
      • setInvestigators

        public void setInvestigators​(FileInfoImageXML.Investigator[] investigators)
        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

        public void setLinkedImagePath​(java.lang.String linkedImagePath)
        Sets the path for the linked image.
        Parameters:
        linkedImagePath - path of linked image
      • setMatrix

        public void setMatrix​(TransMatrix matrix)
        Sets the matrix associated with the FileInfo.
        Parameters:
        matrix - TransMatrix the image orientation matrix
      • setPhone

        public void setPhone​(java.lang.String phone,
                             int num)
        Set the investigators phone # using an index.
        Parameters:
        phone - String investigator phone #
        num - int index for investigator array
      • setProtocol

        public void setProtocol​(java.lang.String protocol)
        Sets scan Protocol for equipment associated with image.
        Parameters:
        protocol - String protocol
      • setPSetHashtable

        public void setPSetHashtable​(java.util.Hashtable<java.lang.String,​XMLPSet> setTable)
        Sets the hashtable that holds all sets of parameters.
        Parameters:
        setTable - Hashtable set hashtable
      • setRace

        public void setRace​(java.lang.String race)
        Sets the subject's race.
        Parameters:
        race - String subject's race
      • setScanDate

        public void setScanDate​(java.lang.String scanDate)
        Set the scan date.
        Parameters:
        scanDate - String scan date
      • setScanDateTime

        public void setScanDateTime​(java.lang.String scanDateTime)
        Set the date & time (date + T + time).
        Parameters:
        scanDateTime - String scan date & time
      • setScanID

        public void setScanID​(java.lang.String scanID)
        Sets the scan ID.
        Parameters:
        scanID - String scan ID
      • setScanTime

        public void setScanTime​(java.lang.String scanTime)
        Set the scan time.
        Parameters:
        scanTime - String scan time
      • setSex

        public void setSex​(java.lang.String sex)
        Set subject's sex.
        Parameters:
        sex - String subject's sex
      • setSubjectID

        public void setSubjectID​(java.lang.String subjectID)
        Set the subject's ID.
        Parameters:
        subjectID - String subject's ID
      • setSubjectName

        public void setSubjectName​(java.lang.String subjectName)
        Sets the subject's name.
        Parameters:
        subjectName - String subject's name
      • setSurfaces

        public void setSurfaces​(java.util.Hashtable<java.lang.String,​FileInfoImageXML.SurfaceLink> _surfaces)
        Sets the Surface hashtable for this image.
        Parameters:
        _surfaces - Hashtable new surface hashtable
      • setTitle

        public void setTitle​(java.lang.String title,
                             int num)
        Set the investigator's title using an index.
        Parameters:
        title - String Investigator Title
        num - int index for investigator array
      • setVOIs

        public void setVOIs​(java.util.Hashtable<java.lang.String,​FileInfoImageXML.VOILink> _VOIs)
        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

        public void setHistory​(java.lang.String hist)
        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

        public void stateChanged​(java.util.Vector ce)
        Updates the fileinfo with changes made within the JDialogs.
        Parameters:
        ce - Vector Vector of new data
      • updateFileInfos

        public void updateFileInfos​(FileInfoXML fInfo)
        Used to propogate all fileInfoXML private variables to other fileinfos.
        Specified by:
        updateFileInfos in class FileInfoXML
        Parameters:
        fInfo - FileInfoXML file info to be copied into