This release is a pre-release and may not be stable for production use.
RSNA DICOM Anonymizer (V19)
Install Python with tkinter (GUI library)
Windows
- Download Python 3.12 from python.org (pytorch does not currently support 3.13)
- Run installer
- Select "Add python.exe to PATH"
- Enable "tcl/tk and IDLE"
macOS
- Install Homebrew if not present:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - Install Python 3.12 (not Homebrew's default
python3, which may be 3.14), tkinter, and OpenMP (required for Harmonize contrast analysis on macOS):
brew install python@3.12 python-tk@3.12 libomp
Homebrew's python@3.12 does not include tkinter by itself — use python-tk@3.12.
Linux (Ubuntu/Debian)
- Install the required packages:
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.12 python3.12-tk python3.12-venv
Verify Installation
Use Python 3.12 explicitly (python3.12, not python3):
python3.12 --version
python3.12 -m tkinter
python3.12 -c "import tkinter as tk; print('Tk', tk.TkVersion)"
If python + tkinter has been installed successfully a small GUI window should open. On macOS, Tk should be 9.0 for correct UI rendering with CustomTkinter 6.
Install rsna-anonymizer from PyPI
V19 is on PyPI as a pre-release (--pre). Use uv — much faster than plain pip for large ML dependencies (PyTorch, TotalSegmentator, etc.).
One-time: install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows (PowerShell): powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Restart the terminal if uv is not found.
On macOS, update uv and install its managed Python 3.12 with Tcl/Tk 9 (recommended when Homebrew Python is broken or unavailable):
uv self update
uv python install --reinstall 3.12
Create a virtual environment
uv venv rsna-anonymizer --python 3.12
source rsna-anonymizer/bin/activate # Windows: rsna-anonymizer\Scripts\activate
Verify inside the activated venv (must be Python 3.12.x and Tk 9.0 on macOS):
python --version
python -c "import tkinter as tk; print('Tk', tk.TkVersion)"
If uv venv --python 3.12 gives Tk 8.6, run uv python install --reinstall 3.12 and recreate the venv. If Homebrew Python works, you can use python3.12 -m venv rsna-anonymizer and python -m pip install --pre rsna-anonymizer instead of uv venv.
Install the package
uv pip install --pre rsna-anonymizer
Verify: uv pip show rsna-anonymizer or rsna-anonymizer --version. See CHANGELOG for release notes.
TotalSegmentator, XGBoost, and related dependencies are included. Download models and accept the face license from Help → AI Features or the AI Features button on the Welcome screen.
Execution
rsna-anonymizer
Headless Mode
You need to provide a path to a project configuration to run in headless mode
rsna-anonymizer -c path/to/ProjectModel.json
Upgrading
Activate the virtual environment first (source rsna-anonymizer/bin/activate).
uv pip install --upgrade --pre rsna-anonymizer
Documentation
Development
Setup
- Setup python environment (3.12) which includes Tkinter, recommend using pyenv with MacOS & Linux
- Ensure python is installed with Tkinter:
python -m tkinter, a small GUI window should open - Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh - Clone repository (for V19 work, checkout branch
V19before syncing) - Create virtual environment and install dependencies:
uv sync --group dev - macOS Harmonize contrast:
brew install libompwhen using XGBoost/TotalSegmentator contrast - Enable Git pre-commit hooks (Ruff lint, same rules as CI):
uv run pre-commit install
For hot-reload during UI work: uv run python scripts/dev_anonymizer.py (requires watchexec).
Hooks run on every git commit, including commits from the VS Code / Cursor Source Control UI. To skip once: git commit --no-verify.
Linting (Ruff)
Configuration: [tool.ruff] in pyproject.toml (scope: src/anonymizer/).
uv run ruff check ./src/anonymizer/
uv run ruff check ./src/anonymizer/ --fix # safe auto-fixes only; not run in CI
uv run pre-commit run ruff-check --all-files
CI runs ruff check without --fix. Pre-commit uses the same check on staged Python files under src/anonymizer/.
Unit Testing
Test layout mirrors source: tests/controller/ → src/anonymizer/controller/, prototyping tests live under src/prototyping/*/tests/. See tests/README.md.
uv sync --group dev
uv run pytest tests/controller/tseg -q # may download TS weights
uv run pytest tests/controller tests/model -q # CI suite (no view)
uv run pytest src/prototyping -q # prototyping only
uv run pytest -q # full local suite (controller + view + model)
Optional: create tests/controller/.env with AWS_USERNAME and AWS_PASSWORD for S3 upload tests.
Markers (tseg_integration, dicom_integration, rsna_local_data) are documented in pyproject.toml and tests/README.md.
Translations
Languages for 17.3: en_US, de, es, fr
Ensure gettext is installed:
- Windows: Install instructions or
choco install gettext - Mac OSX:
brew install gettext - Linux:
sudo apt-get install gettext
Extracting messages from source files:
cd src/anonymizer/assets/locales/ ./extract_translations.sh
Updating translations:
cd src/anonymizer/assets/locales/ ./update_translations.sh
Software Architecture
Full class diagram on github here
Metadata
Release files for rsna-anonymizer 19.0.0.dev10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rsna_anonymizer-19.0.0.dev10.tar.gz | 28.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rsna_anonymizer-19.0.0.dev10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.9 MB
Release files / rsna_anonymizer-19.0.0.dev10.tar.gz
| Download URL | rsna_anonymizer-19.0.0.dev10.tar.gz |
|---|---|
| Size | 28.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13bfe5f28374e844f9d035a645d67aac1659c7a35513bcf00d18b4c1326970a7
|
|
BLAKE2b-256 checksum How to use checksums |
cb33bcc5ab4adc3abf91af94106eb8bf1db5a8bd03a11bdff3810d32f18f542b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 19, 2026.
Transparency logRelease files / rsna_anonymizer-19.0.0.dev10-py3-none-any.whl
| Download URL | rsna_anonymizer-19.0.0.dev10-py3-none-any.whl |
|---|---|
| Size | 11.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5bf4033d875c9705b9789978edbcf7c9b5b530907bfc2ec36c1e5f4e0438325b
|
|
BLAKE2b-256 checksum How to use checksums |
92b75a42092a201b7a121c20faaa5523ee9adcb15fc11609dc772fdf98336431
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 19, 2026.
Transparency log