DICOM Geometry QA Toolkit (Python Scripts for RTSTRUCT & RTPLAN Analysis)
Automate key geometric checks directly from DICOM — no TPS required.
This bundle includes two practical Python scripts designed for radiation oncology workflows, helping you extract meaningful geometric insights from RTSTRUCT and RTPLAN files.
🔧 What’s Included
✅ 1. PTV Center to Isocenter Distance Script
- Computes the 3D distance between the PTV centroid and treatment isocenter
- Uses RTSTRUCT + RTPLAN
- Area-weighted centroid calculation for improved accuracy
- Supports multiple beams and detects unique isocenters
- Includes Frame of Reference validation to prevent incorrect calculations
✅ 2. Isocenter to Patient External Center (Lateral Shift) Script
- Computes lateral distance between isocenter and patient external contour center
- Uses RTSTRUCT + RTPLAN
- Helps estimate potential clearance or setup issues
- User-defined body contour name
- Simple and fast geometric approximation for QA workflows
💡 Why This Matters
These scripts help you:
- Perform independent QA checks outside the TPS
- Validate plan geometry quickly and consistently
- Build your own automation workflows
- Reduce manual checks and increase confidence in plan setup
👩💻 Who This Is For
- Medical physicists
- Dosimetrists
- Researchers working with DICOM RT data
- Anyone interested in DICOM workflows
🚀 What You’ll Gain
Instead of manually checking geometry inside your planning system, you’ll be able to:
- Extract key metrics instantly
- Reuse scripts across multiple patients
- Start building your own clinical-grade automation tools
🛠️💡 Need customization? Contact me to adapt this tool to your workflow.