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,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,TreeSelectionListener,RootPaneContainer,WindowConstants
public class JDialogDicomDir
extends JDialogBase
implements ActionListener, ItemListener, TreeSelectionListener, 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:
-
Nested Class Summary
Nested 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 TypeFieldDescription(package private) DefaultMutableTreeNodeprivate intDOCUMENT ME!private JPanelDOCUMENT ME!private JSliderDOCUMENT ME!private JPanelDOCUMENT ME!private floatDOCUMENT ME!private JSliderDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!protected final DimensionDescribes the initial size of the textual display area when the dialog is created.private DimensionDOCUMENT ME!private FileInfoDicomprivate FileDicomSQstatic final String[]Column names for data provenanceprivate Fileprivate boolean(package private) JPanelprivate JSplitPaneDOCUMENT ME!(package private) ViewJComponentPreviewImageprivate NumberFormatDOCUMENT ME!(package private) FileDicomprivate intDOCUMENT ME!private floatDOCUMENT ME!private JScrollPaneDOCUMENT ME!private static final longUse serialVersionUID for interoperability.protected FontDOCUMENT ME!protected FontDOCUMENT ME!private JPanelDOCUMENT ME!private ViewTableModelThe table modelprotected FileImageXML.ThumbnailDOCUMENT ME!private JTreeDICOMFields 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, 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
ConstructorsConstructorDescriptionJDialogDicomDir(Frame parent) Default constructor for DICOMDIRJDialogDicomDir(Frame parent, File file, FileDicom caller) -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Closes dialog box when the "Close" button is pressed.private voidInitializes GUI components and displays dialog.protected FileInfoBasebuildImage(String fileName, String directory) Opens preview of image in frameprivate JSplitPaneprivate voidCreates nodes on the tree based on DICOMDIRThe method returns the size of the panel into which the ViewJComponentPreviewImage will be drawing itself.private voidInitializes the dialog box to a certain size and adds the components.private voidopen()Open new DICOMDIR file, if successful then close current boxprivate voidvoidUpdates the image based on thumbnailsvoidUpdates the table based on tree selectionbooleanMethods 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, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.awt.event.ItemListener
itemStateChanged
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
dpColumnNames
Column names for data provenance -
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. -
origBrightness
private int origBrightnessDOCUMENT ME! -
origContrast
private float origContrastDOCUMENT ME! -
buttonPanel
DOCUMENT ME! -
scrollPane
DOCUMENT ME! -
ifSuccess
private boolean ifSuccess -
imagePanel
JPanel imagePanel -
img
-
tagViewer
The table model -
tree
-
brightPanel
DOCUMENT ME! -
serif12
DOCUMENT ME! -
serif12B
DOCUMENT ME! -
brightSlider
DOCUMENT ME! -
contSlider
DOCUMENT ME! -
imageSliderPane
DOCUMENT ME! -
defaultImageSize
DOCUMENT ME! -
current
DOCUMENT ME! -
current2
DOCUMENT ME! -
sliderPanel
DOCUMENT ME! -
nfc
DOCUMENT ME! -
thumbnail
DOCUMENT ME! -
contrast
private float contrastDOCUMENT ME! -
brightness
private int brightnessDOCUMENT ME! -
base
-
dirInfo
-
dicomInfo
-
opener
FileDicom opener -
file
-
-
Constructor Details
-
JDialogDicomDir
Default constructor for DICOMDIR -
JDialogDicomDir
-
-
Method Details
-
actionPerformed
Closes dialog box when the "Close" button is pressed. Opens either a new file or selected images based on button.- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogBase- Parameters:
event- Event that triggers this function.
-
openImage
private void openImage() -
init
Initializes the dialog box to a certain size and adds the components.- Parameters:
title- Title of the dialog box.
-
createNodes
private void createNodes()Creates nodes on the tree based on DICOMDIR -
open
private void open()Open new DICOMDIR file, if successful then close current box -
buildImage
Opens preview of image in frame -
buildBrightContPanel
private 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.
-
valueChanged
Updates the table based on tree selection- Specified by:
valueChangedin interfaceTreeSelectionListener
-
stateChanged
Updates the image based on thumbnails- Specified by:
stateChangedin interfaceChangeListener
-
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 interfacePreviewImageContainer- Returns:
- Dimension
-
buildImagePanel
-
wasSuccess
public boolean wasSuccess()
-