Free, open-source CLI tool for merging, splitting, compressing, anonymizing, and converting DICOM medical imaging files. Cross-platform. No GUI needed.
Everything you need to work with DICOM files from the command line — analogous to Sante Dicommander.
Merge hundreds of single-frame DICOM files into one Enhanced CT multi-frame file with correct 3D spatial reconstruction.
Split a multi-frame DICOM file back into individual single-frame files.
Compress DICOM files using JPEG Lossless (-x) or JPEG Lossy (-z) transfer syntaxes.
Decompress compressed DICOM files back to uncompressed transfer syntax.
Remove or replace patient-identifying information using a parameter file. Supports rectangle masks for burned-in annotations.
Insert, modify, or remove any DICOM tag using a simple parameter file.
Export DICOM files to JPEG, PNG, BMP, or TIFF images.
Export multi-frame DICOM files to AVI video.
Generate a DICOMDIR index file for a folder of DICOM files.
Export DICOM headers (metadata) to human-readable text files.
Convert between Little Endian and Big Endian transfer syntaxes.
Convert between legacy NEMA2 format and modern DICOM 3.0 Part 10.
Display detailed information about a DICOM file — dimensions, modality, transfer syntax, patient info, and more.
Get an overview of all DICOM files in a folder — patient count, series, modalities, and statistics.
Idempotent processing — creates a .dicompressor_done marker after success. Safe to run repeatedly via cron or scheduler.
Continuously monitors a parent folder for new patient subfolders and auto-processes them every N seconds. Standalone watch scripts included.
Persistent per-folder mtime cache. After the first pass, watch mode skips folders whose contents haven’t changed since the last pass instead of re-reading every DICOM header. New 3D studies get picked up within one interval even on trees with thousands of patient folders.
DicomPressor requires Python 3.8+ and works on macOS, Windows, and Linux. The wrapper scripts automatically install all dependencies.
Clone the repository
Make the shell wrapper executable
Run — it auto-installs pydicom, numpy, Pillow on first run
Clone the repository
Recommended: install the requirements once and run Python directly
If `python` is missing, use `py -3`. If the wrapper is blocked by execution policy, use the direct Python command above or allow the wrapper only for the current session.
The installer uses the built-in Windows Task Scheduler, asks for python.exe, source folder, output folder, log path, interval, and task name, then creates a hidden auto-start background task. No nssm download is required.
Open WSL terminal (Ubuntu)
Clone and set up (same as Linux)
Run — access Windows drives via /mnt/c/
Install Python if missing
Core runtime
DICOM file parsing
Pixel data processing
Image export
DicomPressor uses a simple CLI syntax: dicompressor.py [action] [options] -f/-F <path>
Use -f to scan subfolders recursively, or -F to process a single file or folder only.
python3 dicompressor.py -j -f /path/to/patient_folder
python3 dicompressor.py -s -F multiframe.dcm
python3 dicompressor.py -x -f /path/to/folder
python3 dicompressor.py -z -f /path/to/folder
python3 dicompressor.py -u -f /path/to/folder
python3 dicompressor.py -a anon_params.txt -f /path/to/folder
python3 dicompressor.py -m modify_params.txt -f /path/to/folder
python3 dicompressor.py -I png -f /path/to/folder
python3 dicompressor.py -E -F multiframe.dcm
python3 dicompressor.py -d -f /path/to/folder
python3 dicompressor.py -t -f /path/to/folder
python3 dicompressor.py --info -F file.dcm
python3 dicompressor.py --summary -f /path/to/folder
python3 dicompressor.py -j --skip-if-done -f /path/to/patient
python3 dicompressor.py -j --watch 300 -f /path/to/patients/
python3 dicompressor.py -j --watch 300 --output-dir /data/merged -f /data/patients/
python .\dicompressor.py -j --watch 300 --output-dir "D:\Merged" -f "D:\DICOM\Patients"
python .\dicompressor.py -j --watch 300 --log-file "D:\DICOM\Logs\dicompressor.log" --output-dir "D:\Merged" -f "D:\DICOM\Patients"
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Unblock-File .\dicompressor-install-service.ps1
.\dicompressor-install-service.ps1
./dicompressor-watch.sh /path/to/patients 300 /data/merged /data/logs/dicompressor.log
.\dicompressor-watch.ps1 -WatchDir "D:\DICOM\Patients" -OutputDir "D:\Merged" -LogFile "D:\DICOM\Logs\dicompressor.log"
The generic merge/watch workflow now behaves like the Vatech scheduler: it starts processing folders while the recursive scan is still running, writes a rotating dicompressor.log file next to the script by default, skips done-marked folders before deep re-inspection on later passes, and waits only for the remaining part of the interval before the next pass.
If PowerShell says running scripts is disabled on this system, either use the direct python command above or allow the wrapper only for the current session:
This warning is usually safe and does not stop the merge:
The first watch pass can still take time on very large historical trees, but matching folders now start merging during the scan instead of waiting for a full candidate list.
By default the script writes a rotating log file next to itself:
Use the log to confirm scan progress, found folders, copied outputs, and failures. You can override the location with --log-file.
Watch mode keeps a per-folder mtime cache so subsequent passes skip folders whose contents haven’t changed:
The first pass on a large historical tree still reads every folder. Every pass after that looks only at folders whose direct-child list has changed since the previous scan, so a new 3D study is picked up within one --watch interval. Override with --scan-state-file or disable it by passing an empty string.
The generic ZIP and GitHub repo now include an interactive installer built on the Windows Task Scheduler. It asks for the important paths instead of requiring a hand-written command or an external service wrapper.
Run it from an Administrator PowerShell. The created scheduled task starts with Windows, runs hidden as SYSTEM, restarts automatically if it exits, and uses the source, output, interval, and log path you enter during the prompts.
If an older Windows console cannot print box-drawing Unicode characters, the CLI help output now falls back to plain ASCII separators automatically.
Anonymize and Modify commands accept a simple text file with tag assignments:
(0010,0010)=ANONYMOUS^PATIENT (0010,0020)=ANON001 (0010,0030)=19000101 (0010,0040)=O (0008,0090)=
(0008,1030)=My Study Description (0008,103E)=Modified Series
Use the dedicated Vatech variant when the machine exports a DCM_FILE.CT archive instead of a folder with many small DICOM slices.
If the machine already writes hundreds of single-frame .dcm files into one folder, the current generic script stays the right tool.
.CT archivesThe Vatech variant searches folders for normal slices and Vatech archives in parallel. For every DCM_FILE.CT it extracts to a temp folder, merges the slices, moves the merged output back next to the source data, removes the temp folder, and writes .dicompressor_vatech_done.
Clone the dedicated Vatech repo or use the ZIP below.
Recommended for most Windows users: install the requirements once, then run the Python script directly. If python is missing, replace it with py -3.
If you want to use the PowerShell wrapper, allow it only for the current terminal session and then start it normally.
For clinics that want the watcher to start with Windows and stay hidden, use the interactive Task Scheduler installer. It asks for the Python path, source folder, output folder, log file, interval, and task name.
Run the Linux wrapper inside WSL and point it to the Windows mount.
The Vatech script supports normal single-frame DICOM folders and Vatech archives side by side in the same tree. In watch mode it starts processing folders as soon as they are found during the scan, writes .dicompressor_vatech_done only after success, prunes done-marked study folders from later recursive passes, and writes a rotating dicompressor-vatech.log file next to the script by default. If you need to re-run a folder, delete the done marker.
Best match for the Vatech workflow:
Each patient stays in its own Sub... folder. The script looks for real 3D CT folders and ignores small patient-root 2D series like PX*.dcm.
If PowerShell says running scripts is disabled on this system, either use the direct python command above or allow the wrapper only for the current session:
This warning is usually safe and does not stop the merge:
The first watch pass can still take time on very large archives, but the script now logs scan progress, starts merging matching folders during the scan, and skips done-marked study folders before deep inspection on later passes.
By default the script writes a rotating log file next to itself:
Use that log to confirm scan progress, found folders, extracted DCM_FILE.CT archives, copy operations, and failures. You can override the location with --log-file.
The ZIP and GitHub repo include an interactive installer built on the Windows Task Scheduler. It prompts for the important paths instead of making you edit a command by hand or download nssm.
Run it from an Administrator PowerShell. The created scheduled task starts automatically with Windows, runs hidden as SYSTEM, restarts if it exits, and writes the same Vatech log file you configure during the prompts.
If an older Windows console cannot print box-drawing Unicode characters, the Vatech CLI help output now falls back to plain ASCII separators automatically.
Merged filenames do not come from DCM_FILE.CT. They come from the DICOM headers inside the archive, usually PatientName and SeriesNumber.
If two merged files would have the same name in the output folder, the later one gets a suffix like _1 or _2 instead of overwriting the existing file.
Download the generic DicomPressor workflow or the dedicated Vatech variant. Both are free and open source.
Download the latest generic release — includes the CLI tool, wrapper scripts, watch scripts, Windows startup task installer, and README. No Git needed.
Download .zipDedicated source repository for the Vatech workflow and future release history.
Open Vatech RepoZIP package with the dedicated Vatech script, wrapper scripts, watch scripts, Windows startup task installer, and README.
Download Vatech .zipAfter merging, use the built-in VolView viewer to explore your DICOM data in 3D — right here in the browser. Drag & drop your .dcm file into the viewer below.
Powered by VolView by Kitware — self-hosted on this server.
Found a bug? Have a feature request? Need help?
Report bugs, request features, or ask questions. We'll get back to you as soon as possible.
[email protected]You can also open an issue on GitHub.