
SSD Calculation from RTPLAN + RTSTRUCT (No CT Needed)
This Python script calculates Source-to-Skin Distance (SSD) for each beam in a DICOM RT Plan using only the RTPLAN and RTSTRUCT files — no CT images required.
It reconstructs beam geometry using isocenter, gantry angle, and SAD, and computes the SSD by projecting the beam backward to the external contour points defined in the RTSTRUCT.
✔ No CT image stack required
✔ Matches TPS SSD within ~1–2 mm accuracy
✔ Simple and clean: No external libraries like rt-utils required
✔ Tested with TPS-exported DICOMs
Great for quick QA checks, TPS comparisons, or educational demos.