Class PseudonymizeAndSequester.OurMediaImporter
- Enclosing class:
PseudonymizeAndSequester
A protected class that actually does all the work of finding and processing the files.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmed.dicom.MediaImporter
MediaImporter.MediaImporterWithFileChooserDialogThread, MediaImporter.OurReadTerminationStrategy
-
Field Summary
Fields inherited from class com.pixelmed.dicom.MediaImporter
logger, mediaDirectoryPath, progressBar, progressBarUpdater, terminateAfterIdentifyingGroup
-
Constructor Summary
ConstructorsConstructorDescriptionOurMediaImporter
(MessageLogger logger, String inputPathName, String outputFolderCleanName, String outputFolderDirtyName, String pseudonymizationControlFileName, String pseudonymizationResulttByOriginalPatientIDFileName, String pseudonymizationResultByOriginalStudyInstanceUIDFileName, String failedFilesFileName, String uidMapResultFileName, boolean keepAllPrivate, boolean addContributingEquipmentSequence, boolean keepDescriptors, boolean keepSeriesDescriptors, boolean keepProtocolName, boolean keepPatientCharacteristics, boolean keepDeviceIdentity, boolean keepInstitutionIdentity, int handleDates, int handleStructuredContent) De-identify the DICOM Attributes and pseudonymize them and sequester any files that may have risk of identity leakage. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doSomethingWithDicomFileOnMedia
(String dicomFileName, String inputTransferSyntaxUID, String sopClassUID) De-identify the DICOM Attributes and pseudonymize them and sequester if may have risk of identity leakage.protected void
finish()
protected boolean
isOKToImport
(String sopClassUID, String transferSyntaxUID) Allows all types of DICOM files, images or not, with any Transfer Syntax to be processedMethods inherited from class com.pixelmed.dicom.MediaImporter
choosePathAndImportDicomFiles, choosePathAndImportDicomFiles, doSomethingWithDicomFileOnMedia, doSomethingWithUnwantedFileOnMedia, getDirectory, importDicomFiles, logLn, main
-
Constructor Details
-
OurMediaImporter
public OurMediaImporter(MessageLogger logger, String inputPathName, String outputFolderCleanName, String outputFolderDirtyName, String pseudonymizationControlFileName, String pseudonymizationResulttByOriginalPatientIDFileName, String pseudonymizationResultByOriginalStudyInstanceUIDFileName, String failedFilesFileName, String uidMapResultFileName, boolean keepAllPrivate, boolean addContributingEquipmentSequence, boolean keepDescriptors, boolean keepSeriesDescriptors, boolean keepProtocolName, boolean keepPatientCharacteristics, boolean keepDeviceIdentity, boolean keepInstitutionIdentity, int handleDates, int handleStructuredContent) throws FileNotFoundException, IOException De-identify the DICOM Attributes and pseudonymize them and sequester any files that may have risk of identity leakage.
- Parameters:
logger
-outputFolderCleanName
- where to store all the low risk processed output files (must already exist)outputFolderDirtyName
- where to store all the high risk processed output files (must already exist)pseudonymizationControlFileName
- values to use for pseudonymization, may be null or empty in which case random values are usedpseudonymizationResulttByOriginalPatientIDFileName
- file into which to store pseudonymization by original PatientID performedpseudonymizationResultByOriginalStudyInstanceUIDFileName
- file into which to store pseudonymization by original StudyInstanceUID performedfailedFilesFileName
- file into which to store the paths of files that failed to processuidMapResultFileName
- file into which to store the map of original to new UIDskeepAllPrivate
- retain all private attributes, not just known safe onesaddContributingEquipmentSequence
- whether or not to add ContributingEquipmentSequencekeepDescriptors
- if true, keep the text description and comment attributeskeepSeriesDescriptors
- if true, keep the series description even if all other descriptors are removedkeepProtocolName
- if true, keep protocol name even if all other descriptors are removedkeepPatientCharacteristics
- if true, keep patient characteristics (such as might be needed for PET SUV calculations)keepDeviceIdentity
- if true, keep device identitykeepInstitutionIdentity
- if true, keep institution identityhandleDates
- keep, remove or modify dates and timeshandleStructuredContent
- keep, remove or modify structured content- Throws:
FileNotFoundException
IOException
-
-
Method Details
-
finish
- Throws:
IOException
-
doSomethingWithDicomFileOnMedia
protected void doSomethingWithDicomFileOnMedia(String dicomFileName, String inputTransferSyntaxUID, String sopClassUID) De-identify the DICOM Attributes and pseudonymize them and sequester if may have risk of identity leakage.
Implements the following options of
ClinicalTrialsAttributes.removeOrNullIdentifyingAttributes()
:keepDescriptors, keepSeriesDescriptors, keepProtocolName, keepPatientCharacteristics, keepDeviceIdentity, keepInstitutionIdentity, ClinicalTrialsAttributes.HandleDates.keep
Also performs
AttributeList.removeUnsafePrivateAttributes()
Also performs
ClinicalTrialsAttributes.remapUIDAttributes(AttributeList)
The pixel data is not redacted.
The output file is stored in the outputFolderName specified in the constructor and is named ...
Any exceptions encountered during processing are logged to stderr, and processing of the next file will continue.
- Overrides:
doSomethingWithDicomFileOnMedia
in classMediaImporter
- Parameters:
dicomFileName
- the fully qualified path name to a DICOM fileinputTransferSyntaxUID
- the Transfer Syntax of the Data Set if a DICOM file, from the DICOMDIR or Meta Information HeadersopClassUID
- the SOP Class of the Data Set if a DICOM file, from the DICOMDIR or Meta Information Header
-
isOKToImport
Allows all types of DICOM files, images or not, with any Transfer Syntax to be processed
- Overrides:
isOKToImport
in classMediaImporter
- Parameters:
sopClassUID
-transferSyntaxUID
-- Returns:
- true if is suitable
-