chromadose
Modern multichannel radiochromic film dosimetry in Python.
chromadose implements all major multichannel film dosimetry methods in one library, with built-in uncertainty estimation, gamma analysis, and PDF reporting.
⚠️ Research use only — not a medical device. chromadose is open-source software for academic research and method development in radiochromic film dosimetry. It is not intended for diagnosis, treatment planning, or clinical decision-making, and has not been evaluated by the FDA, MHRA, or any Notified Body under EU MDR. Clinical use is the sole responsibility of a qualified medical physicist operating under their institution's QA programme. See DISCLAIMER.md for the full statement.
Methods
| Method | Reference | Description |
|---|---|---|
| Micke | Micke, Lewis, Yu (2011) | Original multichannel method — Newton refinement |
| Mayer | Mayer et al. (2012) | Analytical optimization with disturbance correction |
| Multigaussian | Mendez et al. (2018) | MLE on multivariate Gaussian N(mu(D), Sigma(D)) |
| ANN | Chang et al. (2025) | Neural network with ensemble uncertainty |
The Multigaussian implementation is the first open-source version of this method.
Quick Start
import chromadose as cd
from chromadose.core.image import load_tiff
from chromadose.methods import MickeSolver
# Load and calibrate
film = load_tiff("treatment_film.tif")
cal = cd.Calibration.from_arrays(
doses=[0, 0.5, 1, 2, 4, 7, 9],
red_pixels=red_means,
green_pixels=green_means,
blue_pixels=blue_means,
)
# Convert to dose
solver = MickeSolver()
dose_map = solver.solve(film, cal.result)
print(f"Max dose: {dose_map.dose.max():.2f} Gy")
Gamma Analysis
from chromadose.analysis import gamma_2d
result = gamma_2d(
reference=tps_dose,
evaluated=dose_map.dose,
dose_criteria=3.0, # 3%
distance_criteria_mm=3.0, # 3mm
)
print(f"Pass rate: {result.pass_rate * 100:.1f}%")
PDF Reports
from chromadose.io import generate_report
generate_report(
"qa_report.pdf",
dose_map,
gamma_result=result,
title="IMRT QA Report",
patient_id="PATIENT001",
)
CLI
chromadose calibrate --films cal*.tif --doses 0 0.5 1 2 4 7 9 -o cal.json
chromadose solve --film treatment.tif --cal cal.json --method micke -o dose.npy
chromadose gamma --measured dose.npy --reference tps.npy --criteria 3/3
chromadose report --measured dose.npy --reference tps.npy -o report.pdf
Installation
pip install chromadose
Optional extras:
pip install chromadose[dicom] # DICOM RT Dose import
pip install chromadose[ann-gpu] # PyTorch GPU acceleration for ANN
pip install chromadose[dev] # Development tools
Features
- 4 dosimetry methods with a unified API
- Uncertainty estimation built into every method
- 2D gamma analysis (Low 1998) with global/local dose criteria
- Dose profiles — row, column, or arbitrary line extraction
- Film-to-TPS registration — automatic or manual rigid alignment
- DICOM RT Dose import with resampling to film grid
- PDF QA reports — dose maps, gamma, profiles in one document
- CLI — full pipeline from command line
- 6-channel Multigaussian — uses pre-irradiation scans for improved accuracy
- Fully vectorized — no per-pixel Python loops
- Pure Python — numpy + scipy only (torch optional for GPU)
Performance
| Method | 550x500 image | Notes |
|---|---|---|
| Mayer | 0.04s | Analytical — fastest |
| Micke | 0.14s | Newton refinement |
| Multigaussian | 4.7s | Dense grid + parabolic interpolation |
| ANN | ~1s | Depends on ensemble size |
Requirements
- Python >= 3.11
- numpy >= 1.24
- scipy >= 1.10
- tifffile >= 2023.1
- matplotlib >= 3.7
References
- Micke A, Lewis DF, Yu X. "Multichannel film dosimetry with nonuniformity correction." Med. Phys. 2011;38(5):2523-34.
- Mayer RR, et al. "An improved dose response function for multichannel film dosimetry." Med. Phys. 2012;39(12):7596-602.
- Mendez I, Polsak A, Hudej R, Casar B. "The Multigaussian method: a new approach to mitigating spatial heterogeneities with multichannel radiochromic film dosimetry." Phys. Med. Biol. 2018;63(17):175013.
- Chang L-Y, et al. "GANN: a generalized artificial neural network for multichannel radiochromic film dosimetry." Phys. Med. Biol. 2025.
- Low DA, et al. "A technique for the quantitative evaluation of dose distributions." Med. Phys. 1998;25(5):656-61.
License
MIT
Metadata
Release files for chromadose 0.9.1
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 |
|---|---|---|---|---|
| chromadose-0.9.1.tar.gz | 44.9 kB | Without provenance | Details for chromadose-0.9.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chromadose-0.9.1-py3-none-any.whl | Python 3 | none | any | Details for chromadose-0.9.1-py3-none-any.whl |
Total release size: 85.7 kB
Release files / chromadose-0.9.1.tar.gz
| Download URL | chromadose-0.9.1.tar.gz |
|---|---|
| Size | 44.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a17206ce326598cd64803a74f5e54a12723278f1ce0c66d530a831c772dc3054
|
|
BLAKE2b-256 checksum How to use checksums |
60f1f8897eae1e0c1f65026cab444eae7d72d5e029e85d34f58e7c32eaa6dc92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / chromadose-0.9.1-py3-none-any.whl
| Download URL | chromadose-0.9.1-py3-none-any.whl |
|---|---|
| Size | 40.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df1c840d7d9a5b394ef942367b5af825b76da0c025b48ec061c691c45e33c68b
|
|
BLAKE2b-256 checksum How to use checksums |
286b4807e4236b14ad5ec358d8c64a63ce229934ee17be11c2d53e95128d5c9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for chromadose 0.9.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.