DoseMetrics¶
DoseMetrics 0.4.0 provides data containers, I/O, metrics, comparisons, and visualization tools for radiotherapy dose analysis.
Quick example¶
from dosemetrics.metrics import dvh
from dosemetrics.utils import load_example_study, plot_dvh
dose, structures = load_example_study("test_subject")
ptv = structures["PTV"]
dose_bins, volume_percent = dvh.compute_dvh(dose, ptv, verbose=True)
stats = dvh.compute_dose_statistics(dose, ptv, verbose=True)
fig, ax = plot_dvh(dose, ptv, label="PTV")
What is included¶
- Dose-volume histograms, dose statistics, EUD, and DVH comparisons
- Conformity, coverage, spillage, homogeneity, and gradient indices
- Voxel-wise image comparisons and CPU gamma analysis
- Dice, Jaccard, surface-distance, and volume comparisons
- NIfTI and DICOM-RT loading, plus NIfTI export helpers
- Batch/cohort analysis, compliance checking, and Matplotlib plotting
API organization¶
Dose,Structure, andStructureSetare data containers.dosemetrics.iotranslates NIfTI and DICOM data into those containers.dosemetrics.metricscontains computations grouped by clinical domain.dosemetrics.utilscontains plotting, compliance, batch, and cohort helpers.
Import reference-free computations from their domain module, for example
from dosemetrics.metrics import dvh, conformity. Named plan comparisons are
available directly, for example from dosemetrics.metrics import compare_ptv_dose.
Start here¶
- Install DoseMetrics
- Run the quick start
- Review supported file layouts
- Open the executable notebooks
- Browse the API reference