Class JDialogAnonymizeImage

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

public class JDialogAnonymizeImage extends JDialogScriptableBase
REALLY like JDialogRemoveSlices except it does not have an "algorithm"

builds a simple dialog which imbeds a JPanelAnonymizeImage. The JDialogAnonymizeImage will gray-out all entries which are not available in the FileInfoDicom that goes with the given image. "Okay" then proceeds to remove or filter the selected tags from the image.

Version:
0.9
Author:
parsonsd
See Also:
  • Field Details

  • Constructor Details

    • JDialogAnonymizeImage

      public JDialogAnonymizeImage()
    • JDialogAnonymizeImage

      public JDialogAnonymizeImage(Dialog parent, ModelImage img)
      constructor to build a dialog allowing user to find which tags are available to anonymize.
      Parameters:
      parent - Parent dialog
      img - Image to anonymize
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Closes dialog box when the OK button is pressed and does the routine.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - event that triggers function
    • getOKCancelPanel

      protected JPanel getOKCancelPanel()
      makes the panel which displays the ok and cancel buttons.
      Returns:
      DOCUMENT ME!
    • getSequenceTags

      private void getSequenceTags()
      Method to retrieve the sequence tags from the file info. This will be used later to check for the other tags when anonymizing/removing information so that things aren't left in erroneously.
    • loadProfile

      private void loadProfile(String name)
      Parses through the profile in the MIPAV preferences to determine which tags were selected and set them correctly in the respective panels. Parsing occurs here while the actual selection determination is within each panel.
      Parameters:
      name -
    • getProfiles

      private ArrayList<String> getProfiles()
      Searches for all profiles in the MIPAV preferences that start with profileAnonymizeDICOM. Works for both the anonymize image dialog and the anonymize directory dialog.
    • saveProfile

      private void saveProfile(String name)
      Saves off a profile into the preferences. This is basically the exact same as what is seen in the anonymize directory version. This is so that the profiles from one image can be applied across all images in the directory.
      Parameters:
      name -
    • callAlgorithm

      protected void callAlgorithm()
      Description copied from class: JDialogScriptableBase
      Starts the algorithm. Already exists in most algorithm dialogs. Should be called during scripted execution and regular operation.
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • setGUIFromParams

      protected void setGUIFromParams()
      Description copied from class: JDialogScriptableBase
      Set the dialog GUI using the script parameters while running this algorithm as part of a script.
      Specified by:
      setGUIFromParams in class JDialogScriptableBase
    • storeParamsFromGUI

      protected void storeParamsFromGUI() throws ParserException
      Stores all the keys that were selected, but in string form so that it is easier to pull up later (although it is not a pretty sight to see in the recorder)
      Specified by:
      storeParamsFromGUI in class JDialogScriptableBase
      Throws:
      ParserException - If there is a problem creating/recording the new parameters.
    • doPostAlgorithmActions

      protected void doPostAlgorithmActions()
      Perform any actions required after the running of the algorithm is complete.
      Overrides:
      doPostAlgorithmActions in class JDialogScriptableBase