Class JDialogDicomDir

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

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:
  • Field Details

    • serialVersionUID

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

      public static final String[] dpColumnNames
      Column names for data provenance
    • DEFAULT_SIZE

      protected final 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.
    • origBrightness

      private int origBrightness
      DOCUMENT ME!
    • origContrast

      private float origContrast
      DOCUMENT ME!
    • buttonPanel

      private JPanel buttonPanel
      DOCUMENT ME!
    • scrollPane

      private JScrollPane scrollPane
      DOCUMENT ME!
    • ifSuccess

      private boolean ifSuccess
    • imagePanel

      JPanel imagePanel
    • img

    • tagViewer

      private ViewTableModel tagViewer
      The table model
    • tree

      private JTreeDICOM tree
    • brightPanel

      private JPanel brightPanel
      DOCUMENT ME!
    • serif12

      protected Font serif12
      DOCUMENT ME!
    • serif12B

      protected Font serif12B
      DOCUMENT ME!
    • brightSlider

      private JSlider brightSlider
      DOCUMENT ME!
    • contSlider

      private JSlider contSlider
      DOCUMENT ME!
    • imageSliderPane

      private JSplitPane imageSliderPane
      DOCUMENT ME!
    • defaultImageSize

      private Dimension defaultImageSize
      DOCUMENT ME!
    • current

      private JLabel current
      DOCUMENT ME!
    • current2

      private JLabel current2
      DOCUMENT ME!
    • sliderPanel

      private JPanel sliderPanel
      DOCUMENT ME!
    • nfc

      private NumberFormat nfc
      DOCUMENT ME!
    • thumbnail

      protected FileImageXML.Thumbnail thumbnail
      DOCUMENT ME!
    • contrast

      private float contrast
      DOCUMENT ME!
    • brightness

      private int brightness
      DOCUMENT ME!
    • base

    • dirInfo

      private FileDicomSQ dirInfo
    • dicomInfo

      private FileInfoDicom dicomInfo
    • opener

      FileDicom opener
    • file

      private File file
  • Constructor Details

    • JDialogDicomDir

      public JDialogDicomDir(Frame parent)
      Default constructor for DICOMDIR
    • JDialogDicomDir

      public JDialogDicomDir(Frame parent, File file, FileDicom caller)
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Closes dialog box when the "Close" button is pressed. Opens either a new file or selected images based on button.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - Event that triggers this function.
    • openImage

      private void openImage()
    • init

      private void init(String title)
      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

      protected FileInfoBase buildImage(String fileName, String directory)
      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

      public void valueChanged(TreeSelectionEvent e)
      Updates the table based on tree selection
      Specified by:
      valueChanged in interface TreeSelectionListener
    • stateChanged

      public void stateChanged(ChangeEvent e)
      Updates the image based on thumbnails
      Specified by:
      stateChanged in interface ChangeListener
    • getPanelSize

      public Dimension getPanelSize()
      Description copied from interface: PreviewImageContainer
      The 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:
      getPanelSize in interface PreviewImageContainer
      Returns:
      Dimension
    • buildImagePanel

      private JSplitPane buildImagePanel()
    • wasSuccess

      public boolean wasSuccess()