Class JDialogSaveDicom

All Implemented Interfaces:
DialogDefaultsInterface, ActionListener, FocusListener, ItemListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class JDialogSaveDicom extends JDialogBase
Simple dialog to tell the program important information necessary for saving the DICOM file.
Version:
1.0 Aug 1, 2000
Author:
Neva Cherniavsky
See Also:
  • Field Details

    • serialVersionUID

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

      private JButton autofillButton
      DOCUMENT ME!
    • dicomFileInfo

      private final FileInfoDicom dicomFileInfo
      DOCUMENT ME!
    • fileInfo

      private final FileInfoBase fileInfo
      DOCUMENT ME!
    • fillButton

      private JButton fillButton
      DOCUMENT ME!
    • gbc

      private final GridBagConstraints gbc
      DOCUMENT ME!
    • lateralities

      private final String[] lateralities
      DOCUMENT ME!
    • laterality

      private JComboBox laterality
      DOCUMENT ME!
    • layout

      private final GridBagLayout layout
      DOCUMENT ME!
    • modalities

      private final String[] modalities
      DOCUMENT ME!
    • parts

      private final String[] parts
      DOCUMENT ME!
    • patientBirthDate

      private JTextField patientBirthDate
      DOCUMENT ME!
    • patientBirthTime

      private JTextField patientBirthTime
      DOCUMENT ME!
    • patientComments

      private JTextField patientComments
      DOCUMENT ME!
    • patientEthnicGroup

      private JTextField patientEthnicGroup
      DOCUMENT ME!
    • patientID

      private JTextField patientID
      DOCUMENT ME!
    • patientName

      private JTextField patientName
      DOCUMENT ME!
    • patientOrientation

      private JTextField patientOrientation
      DOCUMENT ME!
    • patientOtherIDs

      private JTextField patientOtherIDs
      DOCUMENT ME!
    • patientOtherNames

      private JTextField patientOtherNames
      DOCUMENT ME!
    • patientPanel

      private JPanel patientPanel
      DOCUMENT ME!
    • patientSex

      private JComboBox patientSex
      DOCUMENT ME!
    • positions

      private final String[] positions
      DOCUMENT ME!
    • requiredPanel

      private JPanel requiredPanel
      DOCUMENT ME!
    • seriesBody

      private JComboBox seriesBody
      DOCUMENT ME!
    • seriesDate

      private JTextField seriesDate
      DOCUMENT ME!
    • seriesDescrip

      private JTextField seriesDescrip
      DOCUMENT ME!
    • seriesLarge

      private JTextField seriesLarge
      DOCUMENT ME!
    • seriesMod

      private JComboBox seriesMod
      DOCUMENT ME!
    • seriesNo

      private JTextField seriesNo
      DOCUMENT ME!
    • seriesOp

      private JTextField seriesOp
      DOCUMENT ME!
    • seriesPanel

      private JPanel seriesPanel
      DOCUMENT ME!
    • seriesPerfPhy

      private JTextField seriesPerfPhy
      DOCUMENT ME!
    • seriesPos

      private JComboBox seriesPos
      DOCUMENT ME!
    • seriesProtocol

      private JTextField seriesProtocol
      DOCUMENT ME!
    • seriesSmall

      private JTextField seriesSmall
      DOCUMENT ME!
    • seriesStepDate

      private JTextField seriesStepDate
      DOCUMENT ME!
    • seriesStepDescrip

      private JTextField seriesStepDescrip
      DOCUMENT ME!
    • seriesStepID

      private JTextField seriesStepID
      DOCUMENT ME!
    • seriesStepTime

      private JTextField seriesStepTime
      DOCUMENT ME!
    • seriesTime

      private JTextField seriesTime
      DOCUMENT ME!
    • seriesUID

      private JTextField seriesUID
      DOCUMENT ME!
    • sexes

      private final String[] sexes
      DOCUMENT ME!
    • studyAccNumber

      private JTextField studyAccNumber
      DOCUMENT ME!
    • studyAge

      private JTextField studyAge
      DOCUMENT ME!
    • studyDate

      private JTextField studyDate
      DOCUMENT ME!
    • studyDescrip

      private JTextField studyDescrip
      DOCUMENT ME!
    • studyDiag

      private JTextField studyDiag
      DOCUMENT ME!
    • studyHist

      private JTextField studyHist
      DOCUMENT ME!
    • studyID

      private JTextField studyID
      DOCUMENT ME!
    • studyOcc

      private JTextField studyOcc
      DOCUMENT ME!
    • studyPanel

      private JPanel studyPanel
      DOCUMENT ME!
    • studyPhyRead

      private JTextField studyPhyRead
      DOCUMENT ME!
    • studyPhyRec

      private JTextField studyPhyRec
      DOCUMENT ME!
    • studyRefPhy

      private JTextField studyRefPhy
      DOCUMENT ME!
    • studySize

      private JTextField studySize
      DOCUMENT ME!
    • studyTime

      private JTextField studyTime
      DOCUMENT ME!
    • studyUID

      private JTextField studyUID
      DOCUMENT ME!
    • studyWeight

      private JTextField studyWeight
      DOCUMENT ME!
    • tabPane

      private final JTabbedPane tabPane
      DOCUMENT ME!
    • tagsImportedFromNonDicomImage

      private Hashtable<String,String> tagsImportedFromNonDicomImage
      DICOM tags extracted from the image we want to save. Example: dicom_0xNNNN el_0xNNNN tags stored in MINC headers.
    • tagsList

      private Hashtable<String,JComponent> tagsList
      The additional tags list is a list of tags the DTI group has requested.
    • additionalTagsList

      private Hashtable<String,String> additionalTagsList
    • UI

      private final ViewUserInterface UI
      DOCUMENT ME!
    • isMultiFrame

      private boolean isMultiFrame
    • dataType

      private int dataType
  • Constructor Details

    • JDialogSaveDicom

      public JDialogSaveDicom(Frame theParentFrame, FileInfoBase _fileInfo, FileInfoDicom dicomInfo, boolean isScriptRunning, boolean isMultiFrame, int dataType)
      Creates dialog for setting tag information for DICOM image.
      Parameters:
      theParentFrame - Parent frame.
      _fileInfo - File info object to get initialization info from.
      dicomInfo - Dicom file info object.
      isScriptRunning - Whether this dialog is being instantiated as part of the running of a script.
      isMultiFrame -
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Closes dialog box when the OK button is pressed and sets the information, doing error checking for every tag.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - Event that triggers this function.
    • autofillRequiredFields

      public void autofillRequiredFields()
      Autofill the dicom required tags to loosely fullfill the dicom standard.
    • checkTag

      private boolean checkTag(String value, String type)
      Checks the text field data for the proper format. For example, UIDs must be strings of numbers and periods, person's names must be in the format Doe^John, etc.
      Parameters:
      value - The text we are checking.
      type - Types we can expect - UI, PN, LO, DA, TM, etc.
      Returns:
      Boolean confirming if the tag checked through or not.
    • createButton

      private JButton createButton(String title, JButton button)
      Makes a button.
      Parameters:
      title - The value of the button.
      button - Button to create.
      Returns:
      The button.
    • createComboBox

      private JComboBox createComboBox(Container panel, String[] choices, int x, int y, int w, int h)
      Creates a combo box and adds it to the panel.
      Parameters:
      panel - the panel to add the combo box to
      choices - the layout to add the constraints to
      x - the constraints for this combo box
      y - DOCUMENT ME!
      w - DOCUMENT ME!
      h - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • createHashtable

      private void createHashtable()
      Creates static hashtable to use to fill the tags in the dialog.
    • createLabel

      private void createLabel(String title, Container panel, int x, int y, int w, int h)
      Makes a label and adds it to the panel.
      Parameters:
      title - the value of the label
      panel - the panel to add the label to
      x - the layout to add the constraints to
      y - the constraints for this label
      w - DOCUMENT ME!
      h - DOCUMENT ME!
    • createPanel

      private JPanel createPanel()
      Makes a panel with a grid layout with the parameters specified.
      Returns:
      the panel created
    • createPatientPanel

      private void createPatientPanel()
      Creates the panel for the patient tab.
    • createRequiredPanel

      private void createRequiredPanel()
      Creates the panel of required tags.
    • createSeriesPanel

      private void createSeriesPanel()
      Creates the panel for the series tab.
    • createStudyPanel

      private void createStudyPanel()
      Creates the panel for the study tab.
    • fillDataFromFile

      private void fillDataFromFile()
      Asks for a text file of tags, then loads them into the text fields.
    • fillDataFromTable

      private void fillDataFromTable(Hashtable<String,String> table)
      Fill the values in the dialog from tag-value pairs in a hashtable.
      Parameters:
      table - the table of tag-value pairs
    • isDefaultCharacter

      private boolean isDefaultCharacter(String word, boolean control)
      Checks that all the characters of the string are in the default character repertoire.
      Parameters:
      word - Word to check.
      control - Indicates if control characters should be included or not.
      Returns:
      true if the string is in the default character repertoire.
    • resetSize

      private void resetSize(JTextField field)
      Resizes the text field so that all characters are displayed.
      Parameters:
      field - Text field to change.
    • setChooserFromTag

      private void setChooserFromTag(String tag, String value)
      Sets the value for one of the choosers based on a dicom tag and value.
      Parameters:
      tag - the tag (which determines which chooser to set)
      value - the value (which determines which index in the chooser is selected)
    • setGBC

      private void setGBC(int x, int y, int w, int h)
      A helper method for adding a component using GridBagLayout, so we don't have to set up the x, y, width, and height over and over again.
      Parameters:
      x - GridBagConstraints.gridx
      y - GridBagConstraints.gridy
      w - GridBagContraints.gridwidth
      h - GridBagConstraints.gridheight
      See Also:
    • setModalityChooser

      private void setModalityChooser(int modality)
      Sets the modality chooser box based on the file info modality (the modality indexes should match up with the ordering of the chooser).
      Parameters:
      modality - The image modality.
    • setTextField

      private JTextField setTextField(String initial, Container panel, int x, int y, int w, int h)
      Makes a text field and adds it to the panel.
      Parameters:
      initial - the initial string in the text field
      panel - the panel to add the text field to
      x - the layout to add the constraints to
      y - the constraints for this text field
      w - DOCUMENT ME!
      h - DOCUMENT ME!
      Returns:
      the text field created