GUISkinDose
Peak skin dose and 3D skin dose maps for fluoroscopic X-ray procedures.
Quick launch · Installation · Headless use · User guide · Changelog · Discussions
Independently maintained fork of PySkinDose. Original author: Max Hellström. This fork is not an official or endorsed PySkinDose release unless upstream maintainers say otherwise.
Current maintainer: @kgrizz-git — see SUPPORT.md and GOVERNANCE.md.
GUISkinDose estimates peak skin dose (PSD) and 3D skin dose maps for fluoroscopic X-ray procedures. Load a DICOM RDSR (or a tabular event-table export), preview the examination geometry, run the dose calculation, and export an audit report — from a graphical interface or headlessly from scripts.
The distribution and import package name is guiskindose (distinct from upstream).
| Upload | Geometry |
|---|---|
| Results | Export |
Captured with the bundled example data; no patient data.
Intended use and responsibility
GUISkinDose is intended for research, education, development, and institutional quality-assurance workflows. It is not FDA-cleared (or otherwise certified) as a medical device, and results are not independently validated for making patient-care decisions on their own.
Physicists and physicians remain responsible for reviewing outputs, confirming that inputs and geometry settings are appropriate, and making any clinical or patient-care decisions. Do not treat dose maps or PSD values as a substitute for professional judgment, institutional policy, or regulatory clearance.
Never commit or attach real patient data to issues, pull requests, or the repository — see CONTRIBUTING.md and dev-docs/PRIVACY_AND_SENSITIVE_ASSETS.md.
Quick launch (GUI)
The typical way to use GUISkinDose is the NiceGUI-based graphical interface: Upload (RDSR DICOM or tabular CSV/TSV/XLSX) → Data review → Settings (phantom, per-exam offsets) → Corrections (patient-support transmission, kerma-meter factors) → Geometry preview → Calculate → Results (PSD, dose map) → Export (JSON, dose-map HTML/PNG, rich XLSX/PDF/DOCX report).
After installing guiskindose[gui] (see Installation), start the GUI:
guiskindose --mode gui # opens in your browser
guiskindose --mode gui --native # own window; needs guiskindose[gui-native]
From a source checkout, the launcher scripts below also set up the environment.
macOS / Linux:
chmod +x run_gui.sh # one-time setup, enables executing the sh script
./run_gui.sh
Windows:
run_gui.bat
Both scripts prompt you to run in browser mode (option 1) or native window mode (option 2, default).
Double-click launchers. After the first run, each OS has a file you can double-click, with the GUISkinDose icon:
| OS | Double-click | Created by |
|---|---|---|
| macOS | GUISkinDose.command (opens Terminal) |
Tracked; its icon is set on first run |
| Windows | GUISkinDose.lnk |
The first run_gui.bat run |
| Linux | GUISkinDose.desktop (GNOME: allow launching if asked) |
The first ./run_gui.sh run |
The shortcuts stay inside the checkout and are git-ignored (on Linux, GNOME records
the "allow launching" trust flag in its own metadata store under your home folder). Set
GUISKINDOSE_NO_LAUNCHER_SETUP=1 to skip creating them. On macOS, a checkout
downloaded as a ZIP is quarantined: allow it under System Settings → Privacy &
Security → Open Anyway. A git clone is not quarantined.
Or launch directly:
python -m guiskindose --mode gui # browser mode
python -m guiskindose --mode gui --native # native window (requires pywebview)
# or the equivalent installed console command:
guiskindose --mode gui [--native]
Example RDSR files ship under src/guiskindose/example_data/RDSR/. In-app
help on each tab mirrors docs/source/gui_help/ (mirrored into the package
by scripts/sync_gui_help.py, enforced by pre-commit + CI).
Feature highlights: multi-exam aggregation with per-exam offsets, tabular DoseTrack/Radimetrics imports with schema auto-detection, kerma-meter correction keyed by equipment × tube, rich audit reports, and a human phantom library with habitus scaling. Details in dev-docs/FEATURE_INVENTORY.md and the User guide.
Privacy / network
The GUI has no user accounts and loads PHI-derived RDSR data into a single
shared, process-global state. It always binds to 127.0.0.1 (localhost only)
and refuses any non-loopback host. There is no LAN/remote mode: do not try to
expose it with a proxy; move the computation to the machine where the data may
reside instead.
Loopback binding is not an authentication boundary, so browser mode adds
three controls (see src/guiskindose/gui/loopback_security.py):
- A per-launch token: the console prints a launch URL with a random secret (valid until the server restarts — deliberately reusable, so a second browser profile or a cleared cookie doesn't lock you out), and the browser opens it automatically. Only that URL bootstraps a session (session cookie); every other request — HTTP and websocket alike — needs the cookie. Stale tabs and old URLs stop working after each restart — relaunch and use the new console URL.
- Strict Host validation: only the loopback authority is accepted, so DNS
rebinding (
evil.comresolving to127.0.0.1) is rejected. - Origin validation: a present-but-foreign
Originon websockets and HTTP is a cross-site page (browsers always sendOrigin). Sockets need the session whenever tokens are on — an allowlisted origin alone proves nothing against local processes, which can forge it.
Anyone logged into the same machine who obtains the launch URL (or an active session) sees the same shared state — OS accounts alone do not protect it, so shared workstations need their own access story (e.g. one operator at a time, or per-operator machines). Native mode enforces the same Host/Origin checks but no launch token (the embedded window is the trusted client), so another local user can still reach its port.
Logging & privacy
The CLI and GUI log to the console (stderr) by default. Native mode has no
visible terminal, so diagnostic output is still emitted to stderr but may not be
easy to read unless you launch from a shell. No log file is written unless
configure_logging(log_file=...) is wired at startup (the optional file sink in
guiskindose.debug supports rotation and size caps when enabled).
To protect PHI, the app does not log file names or paths (RDSR filenames
often contain patient name/MRN/accession) — only file type, size, and event
counts. Verbose DEBUG output is opt-in per category via a debug.json in the
working directory, e.g.:
{ "GUI": true, "PROCESSING": true, "CALCULATION": true, "RENDERING": true }
Even with debug enabled, identifiers are still redacted. Do not paste console output into issues or commits without reviewing it for PHI first.
Platform notes (Tkinter)
The GUI works fully without Tkinter, but uses it for two niceties: the native
Save As file dialog when exporting, and detecting your screen size to size
the native window. If Tkinter is missing you'll see a log line like
No module named '_tkinter', exports fall back to a browser-style download, and
the window opens at a default size — nothing crashes.
Tkinter ships with Python but is only built when the Tcl/Tk libraries are present
at build time, so it can be absent (commonly with pyenv builds). It is not a
pip package — do not add it to the project dependencies. To install it:
| Platform | Command |
|---|---|
| macOS, Homebrew Python | brew install python-tk (or python-tk@3.12 for a specific version) |
| macOS, pyenv Python | brew install tcl-tk, then reinstall the interpreter: pyenv install 3.12.9 |
| Debian / Ubuntu | sudo apt install python3-tk |
| Fedora | sudo dnf install python3-tkinter |
| Windows | Included with the python.org installer — keep "tcl/tk and IDLE" checked |
Verify with: python -c "import tkinter; print(tkinter.TkVersion)".
Native window mode remembers the last window size, position, and maximized state in
~/.guiskindose/gui.json (first launch opens maximized; Restore returns to the saved
normal size). Existing ~/.mypyskindose/gui.json is still read when the new file is
absent.
What this code is for
Within the intended-use boundary above, GUISkinDose is meant to be used in a few different ways:
- Inspect or debug the examination geometry before doing dose calculations.
- Step through irradiation events from an RDSR study to understand beam orientation and positioning.
- Calculate a skin dose map on a mathematical or human phantom.
- Export the calculation result as HTML, JSON, XLSX, PDF, or DOCX rich audit report, or as a Python dictionary for downstream processing.
- Run the analysis headlessly from your own Python scripts.
Installation
Install GUISkinDose from PyPI:
pip install "guiskindose[gui]" # library, CLI, and browser GUI
pip install "guiskindose[gui-native]" # adds the native window (pywebview)
pip install guiskindose # library and CLI only; no GUI
With [gui], run guiskindose --mode gui to open the GUI in your browser.
With [gui-native], run guiskindose --mode gui --native to open it in its own window.
To work on the code, clone the repository and install it in editable mode:
git clone https://github.com/kgrizz-git/GUISkinDose.git
cd GUISkinDose
pip install -e .
With uv, uv sync --extra gui creates the
environment from the pinned uv.lock instead.
To include the GUI dependencies:
pip install -e ".[gui]" # browser mode
pip install -e ".[gui-native]" # native window mode (includes pywebview)
For full development setup (linting, testing, docs, Jupyter), install the optional extras you need:
pip install -e ".[dev,gui]" # lint/type/test toolchain + GUI
pip install -e ".[dev,gui,docs,notebooks]" # everything (docs + JupyterLab)
If you only need the documentation tooling as well:
pip install -e ".[docs]"
Requirements
- Python 3.11 or above
- A settings configuration, typically based on src/guiskindose/settings_example.json
- A DICOM RDSR file (
.dcm), a pre-parsed JSON export, or a supported tabular event-table export (.csv,.tsv,.xlsx)
Headless use
Command-line flags
Run guiskindose --help for the full list. Common headless examples:
guiskindose --file-path study.dcm
guiskindose --file-path events.csv --input-schema auto
guiskindose --file-path workbook.xlsx --sheet-name "Sheet1"
guiskindose --file-path study.dcm --export-format xlsx --export-path report.xlsx
Notable flags: --input-schema (default auto for tabular files), --input-preview-only,
--export-format {xlsx,pdf,html,docx}, --export-path, --include-source-identifiers (opt-in;
may include PHI-bearing source filenames in reports), --kerma-meter-correction and related
kerma-meter options, --equipment-profile (repeatable custom-profile file) and
--equipment-profile-sheet (XLSX sheet name or 0-based index).
Scripted example
from guiskindose import PyskindoseSettings, get_path_to_example_rdsr_files, load_settings_example_json
from guiskindose.main import main
settings = PyskindoseSettings(settings=load_settings_example_json())
settings.mode = "calculate_dose"
settings.output_format = "dict"
settings.phantom.model = "human"
settings.phantom.human_mesh = "hudfrid"
rdsr_dir = get_path_to_example_rdsr_files()
output = main(settings=settings, file_path=rdsr_dir / "siemens_axiom_example_procedure.dcm")
print(f"Estimated PSD: {output['psd']:.1f} mGy")
When settings.output_format is set to dict or json, the result can be used programmatically. The exported result includes items such as patient/table/pad data, event geometry, correction factors, dose map data, and peak skin dose. If you already have normalized RDSR data in a pandas DataFrame, use analyze_normalized_data_with_custom_settings_object() instead.
Custom equipment profiles (experimental)
Validated manufacturer/model coordinate profiles can override vendor coordinate
handling for raw inputs, from Python (assemble_session()), a settings-file
equipment_profiles block, or --equipment-profile. See
Custom equipment profiles for the API,
CLI flags, and capture replay.
New to GUISkinDose? Prefer the GUI or the interactive getting-started notebook
(docs/source/getting_started/getting_started.ipynb;
run it via pip install -e ".[notebooks]" + python scripts/open_getting_started_notebook.py, which
opens an ignored local copy so experiments never dirty the tracked source).
Useful helpers
The package includes helper functions that make exploration easier:
load_settings_example_json()loads a ready-made settings template.print_available_human_phantoms()lists available human phantom meshes.get_path_to_example_rdsr_files()returns the folder containing bundled example RDSR files.print_example_rdsr_files()prints the bundled example filenames.
Settings and modes
Important settings live in src/guiskindose/settings_example.json and the settings classes under src/guiskindose/settings.
| Mode | What it does |
|---|---|
plot_setup |
Plot the initial geometry without loading an irradiation sequence |
plot_event |
Inspect one irradiation event |
plot_procedure |
Inspect the full event sequence |
calculate_dose |
Compute the dose map and peak skin dose estimate |
Common phantom models: plane, cylinder, human.
Documentation
Documentation sources live under docs/source, including the getting-started notebook and user guide material.
To build the HTML documentation locally from this repository (use the docs
optional extra — there are no requirements*.txt files):
pip install -e ".[docs]"
python -m sphinx -b html docs/source docs/build/html
Then open the built site locally (path exists only after the Sphinx step above):
docs/build/html/index.html
Notes for this fork
- Independently maintained fork of PySkinDose; MIT license and upstream copyright preserved.
- Package identity:
guiskindose(see dev-docs/GUISKINDOSE_MIGRATION_STATUS.md). - How we maintain the fork: dev-docs/FORK_MAINTAINER_GUIDE.md.
- Bugs and features: GitHub Issues (templates require a no-PHI/PII confirmation; see dev-docs/PRIVACY_AND_SENSITIVE_ASSETS.md).
- Questions and contribution ideas: GitHub Discussions. Ideas welcome — prefer Issues/Discussions over cold PRs (CONTRIBUTING.md).
- Security: SECURITY.md. Support channels: SUPPORT.md.
Metadata
Release files for guiskindose 1.1.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 |
|---|---|---|---|---|
| guiskindose-1.1.0.tar.gz | 43.5 MB | With provenance | Details for guiskindose-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| guiskindose-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for guiskindose-1.1.0-py3-none-any.whl |
Total release size: 87.0 MB
Release files / guiskindose-1.1.0.tar.gz
| Download URL | guiskindose-1.1.0.tar.gz |
|---|---|
| Size | 43.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f652980f7b86a7e1700a544315fc5e419894392e09e8de97b72427d4858727c9
|
|
BLAKE2b-256 checksum How to use checksums |
0777c2cbc0481e33b0cbc548712c8ac737609b7fa1ded425b5b5bc015896eed9
|
| 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 Oct 30, 2026.
Transparency logRelease files / guiskindose-1.1.0-py3-none-any.whl
| Download URL | guiskindose-1.1.0-py3-none-any.whl |
|---|---|
| Size | 43.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
524ab976004b5e44ed8fb970ecead74c97ca828d772a50331cb8e41a4cbb91f5
|
|
BLAKE2b-256 checksum How to use checksums |
2bd99535c4ee8d4d0931383281e506a98d6b045d6ab0a018f2d6887e21e9ecfe
|
| 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 Oct 30, 2026.
Transparency logSecurity for guiskindose 1.1.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for guiskindose-1.1.0.tar.gz
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 Oct 30, 2026.
Transparency logA 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.