LuwakX is a powerful, config-driven tool for anonymizing DICOM files using the deid library. It supports flexible configuration through JSON files and provides both command-line and programmatic interfaces.
It is based on the 2025b DICOM standards.
pip install luwakxgit clone https://github.com/ZentaLabs/LUWAKX.git
cd luwakx
pip install -e ".[test]"pip install -r requirements.txt
pip install -e ".[test]"Note:
deidis a custom fork not available on PyPI. It is automatically installed from GitHub the first time anonymization is run.
- Python >= 3.12
luwakx --config_path /path/to/config.jsonOptions:
--config_path: Path to the JSON configuration file--no-console: Disable console logging (only log to file)
from luwakx.anonymize import LuwakAnonymizer
anonymizer = LuwakAnonymizer("/path/to/config.json")
result = anonymizer.anonymize()Create a JSON configuration file:
{
"inputFolder": "/path/to/input/dicom/files",
"patientIdPrefix": "Patient",
"outputDeidentifiedFolder": "/path/to/output/deidentified",
"outputPrivateMappingFolder": "/path/to/output/privateMapping",
"recipesFolder": "/path/to/output/recipes",
"recipes": ["basic_profile"],
"projectHashRoot": "your_encryption_key",
"maxDateShiftDays": 1095,
"logLevel": "INFO"
}For full configuration documentation see luwakx/README.md.
Apache License 2.0 — see LICENSE.txt.