Package gov.nih.mipav.view.dialogs
Class JDialogDicomDir
- 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.JDialogDicomDir
 
 
 
 
 
 
 
- 
- All Implemented Interfaces:
- DialogDefaultsInterface,- PreviewImageContainer,- 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.event.ChangeListener,- javax.swing.event.TreeSelectionListener,- javax.swing.RootPaneContainer,- javax.swing.WindowConstants
 
 public class JDialogDicomDir extends JDialogBase implements java.awt.event.ActionListener, java.awt.event.ItemListener, javax.swing.event.TreeSelectionListener, javax.swing.event.ChangeListener, PreviewImageContainer Simple dialog used to show the contents of a selected DICOMDIR file. Allows the user to view previews of the image, related tags, along with opening the image.- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBaseJDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKAction
 - 
Nested classes/interfaces inherited from class javax.swing.JDialogjavax.swing.JDialog.AccessibleJDialog
 - 
Nested classes/interfaces inherited from class java.awt.Dialogjava.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
 - 
Nested classes/interfaces inherited from class java.awt.Windowjava.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
 
- 
 - 
Field SummaryFields Modifier and Type Field Description (package private) javax.swing.tree.DefaultMutableTreeNodebaseprivate intbrightnessDOCUMENT ME!private javax.swing.JPanelbrightPanelDOCUMENT ME!private javax.swing.JSliderbrightSliderDOCUMENT ME!private javax.swing.JPanelbuttonPanelDOCUMENT ME!private floatcontrastDOCUMENT ME!private javax.swing.JSlidercontSliderDOCUMENT ME!private javax.swing.JLabelcurrentDOCUMENT ME!private javax.swing.JLabelcurrent2DOCUMENT ME!protected java.awt.DimensionDEFAULT_SIZEDescribes the initial size of the textual display area when the dialog is created.private java.awt.DimensiondefaultImageSizeDOCUMENT ME!private FileInfoDicomdicomInfoprivate FileDicomSQdirInfostatic java.lang.String[]dpColumnNamesColumn names for data provenanceprivate java.io.Filefileprivate booleanifSuccess(package private) javax.swing.JPanelimagePanelprivate javax.swing.JSplitPaneimageSliderPaneDOCUMENT ME!(package private) ViewJComponentPreviewImageimgprivate java.text.NumberFormatnfcDOCUMENT ME!(package private) FileDicomopenerprivate intorigBrightnessDOCUMENT ME!private floatorigContrastDOCUMENT ME!private javax.swing.JScrollPanescrollPaneDOCUMENT ME!private static longserialVersionUIDUse serialVersionUID for interoperability.protected java.awt.Fontserif12DOCUMENT ME!protected java.awt.Fontserif12BDOCUMENT ME!private javax.swing.JPanelsliderPanelDOCUMENT ME!private ViewTableModeltagViewerThe table modelprotected FileImageXML.ThumbnailthumbnailDOCUMENT ME!private JTreeDICOMtree- 
Fields inherited from class gov.nih.mipav.view.dialogs.JDialogBaseapplyButton, bar, cancelButton, cancelFlag, closeButton, HELP, helpButton, mainDialogPanel, NEW, OKButton, parentFrame, progressBar, REPLACE, runInSeparateThread, runningScriptFlag, runQuiet, voiManager
 - 
Fields inherited from class javax.swing.JDialogaccessibleContext, rootPane, rootPaneCheckingEnabled
 - 
Fields inherited from class java.awt.ComponentBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
- 
 - 
Constructor SummaryConstructors Constructor Description JDialogDicomDir(java.awt.Frame parent)Default constructor for DICOMDIRJDialogDicomDir(java.awt.Frame parent, java.io.File file, FileDicom caller)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent event)Closes dialog box when the "Close" button is pressed.private voidbuildBrightContPanel()Initializes GUI components and displays dialog.protected FileInfoBasebuildImage(java.lang.String fileName, java.lang.String directory)Opens preview of image in frameprivate javax.swing.JSplitPanebuildImagePanel()private voidcreateNodes()Creates nodes on the tree based on DICOMDIRjava.awt.DimensiongetPanelSize()The method returns the size of the panel into which the ViewJComponentPreviewImage will be drawing itself.private voidinit(java.lang.String title)Initializes the dialog box to a certain size and adds the components.private voidopen()Open new DICOMDIR file, if successful then close current boxprivate voidopenImage()voidstateChanged(javax.swing.event.ChangeEvent e)Updates the image based on thumbnailsvoidvalueChanged(javax.swing.event.TreeSelectionEvent e)Updates the table based on tree selectionbooleanwasSuccess()- 
Methods inherited from class gov.nih.mipav.view.dialogs.JDialogBasebuildApplyButton, 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.JDialogaddImpl, 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.DialogaddNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
 - 
Methods inherited from class java.awt.WindowaddPropertyChangeListener, 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.Containeradd, 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.Componentaction, 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- 
serialVersionUIDprivate static final long serialVersionUID Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
 
 - 
dpColumnNamespublic static final java.lang.String[] dpColumnNames Column names for data provenance
 - 
DEFAULT_SIZEprotected final java.awt.Dimension DEFAULT_SIZE Describes the initial size of the textual display area when the dialog is created. The value is given in pixel size rather than the number of characters since the display area has no characters to display.
 - 
origBrightnessprivate int origBrightness DOCUMENT ME!
 - 
origContrastprivate float origContrast DOCUMENT ME!
 - 
buttonPanelprivate javax.swing.JPanel buttonPanel DOCUMENT ME!
 - 
scrollPaneprivate javax.swing.JScrollPane scrollPane DOCUMENT ME!
 - 
ifSuccessprivate boolean ifSuccess 
 - 
imagePaneljavax.swing.JPanel imagePanel 
 - 
imgViewJComponentPreviewImage img 
 - 
tagViewerprivate ViewTableModel tagViewer The table model
 - 
treeprivate JTreeDICOM tree 
 - 
brightPanelprivate javax.swing.JPanel brightPanel DOCUMENT ME!
 - 
serif12protected java.awt.Font serif12 DOCUMENT ME!
 - 
serif12Bprotected java.awt.Font serif12B DOCUMENT ME!
 - 
brightSliderprivate javax.swing.JSlider brightSlider DOCUMENT ME!
 - 
contSliderprivate javax.swing.JSlider contSlider DOCUMENT ME!
 - 
imageSliderPaneprivate javax.swing.JSplitPane imageSliderPane DOCUMENT ME!
 - 
defaultImageSizeprivate java.awt.Dimension defaultImageSize DOCUMENT ME!
 - 
currentprivate javax.swing.JLabel current DOCUMENT ME!
 - 
current2private javax.swing.JLabel current2 DOCUMENT ME!
 - 
sliderPanelprivate javax.swing.JPanel sliderPanel DOCUMENT ME!
 - 
nfcprivate java.text.NumberFormat nfc DOCUMENT ME!
 - 
thumbnailprotected FileImageXML.Thumbnail thumbnail DOCUMENT ME!
 - 
contrastprivate float contrast DOCUMENT ME!
 - 
brightnessprivate int brightness DOCUMENT ME!
 - 
basejavax.swing.tree.DefaultMutableTreeNode base 
 - 
dirInfoprivate FileDicomSQ dirInfo 
 - 
dicomInfoprivate FileInfoDicom dicomInfo 
 - 
openerFileDicom opener 
 - 
fileprivate java.io.File file 
 
- 
 - 
Constructor Detail- 
JDialogDicomDirpublic JDialogDicomDir(java.awt.Frame parent) Default constructor for DICOMDIR
 - 
JDialogDicomDirpublic JDialogDicomDir(java.awt.Frame parent, java.io.File file, FileDicom caller)
 
- 
 - 
Method Detail- 
actionPerformedpublic void actionPerformed(java.awt.event.ActionEvent event) Closes dialog box when the "Close" button is pressed. Opens either a new file or selected images based on button.- Specified by:
- actionPerformedin interface- java.awt.event.ActionListener
- Overrides:
- actionPerformedin class- JDialogBase
- Parameters:
- event- Event that triggers this function.
 
 - 
openImageprivate void openImage() 
 - 
initprivate void init(java.lang.String title) Initializes the dialog box to a certain size and adds the components.- Parameters:
- title- Title of the dialog box.
 
 - 
createNodesprivate void createNodes() Creates nodes on the tree based on DICOMDIR
 - 
openprivate void open() Open new DICOMDIR file, if successful then close current box
 - 
buildImageprotected FileInfoBase buildImage(java.lang.String fileName, java.lang.String directory) Opens preview of image in frame
 - 
buildBrightContPanelprivate void buildBrightContPanel() Initializes GUI components and displays dialog.For the brightSlider the slider values and the brightness values are identical. brightness is an offset going from -255 to 255. This is enough to change all 0 values to 255 and all 255 values to 0. brightness is added to all contrast scaled red, green, and blue. However, for the contrastSlider the slider values are different from the contrast values. The contrast values go from 0.1 to 10.0 while the slider values go from -200 to 200. contrast = (float)Math.pow(10.0,contSlider.getValue()/200.0) The original red, green, and blue are mutliplied by contrast. 
 - 
valueChangedpublic void valueChanged(javax.swing.event.TreeSelectionEvent e) Updates the table based on tree selection- Specified by:
- valueChangedin interface- javax.swing.event.TreeSelectionListener
 
 - 
stateChangedpublic void stateChanged(javax.swing.event.ChangeEvent e) Updates the image based on thumbnails- Specified by:
- stateChangedin interface- javax.swing.event.ChangeListener
 
 - 
getPanelSizepublic java.awt.Dimension getPanelSize() Description copied from interface:PreviewImageContainerThe method returns the size of the panel into which the ViewJComponentPreviewImage will be drawing itself. It needs the Dimension so that it knows how large to scale.- Specified by:
- getPanelSizein interface- PreviewImageContainer
- Returns:
- Dimension
 
 - 
buildImagePanelprivate javax.swing.JSplitPane buildImagePanel() 
 - 
wasSuccesspublic boolean wasSuccess() 
 
- 
 
-