protected class PseudonymizeAndSequester.OurMediaImporter extends MediaImporter
A protected class that actually does all the work of finding and processing the files.
MediaImporter.MediaImporterWithFileChooserDialogThread, MediaImporter.OurReadTerminationStrategy
logger, mediaDirectoryPath, progressBar, progressBarUpdater, terminateAfterIdentifyingGroup
Constructor and Description |
---|
OurMediaImporter(MessageLogger logger,
java.lang.String inputPathName,
java.lang.String outputFolderCleanName,
java.lang.String outputFolderDirtyName,
java.lang.String pseudonymizationControlFileName,
java.lang.String pseudonymizationResulttByOriginalPatientIDFileName,
java.lang.String pseudonymizationResultByOriginalStudyInstanceUIDFileName,
java.lang.String failedFilesFileName,
java.lang.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.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doSomethingWithDicomFileOnMedia(java.lang.String dicomFileName,
java.lang.String inputTransferSyntaxUID,
java.lang.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(java.lang.String sopClassUID,
java.lang.String transferSyntaxUID)
Allows all types of DICOM files, images or not, with any Transfer Syntax to be processed
|
choosePathAndImportDicomFiles, choosePathAndImportDicomFiles, doSomethingWithDicomFileOnMedia, doSomethingWithUnwantedFileOnMedia, getDirectory, importDicomFiles, logLn, main
public OurMediaImporter(MessageLogger logger, java.lang.String inputPathName, java.lang.String outputFolderCleanName, java.lang.String outputFolderDirtyName, java.lang.String pseudonymizationControlFileName, java.lang.String pseudonymizationResulttByOriginalPatientIDFileName, java.lang.String pseudonymizationResultByOriginalStudyInstanceUIDFileName, java.lang.String failedFilesFileName, java.lang.String uidMapResultFileName, boolean keepAllPrivate, boolean addContributingEquipmentSequence, boolean keepDescriptors, boolean keepSeriesDescriptors, boolean keepProtocolName, boolean keepPatientCharacteristics, boolean keepDeviceIdentity, boolean keepInstitutionIdentity, int handleDates, int handleStructuredContent) throws java.io.FileNotFoundException, java.io.IOException
De-identify the DICOM Attributes and pseudonymize them and sequester any files that may have risk of identity leakage.
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 contentjava.io.FileNotFoundException
java.io.IOException
protected void doSomethingWithDicomFileOnMedia(java.lang.String dicomFileName, java.lang.String inputTransferSyntaxUID, java.lang.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.
doSomethingWithDicomFileOnMedia
in class MediaImporter
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 Headerprotected void finish() throws java.io.IOException
java.io.IOException
protected boolean isOKToImport(java.lang.String sopClassUID, java.lang.String transferSyntaxUID)
Allows all types of DICOM files, images or not, with any Transfer Syntax to be processed
isOKToImport
in class MediaImporter
sopClassUID
- transferSyntaxUID
-