Date: Dec. 24th, 2021
DICOM Anonymizer v1.0, a CLI/GUI toolbox to structure and anonymize DICOM files.
Developped by Beijing Intelligent Brain Cloud, Inc., Beijing, China.
DICOM Anonymizer use GPLv3 license.
Standalone version have been released at DICOM Anonymizer Release
We developed DICOM Anonymizer based on the following library, however older version should also work.
- Python 3.6.9
- numpy >= 1.20.2
- pydicom >= 2.2.1
If you would like to use GUI version of DICOM Anonymizer
- PyQt5 >= 5.10.1
NOTE: If you would package DICOM Anonymizer by yourself, please visit FBS
- DICOM Working Directory: The source path for unstructured DICOM files which have sensitive information (e.g. PatientName) included in header.
- Anonymized Dicom Output Directory: The output path for structed & anonymized DICOM files.
- Prefix of Anonymized DICOM Sub-Folders: User can set the prefix of all anonymized DICOM folders, e.g., if you set prefix to "patient", the anonymized DICOM folders would be timestamp_patient_0001, timestamp_patient_0002, ...
- Starting Number of Anonymized Dicom Sub-Folders: User can set the starting number of all anonymized DICOM folders, e.g., if you set starting number to 10, the anonymized DICOM folders would be timestamp_patient_0010, timestamp_patient_0011, ...
User can easily call Dicom Anonymizer in the Python3 environment:
from coreFunction import DicomAnonymizer
# Init Dicom Anonymizer
da=DicomAnonymizer()
# Set All Input
da.SetDcmWorkDir("./test")
da.SetDcmOutDir("./sort")
da.SetDcmAnonyPrefix("Patient")
da.SetDcmAnonyStartP(1)
# Parse All DICOM Files and Build Output Folder Structure
da.ParseDicom()
# Anonymize All DICOM Files and Copy Them to Output Directory
da.AnonyDicom()
User can directly use GUI version of DICOM Anonymizer:
- 1 - Set All Input
- 2 - Click 'Export' Button and Execute
- Structured DICOM folders: the output DICOM files, with timestamp_prefix_starting_number.
- Anonymized Subjects Mapping Table: the mapping table between raw Patient_ID to anonymized ones.
- Invalid DICOM files: all invalid files absolute path would be save in this list.
- coreFunction.py: codes to generate structured & anonymized DICOM files.
- mainWindow.py: codes build GUI application.
- main.py: codes for packaging interface.
- Icons of Beijing Intelligent Brain Cloud, Inc., Beijing, China.
Before packaging, please ensure you have installed FBS, and run:
mkdir Dist/
cd Dist
fbs startproject
cp ../Package/* src/main/python/
cp ../Icons/* src/main/icons/
fbs freeze
Then, you could acquire the freezed toolbox in target folder.