Class JDialogAnonymizeDirectory

  • All Implemented Interfaces:
    DialogDefaultsInterface, 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.RootPaneContainer, javax.swing.WindowConstants

    public class JDialogAnonymizeDirectory
    extends JDialogBase
    Visual Interface to anonymize DICOM images by the directory-full. Multiple directories may be chosen to operate on; it will operate on sub-directories as well.

    When one directory is chosen as the source, all anonymized Dicom files in source are placed directly in the destination. Any images in any subdirectories (when chkChildren is selected) are sent into the children of the sub-directories.

    More than one submitted source directory will be placed into discrete child directories of the submitted destination directory. As as example, /images/a, /images/b are selected, and /dest is the selected destination directory. They would get put into /dest/a, and /dest/b.

    Naming can change the way the destination is made. Selecting a top-level randomisation, will randomate the output directory ofthe selected image directory. This isalong the lines in the above example as /images/a becoming /dest/abcde; and /images/b becoming /dest/12345. Selecting only one input directory will notmakea difference for top-level randomising. Child-directory randomising will give a random name when processing child direcories. this amounts to selecting /images (and recursive processing) and the destination directory /dest,and getting /images/a becoming /dest/abcde, and /images/b becoming /dest/12345.

    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  JDialogAnonymizeDirectory.AnonymizeDicomDirectories
      This thread anonymization processes all the Dicom files in the submitted source directories and places them into the submitted destination directory.
      • Nested classes/interfaces inherited from class javax.swing.JDialog

        javax.swing.JDialog.AccessibleJDialog
      • Nested classes/interfaces inherited from class java.awt.Dialog

        java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
      • Nested classes/interfaces inherited from class java.awt.Window

        java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Constructor Summary

      Constructors 
      Constructor Description
      JDialogAnonymizeDirectory​(java.lang.String dir)
      builds and packs the frame. does not set it visible.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent ae)
      when a button is clicked.
      void anonymizationComplete​(JDialogAnonymizeDirectory.AnonymizeDicomDirectories event)
      A psuedo-event-handler.
      private void applyGenericName()
      converts the name and sequence JTextFields into native types.
      private javax.swing.JPanel buildFilePanel​(java.lang.String dir)
      creates the source panel which consists of the directory line, the browse button, and a check box approving the anonymize in sub-directories.
      private javax.swing.JPanel buildImageDestPanel()
      creates the destination panel which consists of the directory textline, the browse button, and a sub-panel to provide the name of the randomized image.
      private javax.swing.JPanel buildLogPanel()
      creates a panel for the output log.
      private javax.swing.JMenuBar buildMenuEntries()
      Creates the menu bar for the dialog.
      private javax.swing.JPanel buildNameSuggestionPanel()
      creates a name-suggestion panel.
      private javax.swing.JTree buildNewSourceTree​(java.lang.String directory)
      Creates a new directory tree starting with directory as the root.
      private javax.swing.JPanel buildOKCancelPanel()
      Creates the panel which consists of the OKAY button and the Cancel button.
      private javax.swing.JPanel buildOptionPanel()
      creates the random-button panel,which are two radio-buttons determining the naming actions for the output directories.
      private javax.swing.JPanel buildRandButtonPanel()
      creates the random-button panel,which are two radio-buttons determining the naming actions for the output directories.
      private javax.swing.JPanel buildRandSelectionPanel()
      puts together the panel of recursive box and directory-randomization level radio button.
      private javax.swing.JPanel buildSelectedListing()
      creates the visual display in which to list all selected directories in the directory tree.
      private javax.swing.JPanel buildSourcePanel​(java.lang.String dir)
      creates the source panel which consists of the directory line, the browse button, and a check box approving the anonymize in sub-directories.
      private javax.swing.JPanel buildSourceTreeListing​(java.lang.String directory)
      Creates the panel holding the directory tree.
      private void buildStopButton()
      Builds the Stop button.
      private javax.swing.JPanel buildXLATdestPanel()
      creates the destination panel which consists of the directory textline, the browse button for the translation key file.
      private java.lang.String generateRandString()
      generates a random, up to-5 character, hexadecimal string.
      private java.util.ArrayList<java.lang.String> getProfiles()
      Searches for all profiles in the MIPAV preferences that start with profileAnonymizeDICOM.
      private boolean isImageDestinationOkay()
      Makes the image destination directory.
      private boolean isRemovalSelectionOkay()
      checks to see if the JPanelAnonymizeImage has had any selections made to it.
      private boolean isSelectedPathsOkay()
      Records all paths chosen in the source tree.
      private boolean isXLATdestinationOkay()
      Locates the translation/key-file destination directory.
      private void loadProfile​(java.lang.String name)
      Parses through the profile in the MIPAV preferences to determine which Supplement 55 tags are selected, which public tags exists (and were selected), and which private tags exist (and were selected).
      private java.io.File makeDirectory​(java.io.File selDir, javax.swing.JTextField txtField)
      makes the submitted directory as given by the inputted File, or the text as given in the given given textField.
      private java.lang.String newKeyLog()
      creates a new keylog, writing which tags are to be removed from the image information; the table header for the image read/write logging is added. the string created here is not automatically turned into the keylog string.
      private java.util.ArrayList<java.lang.String> privateKeySearch​(java.lang.String dir)  
      private void saveProfile​(java.lang.String name)
      Saves off a profile into the preferences.
      private void writeKeyFile()
      creates a keyFile named "patient.key.doc" in the destination directory as specified by the user. the keyFile contains a tab-delimited table of original filenames and the anonymous filename which replaced it; it flushes the keyLog into the keyFile.
      • Methods 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, update
      • Methods inherited from class java.awt.Dialog

        addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
      • Methods 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, toFront
      • Methods 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, validateTree
      • Methods 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, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • RANDOM_DIRECTORY_NAME

        public static final int RANDOM_DIRECTORY_NAME
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • RANDOM_SUBDIRECTORY_NAME

        public static final int RANDOM_SUBDIRECTORY_NAME
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • actOnPath

        private javax.swing.tree.TreePath[] actOnPath
        for the files selected ...
      • anonymizer

        private java.lang.Thread anonymizer
        Access to the running thread which is anonymising directories.
      • changeFilenameBox

        private javax.swing.JCheckBox changeFilenameBox
        DOCUMENT ME!
      • directoryTree

        private javax.swing.JTree directoryTree
        Actual things we can see...
      • everything

        private javax.swing.JTabbedPane everything
        Onscreen objects.
      • filePanel

        private javax.swing.JPanel filePanel
        Logical construct to reuild a source tree...
      • genericImageName

        private java.lang.String genericImageName
        Used as part of the image name; used in all processed image-sets.
      • grouping

        private javax.swing.ButtonGroup grouping
        DOCUMENT ME!
      • imageDestBrowse

        private javax.swing.JButton imageDestBrowse
        DOCUMENT ME!
      • imageDestDirectory

        private java.io.File imageDestDirectory
        private File srcDirectory; // Defined by the.
      • imageDestDirText

        private javax.swing.JTextField imageDestDirText
        DOCUMENT ME!
      • imageNameText

        private javax.swing.JTextField imageNameText
        DOCUMENT ME!
      • keyLog

        private java.lang.String keyLog
        Translation key, stored in "patient.key.doc".
      • logPane

        private javax.swing.JTextArea logPane
        holds output log; updated as processed.
      • noisyProcess

        private boolean noisyProcess
        Noisy means notifying the user of stupid errors.
      • noRandButton

        private javax.swing.JRadioButton noRandButton
        DOCUMENT ME!
      • outputLog

        private java.lang.String outputLog
        String to hold all file checks, changes and ignores.
      • rand

        private java.util.Random rand
        To generate wierd, unrecoverable names for anon images.
      • randChildButton

        private javax.swing.JRadioButton randChildButton
        DOCUMENT ME!
      • randTopButton

        private javax.swing.JRadioButton randTopButton
        DOCUMENT ME!
      • recursiveCheckBox

        private javax.swing.JCheckBox recursiveCheckBox
        private JButton srcBrowse;.
      • selectedList

        private javax.swing.JTextArea selectedList
        All directory-tree selected directories are listed for user-consumption in this whitespace.
      • sequenceStart

        private int sequenceStart
        Used as part of the image name; represents beginning of sequence for all processed image sets.
      • sequenceText

        private javax.swing.JTextField sequenceText
        DOCUMENT ME!
      • sourcePanel

        private javax.swing.JPanel sourcePanel
        DOCUMENT ME!
      • stopButton

        private javax.swing.JButton stopButton
        stops the thread from continuing its processing. on same panel as OK and Cancel.
      • toplevelOnly

        private int toplevelOnly
        DOCUMENT ME!
      • xlatDestBrowse

        private javax.swing.JButton xlatDestBrowse
        DOCUMENT ME!
      • xlatDestDirectory

        private java.io.File xlatDestDirectory
        DOCUMENT ME!
      • xlatDestDirText

        private javax.swing.JTextField xlatDestDirText
        DOCUMENT ME!
      • xlatDestinationUsage

        private int xlatDestinationUsage
        Defines options for WRITE, OVERWRITE, APPEND for the xlat file.
      • removeBox

        private javax.swing.JCheckBox removeBox
    • Constructor Detail

      • JDialogAnonymizeDirectory

        public JDialogAnonymizeDirectory​(java.lang.String dir)
        builds and packs the frame. does not set it visible.

        install the panels of source directory, destination directory, the checkbox for approving the translation-table file and the panel containing the ok and cancel buttons. Installs the checkbox panel.

        Parameters:
        dir - DOCUMENT ME!
    • Method Detail

      • privateKeySearch

        private java.util.ArrayList<java.lang.String> privateKeySearch​(java.lang.String dir)
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent ae)
        when a button is clicked.
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Overrides:
        actionPerformed in class JDialogBase
        Parameters:
        ae - DOCUMENT ME!
      • anonymizationComplete

        public void anonymizationComplete​(JDialogAnonymizeDirectory.AnonymizeDicomDirectories event)
        A psuedo-event-handler. Takes the event (An instance of AnonymizeDicomDirectories) resets the enabled status of the OK and Cancel buttons, appends the key-log text to the key-log and calls writeKeyFile().
        Parameters:
        event - the event
      • applyGenericName

        private void applyGenericName()
        converts the name and sequence JTextFields into native types. Ensures that if the textFields are empty, the empty values don't cause problems. That means the generic name is the original generated random string and sequence is 0.
      • buildFilePanel

        private javax.swing.JPanel buildFilePanel​(java.lang.String dir)
        creates the source panel which consists of the directory line, the browse button, and a check box approving the anonymize in sub-directories.
        Parameters:
        dir - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • buildImageDestPanel

        private javax.swing.JPanel buildImageDestPanel()
        creates the destination panel which consists of the directory textline, the browse button, and a sub-panel to provide the name of the randomized image.
        Returns:
        DOCUMENT ME!
      • buildLogPanel

        private javax.swing.JPanel buildLogPanel()
        creates a panel for the output log.
        Returns:
        DOCUMENT ME!
      • buildMenuEntries

        private javax.swing.JMenuBar buildMenuEntries()
        Creates the menu bar for the dialog. Builds a small menu with "New directory" and "Refresh directory" options.
        Returns:
        DOCUMENT ME!
      • buildNameSuggestionPanel

        private javax.swing.JPanel buildNameSuggestionPanel()
        creates a name-suggestion panel.
        Returns:
        DOCUMENT ME!
      • buildNewSourceTree

        private javax.swing.JTree buildNewSourceTree​(java.lang.String directory)
        Creates a new directory tree starting with directory as the root. Each leaf of the tree is populated by ViewFileTreeNodes, representing directories.

        It is selectable with TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION. Each item that is selected will be placed into a JTextArea displaying all the selected items. And as the tree is expanded, the leaves will be explored, but as yet, there is no utility to un-explore them, or refresh their view once explored.

        Parameters:
        directory - a string signifying the root of the tree
        Returns:
        a directory-tree, with the input argumenbt as the root.
        See Also:
        ViewFileTreeNode, TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION
      • buildOKCancelPanel

        private javax.swing.JPanel buildOKCancelPanel()
        Creates the panel which consists of the OKAY button and the Cancel button. The OKAY button is set to read "Run", and the Cancel button is set to read "Close".

        a STOP button to stop the seperate thread is on the panel after the cancel button. The stop button reads "Stop".

        Places a "Help" button to the right of the "Stop" button.

        Returns:
        DOCUMENT ME!
      • buildOptionPanel

        private javax.swing.JPanel buildOptionPanel()
        creates the random-button panel,which are two radio-buttons determining the naming actions for the output directories.
        Returns:
        DOCUMENT ME!
      • buildRandButtonPanel

        private javax.swing.JPanel buildRandButtonPanel()
        creates the random-button panel,which are two radio-buttons determining the naming actions for the output directories.
        Returns:
        DOCUMENT ME!
      • buildRandSelectionPanel

        private javax.swing.JPanel buildRandSelectionPanel()
        puts together the panel of recursive box and directory-randomization level radio button.
        Returns:
        the loaded panel
        See Also:
        JDialogAnonymizeDirectory#buildRecursiveButtonPanel(), buildRandButtonPanel()
      • buildSelectedListing

        private javax.swing.JPanel buildSelectedListing()
        creates the visual display in which to list all selected directories in the directory tree. The panel is 240 pixels wide though that is supposed to be the minimum size
        Returns:
        the panel which is to hold the list of selected items
      • buildSourcePanel

        private javax.swing.JPanel buildSourcePanel​(java.lang.String dir)
        creates the source panel which consists of the directory line, the browse button, and a check box approving the anonymize in sub-directories.
        Parameters:
        dir - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • buildSourceTreeListing

        private javax.swing.JPanel buildSourceTreeListing​(java.lang.String directory)
        Creates the panel holding the directory tree.
        Parameters:
        directory - DOCUMENT ME!
        Returns:
        Panel.
      • buildStopButton

        private void buildStopButton()
        Builds the Stop button.
      • buildXLATdestPanel

        private javax.swing.JPanel buildXLATdestPanel()
        creates the destination panel which consists of the directory textline, the browse button for the translation key file.
        Returns:
        DOCUMENT ME!
      • generateRandString

        private java.lang.String generateRandString()
        generates a random, up to-5 character, hexadecimal string.
        Returns:
        a hexadeciaml string of up to 5-characters.
      • isImageDestinationOkay

        private boolean isImageDestinationOkay()
        Makes the image destination directory. If there is a problem in creating the destination directory, the "Directory" tab is brought to the front; the warning message describing the error is displayed; then the text field with the destination directory is given focus, and all available text is displayed.
        Returns:
        boolean if the selected destination has been made, returns true. Otherwise, returns false.
      • isRemovalSelectionOkay

        private boolean isRemovalSelectionOkay()
        checks to see if the JPanelAnonymizeImage has had any selections made to it. If it hasn't, then the "Tag Options" tab is brought to the front (it contains the JPanelAnonymizeImage), and the warning message "No fields to anonymize were selected! Select a field." is displayed.
        Returns:
        boolean if a selection in the JPanelAnonymizeImage has been made, returns true. Otherwise, returns false.
        See Also:
        JPanelAnonymizeImage
      • isSelectedPathsOkay

        private boolean isSelectedPathsOkay()
        Records all paths chosen in the source tree. If no selections have been made, the "Directory" tab is brought to the front, and the warning message "Select at least one directory to work on." is displayed.
        Returns:
        boolean if a selection in the source tree has been made, returns true. Otherwise, returns false.
      • isXLATdestinationOkay

        private boolean isXLATdestinationOkay()
        Locates the translation/key-file destination directory. If the directory is not there already, the directory is made. If there is a problem in creating the destination directory, the "Directory" tab is brought to the front; the warning message describing the error is displayed; then the text field with the destination directory is given focus, and all available text is displayed. If the translation/key-file is already present in the chosen directory, there will be an options dialog allowing the user to Overwrite the old translation/key-file, to append the the new translation/key to the end of the current file, or to cancel the entire operation (to look for a new location).
        Returns:
        boolean if the selected destination has been made, returns true. Otherwise, returns false.
      • makeDirectory

        private java.io.File makeDirectory​(java.io.File selDir,
                                           javax.swing.JTextField txtField)
                                    throws java.io.IOException
        makes the submitted directory as given by the inputted File, or the text as given in the given given textField. Priority is given to the text in the textfield, so if the File's path does not agree with the path in the text field, the directory will be made with the path in the text field. Should the text field not have any path, an IOException will be thrown indicating this problem. If the directory does not exist, it will be created; if there are errors in creating the directory, an IOException will be thrown, with error message describing the problem, with a possible remedy as a suggestion.
        Parameters:
        selDir - DOCUMENT ME!
        txtField - DOCUMENT ME!
        Returns:
        File a directory
        Throws:
        java.io.IOException - -- failure to create the directory
      • newKeyLog

        private java.lang.String newKeyLog()
        creates a new keylog, writing which tags are to be removed from the image information; the table header for the image read/write logging is added. the string created here is not automatically turned into the keylog string. that must be done by the caller.
        Returns:
        the new KeyLog String.
      • writeKeyFile

        private void writeKeyFile()
        creates a keyFile named "patient.key.doc" in the destination directory as specified by the user. the keyFile contains a tab-delimited table of original filenames and the anonymous filename which replaced it; it flushes the keyLog into the keyFile. Any further writes to the keyLog will be writing into a new keyLog. Writing to the keyFile later will overwrite the keyFile already there.
      • getProfiles

        private java.util.ArrayList<java.lang.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.
      • loadProfile

        private void loadProfile​(java.lang.String name)
        Parses through the profile in the MIPAV preferences to determine which Supplement 55 tags are selected, which public tags exists (and were selected), and which private tags exist (and were selected). Since for this dialog we do not go into an image to determine which tags are present, whatever was in the profile is displayed.
        Parameters:
        name -
      • saveProfile

        private void saveProfile​(java.lang.String name)
        Saves off a profile into the preferences. This is basically the exact same as what is seen in the anonymize image version.
        Parameters:
        name -