Package gov.nih.mipav.view.dialogs
Class JDialogSaveDicom
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Dialog
-
- javax.swing.JDialog
-
- gov.nih.mipav.view.dialogs.JDialogBase
-
- gov.nih.mipav.view.dialogs.JDialogSaveDicom
-
- All Implemented Interfaces:
DialogDefaultsInterface,java.awt.event.ActionListener,java.awt.event.FocusListener,java.awt.event.ItemListener,java.awt.event.WindowListener,java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,java.util.EventListener,javax.accessibility.Accessible,javax.swing.RootPaneContainer,javax.swing.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:
FileDicom, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKAction
-
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
-
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Hashtable<java.lang.String,java.lang.String>additionalTagsListprivate javax.swing.JButtonautofillButtonDOCUMENT ME!private intdataTypeprivate FileInfoDicomdicomFileInfoDOCUMENT ME!private FileInfoBasefileInfoDOCUMENT ME!private javax.swing.JButtonfillButtonDOCUMENT ME!private java.awt.GridBagConstraintsgbcDOCUMENT ME!private booleanisMultiFrameprivate java.lang.String[]lateralitiesDOCUMENT ME!private javax.swing.JComboBoxlateralityDOCUMENT ME!private java.awt.GridBagLayoutlayoutDOCUMENT ME!private java.lang.String[]modalitiesDOCUMENT ME!private java.lang.String[]partsDOCUMENT ME!private javax.swing.JTextFieldpatientBirthDateDOCUMENT ME!private javax.swing.JTextFieldpatientBirthTimeDOCUMENT ME!private javax.swing.JTextFieldpatientCommentsDOCUMENT ME!private javax.swing.JTextFieldpatientEthnicGroupDOCUMENT ME!private javax.swing.JTextFieldpatientIDDOCUMENT ME!private javax.swing.JTextFieldpatientNameDOCUMENT ME!private javax.swing.JTextFieldpatientOrientationDOCUMENT ME!private javax.swing.JTextFieldpatientOtherIDsDOCUMENT ME!private javax.swing.JTextFieldpatientOtherNamesDOCUMENT ME!private javax.swing.JPanelpatientPanelDOCUMENT ME!private javax.swing.JComboBoxpatientSexDOCUMENT ME!private java.lang.String[]positionsDOCUMENT ME!private javax.swing.JPanelrequiredPanelDOCUMENT ME!private static longserialVersionUIDUse serialVersionUID for interoperability.private javax.swing.JComboBoxseriesBodyDOCUMENT ME!private javax.swing.JTextFieldseriesDateDOCUMENT ME!private javax.swing.JTextFieldseriesDescripDOCUMENT ME!private javax.swing.JTextFieldseriesLargeDOCUMENT ME!private javax.swing.JComboBoxseriesModDOCUMENT ME!private javax.swing.JTextFieldseriesNoDOCUMENT ME!private javax.swing.JTextFieldseriesOpDOCUMENT ME!private javax.swing.JPanelseriesPanelDOCUMENT ME!private javax.swing.JTextFieldseriesPerfPhyDOCUMENT ME!private javax.swing.JComboBoxseriesPosDOCUMENT ME!private javax.swing.JTextFieldseriesProtocolDOCUMENT ME!private javax.swing.JTextFieldseriesSmallDOCUMENT ME!private javax.swing.JTextFieldseriesStepDateDOCUMENT ME!private javax.swing.JTextFieldseriesStepDescripDOCUMENT ME!private javax.swing.JTextFieldseriesStepIDDOCUMENT ME!private javax.swing.JTextFieldseriesStepTimeDOCUMENT ME!private javax.swing.JTextFieldseriesTimeDOCUMENT ME!private javax.swing.JTextFieldseriesUIDDOCUMENT ME!private java.lang.String[]sexesDOCUMENT ME!private javax.swing.JTextFieldstudyAccNumberDOCUMENT ME!private javax.swing.JTextFieldstudyAgeDOCUMENT ME!private javax.swing.JTextFieldstudyDateDOCUMENT ME!private javax.swing.JTextFieldstudyDescripDOCUMENT ME!private javax.swing.JTextFieldstudyDiagDOCUMENT ME!private javax.swing.JTextFieldstudyHistDOCUMENT ME!private javax.swing.JTextFieldstudyIDDOCUMENT ME!private javax.swing.JTextFieldstudyOccDOCUMENT ME!private javax.swing.JPanelstudyPanelDOCUMENT ME!private javax.swing.JTextFieldstudyPhyReadDOCUMENT ME!private javax.swing.JTextFieldstudyPhyRecDOCUMENT ME!private javax.swing.JTextFieldstudyRefPhyDOCUMENT ME!private javax.swing.JTextFieldstudySizeDOCUMENT ME!private javax.swing.JTextFieldstudyTimeDOCUMENT ME!private javax.swing.JTextFieldstudyUIDDOCUMENT ME!private javax.swing.JTextFieldstudyWeightDOCUMENT ME!private javax.swing.JTabbedPanetabPaneDOCUMENT ME!private java.util.Hashtable<java.lang.String,java.lang.String>tagsImportedFromNonDicomImageDICOM tags extracted from the image we want to save.private java.util.Hashtable<java.lang.String,javax.swing.JComponent>tagsListThe additional tags list is a list of tags the DTI group has requested.private ViewUserInterfaceUIDOCUMENT ME!-
Fields inherited from class gov.nih.mipav.view.dialogs.JDialogBase
applyButton, bar, cancelButton, cancelFlag, closeButton, HELP, helpButton, mainDialogPanel, NEW, OKButton, parentFrame, progressBar, REPLACE, runInSeparateThread, runningScriptFlag, runQuiet, serif12, serif12B, voiManager
-
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description JDialogSaveDicom(java.awt.Frame theParentFrame, FileInfoBase _fileInfo, FileInfoDicom dicomInfo, boolean isScriptRunning, boolean isMultiFrame, int dataType)Creates dialog for setting tag information for DICOM image.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent event)Closes dialog box when the OK button is pressed and sets the information, doing error checking for every tag.voidautofillRequiredFields()Autofill the dicom required tags to loosely fullfill the dicom standard.private booleancheckTag(java.lang.String value, java.lang.String type)Checks the text field data for the proper format.private javax.swing.JButtoncreateButton(java.lang.String title, javax.swing.JButton button)Makes a button.private javax.swing.JComboBoxcreateComboBox(java.awt.Container panel, java.lang.String[] choices, int x, int y, int w, int h)Creates a combo box and adds it to the panel.private voidcreateHashtable()Creates static hashtable to use to fill the tags in the dialog.private voidcreateLabel(java.lang.String title, java.awt.Container panel, int x, int y, int w, int h)Makes a label and adds it to the panel.private javax.swing.JPanelcreatePanel()Makes a panel with a grid layout with the parameters specified.private voidcreatePatientPanel()Creates the panel for the patient tab.private voidcreateRequiredPanel()Creates the panel of required tags.private voidcreateSeriesPanel()Creates the panel for the series tab.private voidcreateStudyPanel()Creates the panel for the study tab.private voidfillDataFromFile()Asks for a text file of tags, then loads them into the text fields.private voidfillDataFromTable(java.util.Hashtable<java.lang.String,java.lang.String> table)Fill the values in the dialog from tag-value pairs in a hashtable.private booleanisDefaultCharacter(java.lang.String word, boolean control)Checks that all the characters of the string are in the default character repertoire.private voidresetSize(javax.swing.JTextField field)Resizes the text field so that all characters are displayed.private voidsetChooserFromTag(java.lang.String tag, java.lang.String value)Sets the value for one of the choosers based on a dicom tag and value.private voidsetGBC(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.private voidsetModalityChooser(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).private javax.swing.JTextFieldsetTextField(java.lang.String initial, java.awt.Container panel, int x, int y, int w, int h)Makes a text field and adds it to the panel.-
Methods inherited from class gov.nih.mipav.view.dialogs.JDialogBase
buildApplyButton, buildButtons, buildCancelButton, buildCancelButton, buildCloseButton, buildHelpButton, buildImageComboBox, buildOKButton, buildOKButton, buildOKCancelButtons, buildTitledBorder, buildTitledBorder, createLabel, createProgressBar, createProgressBar, createTextField, focusGained, focusLost, getDialogName, isCancelled, isQuietRunning, isRunInSeparateThread, isScriptRunning, itemStateChanged, loadDefaults, loadDefaults, makeImageName, makeString, openNewFrame, saveDefaults, saveDefaults, setLeftHandSystem, setQuietRunning, setScriptRunning, setSeparateThread, setVisible, setVisible, setVisibleMenuBar, setVisibleStandard, setVOIManager, setWCSystem, testParameter, testParameterMin, updateFFTFileInfo, updateFileInfo, updateFileInfoOtherModality, updateFileInfoStatic, updateFileInfoStatic, updateFileTypeInfo, updateFileTypeInfo, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
autofillButton
private javax.swing.JButton autofillButton
DOCUMENT ME!
-
dicomFileInfo
private final FileInfoDicom dicomFileInfo
DOCUMENT ME!
-
fileInfo
private final FileInfoBase fileInfo
DOCUMENT ME!
-
fillButton
private javax.swing.JButton fillButton
DOCUMENT ME!
-
gbc
private final java.awt.GridBagConstraints gbc
DOCUMENT ME!
-
lateralities
private final java.lang.String[] lateralities
DOCUMENT ME!
-
laterality
private javax.swing.JComboBox laterality
DOCUMENT ME!
-
layout
private final java.awt.GridBagLayout layout
DOCUMENT ME!
-
modalities
private final java.lang.String[] modalities
DOCUMENT ME!
-
parts
private final java.lang.String[] parts
DOCUMENT ME!
-
patientBirthDate
private javax.swing.JTextField patientBirthDate
DOCUMENT ME!
-
patientBirthTime
private javax.swing.JTextField patientBirthTime
DOCUMENT ME!
-
patientComments
private javax.swing.JTextField patientComments
DOCUMENT ME!
-
patientEthnicGroup
private javax.swing.JTextField patientEthnicGroup
DOCUMENT ME!
-
patientID
private javax.swing.JTextField patientID
DOCUMENT ME!
-
patientName
private javax.swing.JTextField patientName
DOCUMENT ME!
-
patientOrientation
private javax.swing.JTextField patientOrientation
DOCUMENT ME!
-
patientOtherIDs
private javax.swing.JTextField patientOtherIDs
DOCUMENT ME!
-
patientOtherNames
private javax.swing.JTextField patientOtherNames
DOCUMENT ME!
-
patientPanel
private javax.swing.JPanel patientPanel
DOCUMENT ME!
-
patientSex
private javax.swing.JComboBox patientSex
DOCUMENT ME!
-
positions
private final java.lang.String[] positions
DOCUMENT ME!
-
requiredPanel
private javax.swing.JPanel requiredPanel
DOCUMENT ME!
-
seriesBody
private javax.swing.JComboBox seriesBody
DOCUMENT ME!
-
seriesDate
private javax.swing.JTextField seriesDate
DOCUMENT ME!
-
seriesDescrip
private javax.swing.JTextField seriesDescrip
DOCUMENT ME!
-
seriesLarge
private javax.swing.JTextField seriesLarge
DOCUMENT ME!
-
seriesMod
private javax.swing.JComboBox seriesMod
DOCUMENT ME!
-
seriesNo
private javax.swing.JTextField seriesNo
DOCUMENT ME!
-
seriesOp
private javax.swing.JTextField seriesOp
DOCUMENT ME!
-
seriesPanel
private javax.swing.JPanel seriesPanel
DOCUMENT ME!
-
seriesPerfPhy
private javax.swing.JTextField seriesPerfPhy
DOCUMENT ME!
-
seriesPos
private javax.swing.JComboBox seriesPos
DOCUMENT ME!
-
seriesProtocol
private javax.swing.JTextField seriesProtocol
DOCUMENT ME!
-
seriesSmall
private javax.swing.JTextField seriesSmall
DOCUMENT ME!
-
seriesStepDate
private javax.swing.JTextField seriesStepDate
DOCUMENT ME!
-
seriesStepDescrip
private javax.swing.JTextField seriesStepDescrip
DOCUMENT ME!
-
seriesStepID
private javax.swing.JTextField seriesStepID
DOCUMENT ME!
-
seriesStepTime
private javax.swing.JTextField seriesStepTime
DOCUMENT ME!
-
seriesTime
private javax.swing.JTextField seriesTime
DOCUMENT ME!
-
seriesUID
private javax.swing.JTextField seriesUID
DOCUMENT ME!
-
sexes
private final java.lang.String[] sexes
DOCUMENT ME!
-
studyAccNumber
private javax.swing.JTextField studyAccNumber
DOCUMENT ME!
-
studyAge
private javax.swing.JTextField studyAge
DOCUMENT ME!
-
studyDate
private javax.swing.JTextField studyDate
DOCUMENT ME!
-
studyDescrip
private javax.swing.JTextField studyDescrip
DOCUMENT ME!
-
studyDiag
private javax.swing.JTextField studyDiag
DOCUMENT ME!
-
studyHist
private javax.swing.JTextField studyHist
DOCUMENT ME!
-
studyID
private javax.swing.JTextField studyID
DOCUMENT ME!
-
studyOcc
private javax.swing.JTextField studyOcc
DOCUMENT ME!
-
studyPanel
private javax.swing.JPanel studyPanel
DOCUMENT ME!
-
studyPhyRead
private javax.swing.JTextField studyPhyRead
DOCUMENT ME!
-
studyPhyRec
private javax.swing.JTextField studyPhyRec
DOCUMENT ME!
-
studyRefPhy
private javax.swing.JTextField studyRefPhy
DOCUMENT ME!
-
studySize
private javax.swing.JTextField studySize
DOCUMENT ME!
-
studyTime
private javax.swing.JTextField studyTime
DOCUMENT ME!
-
studyUID
private javax.swing.JTextField studyUID
DOCUMENT ME!
-
studyWeight
private javax.swing.JTextField studyWeight
DOCUMENT ME!
-
tabPane
private final javax.swing.JTabbedPane tabPane
DOCUMENT ME!
-
tagsImportedFromNonDicomImage
private java.util.Hashtable<java.lang.String,java.lang.String> tagsImportedFromNonDicomImage
DICOM tags extracted from the image we want to save. Example: dicom_0xNNNN el_0xNNNN tags stored in MINC headers.
-
tagsList
private java.util.Hashtable<java.lang.String,javax.swing.JComponent> tagsList
The additional tags list is a list of tags the DTI group has requested.
-
additionalTagsList
private java.util.Hashtable<java.lang.String,java.lang.String> additionalTagsList
-
UI
private final ViewUserInterface UI
DOCUMENT ME!
-
isMultiFrame
private boolean isMultiFrame
-
dataType
private int dataType
-
-
Constructor Detail
-
JDialogSaveDicom
public JDialogSaveDicom(java.awt.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 Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Closes dialog box when the OK button is pressed and sets the information, doing error checking for every tag.- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Overrides:
actionPerformedin classJDialogBase- 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(java.lang.String value, java.lang.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 javax.swing.JButton createButton(java.lang.String title, javax.swing.JButton button)Makes a button.- Parameters:
title- The value of the button.button- Button to create.- Returns:
- The button.
-
createComboBox
private javax.swing.JComboBox createComboBox(java.awt.Container panel, java.lang.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 tochoices- the layout to add the constraints tox- the constraints for this combo boxy- 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(java.lang.String title, java.awt.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 labelpanel- the panel to add the label tox- the layout to add the constraints toy- the constraints for this labelw- DOCUMENT ME!h- DOCUMENT ME!
-
createPanel
private javax.swing.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(java.util.Hashtable<java.lang.String,java.lang.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(java.lang.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:
trueif the string is in the default character repertoire.
-
resetSize
private void resetSize(javax.swing.JTextField field)
Resizes the text field so that all characters are displayed.- Parameters:
field- Text field to change.
-
setChooserFromTag
private void setChooserFromTag(java.lang.String tag, java.lang.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.gridxy- GridBagConstraints.gridyw- GridBagContraints.gridwidthh- GridBagConstraints.gridheight- See Also:
GridBagConstraints
-
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 javax.swing.JTextField setTextField(java.lang.String initial, java.awt.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 fieldpanel- the panel to add the text field tox- the layout to add the constraints toy- the constraints for this text fieldw- DOCUMENT ME!h- DOCUMENT ME!- Returns:
- the text field created
-
-