DICOM RTPLAN Jaw & MLC Blocking Checker Python Script for Control-Point–Level Dose Point Visibility Analysis
🔍 What this tool does
This Python script analyzes a DICOM RTPLAN to determine whether a dose specification point is geometrically open or blocked by jaws or MLCs, evaluated per control point.
Instead of relying on visual inspection inside the treatment planning system, this tool performs a pure geometry-based check in beam’s-eye view (BEV) — exactly as the beam is delivered by the machine.
For each control point, the script:
- Projects the dose point into BEV coordinates
- Checks whether the point is inside the jaw opening
- Identifies the correct MLC leaf pair using leaf position boundaries
- Determines whether the point is open, blocked, or outside the field
⚙️ Key Features
- ✅ Control-point–level analysis (dynamic delivery aware)
- ✅ Jaw gating before MLC evaluation
- ✅ Automatic leaf pair mapping (supports variable leaf widths)
- ✅ Vendor-agnostic geometry logic
- ✅ Beam’s-eye-view–only evaluation (no TPS display assumptions)
- ✅ Clear debug output for verification and education
🧠 Why this matters
In VMAT and other dynamic techniques, jaw and MLC positions change continuously.
A dose point that appears “inside the field” on a static display may be blocked at certain control points.
This script provides:
- Independent verification logic
- A foundation for automated plan checks
- Insight into what the machine is actually delivering
👩⚕️ Who this is for
- Medical physicists
- Physics residents
- QA and plan-check automation developers
- Anyone working with DICOM RTPLAN geometry
- Researchers or educators demonstrating BEV-based checks