Class DicomCleaner

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

    public class DicomCleaner
    extends ApplicationFrame

    This class is an application for importing or retrieving DICOM studies, cleaning them (i.e., de-identifying them or replacing UIDs, etc.), and sending them elsewhere.

    It is configured by use of a properties file that resides in the user's home directory in .com.pixelmed.display.DicomCleaner.properties.

    It supports import and network retrieval of uncompressed, deflate and bzip compressed, and baseline JPEG compressed images (but not yet other encapsulated compressed pixel data).

    See Also:
    Serialized Form
    • Field Detail

      • resourceBundleName

        protected static java.lang.String resourceBundleName
      • propertiesFileName

        protected static java.lang.String propertiesFileName
      • propertyName_DicomCurrentlySelectedStorageTargetAE

        protected static java.lang.String propertyName_DicomCurrentlySelectedStorageTargetAE
      • propertyName_DicomCurrentlySelectedQueryTargetAE

        protected static java.lang.String propertyName_DicomCurrentlySelectedQueryTargetAE
      • rootNameForDicomInstanceFilesOnInterchangeMedia

        protected static java.lang.String rootNameForDicomInstanceFilesOnInterchangeMedia
      • filePrefixForDicomInstanceFilesOnInterchangeMedia

        protected static java.lang.String filePrefixForDicomInstanceFilesOnInterchangeMedia
      • fileSuffixForDicomInstanceFilesOnInterchangeMedia

        protected static java.lang.String fileSuffixForDicomInstanceFilesOnInterchangeMedia
      • nameForDicomDirectoryOnInterchangeMedia

        protected static java.lang.String nameForDicomDirectoryOnInterchangeMedia
      • exportedZipFileName

        protected static java.lang.String exportedZipFileName
      • textFieldLengthForQueryPatientName

        protected static int textFieldLengthForQueryPatientName
      • textFieldLengthForQueryPatientID

        protected static int textFieldLengthForQueryPatientID
      • textFieldLengthForQueryStudyDate

        protected static int textFieldLengthForQueryStudyDate
      • textFieldLengthForQueryAccessionNumber

        protected static int textFieldLengthForQueryAccessionNumber
      • textFieldLengthForReplacementPatientName

        protected static int textFieldLengthForReplacementPatientName
      • textFieldLengthForReplacementPatientID

        protected static int textFieldLengthForReplacementPatientID
      • textFieldLengthForReplacementAccessionNumber

        protected static int textFieldLengthForReplacementAccessionNumber
      • textFieldLengthForModifyDates

        protected static int textFieldLengthForModifyDates
      • resourceBundle

        protected java.util.ResourceBundle resourceBundle
      • srcDatabasePanel

        protected javax.swing.JPanel srcDatabasePanel
      • dstDatabasePanel

        protected javax.swing.JPanel dstDatabasePanel
      • remoteQueryRetrievePanel

        protected javax.swing.JPanel remoteQueryRetrievePanel
      • removeIdentityCheckBox

        protected javax.swing.JCheckBox removeIdentityCheckBox
      • removeDescriptionsCheckBox

        protected javax.swing.JCheckBox removeDescriptionsCheckBox
      • removeSeriesDescriptionsCheckBox

        protected javax.swing.JCheckBox removeSeriesDescriptionsCheckBox
      • removeProtocolNameCheckBox

        protected javax.swing.JCheckBox removeProtocolNameCheckBox
      • removeCharacteristicsCheckBox

        protected javax.swing.JCheckBox removeCharacteristicsCheckBox
      • removeDeviceIdentityCheckBox

        protected javax.swing.JCheckBox removeDeviceIdentityCheckBox
      • removeInstitutionIdentityCheckBox

        protected javax.swing.JCheckBox removeInstitutionIdentityCheckBox
      • cleanUIDsCheckBox

        protected javax.swing.JCheckBox cleanUIDsCheckBox
      • removePrivateCheckBox

        protected javax.swing.JCheckBox removePrivateCheckBox
      • addContributingEquipmentCheckBox

        protected javax.swing.JCheckBox addContributingEquipmentCheckBox
      • removeClinicalTrialAttributesCheckBox

        protected javax.swing.JCheckBox removeClinicalTrialAttributesCheckBox
      • zipExportCheckBox

        protected javax.swing.JCheckBox zipExportCheckBox
      • hierarchicalExportCheckBox

        protected javax.swing.JCheckBox hierarchicalExportCheckBox
      • acceptAnyTransferSyntaxCheckBox

        protected javax.swing.JCheckBox acceptAnyTransferSyntaxCheckBox
      • replacePatientNameCheckBox

        protected javax.swing.JCheckBox replacePatientNameCheckBox
      • replacePatientIDCheckBox

        protected javax.swing.JCheckBox replacePatientIDCheckBox
      • replaceAccessionNumberCheckBox

        protected javax.swing.JCheckBox replaceAccessionNumberCheckBox
      • modifyDatesCheckBox

        protected javax.swing.JCheckBox modifyDatesCheckBox
      • replacementPatientNameTextField

        protected javax.swing.JTextField replacementPatientNameTextField
      • replacementPatientIDTextField

        protected javax.swing.JTextField replacementPatientIDTextField
      • replacementAccessionNumberTextField

        protected javax.swing.JTextField replacementAccessionNumberTextField
      • modifyDatesTextField

        protected javax.swing.JTextField modifyDatesTextField
      • queryFilterPatientNameTextField

        protected javax.swing.JTextField queryFilterPatientNameTextField
      • queryFilterPatientIDTextField

        protected javax.swing.JTextField queryFilterPatientIDTextField
      • queryFilterStudyDateTextField

        protected javax.swing.JTextField queryFilterStudyDateTextField
      • queryFilterAccessionNumberTextField

        protected javax.swing.JTextField queryFilterAccessionNumberTextField
      • currentRemoteQuerySelectionQueryTreeRecord

        protected QueryTreeRecord currentRemoteQuerySelectionQueryTreeRecord
      • currentRemoteQuerySelectionUniqueKeys

        protected AttributeList currentRemoteQuerySelectionUniqueKeys
      • currentRemoteQuerySelectionUniqueKey

        protected Attribute currentRemoteQuerySelectionUniqueKey
      • currentRemoteQuerySelectionRetrieveAE

        protected java.lang.String currentRemoteQuerySelectionRetrieveAE
      • currentRemoteQuerySelectionLevel

        protected java.lang.String currentRemoteQuerySelectionLevel
      • ourCalledAETitle

        protected java.lang.String ourCalledAETitle
      • earliestDatesIndexedBySourceFilePath

        protected java.util.Map<java.lang.String,​java.util.Date> earliestDatesIndexedBySourceFilePath
      • savedImagesFolder

        protected java.io.File savedImagesFolder
      • currentSourceDatabaseSelections

        protected DatabaseTreeRecord[] currentSourceDatabaseSelections
      • currentSourceFilePathSelections

        protected java.util.Vector currentSourceFilePathSelections
      • currentDestinationDatabaseSelections

        protected DatabaseTreeRecord[] currentDestinationDatabaseSelections
      • currentDestinationFilePathSelections

        protected java.util.Vector currentDestinationFilePathSelections
      • importDirectoryPath

        protected java.lang.String importDirectoryPath
      • exportDirectoryPath

        protected java.lang.String exportDirectoryPath
    • Method Detail

      • setCurrentRemoteQueryInformationModel

        protected void setCurrentRemoteQueryInformationModel​(java.lang.String remoteAEForQuery)
      • importFileIntoDatabase

        protected static void importFileIntoDatabase​(DatabaseInformationModel database,
                                                     java.lang.String dicomFileName,
                                                     java.lang.String fileReferenceType,
                                                     java.util.Map<java.lang.String,​java.util.Date> earliestDatesIndexedBySourceFilePath)
                                              throws java.io.FileNotFoundException,
                                                     java.io.IOException,
                                                     DicomException
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
        DicomException
      • activateStorageSCP

        protected void activateStorageSCP()
                                   throws DicomException,
                                          java.io.IOException

        Start DICOM storage listener for populating source database.

        Throws:
        DicomException
        java.io.IOException
      • activateTemporaryDatabases

        protected void activateTemporaryDatabases()
                                           throws DicomException

        Start two databases, one for the "source" instances and one for the "target" instances.

        Neither will persist when the application is closed, so in memory databases only are used and instances live in the temporary filesystem.

        Throws:
        DicomException
      • findEarliestDate

        protected static java.util.Date findEarliestDate​(java.util.Map<java.lang.String,​java.util.Date> earliestDatesIndexedBySourceFilePath,
                                                         java.util.Vector<java.lang.String> sourceFilePathSelections)
      • makeNewFullyQualifiedInterchangeMediaInstancePathName

        protected java.lang.String makeNewFullyQualifiedInterchangeMediaInstancePathName​(int fileCount)
                                                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • makeNewFullyQualifiedHierarchicalInstancePathName

        protected java.lang.String makeNewFullyQualifiedHierarchicalInstancePathName​(java.lang.String sourceFileName)
                                                                              throws DicomException,
                                                                                     java.io.IOException
        Throws:
        DicomException
        java.io.IOException
      • performRetrieve

        protected void performRetrieve​(AttributeList uniqueKeys,
                                       java.lang.String selectionLevel,
                                       java.lang.String retrieveAE)
      • main

        public static void main​(java.lang.String[] arg)

        The method to invoke the application.

        Parameters:
        arg - none