DoseRAD2026: Paired CT/MRI Beam-Level Monte Carlo Radiotherapy Dose Dataset: sample notebook

A worked notebook for DoseRAD2026: Paired CT/MRI Beam-Level Monte Carlo Radiotherapy Dose Dataset, with 5 code cells and the output each one printed. On Scigantic it opens in a hosted JupyterLab with the dataset already mounted, so nothing is downloaded first.

Provider
Fan Xiao, Nikolaos Delopoulos, Niklas Wahl, et al., LMU Munich Department of Radiation Oncology (LMUK-RADONC-PHYS-RES)
License
cc-by-nc-4.0
Size
100,000 files
Format
JSON (in sampled files)
Stored at
Hugging Face (https://huggingface.co/datasets/LMUK-RADONC-PHYS-RES/DoseRAD2026)
Access
Free and public. No account with the data provider is needed.
DOI
10.5281/zenodo.19347848

The notebook

DoseRAD2026: Getting Started

A row here is not a table row, it's a beam. Each of the 75 public training patients ships a CT/MRI pair, a JSON beam configuration, and one Monte Carlo dose grid (.mha) *per beam unit*: 540 photon control-point doses or 1,080 proton beamlet doses per patient. This mirrors the DoseRAD2026 challenge task: predict one of those dose grids straight from CT or MRI.

Nothing below is downloaded. The archive is already FUSE-mounted at /mnt/archive.

import os

root = os.environ.get("SCIGANTIC_MOUNT_PATH", "/mnt/archive")
training_dir = f"{root}/photon/training"
patients = sorted(p for p in os.listdir(training_dir) if os.path.isdir(f"{training_dir}/{p}"))
abdominal = [p for p in patients if "ABB" in p]
thoracic = [p for p in patients if "THB" in p]
print(f"{len(patients)} training patients: {len(abdominal)} abdominal (ABB), "
      f"{len(thoracic)} thoracic (THB)")
patients[:5]

Output:

75 training patients: 36 abdominal (ABB), 39 thoracic (THB)
['1ABB006', '1ABB011', '1ABB020', '1ABB021', '1ABB030']

Beam configuration: parsed straight from JSON

Every patient has a .json describing the treatment plan. For photon it's VMAT arcs (Elekta Versa HD, 80-leaf-pair Agility MLC): a list of beams, each with up to 180 control points sweeping the gantry angle.

import json

patient = "1ABB006"
with open(f"{root}/photon/training/{patient}/{patient}.json") as f:
    cfg = json.load(f)

beam0 = cfg["beams"][0]
print(f"{len(cfg['beams'])} beams | beam 0: SAD={beam0['SAD']}mm, "
      f"{len(beam0['control_points'])} control points, "
      f"gantry {beam0['control_points'][0]['gantry_angle']} -> "
      f"{beam0['control_points'][-1]['gantry_angle']} deg")
print(f"MLC leaf pairs: {beam0['num_mlc_leaf_pairs']}")

Output:

3 beams | beam 0: SAD=1000mm, 180 control points, gantry -180 -> 178 deg
MLC leaf pairs: 80

CT + one control point's Monte Carlo dose

Dose filenames encode the answer key: Dose_B{beam_idx}_CP{cp_idx}.mha maps 1:1 onto beams[beam_idx].control_points[cp_idx] above. A single file is one control point's dose alone, not the summed, weighted plan dose, so per-voxel values are small (a few hundredths of a milligray) compared to a clinical fraction.

import SimpleITK as sitk

ct = sitk.ReadImage(f"{root}/photon/training/{patient}/image/ct.mha")
dose = sitk.ReadImage(f"{root}/photon/training/{patient}/dose/Dose_B0_CP000.mha")
ct_arr, dose_arr = sitk.GetArrayFromImage(ct), sitk.GetArrayFromImage(dose)

print(f"CT: shape={ct_arr.shape}, spacing={ct.GetSpacing()}mm, "
      f"HU range=[{ct_arr.min():.0f}, {ct_arr.max():.0f}]")
print(f"dose: shape={dose_arr.shape} (same grid as CT), "
      f"peak={dose_arr.max():.2e} Gy for this one control point")

Output:

CT: shape=(246, 246, 249), spacing=(2.0, 2.0, 2.0)mm, HU range=[-1024, 2834]
dose: shape=(246, 246, 249) (same grid as CT), peak=5.83e-05 Gy for this one control point

Overlay the slice with the most dose signal

import numpy as np
import matplotlib.pyplot as plt

z = dose_arr.sum(axis=(1, 2)).argmax()
fig, ax = plt.subplots(figsize=(6, 6))
ax.imshow(ct_arr[z], cmap="gray", vmin=-200, vmax=400)
dose_slice = np.ma.masked_less(dose_arr[z], dose_arr.max() * 0.03)
ax.imshow(dose_slice, cmap="jet", alpha=0.6)
ax.set_title(f"{patient}, photon beam 0, control point 0, slice {z}")
ax.axis("off")
plt.show()

Proton is a separate story, not a variant

proton/training/{patient}/ has its own independently-resampled CT/MRI pair (1x1x3mm³, not photon's 2x2x2mm³, don't mix the two) and dose files named Dose_B{beam}_R{ray}_L{beamlet}.mha, one per pencil-beam energy layer. Beamlet energies (31.7-200.8 MeV) join against proton/training/beam_parameters.json's energy_table by exact float value.

with open(f"{root}/proton/training/{patient}/{patient}.json") as f:
    proton_cfg = json.load(f)

ray0 = proton_cfg["beams"][0]["rays"][0]
print(f"proton beam 0, ray 0: {len(ray0['beamlets'])} beamlets, "
      f"energies {[round(b['energy'], 1) for b in ray0['beamlets']]} MeV")

Output:

proton beam 0, ray 0: 2 beamlets, energies [45.6, 126.1] MeV

Next steps

Run it

Open this notebook to run it, see the dataset page for the full description, or browse the full catalog.