Package gov.nih.mipav.view.dialogs
Class JDialogDicomTagSelector
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.JDialogScriptableBase
gov.nih.mipav.view.dialogs.JDialogDicomTagSelector
- All Implemented Interfaces:
ScriptableActionInterface,DialogDefaultsInterface,DicomTagSelectorImpl,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ListSelectionListener,RootPaneContainer,WindowConstants
- Direct Known Subclasses:
JDialogDicomTagMultiEditor
public class JDialogDicomTagSelector
extends JDialogScriptableBase
implements ListSelectionListener, DicomTagSelectorImpl
This class allows for DICOM tags to be selected. Selected DICOM tags can either come from the overall DICOM dictionary or from the tags that exist in
a given image.
- Author:
- senseneyj
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassprivate classprivate classNested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKActionNested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringFor adding a top level dicom tagstatic final StringFor adding a dicom tag contained within a sequenceprotected JButtonButtons used by this dialogprotected JButtonButtons used by this dialogprivate FocusListenerstatic final StringFor removing all tags from the main dialogprotected JButtonButtons used by this dialogstatic final StringCloses the dialogprotected JButtonButtons used by this dialogprivate JComboBoxCombo boxes used for sequence tagsprivate JComponentprivate JListLists used to display available DICOM tagsprivate JTextFieldText fields for displaying/entering a group/element tagprivate JTextFieldText fields for displaying/entering a group/element tagprivate JPanelWhen this object exists as an embedded panel, this variable contains all necessary data elements.private JComboBoxCombo boxes used for sequence tagsprivate JListLists used to display available DICOM tagsprivate JTextFieldText fields for displaying/entering a group/element tagprivate JTextFieldText fields for displaying/entering a group/element tagList of all file's elements for each group of a FileDicomKey setList of all file's elements for each group of a FileDicomKey setprotected booleanFileDicomTag to its name in the Dicom dictionaryFileDicomTag to its name in the Dicom dictionaryFileDicomTag to its value in the fileFileDicomTag to its value in the fileprivate JLabelName and property labels that describe a DICOM tag for a particular fileprivate JLabelName and property labels that describe a DICOM tag for a particular fileprivate DicomTagSelectorImplThe parent dialog which receives text from this dicom tag editorstatic final StringIndicates tag is a private tagprivate JLabelWhen a tag value exists, this label displays the text "Tag value:"private JTextFieldprivate JLabelName and property labels that describe a DICOM tag for a particular fileprivate JScrollPaneWhen a tag value exists, this panel displays the valueprivate final DimensionMin/max size of all text boxes contained in scroll panes.static final StringIndicates tag value is a sequence tagprivate JPanelPanels used by this dialog boxprivate JPanelPanel contains JTable for storing dicom tags.private JPanelPanels used by this dialog boxprotected Hashtable<FileDicomKey, FileDicomTag> Original list of available DICOM tagsprivate JPanelPanels used by this dialog boxprotected JTableOption table where dicom tags are reported to.static final StringIndicates tag value may exist but cannot be understood by the dialog.Fields inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
displayInNewFrame, isComplete, scriptParametersFields inherited from class gov.nih.mipav.view.dialogs.JDialogBase
applyButton, bar, cancelButton, cancelFlag, HELP, helpButton, mainDialogPanel, NEW, OKButton, parentFrame, progressBar, REPLACE, runInSeparateThread, runningScriptFlag, runQuiet, serif12, serif12B, voiManagerFields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPEFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionBlank constructor needed for scriptingJDialogDicomTagSelector(JDialogBase parent, boolean isStandalone) -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidprivate voidprivate JPanelprivate JPanelprivate JPanelprivate JPanelprotected voidStarts the algorithm.voidinit(boolean isStandalone) Builds the panel that the tag dialog frame contains, and optionally builds the standalone frame that encompasses all functionality of this class.protected voidSet the dialog GUI using the script parameters while running this algorithm as part of a script.voidsetParentDialog(DicomTagSelectorImpl parentDialog) voidsetTagList(Hashtable<FileDicomKey, FileDicomTag> tagList) protected voidRecord the parameters just used to run this algorithm in a script.private booleantagExistsInField(String text) voidMethods inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
doPostAlgorithmActions, getDialogActionString, insertScriptLine, isComplete, scriptRun, setCompleteMethods 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, windowOpenedMethods 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, updateMethods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackMethods 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, toFrontMethods 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, validateTreeMethods 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 Details
-
ADD_TAG
For adding a top level dicom tag- See Also:
-
ADD_TAG_SEQ
For adding a dicom tag contained within a sequence- See Also:
-
CLOSE
Closes the dialog- See Also:
-
CLEAR_TAGS
For removing all tags from the main dialog- See Also:
-
UNKNOWN
Indicates tag value may exist but cannot be understood by the dialog.- See Also:
-
SEQUENCE
Indicates tag value is a sequence tag- See Also:
-
PRIVATE
Indicates tag is a private tag- See Also:
-
SCROLL_PANE_SIZE
Min/max size of all text boxes contained in scroll panes. -
groupToElement
List of all file's elements for each group of a FileDicomKey set -
groupToElementSeq
List of all file's elements for each group of a FileDicomKey set -
keyToName
FileDicomTag to its name in the Dicom dictionary -
keyToNameSeq
FileDicomTag to its name in the Dicom dictionary -
keyToValue
FileDicomTag to its value in the file -
keyToValueSeq
FileDicomTag to its value in the file -
tagSelectorPanel
Panels used by this dialog box -
tagInformationPanel
Panels used by this dialog box -
sequenceInformationPanel
Panels used by this dialog box -
groupList
Lists used to display available DICOM tags -
elementList
Lists used to display available DICOM tags -
groupCombo
Combo boxes used for sequence tags -
elementCombo
Combo boxes used for sequence tags -
addButton
Buttons used by this dialog -
addButtonSeq
Buttons used by this dialog -
clearButton
Buttons used by this dialog -
closeButton
Buttons used by this dialog -
nameValue
Name and property labels that describe a DICOM tag for a particular file -
nameValueSeq
Name and property labels that describe a DICOM tag for a particular file -
propertyValueSeq
Name and property labels that describe a DICOM tag for a particular file -
propertyValue
-
tagList
Original list of available DICOM tags -
parentDialog
The parent dialog which receives text from this dicom tag editor -
embeddedPanel
When this object exists as an embedded panel, this variable contains all necessary data elements. -
tablePanel
Panel contains JTable for storing dicom tags. -
propertyLabel
When a tag value exists, this label displays the text "Tag value:" -
propPane
When a tag value exists, this panel displays the value -
elementSeqText
Text fields for displaying/entering a group/element tag -
groupSeqText
Text fields for displaying/entering a group/element tag -
elementText
Text fields for displaying/entering a group/element tag -
groupText
Text fields for displaying/entering a group/element tag -
k1
-
k2
-
tagsTable
Option table where dicom tags are reported to. -
isStandalone
protected boolean isStandalone -
addListener
-
elementFocus
-
-
Constructor Details
-
JDialogDicomTagSelector
public JDialogDicomTagSelector()Blank constructor needed for scripting -
JDialogDicomTagSelector
-
-
Method Details
-
setTagList
-
init
public void init(boolean isStandalone) Builds the panel that the tag dialog frame contains, and optionally builds the standalone frame that encompasses all functionality of this class.- Parameters:
isStandalone-
-
buildTablePanel
-
buildTagSelectorPanel
-
buildTagInfoPanel
-
buildSequenceInfoPanel
-
buildGroupElementMap
-
buildSeqGroupElementMap
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogBase
-
getEmbeddedPanel
- Returns:
- the embeddedPanel
-
tagExistsInField
-
valueChanged
- Specified by:
valueChangedin interfaceListSelectionListener
-
getTagListTextField
- Specified by:
getTagListTextFieldin interfaceDicomTagSelectorImpl
-
getTagTable
- Specified by:
getTagTablein interfaceDicomTagSelectorImpl
-
getParentDialog
-
setParentDialog
-
callAlgorithm
protected void callAlgorithm()Description copied from class:JDialogScriptableBaseStarts the algorithm. Already exists in most algorithm dialogs. Should be called during scripted execution and regular operation.- Specified by:
callAlgorithmin classJDialogScriptableBase
-
setGUIFromParams
protected void setGUIFromParams()Description copied from class:JDialogScriptableBaseSet the dialog GUI using the script parameters while running this algorithm as part of a script.- Specified by:
setGUIFromParamsin classJDialogScriptableBase
-
storeParamsFromGUI
Description copied from class:JDialogScriptableBaseRecord the parameters just used to run this algorithm in a script.- Specified by:
storeParamsFromGUIin classJDialogScriptableBase- Throws:
ParserException- If there is a problem creating/recording the new parameters.
-