HomeIMRT/VMAT Treatment PlanningDose-Volume Histogram Organ-at-Risk Constraint Simulator

🎯 Dose-Volume Histogram Organ-at-Risk Constraint Simulator

This simulation helps users understand and apply dose-volume histogram constraints to protect critical organs at risk during radiotherapy treatment planning.

IMRT/VMAT Treatment Planning2DModerate60 FPS
dvh-oar-constraint-simulator ↗ Open standalone

Structure Segmentation — From Contours to Voxel Masks

Every dose-volume histogram begins as geometry, not dose. Before a single beam is calculated, a radiation oncologist and dosimetrist define exactly which 3D voxels belong to the tumor and which belong to nearby healthy organs. The DVH is nothing more than these voxel masks re-expressed against a dose axis once calculation is complete.

  • 1–3 mm: CT slice thickness (typical planning CT)
  • 5–15: Structures per plan (targets + OARs)
  • 5–10 mm: PTV margin (CTV + setup + motion)
  • 30–90 min: Contouring time (per physician per case)

ICRU nomenclature: GTV, CTV, PTV, OAR

ICRU Reports 50/62/83 define a hierarchy of target volumes. The Gross Tumor Volume (GTV) is the visible/palpable disease on imaging. The Clinical Target Volume (CTV) adds a margin for suspected microscopic spread. The Planning Target Volume (PTV) adds a further geometric margin (typically 5–10 mm) to account for daily setup uncertainty and organ motion, ensuring the CTV receives full dose despite day-to-day variability.

Organs-at-risk (OARs) are any normal structure whose irradiation could cause a clinically meaningful complication — spinal cord, parotid glands, rectum, lungs, heart, optic chiasm, and dozens more depending on treatment site. Each is contoured as its own 3D structure.

Manual, atlas-based, and deep-learning segmentation

Targets are almost always contoured manually by a physician, since tumor extent requires clinical judgment that automated tools cannot yet replace reliably. OARs, by contrast, are increasingly auto-segmented: atlas-based deformable registration maps a labeled reference patient onto the new CT, while deep convolutional networks (U-Net variants) now achieve near-expert Dice similarity coefficients (>0.85) for well-defined organs like parotids, lungs, and rectum in seconds rather than the 20–40 minutes manual contouring requires.

Whatever the method, the output is the same: a binary mask — a label assigned to every voxel of the CT — marking membership in each structure. This mask is the sole geometric input the DVH calculation will later need.

A DVH is only as trustworthy as the contour it summarizes. A parotid mask that clips 20% of the true gland volume will silently understate the real dose the gland receives — the single most common source of DVH error in clinical practice.

Why segmentation precedes dose calculation

The dose calculation engine computes dose at every voxel of a separate calculation grid regardless of which structures exist — dose physics does not know about anatomy labels. It is only at the DVH-generation step that these two independent grids (structure masks and dose values) are combined: for each structure, every voxel whose mask flag is "inside" contributes its calculated dose value to that structure's histogram.

This is why segmentation errors and dose calculation errors are independent failure modes: a perfect dose calculation on a wrong contour still produces a misleading DVH, and vice versa. Stage 1 of this simulation shows the contours defined and the DVH axes drawn and waiting — genuinely empty, because no dose has been computed yet.

Dose Grid Calculation — Filling the Histogram Bins

With structures defined, a dose calculation algorithm computes the absorbed dose at every point of a fine 3D grid overlaid on the patient. As this grid fills in, each structure begins accumulating a private tally of voxel doses — the raw material from which the differential and cumulative DVH are built.

  • 2–3 mm³: Dose grid resolution (typical voxel size)
  • CCC / MC: Calculation algorithm (collapsed cone, Monte Carlo)
  • millions: Voxels per plan (across full CT volume)
  • sec–min: Calculation time (GPU-accelerated engines)

Dose calculation algorithms

Modern treatment planning systems offer a hierarchy of dose engines trading speed for accuracy. Pencil-beam convolution is fastest but handles tissue heterogeneities (lung, bone, air cavities) poorly. Collapsed-cone convolution/superposition (CCCS) models scatter more explicitly and is the clinical workhorse for photon planning. Monte Carlo simulation, which explicitly tracks individual particle histories through the patient's CT-derived density map, is the most physically accurate — essential for proton therapy and lung tumors near air-tissue interfaces — but the slowest, now made tractable in minutes by GPU acceleration.

Every algorithm ultimately produces the same output object: a 3D array of dose values, one per grid voxel, aligned to the planning CT.

From dose grid to histogram bins

DVH construction is a bookkeeping exercise. For a given structure, every voxel of the dose grid that falls inside that structure's mask has its dose value read off and dropped into a dose bin (commonly 0.1–1 Gy wide). Tallying voxel counts per bin produces the differential DVH: essentially a probability density of dose within the structure. Summing bin counts from the highest dose bin downward — or equivalently integrating the differential histogram from D to infinity — produces the cumulative DVH, the form used almost universally in clinic because it directly answers "what fraction of this organ receives at least dose D?"

Grid resolution and discretization error

Because DVH voxels are cubes and structure boundaries are curved, boundary voxels are only partially inside a structure. Coarse dose grids (e.g. 5 mm) round these partial-volume voxels crudely, which barely matters for a large organ like the rectum but can meaningfully distort the DVH of a small, high-gradient structure like the optic chiasm or cochlea. Clinical protocols increasingly mandate sub-2-mm calculation grids specifically for small serial-type OARs, and QA checks compare structure volume from contouring against the volume implied by the dose grid's voxel count to catch resolution mismatches before they reach the DVH.

A dose grid mismatched to the image resolution is the second most common hidden source of DVH inaccuracy after contouring error — always check reported structure volume against contoured volume before trusting a DVH metric on a small OAR.

Cumulative DVH Curve Generation & Nomenclature

The cumulative dose-volume histogram compresses millions of individual voxel dose values into one curve per structure: percent volume on the y-axis, dose on the x-axis, monotonically falling from 100% at D=0 to 0% beyond the maximum voxel dose. Its shape alone tells a trained eye most of what they need to know about plan quality.

  • Near-vertical: Ideal PTV shape (steep step at Rx dose)
  • Hugs y-axis: Ideal OAR shape (steep early falloff)
  • (D2-D98)/D50: Homogeneity index (lower is better)
  • 100%→0%: Curve is monotonic (by construction)

Definition: cumulative vs differential DVH

The differential DVH plots volume (or voxel count) per dose bin — a histogram in the traditional sense, often noisy and hard to read directly. The cumulative DVH, V(D), instead plots the volume receiving at least D: V(D) = volume with dose ≥ D. It is obtained by integrating the differential histogram from D up to the maximum dose, which guarantees a smooth, strictly non-increasing curve. Virtually every DVH shown in a clinical planning system, and every DVH in this simulation, is cumulative.

Reading curve shape as plan quality

For the PTV, the ideal curve is a near-vertical step located exactly at the prescription dose: every voxel receives the same dose, all at once, with no cold spots below prescription and no hot spots meaningfully above it. Homogeneity is quantified as HI = (D2% − D98%) / D50%, where lower values indicate a flatter, more uniform target dose.

For an OAR, the ideal curve instead hugs the vertical (dose) axis and falls to near-zero volume at the lowest possible dose — meaning most of the organ received almost no dose at all. A curve that instead trails slowly toward high dose indicates the organ is receiving unwanted integral dose throughout its volume, even if no single point exceeds a hard limit.

Two plans can have identical PTV coverage (same D95) yet very different OAR sparing — DVH overlay of a spinal cord curve from two competing plans is often the deciding factor in plan selection at treatment-planning review.

Dose-volume nomenclature: D95, D50, Dmax, Dmean, Vx

Clinical shorthand reads points directly off the cumulative curve. Dx% means the minimum dose received by the hottest x% of the structure's volume — so D95 is the dose covering 95% of the target (a standard PTV coverage metric), and D2% approximates the near-maximum dose. Conversely, Vx Gy means the percent (or absolute) volume receiving at least x Gy — e.g. lung V20Gy, the classic pneumonitis-risk metric. Dmean is the arithmetic mean of all voxel doses in the structure (area under the differential histogram, not read from a single point). Dmax is the single highest voxel dose recorded — clinically useful for serial organs like spinal cord where even one damaged cross-section can cause a myelopathy.

Constraint Checking — Dose-Volume Objectives & QUANTEC

A DVH curve only becomes actionable once it is compared against evidence-based dose-volume constraints. QUANTEC (Quantitative Analyses of Normal Tissue Effects in the Clinic, 2010) remains the reference synthesis of dose-response data for major organs, translating decades of outcomes data into simple pass/fail thresholds planners can read directly off a DVH.

  • <45–50 Gy: Spinal cord Dmax (myelopathy risk <0.2%)
  • <26 Gy: Parotid mean dose (spares salivary function)
  • <20%: Rectum V70Gy (grade ≥2 rectal toxicity)
  • <30–35%: Lung V20Gy (symptomatic pneumonitis)

The QUANTEC framework

Published as a 2010 supplement to the International Journal of Radiation Oncology, QUANTEC pooled published dose-response data across dozens of institutions to produce consensus dose-volume limits associated with defined complication probabilities for each major organ. Unlike earlier single-institution rules of thumb, QUANTEC limits are population-based normal tissue complication probability (NTCP) estimates, explicitly stating the endpoint (e.g. "symptomatic pneumonitis"), the associated risk level, and the underlying dataset quality — which is why they remain the default starting point for optimization objectives in virtually every modern planning system.

How a constraint is checked against a DVH

Checking a constraint is a direct read-off operation. A "Dmax" constraint (e.g. spinal cord <45 Gy) is checked by finding the curve's highest non-zero dose value and comparing it to the threshold. A "Dmean" constraint (parotid <26 Gy) compares the structure's mean dose, computed from the full differential histogram, against the limit. A "Vx" constraint (rectum V70Gy <20%) is checked by reading the curve's y-value at x=70 Gy and comparing that percent volume to the limit. Planning systems automate this as a simple traffic-light table next to the DVH plot — green for pass, red for fail — letting a planner scan dozens of constraints in seconds rather than eyeballing each curve.

A single constraint violation does not automatically mean an unusable plan — clinical judgment weighs the size and clinical relevance of an overshoot, and constraints are treated as soft guidance, not hard physical limits, unless institutional policy states otherwise.

Constraints as inverse-planning objectives

In modern inverse planning, dose-volume constraints are not just checked after the fact — they are fed directly into the optimizer's cost function as dose-volume objectives. Each objective penalizes any voxel of a structure that violates its target (e.g. "penalize any rectum voxel above 70 Gy if more than 20% of the volume is affected"), with a tunable weight controlling how strongly the optimizer prioritizes that objective relative to competing PTV-coverage objectives. Because PTV coverage and OAR sparing objectives are inherently in tension for overlapping or adjacent structures, the final plan represents a Pareto trade-off between them, not a simultaneous perfect solution to every objective.

Representative QUANTEC-style dose-volume constraints

ProductIndicationTrial DesignKey Result
Spinal cordMyelopathyDmax < 45–50 GySerial organ — even small hot spots matter
Parotid glandXerostomiaDmean < 26 Gy (≥1 gland)Parallel organ — mean dose drives function
RectumGrade ≥2 rectal toxicityV70Gy < 20%, V60Gy < 35%Multiple dose-volume points typically checked
Lung (both, minus GTV)Symptomatic pneumonitisV20Gy < 30–35%, Dmean < 20–23 GyCorrelates strongly with mean lung dose
HeartPericarditis / cardiac eventsDmean < 26 Gy, V30Gy < 46%Long-term cardiac risk, especially breast/lung RT

Plan Optimization Iteration — Converging the DVH

Inverse planning is an iterative loop: propose fluence, calculate dose, evaluate the resulting DVH against every objective, adjust fluence to reduce the total cost, and repeat. Each iteration nudges every structure's DVH curve — OARs shifting toward lower dose, the PTV curve tightening around prescription — until the optimizer converges or a maximum iteration count is reached.

  • 50–200: Typical iterations (per optimization run)
  • 10–30+: Cost function terms (weighted objectives)
  • 1–10 min: Convergence time (modern GPU optimizers)
  • PTV vs OAR: Trade-off axis (Pareto frontier)

The optimization loop

Each iteration of gradient-based or stochastic optimization follows the same cycle: (1) the current beamlet fluence weights produce a 3D dose distribution; (2) that dose is binned per structure into an updated DVH; (3) each dose-volume objective compares its structure's current curve to its target and returns a cost penalty proportional to the violation; (4) the optimizer computes a gradient (or accepts/rejects a perturbation) that reduces total weighted cost, and updates the fluence weights; (5) the loop repeats. Early iterations produce large, coarse improvements; later iterations make progressively smaller refinements as the plan approaches a local optimum on the Pareto surface between competing objectives.

How curves visibly shift with iteration

Across iterations, OAR curves characteristically shift leftward — the same percent volume now receives less dose — as the optimizer discovers fluence patterns that route dose around sensitive structures while still delivering it to target. Simultaneously, the PTV curve steepens and centers more tightly on the prescription dose as coverage and homogeneity objectives converge. This simulation's optimization-iteration slider and animated iteration counter directly visualize that convergence: watch the spinal cord and parotid curves march toward the y-axis, and the constraint markers flip from red (fail) to green (pass), as the iteration count climbs.

Diminishing returns are the norm: the jump from 10 to 50 iterations typically improves OAR sparing far more than the jump from 150 to 200 — most planning systems use convergence-based stopping criteria rather than a fixed iteration count for exactly this reason.

DVH limitations and plan comparison

For all its usefulness, a DVH discards all spatial information. Two plans can produce visually identical DVH curves for an OAR while depositing that dose in completely different regions of the organ — one plan might concentrate dose in a functionally unimportant sub-volume while another hits a critical region, and the DVH alone cannot distinguish them. It also cannot show whether a hot spot sits inside the PTV (usually acceptable) or bleeds into an adjacent OAR (usually not). For this reason, DVH review is always paired with inspection of the axial, sagittal, and coronal dose-wash overlays before a plan is approved. Despite this, DVH overlay remains the fastest, most standardized way to compare two competing plans side by side — which is precisely why it is the first screen every plan passes through at treatment-planning review.

⚙ Under the hood

This simulation helps users understand and apply dose-volume histogram constraints to protect critical organs at risk during radiotherapy treatment planning.

CanvasBiomedicine

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)