Class FileInfoImageXML

All Implemented Interfaces:
Serializable, 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:
  • Field Details

    • serialVersionUID

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

      private String bodyPart
      DOCUMENT ME!
    • currentPSetDesc

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

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

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

      private String diagnosis
      DOCUMENT ME!
    • DOB

      private String DOB
      DOCUMENT ME!
    • equipmentName

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

      private int height
      DOCUMENT ME!
    • invest

      private boolean[] invest
      DOCUMENT ME!
    • investigators

      private FileInfoImageXML.Investigator[] investigators
      Investigators (up to 3). Optional XML tag.
    • linkedImagePath

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

      private TransMatrix matrix
      Transformation matrix.
    • protocol

      private String protocol
      DOCUMENT ME!
    • race

      private String race
      DOCUMENT ME!
    • scanDate

      private String scanDate
      DOCUMENT ME!
    • scanID

      private String scanID
      DOCUMENT ME!
    • scanTime

      private String scanTime
      DOCUMENT ME!
    • setTable

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

      private String sex
      DOCUMENT ME!
    • subjectID

      private String subjectID
      DOCUMENT ME!
    • subjectName

      private String 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 weight
      DOCUMENT ME!
    • history

      private 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 Details

    • FileInfoImageXML

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

    • addSurface

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

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

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

      public void addPset(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 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 String getDiagnosis()
      Get diagnosis for subject (optional).
      Returns:
      diagnosis subject's diagnosis
    • getDOB

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

      public 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 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 Hashtable<?,?> getParameterTable(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 String getProtocol()
      Get scan Protocol for equipment associated with image.
      Returns:
      protocol protocol
    • getPSet

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

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

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

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

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

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

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

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

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

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

      public FileInfoImageXML.SurfaceLink getSurface(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 Enumeration<String> 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

      public FileInfoImageXML.VOILink getVOI(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 Enumeration<String> 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

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

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

      public void removeSurface(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(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(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(String bodyPart)
      Set the subject's body part.
      Parameters:
      bodyPart - String subject's body part
    • setDiagnosis

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

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

      public void setEmail(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(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(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(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(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(String protocol)
      Sets scan Protocol for equipment associated with image.
      Parameters:
      protocol - String protocol
    • setPSetHashtable

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

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

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

      public void setScanDateTime(String scanDateTime)
      Set the date invalid input: '&' time (date + T + time).
      Parameters:
      scanDateTime - String scan date invalid input: '&' time
    • setScanID

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

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

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

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

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

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

      public void setTitle(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(Hashtable<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(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(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