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.
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
Run the PowerShell wrapper — auto-installs dependencies
If you get an execution policy error
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/
./dicompressor-watch.sh /path/to/patients 300 /data/merged
.\dicompressor-watch.ps1 -WatchDir "D:\DICOM\Patients" -OutputDir "D:\Merged"
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.
PowerShell wrapper auto-installs the Python dependencies on first run.
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. It only writes the marker after the whole folder finishes successfully. If you need to re-run a folder, delete .dicompressor_vatech_done.
Download the generic DicomPressor workflow or the dedicated Vatech variant. Both are free and open source.
Download the latest version — includes CLI tool, watch scripts, and all dependencies. 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, 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.