Fully automated searching for the optimal VMAT jaw settings based on Eclipse Scripting Application Programming Interface (ESAPI) and RapidPlan knowledge‐based planning

Abstract Purpose Eclipse treatment planning system has not been able to optimize the jaw positions for Volumetric Modulated Arc Therapy (VMAT). The arbitrary and planner‐dependent jaw placements define the maximum field size within which multi‐leaf‐collimator (MLC) sequences can be optimized to modulate the beam. Considering the mechanical constraints of MLC transitional speed and range, suboptimal X jaw settings may impede the optimization or undermine the deliverability. This work searches optimal VMAT jaw settings automatically based on Eclipse Scripting Application Programming Interface (ESAPI) and RapidPlan knowledge‐based planning. Methods and materials Using an ESAPI script, the X jaws of rectal VMAT plans were initially set to conform the planning‐target‐volume (PTV), and were gradually extended toward the isocenter (PTV center) in 5–7 mm increments. Using these jaw pairs, 592 plans were automatically created for 10 patients and quantitatively evaluated using a comprehensive scoring function. A published RapidPlan model was evoked by ESAPI to generate patient‐specific optimization objectives without manual intervention. All candidate plans were first stored as text files to save storage space, and only the best, worst, and conformal plans were consequently recreated for comparison. Results Although RapidPlan estimates dose‐volume histogram (DVH) based on individual anatomy, the geometry‐based expected dose (GED) algorithm does not recognize different jaw settings but uses PTV‐conformal jaws as default; hence, identical DVHs were observed regardless of planner‐defined jaws. Therefore, ESAPI finalized dose‐volume calculation and eliminated the plans with unacceptable hotspots before comparison. The plan quality varied dramatically with different jaw settings. Trade‐offs among different organs‐at‐risk (OARs) were collectively considered by the proposed scoring method, which identified the best and worst plans correctly. The plans using conformal jaws were neither the best nor the worst of all candidates. Conclusions VMAT plans using optimal jaw locations can be created automatically using ESAPI and RapidPlan. Conformal jaws are not the optimal choice.

Conclusions: VMAT plans using optimal jaw locations can be created automatically using ESAPI and RapidPlan. Conformal jaws are not the optimal choice.

| INTRODUCTION
Although the in-field beam intensity can be modulated by the optimizer, 1 the jaw locations for VMAT are not optimized by the engine of Varian Eclipse treatment planning system. 2 Even for jaw-tracking technique, the planner-defined values still determine the largest field size within which MLCs can modulate the beams. Tracking jaws are only programmed to reduce the low dose spillage outside MLC apertures, but are not optimized for finding the best MLC sequences. 3 Limited by the physical constraints of MLCs such as translational range and speed, large jaw settings may impede the MLCs to reach the best location timely to shield the OAR, 4 while small jaw size may induce inadequate target dose coverage. Optimal jaw settings may assist the optimizer to find better solutions 5 which can be less challenging for MLC speeds and acceleration, hence increase the delivery accuracy. 6 However, setting VMAT jaws has been a very arbitrary and plannerdependent practice clinically, which might be more complex when the target dimension varies dramatically from different beams-eye-views. 7 To explicitly display the dosimetric impact of jaw settings on the VMAT planning and find the best configuration, this work used ESAPI to create and evaluate a large number of plans automatically using various jaw settings, which can be hardly performed by a human before.
RapidPlan knowledge-based planning was also involved to minimize the planner dependence 8,9 and to automate the assignment of personalized optimization objectives for ten patients. 10

| MATERIALS AND METHODS
This study was performed on Varian Eclipse Treatment Planning System V. 13.6.

2.A | ESAPI Scripting and plan creation
C#-based plug-in scripts were developed in an ESAPI research mode to duplicate and modify the parameters of historical VMAT plans for presurgical rectal cancer patients. The contouring, prescription, and planning protocols were based on Li's study 11 and RTOG 0822 protocols. 12 The plan was accessed through the "Context" interface in the "VMS.TPS" namespace. Information can be extracted from multiple data structures under the interface.
The plans were optimized with 10 MV photon, 1 full arc, and 5°c ollimator angle. The isocenter coincided with PTV center. Photon Optimizer v. 13.6 was used for the optimization. Initially, conformal X jaws to PTV border without margin were placed by the API, larger than which may increase unnecessary OAR exposure from MLC dose leakage. The Y jaws were further retracted by the width of an adjacent leaf of Millennium 120 MLCs for scatter contribution. 13 Keeping all other parameters unchanged, plans with various X jaw sizes and positions were created by the scripts: One patient was used to test the method feasibility and display the dosimetric sensitivity to finer jaw changes, where the X jaws were gradually extended toward the isocenter by 50 mm (5 mm/step, 10 steps for each bank). The combined settings of two jaws yielded 100 possibilities. Nine more patients were optimized for statistical comparison but a larger step size (5-7 mm/step, 49-100 plans per patient) was used to accelerate the computation. Plans were deleted thereafter.

2.B | Plan scoring and postprocessing
To ensure the target coverage, candidate plans were first normalized to meet the prescription before evaluating the OAR dose. Plans with >107% prescription hot spots were considered as clinically unacceptable and were removed before ranking. To simplify the collective consideration of all OAR dose indices, a plan scoring function was proposed to quantify the plan quality, whose values were calculated for each plan by postprocessing the text files using Python 3.5. The objective was to minimize the following score function where the subscript i refers to each OAR and j refers to each dose interval.
The lower the plan score is, the better the OARs are spared. †Yuliang Huang and Haizhen Yue contributed equally to this work.

3.B | Plan quality under various jaw settings
For the first patient, the candidate plans were labeled consecutively from index 1 to 100. The plan scores as well as the individual OAR scores were plotted in Fig. 1. Twenty-six plans were identified as clinically unacceptable due to hotspot and were marked as "x". The vertical dashed blue and orange lines mark the best (lowest score = 2.73) and the worst plans (highest score = 3.02), respectively, of the remaining 74 plans. The plan using conformal jaws was plotted as the first one on the left (plan score = 2.94).
Using the first patient as an example, Fig. 2  The average DVHs of ten patients displaying the best, worst, and conformal plans as identified by the scoring function were plotted for comparison in Fig. 3, where the error bars indicate 1 standard deviation (SD). Note that multiple plans of equally high score may exist, wherein one of them was randomly selected for calculating the average DVHs in Fig. 3 to demonstrate the agreement between the plan score and ultimate DVHs. Table 1 shows the statistics of the dosimetric metrics of all 100 candidate plans for the first patient.

| DISCUSSION
Although the RapidPlan model generated identical optimization objectives for the same patient anatomy and beam geometry (except jaws), the knowledge-based planning module in the proposed optimal jaw searching method is intended to avoid subjective planner dependence, and to personalize the automated optimization in case of different patient anatomy, prescription, field geometry and energies,  Table 1 confirm the sensitivity of VMAT plan quality to the jaw settings. The inter-competition of OARs in the same plan can be interpreted from Fig. 1: the decreased dose to one OAR is often at cost of increased dose to another. It is unlikely to find a solution to achieve the minimum dose simultaneously for all OARs. That is why the individual OAR dose metrics of the best plan were consistently higher than the minimum values of 100 plans ( Table 1). The best plan struck a balance through evaluating various OAR dose indices collectively, by means of a scoring function in this study. As a reminder, the components and weighting factors of the scoring function can be adjusted to comply with the site-specific OARs, other institutionally preferred trade-offs or clinical protocols. Similar score functions may also be used for automatic QA purposes using ESAPI.
Plans with hotspot >107% of prescription were excluded per our clinical preference and ICRU 83 protocols. 21 The over-shrunk jawinduced target under-dose, and the hot spots were amplified after normalization to prescription.
On the basis of largely overlapping DVHs of the targets, Fig. 3 suggests that the plan quality can be well reflected by the proposed plan scoring function. Figure 3 also demonstrates that conformal jaws are not necessarily the optimal setting for VMAT planning, agreeing with the dosimetric comparison in Table 2 | 181 knowledge-based model learn features from its training cohort, the generated plan optimization objectives may be more favorable to the jaw settings that were similar to the training plans. Further studies are desirable to investigate these unpredicted uncertainties.

| CONCLUSIONS
VMAT plans using optimal jaw settings can be created automatically using Eclipse Scripting Application Programming Interface and Rapid-Plan knowledge-based planning. Suboptimal or even unqualified plans are associated with conformal or arbitrary jaw definitions.

ACKNOWLEDGMENTS
This work was jointly supported by Beijing Natural Science Founda-