Skip to content

RSNA/anonymizer

Repository files navigation

RSNA DICOM Anonymizer V17.3

de es fr Tests

Install Python with tkinter (GUI library)

Windows

  1. Download Python 3.12+ from python.org
  2. Run installer
    • Select "Add python.exe to PATH"
    • Enable "tcl/tk and IDLE"

macOS

  1. Install Homebrew if not present: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)'
  2. Install Python 3.12 with Tcl/Tk:
brew install [email protected]
brew install tcl-tk

Linux (Ubuntu/Debian)

  1. 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

Verify Installation

python --version
python -m tkinter

If python + tkinter has been installed successfully a small GUI window should open

Install rsna-anonymizer package from PyPI

pip install rsna-anonymizer

Execution

rsna-anonymizer

Upgrading

pip install --upgrade rsna-anonymizer

Documentation

Help files

Development

Setup

  1. Setup python environment (>3.10) which includes Tkinter, recommend using pyenv with MacOS & Linux
  2. Ensure python is installed with Tkinter: python -m tkinter, a small GUI window should open
  3. Install poetry: pip install poetry
  4. Set virtual environment within project: poetry config virtualenvs.in-project true
  5. Clone repository
  6. Setup virtual environment and install all dependencies listed in pyproject.toml: poetry install --with dev

Unit Testing

For model and controller with coverage

1. Create tests/controller/.env file with your AWS_USERNAME and AWS_PASSWORD
2. poetry run pytest

Translations

Languages for 17.3: en_US, de, es, fr

Ensure gettext is installed:

  1. Windows: Install instructions or choco install gettext
  2. Mac OSX: brew install gettext
  3. 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 here