Class JDialogFileInfoDICOM

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

public class JDialogFileInfoDICOM extends JDialogScriptableBase implements ActionListener
This class shows the dialog which contains the DICOM header information as contained in the FileInfoDicom class. It merely brings up the dialog and does whatever preparation to make the file-info readable in the table.
Version:
0.2
Author:
parsonsd; (mostly) cut and pasted from Neva Cherniavsky's FileInfoDicom
See Also:
  • Field Details

    • serialVersionUID

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

      private FileInfoDicom DicomInfo
      DOCUMENT ME!
    • editorDialogDicom

      private JDialogDICOMTagEditor editorDialogDicom
      DOCUMENT ME!
    • editorNewTag

      private JDialogDICOMNewTagEditor editorNewTag
    • editorDeleteTag

      private JDialogDICOMDeleteTagEditor editorDeleteTag
    • editorDialogDicomList

      private Vector<JDialogDICOMTagEditor> editorDialogDicomList
      DOCUMENT ME!
    • imageA

      private ModelImage imageA
      DOCUMENT ME!
    • listSelectorDicom

      private ListSelectionModel listSelectorDicom
      DOCUMENT ME!
    • tablePane

      private JScrollPane tablePane
      DOCUMENT ME!
    • anchorPane

      private JScrollPane anchorPane
      DOCUMENT ME!
    • splitPane

      private JSplitPane splitPane
    • selectedRowDicom

      private int selectedRowDicom
      DOCUMENT ME!
    • showPrivate

      private boolean showPrivate
      DOCUMENT ME!
    • tagsModel

      private ViewTableModel tagsModel
      DOCUMENT ME!
    • tagsTable

      private JTable tagsTable
      DOCUMENT ME!
    • isAppend

      private boolean isAppend
      DOCUMENT ME!
    • toolbarPanel

      private JPanel toolbarPanel
      DOCUMENT ME!
    • toolbarBuilder

      private ViewToolBarBuilder toolbarBuilder
      DOCUMENT ME !
    • saveCheckedButton

      private JButton saveCheckedButton
      buttons for toolbar *
    • saveCheckedAppendButton

      private JButton saveCheckedAppendButton
      buttons for toolbar *
    • checkAllButton

      private JButton checkAllButton
      buttons for toolbar *
    • uncheckAllButton

      private JButton uncheckAllButton
      buttons for toolbar *
    • editTagButton

      private JButton editTagButton
      buttons for toolbar *
    • deleteTagButton

      private JButton deleteTagButton
      buttons for toolbar *
    • overlayButton

      private JButton overlayButton
      buttons for toolbar *
    • anonymizeButton

      private JButton anonymizeButton
      buttons for toolbar *
    • breakDownArea

      private JTextArea breakDownArea
    • toolBar

      private JToolBar toolBar
      tool bar *
    • showPrivateButton

      private JToggleButton showPrivateButton
    • bogusShowPrivateButton

      private JToggleButton bogusShowPrivateButton
    • fileName

      private String fileName
      fileName of where dicom tags are save to *
    • directory

      private String directory
      directory of where dicom tags are save to *
    • sliceIndex

      private int sliceIndex
      slice index for which fileInfo is saved *
    • launchFileChooser

      private boolean launchFileChooser
    • groupColorMap

      private TreeMap<String,Color> groupColorMap
      Maps the group word to a displayed color, private tags are not specified. *
    • newTagButton

      private JButton newTagButton
      Button for inserting new tags
    • lightRed

      private static final Color lightRed
      Light red color (used for private tags).
    • columnNames

      private final ArrayList<String> columnNames
  • Constructor Details

    • JDialogFileInfoDICOM

      public JDialogFileInfoDICOM(Frame parent, String title)
      Constructs new dialog with given title and parent, non modal.
      Parameters:
      parent - Parent of the dialog.
      title - Title of the dialog.
    • JDialogFileInfoDICOM

      public JDialogFileInfoDICOM()
      Default Constructor
  • Method Details

    • showTags

      public static void showTags(ViewTableModel tagsModel, FileInfoDicom DicomInfo, boolean show)
      Shows the "Other Image Information", with or without private tags.
      Parameters:
      tagsModel - DOCUMENT ME!
      DicomInfo - DOCUMENT ME!
      show - boolean that indicates whether or not to show private tags
    • showTagsNoCheckbox

      public static void showTagsNoCheckbox(ViewTableModel tagsModel, FileInfoDicom DicomInfo, boolean show)
      Shows the "Other Image Information", with or without private tags.
      Parameters:
      tagsModel - DOCUMENT ME!
      DicomInfo - DOCUMENT ME!
      show - boolean that indicates whether or not to show private tags
    • showTags

      public static void showTags(ViewTableModel tagsModel, FileDicomTagTable DicomInfo, boolean show)
      Shows the "Other Image Information", with or without private tags.
      Parameters:
      tagsModel - DOCUMENT ME!
      DicomInfo - DOCUMENT ME!
      show - boolean that indicates whether or not to show private tags
    • parseSQTags

      private static void parseSQTags(ViewTableModel tagsModel, String baseTag, FileDicomSQ sq, boolean show)
    • addRow

      private static void addRow(ViewTableModel tagsModel, Object[] rowData, boolean show)
      Determines whether the given row should be shown. Show indicates whether private tags are being displayed.
    • sort

      public static void sort(ViewTableModel model, int col, boolean reverse, boolean isInfoDialog)
      Sort the tag column or name column of the table model. If reverse is true, sorts in reverse order.
      Parameters:
      model - the table model to sort on
      col - column to sort on
      reverse - whether or not to sort in reverse order.
      isInfoDialog - DOCUMENT ME!
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Closes the dialog when the user clicks close and toggles private tags on and off when the user hits the "Show Private" button.

      Brings up a 'Sanitise dialog'--to remove potentially damaging information, like the patient's name, from the image--when user clicks the "Sanitise Image" button.

      Creates editor dialogs to allow changing the value-field of a tag when user clicks "Edit Tag" button. This implmentation supports virtually any number of tag editors, bringing forward any previously opened editor. Most processing occurs when this class hears an editor window close; at that point it checks for "all slices" option in the editor and will alert any open window (frame) to set title as that information may have changed.

      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      e - event that triggered this action
    • displayAboutInfo

      public void displayAboutInfo(ModelImage _image, FileInfoDicom _info, int sIndex)
      This method displays all the valid variables, that is, the ones that are no longer equal to their default values. It parses special types as needed and translates other strings. However, this method does not yet translate every single DICOM tag, only those most used. The others it outputs as strings.
      Parameters:
      _image - The image being displayed.
      _info - The fileInfo to be displayed, of type FileInfoDicom.
    • buildToolBarPanel

      private void buildToolBarPanel()
      A helper method to build the toolbar with various buttons to help in the editing of DICOM tags
    • buildTagsTable

      private void buildTagsTable()
      A helper method to build a JTable out of a ViewTableModel
    • buildTagsModel

      private void buildTagsModel()
      A helper method to build a ViewTableModel and fill in DICOM tag info
    • buildTableScrollPane

      private void buildTableScrollPane()
      A helper method to build a JScrollPane out of tagsTable
    • buildTagsTableListSelector

      private void buildTagsTableListSelector()
      A helper method to build the tagsTable list selection method
    • buildAnchorPane

      private void buildAnchorPane()
    • convertType

      private static String convertType(byte[] bytesValue, boolean endianess, int vm)
      Converts type.
      Parameters:
      bytesValue - Array of bytes to convert
      endianess - DOCUMENT ME!
      vm - DOCUMENT ME!
      Returns:
      String with new value
    • bringToFront

      private boolean bringToFront(String tagKey)
      Checks whether or not the dialog exists; if it does, it brings the dialog to front.
      Parameters:
      tagKey - The tag's Key. Used to dtermine if this tag already has an editor associated with it.
      Returns:
      true if both a tag with the tagkey existed in the list and the associated dialog was brought to front.
    • buildColorMap

      private void buildColorMap()
      Builds which cells to display as light blue and green.
    • saveTags

      private void saveTags()
      Save tags to a file in ASCII format.
    • callAlgorithm

      protected void callAlgorithm()
      call algorithm
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • setGUIFromParams

      protected void setGUIFromParams()
      set gui from parameters
      Specified by:
      setGUIFromParams in class JDialogScriptableBase
    • storeParamsFromGUI

      protected void storeParamsFromGUI() throws ParserException
      store parameters from gui
      Specified by:
      storeParamsFromGUI in class JDialogScriptableBase
      Throws:
      ParserException