Tool to check anonymization of whole-slide images (WSI). It scans metadata and associated label/macro images for potential PHI.
- Clone directory anywhere
- Make sure system packages are present
- Open a terminal from the cloned directory
- Install python dependencies
python check_anon.py- Select folder containing WSI to be checked
- See report
- Choose the input folder via a file-explorer dialog (or pass
--input-dir). - Generates a CSV report with findings.
- Optional OCR on label/macro images using Tesseract.
- Python 3.8+
- System packages (Linux, Windows):
libopenslide0(andopenslide-toolsoptional)tesseract-ocr(for OCR; disable by settingRUN_OCR = Falseincheck_anon.py)
Install Python dependencies:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtUsing file browser and default location for the report:
python check_anon.pySpecifying paths manually:
python check_anon.py --input-dir /path/to/wsi_folder --report /path/to/report.csvIf --input-dir is omitted, a folder chooser will appear. The report defaults to wsi_anonymization_report.csv in the current directory.
If anonymization is done correctly, everything should be False in the anonymization report (.csv file).