Development and Implementation of an In-House Esapi C# Automation Framework with a Dynamic Universal GUI for Optimization Structure Creation across Treatment Sites
Abstract
Purpose
To develop and evaluate an in-house .NET/C# Eclipse Scripting API (ESAPI) solution with a dynamic universal graphical user interface (UGUI) to automate optimization-structure creation across disease sites and reduce treatment planning time.
Methods
A generalized C# framework was developed in Microsoft Visual Studio using ESAPI within Eclipse TPS v18.1. The UGUI dynamically adapts to user-defined inputs, including the number of targets and organs at risk (OARs), ring parameters, cropping limits, and selected dose levels. Two workflow-specific modules were implemented: (1) simultaneous integrated boost (SIB) and (2) sequential planning. Scripts were tested in a non-clinical Eclipse environment and validated using anonymized patient datasets from multiple treatment sites, including prostate, breast, head and neck, and brain. Efficiency was quantified by comparing the time required for manual optimization-structure creation versus the automated scripting workflow.
Results
For both SIB and sequential workflows, the UGUI guides users through selecting targets/OARs and entering standardized margins (e.g., PTV-to-ring spacing and OAR exclusion/cropping distances). The script then automatically generates planning rings and OAR optimization helper structures by cropping OAR volumes away from the target volumes using user-defined distances. For SIB planning, the tool supports multiple PTVs with user-specified dose levels and creates dose-priority cropping and per-PTV ring structures. For sequential workflows, the tool supports single-target prescriptions with the same automated ring and OAR-cropping logic. Across disease sites, the script standardized optimization-structure generation and substantially reduced manual contouring effort, decreasing mean ± SD creation time from 18.75 ± 5.03 minutes (manual) to 1.13 ± 0.29 minutes (automated).
Conclusion
This in-house, department-developed ESAPI automation framework delivers a scalable, disease-site–independent method for optimization-structure generation and substantially improves planning efficiency. The work demonstrates the impact of internally developed clinical automation to standardize workflows and reduce repetitive planning tasks within the department.