Portpy: An Open-Source Python Package to Accelerate Research in Radiotherapy Treatment Planning Optimization 📝

Author: Qijie Huang, Gourav Jhanwar, Saad Nadeem, Vicki Trier Taasti, Mojtaba Tefagh, Seppo Tuomaala, Masoud Zarepisheh 👨‍🔬

Affiliation: Varian Medical Systems Inc, Department of Clinical Medicine - Danish Center for Particle Therapy, Aarhus University Hospital, Memorial Sloan Kettering Cancer Center, The University of Edinburgh 🌍

Abstract:

Purpose:
We have developed PortPy (Planning and Optimization for Radiation Therapy in Python), a first-of-its-kind open-source package designed to accelerate research and development in radiotherapy treatment planning optimization. PortPy provides curated benchmark datasets and a range of benchmark optimization algorithms for IMRT, VMAT, and IMPT, incorporating both classical and AI-based planning approaches. It facilitates transparent, reproducible research across topics such as automated planning, adaptive planning, and emerging modalities for both photon and proton therapy. Additionally, PortPy integrates seamlessly with commercial treatment planning systems (TPSs), bridging the gap between research and clinical practice.
Methods:
We have implemented a variety of classical planning optimization techniques, including fluence map optimization, leaf sequencing, direct-aperture optimization, and column-generation for IMRT, VMAT, and IMPT. We have also incorporated an AI-based 3D dose prediction approach. For non-convex planning challenges—such as those involving DVH constraints, VMAT, or beam angle selection—we developed algorithms that leverage Mixed Integer Programming to find globally optimal solutions. Although these methods are computationally intensive and not practical in clinical settings, they provide invaluable ground-truth for benchmarking novel and computationally efficient techniques. In terms of datasets, we have curated and publicly released a dataset of 50 lung patients, complete with CT-scans/contours, clinical plans, and the dose influence matrix extracted from the commercial Eclipse system via its API. PortPy also interfaces directly with Eclipse for seamless data exchange, and integration with other major TPSs is in-progress.
Results:
Various use cases in IMRT, VMAT, and IMPT planning—leveraging both classic and AI-based optimization techniques—are demonstrated in more than ten easy-to-follow Jupyter notebook examples on the PortPy GitHub page.
Conclusion:
PortPy fosters transparent and community-driven development in radiotherapy treatment planning optimization. Over the past six months, it has been downloaded more than 1,000 times per month—underscoring its growing adoption by the scientific community.

Back to List