This Python script is used to move or copy DICOM files from one directory to another, saving each file in a new directory with the patient, exam date and sequence name and Dicom image number.
For example, a file named "IM-0001-0001.dcm" could be renamed "John_Doe/20221008_1019/CT_Scan/CT_San_dym_00001.dcm" if the patient's name is "John Doe", the exam date is 10/08/2022 at 10:19 AM, and the sequence name is "CT_scan".
- Python: 3.10+
- PyQt5
- tqdm
- pydicom
- win32ui
- ctypes
pip install -r requirements.txt
- Start the script and select the path where the DICOM files are located.
python DICOMTranslator.py
- Select whether the files should be copied or moved.
- Select the number of CPU cores to be used for the operation.
- Click Start Translation to start the operation.
When the process is complete, a message is displayed indicating the duration and the number of files recognized.
- Under the following Links (one_dir_exe, one_file_exe) you can download the DICOMTranslator as exe.
- If you use the one_dir_exe select the folder
- Click on the exe (DicomTranslator.exe), then the application starts
- Select whether the files should be copied or moved.
- Select the number of CPU cores to be used for the operation.
- Click Start Translation to start the operation.
When the process is complete, a message is displayed indicating the duration and the number of files recognized.
Non-DICOM files are not moved or copied. When working in "MOVE" mode, the original directory is deleted after the operation is completed. When working in "COPY" mode, the original directory is retained.
The GNU General Public License is a free, copyleft license for software and other kinds of works.
Install "pre-commit"
pip install pre-commit
then run:
pre-commit install
If you really like this repository and find it useful, please consider (★) starring it, so that it can reach a broader audience of like-minded people.