Winston–Lutz QA Python Toolkit: Synthetic Image Generator + 3D Analysis
Winston–Lutz QA Python Toolkit
Synthetic DICOM Generator + Automated Image Analysis + 3D Isocenter Reconstruction
🎯 Generate, analyze, and validate Winston–Lutz QA images with a complete Python toolkit designed for medical physicists, researchers, and students.
This toolkit provides an end-to-end workflow for Winston–Lutz quality assurance—from generating realistic synthetic EPID DICOM images with known ground truth, to automated BB detection, to reconstructing the three-dimensional radiation isocenter using multiple gantry and couch angles.
📦 What's Included
Part 1 — Synthetic Winston–Lutz DICOM Generator
Generate realistic EPID Winston–Lutz images with configurable:
- Gantry angle
- Couch angle
- 3D BB offsets (X, Y, Z)
- Field size
- Image noise and blur
Perfect for:
- Algorithm development
- Software verification
- Education and training
- Ground-truth validation
Part 2 — Automated Single-Image WL Analysis
Automatically analyzes a Winston–Lutz image by:
- Detecting the radiation field center
- Detecting the BB center with sub-pixel accuracy
- Computing image offsets (dU and dV)
- Displaying annotated analysis figures
- Producing easy-to-read numerical output
No manual measurements required.
Part 3 — 3D Radiation Isocenter Reconstruction
Combine multiple Winston–Lutz images acquired at different gantry and couch angles to estimate the three-dimensional radiation isocenter.
Features include:
- Automatic parsing of gantry and couch angles from filenames
- Reconstruction of BB offsets in IEC coordinates (X, Y, Z)
- Calculation of the total 3D isocenter deviation
- Visualization of projection geometry
- Validation using the included synthetic image generator with known ground truth
✅ Ideal For
- Medical Physicists
- Radiation Oncology QA
- Winston–Lutz Commissioning
- Researchers
- Graduate Students
- Medical Physics Education
- QA Automation Projects
🚀 Why This Toolkit?
Instead of manually measuring Winston–Lutz images, this toolkit enables you to:
- Generate realistic synthetic test datasets with known 3D offsets
- Develop and verify image-processing algorithms
- Automatically detect BB and radiation field centers
- Reconstruct the 3D radiation isocenter from multiple gantry and couch angles
- Validate your implementation against known ground truth
Whether you're learning the Winston–Lutz test, building your own QA software, or validating new algorithms, this toolkit provides a complete end-to-end workflow from image generation to 3D reconstruction.