DICOM RTSTRUCT Margin Expansion Tool (Python) β Automated OAR/PRV Generation
π Expand RTSTRUCT Structures Automatically β No TPS Needed
This Python-based tool allows you to expand any ROI directly from a DICOM RTSTRUCT file with precise, isotropic margins in millimeters.
Designed for medical physicists, dosimetrists, and researchers, this script enables automated structure manipulation outside the treatment planning system (TPS) β giving you flexibility, speed, and control.
π§ What This Tool Does
With just a few inputs, you can:
- Load a DICOM RTSTRUCT file
- Select any ROI (structure)
- Apply a user-defined margin (in mm)
- Generate a new expanded structure
- Export a modified RTSTRUCT file
βοΈ How It Works (Under the Hood)
- Converts RTSTRUCT contours β 3D binary mask
- Applies Euclidean distance transform for true isotropic expansion
- Avoids pixel-based inaccuracies
- Converts expanded mask β planar contours
- Writes back to a new RTSTRUCT file
π‘ Why This Is Powerful
This tool unlocks workflows beyond TPS limitations:
- β Automated PRV generation
- β Batch structure processing
- β Independent QA workflows
- β DICOM-based research pipelines
- β System-agnostic automation
π¨ββοΈ Who This Is For
- Medical Physicists
- Dosimetrists
- Radiation Oncology Researchers
- Developers working with DICOM RTSTRUCT
π οΈπ‘ Need customization? Contact me to adapt this tool to your workflow.