
Python Script: Extract DVH Statistics from RTDOSE and RTSTRUCT DICOM Files
Easily extract Dose-Volume Histogram (DVH) statistics from RTDOSE and RTSTRUCT DICOM files using this simple, ready-to-use Python script!
This script offers a straightforward method to:
✅ Load RTDOSE and RTSTRUCT DICOM files
✅ Map structure contours to the dose grid
✅ Extract dose values inside structures
✅ Build DVH data for quick analysis
✅ Save DVH results as a CSV file
Key Features:
- Simple voxel mapping (nearest neighbor method)
- No external libraries beyond basic Python and pydicom
- Perfect for research, automation, and personal learning projects
- Fast setup and easy to customize for your needs
Important Notes:
- This script uses a basic voxel mapping approach without advanced interpolation (e.g., no trilinear interpolation).
- Point-type structures are not excluded automatically.
- Suitable for research and automation projects, but may require refinement for clinical precision use.
What's Included:
- Python script (.py) file
- Example usage instructions
Ideal for:
- Medical physics researchers
- Medical imaging enthusiasts
- Developers working with DICOM RT data
- Anyone interested in automating DVH extraction!