dorn

GUI program for close contact restrictions

https://github.com/sami-medical-physics/dorn

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

GUI program for close contact restrictions

Basic Info
  • Host: GitHub
  • Owner: SAMI-Medical-Physics
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 507 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 6
Created over 3 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog License Citation

README.md

DOI

Dorn

Dorn is a Python GUI program for generating individual close contact restrictions for radionuclide therapy patients. Some example use cases are shown in the Table below.

| Radionuclide therapy | In/outpatient | Dose rate measurements | |----------------------------------------------|---------------|------------------------| | I-131 for thyroid cancer | Inpatient | Yes | | I-131 for hyperthyroidism | Outpatient | No | | Lu-177-dotatate for neuroendocrine neoplasms | Outpatient | Yes |

Requires

Python >= 3.9

Dependencies

Python package dependencies: - numpy - scipy - matplotlib - pandas - platformdirs - glowgreen - xmltodict - python-docx - pywin32 (optional)

Platforms

The Python files dorn.py and dorn_cli.py are known to run on: - Windows 10 - Windows 11 - Ubtuntu 22.04.2 LTS

They probably also run on Windows 7 but I can no longer confirm. I have not tried on macOS.

On Linux, some of the GUI windows are too small and need to be expanded to reveal content. Also note that LibreOffice does not render the generated report .docx files correctly; the restriction tables are not formatted as intended.

glowgreen package

Dorn uses the Python package glowgreen for calculating radiation dose from contact patterns and restriction periods.

https://github.com/SAMI-Medical-Physics/glowgreen

Tests

A limited number of tests can be ran using pytest. Install pytest:

python -m pip install pytest

Add the dorn-master\src directory to the PYTHONPATH environment variable. For Windows:

set PYTHONPATH=%PYTHONPATH%;\path\to\dorn-master\src\

For Linux:

export PYTHONPATH="${PYTHONPATH}:/path/to/dorn-master/src/"

Then in the dorn-master directory run:

python -m pytest

Executable provided with release

Each release on GitHub includes a zip file. The zip file contains an executable file Dorn.exe that can be used to run the Dorn program on Windows 10 and 11 systems without needing to install Python and Dorn's other dependencies.

The executable for Windows provided with the current release (version 1.12.x) was built using the following:

  • Windows 10
  • Python 3.12.9
  • pip 25.0.1
  • numpy 2.2.3
  • scipy 1.15.2
  • matplotlib 3.10.1
  • pandas 2.2.3
  • glowgreen 0.1.1
  • xmltodict 0.14.2
  • python-docx 1.1.2
  • cx_Freeze 7.2.10
  • pywin32 309

Build your own standalone executable

Follow these instructions to build a standalone executable of Dorn that can run on computers that don't have Python installed. This requires Python and the Python packages listed above.

Note the executable will only work on computers running the same platform as the computer on which it was built.

Install cx_Freeze:

python -m pip install cx_Freeze

Then in the dorn-master\src directory run:

python make_exe.py build

This generates a directory called something like exe.win-amd64-3.11 inside dorn-master\src\build. You can copy this directory to another computer and run the program from the Dorn.exe file.

Note that we have to use

base = None 

in make_exe.py for the command line interface to work in the .exe, but it means we're stuck with a console popping up along with the GUI.

Make icon file

The icon file icofile.ico was generated from shovel.png in Python. Something like:

python -m pip install Pillow

Then

from PIL import Image
filename = 'shovel.png'
img = Image.open(filename)
icon_sizes = [(16,16), (32, 32), (48, 48), (64,64)]
img.save('new_icofile.ico', sizes=icon_sizes)

Source

https://github.com/SAMI-Medical-Physics/dorn

Bug tracker

https://github.com/SAMI-Medical-Physics/dorn/issues

Author

Jake Forster (jake.forster@sa.gov.au)

Copyright

Dorn is copyright (C) 2022-2025 South Australia Medical Imaging.

License

MIT License. See LICENSE file.

Citation

See CITATION.cff file.


Development

Program overview

  • Patient data is stored in an ordered dictionary. Program reads/writes patient data to XML files.

  • Program settings are stored in another ordered dictionary, which has read/write with settings.xml. If settings.xml does not exist at runtime, hard-coded settings are used in the program and a new settings.xml file is written. The hard-coded settings are applicable to South Australia Medical Imaging.

  • Some settings cannot be edited via the GUI, such as the therapy options and the radionuclide data. The user may add at most 1 additional therapy options with measured clearance data and 1 additional therapy option with generic clearance via the command line interface (see below).

  • A command-line interface is provided that offers additional flexibility. To see the command line options, enter:

    python dorn_cli.py -h
    

    or with the executable:

    Dorn.exe -h
    

Ideas for new features

  • For therapy options that use generic clearance, allow the user to provide an initial dose rate measurement to determine the clearance function parameter: initial dose rate at 1 m.
  • Add more dose rate measurement time points and a scroll bar.
  • Add curve fit model representing no excretion at night. The difficulty will be adding the support in glowgreen.
  • Add a name field for the detector.
  • Attempt to propagate uncertainty from the contact pattern onto the calculated restriction period or dose.
  • Allow the user to edit/add contact patterns.

Owner

  • Name: SAMI Medical Physics
  • Login: SAMI-Medical-Physics
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite both the article from preferred-citation and the software itself."
authors:
- family-names: "Forster"
  given-names: "Jake Cameron"
  orcid: "https://orcid.org/0000-0002-0313-5897"
title: "Dorn"
version: 1.12.0
date-released: 2025-05-26
doi: 10.5281/zenodo.7189660
url: "https://github.com/SAMI-Medical-Physics/dorn"
preferred-citation:
  type: article
  authors:
  - family-names: "Forster"
    given-names: "Jake Cameron"
    orcid: "https://orcid.org/0000-0002-0313-5897"
  - family-names: "Badager"
    given-names: "Daniel"
    orcid: "https://orcid.org/0000-0001-7093-6021"
  - family-names: "Hickson"
    given-names: "Kevin James"
    orcid: "https://orcid.org/0000-0002-4006-4944"
  doi: "10.1088/1361-6498/acc4d0"
  journal: "Journal of Radiological Protection"
  title: "Close contact restriction periods for patients who have received iodine-131 therapy for differentiated thyroid cancer"
  volume: 43
  issue: 2
  year: 2023
  month: 4
  start: 021501
identifiers:
- type: doi
  value: 10.5281/zenodo.15537357
  description: "Zenodo DOI for version 1.12.0"
- type: doi
  value: 10.5281/zenodo.14698145
  description: "Zenodo DOI for version 1.11.0"
- type: doi
  value: 10.5281/zenodo.10467581
  description: "Zenodo DOI for version 1.10.1"
- type: doi
  value: 10.5281/zenodo.8354142
  description: "Zenodo DOI for version 1.10.0"
- type: doi
  value: 10.5281/zenodo.7748450
  description: "Zenodo DOI for version 1.9.7"
- type: doi
  value: 10.5281/zenodo.7224836
  description: "Zenodo DOI for version 1.9.6"
- type: doi
  value: 10.48550/arXiv.2210.14065
  description: "The arXiv preprint of the paper"

GitHub Events

Total
Last Year