PACSIFIER
PACSIFIER is an open-source tool written in Python to query, retrieve, and edit data in DICOM format from a radiological PACS server. It can be run directly or via a Docker container.
Full documentation: https://translationalml.github.io/pacsifier
Windows users: We strongly recommend using WSL to run PACSIFIER. Linux is the recommended environment.
Quick Start
Option 1: Pre-built Docker Image (Recommended)
Pull the latest release from Quay.io — no cloning, no building, no dependency installation required:
docker pull quay.io/translationalml/pacsifier:latest
Run PACSIFIER:
docker run --rm --net=host \
-v /path/to/my_dir:/base \
quay.io/translationalml/pacsifier:latest \
pacsifier --save --info --queryfile /base/my_query.csv \
--config /base/my_config.json --out_directory /base/my_output_dir
Tip: You can pin to a specific version (e.g.
pacsifier:1.0.0) instead oflatest. See available tags on Quay.io.
Or use the convenience Docker wrapper scripts:
pip install pacsifier # installs the wrapper scripts
docker_pacsifier -c config.json -i -s -q query.csv -d /output
Option 2: Install via pip
pip install pacsifier
Note: When installing via pip, you also need DCMTK installed on your system (
sudo apt install dcmtkon Ubuntu).
Features
- Query and retrieve DICOM images from PACS servers
- Move DICOM images between PACS nodes
- Upload DICOM images to PACS servers
- Anonymize DICOM files (directly or via Karnak gateway)
- Get pseudonyms from the De-ID API
- Create DICOMDIR files
- Extract Carestream reports
- Docker wrapper scripts for simplified usage
- Resume interrupted extractions
Usage
PACSIFIER provides several CLI commands. How you run them depends on your installation method:
| Install method | How to run commands |
|---|---|
| Docker (no install) | docker run --rm --net=host quay.io/translationalml/pacsifier:latest pacsifier ... |
Docker wrappers (pip install pacsifier) |
docker_pacsifier ..., docker_anonymize_dicoms ... |
pip / source (pip install pacsifier) |
pacsifier ..., pacsifier-anonymize ... |
Available commands
| Command | Docker wrapper | Description |
|---|---|---|
pacsifier |
docker_pacsifier |
Query, retrieve, and move DICOM images |
pacsifier-anonymize |
docker_anonymize_dicoms |
Anonymize DICOM files |
pacsifier-get-pseudonyms |
docker_get_pseudonyms |
Get pseudonyms from De-ID API or custom mapping |
pacsifier-add-karnak-tags |
docker_add_karnak_tags |
Tag DICOM files for Karnak de-identification |
pacsifier-create-dicomdir |
docker_create_dicomdir |
Create a DICOMDIR file |
pacsifier-move-csv |
docker_move_dumps |
Move info CSV dumps to a separate folder |
pacsifier-extract-carestream-report |
docker_extract_carestream_report |
Extract text from Carestream SR reports |
Common examples
With pip/source install (requires DCMTK on your system):
# Query and save DICOM images locally
pacsifier --save --info -q query.csv -c config.json -d ./output
# Query and move images to a remote DICOM node
pacsifier --move -q query.csv -c config.json
# Upload DICOM images to a PACS server
pacsifier --upload --upload_directory ./dicoms -c config.json
# Resume an interrupted download (skips already downloaded series)
pacsifier --save --resume -q query.csv -c config.json -d ./output
# Anonymize DICOM files
pacsifier-anonymize -d ./data -o ./anonymized --fuzz_acq_dates --remove_private_tags
With Docker (no DCMTK or Python needed):
# Using wrapper scripts (pip install pacsifier for the wrappers only)
docker_pacsifier -c config.json -s -i -q query.csv -d ./output
docker_anonymize_dicoms -d ./data -o ./anonymized -a -p
# Or directly with docker run
docker run --rm --net=host \
-v /path/to/my_dir:/base \
quay.io/translationalml/pacsifier:latest \
pacsifier --save --info -q /base/query.csv -c /base/config.json -d /base/output
Run any command with --help for the full list of options. See Docker Wrappers for more details on the wrapper scripts.
Configuration
Config File
PACSIFIER requires a JSON configuration file:
{
"server_address": "PACS server IP/URL",
"port": 4242,
"server_AET": "SERVER_AET",
"AET": "YOUR_AET",
"move_AET": "MOVE_DESTINATION_AET",
"move_port": 11112,
"batch_size": 30,
"batch_wait_time": 10
}
Migrating from PACSMAN
If you are migrating a PACSMAN config.json, update the key names and types:
server_ip→server_addressport: string → integermove_port: string → integerbatch_size: string → integerbatch_wait_time: string → integer
Query File
The query file is a .csv file with columns matching DICOM attributes. Supported columns include:
StudyDate, PatientID, SeriesDescription, Modality, ProtocolName, StudyInstanceUID, SeriesInstanceUID, PatientName, PatientBirthDate, AcquisitionDate, DeviceSerialNumber, SeriesNumber, StudyDescription, AccessionNumber, SequenceName, StudyTime, ImageType.
See the full documentation for query file format, examples, and all CLI options.
Documentation
Full documentation is available at https://translationalml.github.io/pacsifier, including:
Building the Documentation
make build-docs
This generates the HTML documentation in docs/_build/html.
Running Tests
Via Docker (recommended)
make build-docker
make test
Locally
Install from Source (For Developers)
git clone https://github.com/TranslationalML/pacsifier.git
cd pacsifier
conda create -n pacsifier_minimal python=3.10
conda activate pacsifier_minimal
pip install -e ".[all]"
Note: Source installations require DCMTK to be installed on your system.
See the full installation guide for all options and details.
Run the tests
See the Developer Guide for instructions on running tests locally with a mock DICOM server.
Contributing
See the Contributing Guide for guidelines on reporting bugs, requesting features, and submitting pull requests.
License
Apache License 2.0. See LICENSE for details.
Citation
If you use PACSIFIER in your work, please cite it. See How to Cite.
Acknowledgments
This project received funding from the Lausanne University Hospital and the Lundin Family Brain Tumour Research Center.
Metadata
Release files for pacsifier 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pacsifier-1.0.0.tar.gz | 45.6 kB | Without provenance | Details for pacsifier-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pacsifier-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pacsifier-1.0.0-py3-none-any.whl |
Total release size: 96.8 kB
Release files / pacsifier-1.0.0.tar.gz
| Download URL | pacsifier-1.0.0.tar.gz |
|---|---|
| Size | 45.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c0fa915f1298fad9f1933c682330faa0d14a1da9010184c50c1fd90707f9ad7
|
|
BLAKE2b-256 checksum How to use checksums |
8a3190865754ce577f567bd2c67d2d693a430e7ae4c6f5610b4e778aa8da3502
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / pacsifier-1.0.0-py3-none-any.whl
| Download URL | pacsifier-1.0.0-py3-none-any.whl |
|---|---|
| Size | 51.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b11de4aff5c8406f05ad48acf748e764d99f7ced82d9b2853236a6d7d1a59121
|
|
BLAKE2b-256 checksum How to use checksums |
ef8e9085b885a5cd0acf4ed1f8408985831ca56cd741ec0a7b2561b7c11d6422
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Security for pacsifier 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.