Abstract
Objective:
To evaluate and quantify the planning performance of automatic planning (AP) with manual planning (MP) for nasopharyngeal carcinoma in the RayStation treatment planning system (TPS).
Methods:
A progressive and effective design method for AP of nasopharyngeal carcinoma was realized through automated scripts in this study. A total of 30 patients with nasopharyngeal carcinoma with initial treatment was enrolled. The target coverage, conformity index (CI), homogeneity index (HI), organs at risk sparing, and the efficiency of design and execution were compared between automatic and manual volumetric modulated arc therapy (VMAT) plans.
Results:
The results of the 2 design methods met the clinical dose requirement. The differences in D95 between the 2 groups in PTV1 and PTV2 showed statistical significance, and the MPs are higher than APs, but the difference in absolute dose was only 0.21% and 0.16%. The results showed that the conformity index of planning target volumes (PTV1, PTV2, PTVnd and PGTVnx+rpn [PGTVnx and PGTVrpn]), homogeneity index of PGTVnx+rpn, and HI of PTVnd in APs are better than that in MPs. For organs at risk, the APs are lower than the MPs, and the difference was statistically significant (
Conclusion:
IronPython language designed by RayStation TPS has clinical application value in the design of automatic radiotherapy plan for nasopharyngeal carcinoma. The dose distribution of tumor target and organs at risk in the APs was similar or better than those in the MPs. The time of manual operation in the plan design showed a sharp reduction, thus significantly improving the work efficiency in clinical application.
Background
Nasopharyngeal carcinoma (NPC) is one of the most common head and neck malignancies in China. Radiation therapy is the preferred treatment choice as the disease is highly sensitive to its use. Compared with thoracic and abdominal tumors, the target volume of NPC is associated with high degree of complexity and a large number of surrounding organs are at risk (OARs); thus, the requirements of target dose coverage and OARs dose sparing for this disease are relatively strict. The radiotherapy plan design is time-consuming and laborious, and the experience requirements of the physicist/dosimetrist are relatively high. 1 It has been confirmed that volumetric modulated arc therapy (VMAT) has dose distributions comparable to or better than intensity-modulated radiation therapy (IMRT) for treating head and neck tumors and some somatic tumors. 2 -4 In designing the treatment plan for NPC, in addition to radiotherapist’s precise contouring of the target volume and OARs, an experienced physicist/dosimetrist is required to set optimized parameters and continuously optimize accordingly to obtain a better treatment plan meeting the clinical goals. In such a process of continuous trial and error, physicist/dosimetrist have to spend a lot of time and energy, and because of differences in the experience levels between different physicists/dosimetrists, it can easily lead to treatment differences in radiotherapy plans, affecting the final treatment effect. Therefore, much attention should be paid to the automatic design of radiotherapy plans.
After the clinician confirms the treatment target volume and OARs, the formulation of treatment plan still requires the following steps: the creation of nonanatomical help structures, the selection of treatment technique, the arrangement of irradiation field, the setting of optimization objective parameters, the repeated optimization of plan, and adjust the field and optimization parameters according to the optimization results. This process is time-consuming, and the following techniques are mainly used to solve this problem currently 5,6 : (1) knowledge-based treatment planning (KBP), 7 (2) multicriteria optimization (MCO), 8,9 and (3) automatic treatment planning. 10 -12 The automatic treatment planning can be done using the scripting tool by Python in the RayStation treatment planning system (TPS; RaySearch Laboratories AB, Stockholm, Sweden) or via the Pinnacle3 TPS (Philips Healthcare GmbH, Hamburg, Germany). 13 -15 RayStation was used in this study for automatic treatment planning.
Based on RayStation TPS, this study adopted a simple and effective automatic optimization algorithm to simulate a radiotherapy planning process that is designed by an experienced physicist/dosimetrist. The initial optimization parameters of the plan were set according to the dose limitation requirements of the Radiation Therapy Oncology Group (RTOG) protocols 0225 and 0615, and the optimization parameters were constantly adjusted based on the value of the objective function and the actual dose of organs. After completing the optimization, no manual modification was required. Hence, in this study, the automatic planning (AP) method was used to design 30 radiotherapy plans, and the dose distribution and design efficiency were compared with that of manual planning (MP) designed by a senior physicist/dosimetrist in our hospital to analyze the feasibility of its clinical application.
Methods
General Patient Characteristics
From November 2017 to December 2018, a total of 30 patients with NPC who received treatment in the Zhejiang Cancer Hospital were included in this study. All patients were immobilized using a head, neck, and shoulder thermoplastic mask in the supine position. There were 25 males and 5 females aged 31 to 72 years (median age: 52.5 years). According to the 7th edition of the American Joint Committee on Cancer (AJCC)/Union for International Cancer Control (UICC) staging system (2010), 3 patients had stage II disease, 21 had stage III, and 6 had stage IVa/IVb. None of the patients received radiotherapy prior to the study enrollment, and all were free of distant metastases. Computed tomography with a 3-mm slice thickness of the head and neck region was obtained from each patient and imported to RayStation 4.5.1 TPS for target volume and OARs contouring and subsequent treatment planning.
Target Delineation and Prescribed Dose
With the guidance of Report 50 and Report 62 of International Commission on Radiation Units and Measurements (ICRU), the gross tumor volume (GTV) included the primary tumor sites and their invasion range (GTVnx), retropharyngeal metastatic lymph nodes (GTVrpn), and cervical metastatic lymph node (GTVnd). The clinical target volume (CTV) range can be adjusted according to the involvement degrees. For example, CTV1 should include GTVnx, GTVrpn, the whole nasopharyngeal mucosa, and the submucosal region (5 mm); CTV2 should include CTV1, as well as some of the following: posterior nasal cavity, pterygopalatine fossa, posterior maxillary sinus, part of the posterior ethmoid sinus, parapharyngeal space, skull base, part of cervical vertebra, and clivus. Planning target volume (PTV) should include position errors and organ movements when undergoing treatments, which are usually externally expanded for 3 to 5 mm based on GTV and CTV. The prescribed doses were as follows: 70.40 Gy to the PGTVnx+rpn (PGTVnx and PGTVrpn), 67.20 Gy to the PTVnd, 60.80 Gy to the PTV1, and 54.40 Gy to the PTV2, in 32 fractions. The setting of restricted dosages for critical organs was done according to the international consensus. 16,17
Treatment Planning and Dose Prescription
For each case, the MPs and APs were generated in RayStation using 6 MV X-ray beams with a maximum dose rate of 600 monitor unit (MU)/min from the Trilogy linear accelerator (Varian Medical Systems, Palo Alto, California). The gantry speed varied in the VMAT technique. The coplanar dual arcs (clockwise rotation from 182° to 178° and counterclockwise rotation from 178° to 182°) were used in both MPs and APs. The dose-volume constraints of OARs from the RTOG protocols 0225 and 0615 were adopted and modified (Table 1). The treatment goals included 100% of radiation dose to cover 95% of the PTVs volume, and no more than 5% of patients in PGTVnx+rpn received ≥110% of the prescribed dose. Regarding the OARs, the maximum doses to the brain stem and the spinal cord were set as 54 Gy and 45 Gy, respectively. In addition, a mean dose of <26 Gy, or the volume receiving 30 Gy radiation should be <50% to at least one side of the parotid gland. The dose given to other normal tissues was minimized within a reasonable range without affecting the target volume coverage (Table 1). For PTV and OARs, the values of D99% and D1% (dose received by the 99% and 1% of the volume) were defined as metrics for minimum and maximum doses. 18,19
Planning Objectives for Critical Structures.
Abbreviation: OARs, organs at risk.
Description of AP
The RayStation TPS includes the IronPython language platform, which involved the implementation of Python programming language combined with Microsoft.Net framework. Compared to other scripts, Python language is easy to learn and use and is a complete programming language. The Python platform when combines with rich interface as provided by the RayStation TPS, various steps of the IMRT or VMAT plan were automated. The author wrote the script of AP in Python language and the workflow of AP is presented in Figure 1. The process of standardizing ROI naming was then automated. By calling the script, the ROI naming was automatically standardized, the nonanatomical structures that assist were automatically generated, the irradiation fields were automatically added, and the optimization parameters were automatically set and automatically adjusted. According to the set rules, the automatic optimization of the plan was repeated, and an excellent radiotherapy plan was obtained by the intelligent assistant technology. The MPs and APs were designed by the same physicist/dosimetrist.

The workflow of AP.
AP optimization strategy The automatic generation of auxiliary contours included the multilayer ring restriction structure outside the PTV, the expansion of the OARs, the restricted contour of the normal tissue, and so on (Table 2). The irradiation fields, optimized settings, and clinical goals are automatically added (Table 3). The initial optimization parameters are added for optimization: the initial optimization condition setting was slightly stricter than the planning objectives, such as the max dose of <51 Gy of the brain stem. The PTVs’ MinDvh was set as constraint function, and then the 2 cycles of direct machine parameter optimization (DMPO) were started. Different convergence requirements are assigned according to contour types (PTV, Organ, Control), objective functions (MaxEud, MaxDose, and MaxDvh), as well as difference between objective value and actual dose of target volume and OARs (Figure 2 and Table 3). For example, for Max dose of organ, if obj_fun.functionValue.functionValue was <0.005, then the dose value of the objective function was compared with the actual dose of *0.95, taking the Min value as the new “Max dose” value of this objective function, and then start another 2 cycles of optimizations. The maximum number of iterations per cycle was set to 60. Repeat the (3) operation once to obtain the result of the AP.
The Main Function of AP Process.
Abbreviation: obj_fun, plan.PlanOptimizations.Objective.ConstituentFunctions.
Example of an Automatic Optimization Policy.
Abbreviations: obj_fun, plan.PlanOptimizations.Objective.ConstituentFunctions; PTV, planning target volume.

The policy of adjusting the objective function.
When the AP script was running, several cycles (up to 6) of DMPO were started.
Dose Comparisons
Quantitative evaluation of PTVs was performed using a standard dose-volume histogram (DVH), according to ICRU 83. 18 The conformity index (CI) was a measure of target volume dose distribution conformity and was calculated using CI = TVRI/TV × TVRI/VRI (TVRI, target volume covered by reference isodose; TV, target volume; VRI, volume of the reference isodose). 20 The homogeneity index (HI), a measure of the evenness of dose distribution, was calculated using HI = (D2% − D98%)/D50%, 21 whereas D2%, D98%, and D50% are the doses covering 2%, 98%, and 50% of the PTVs, respectively. Analysis of the PTVs included D95%, CI and HI, and the OARs included the maximum dose, mean dose, and a set of appropriate define (Vx) and define (Dy%) values.
Planned Efficiency Assessment
The time efficiency of manual and automatic planning design and implementation was evaluated. The time for designing a complete treatment plan could be divided into manual operation time and computer processing time. Therefore, the manual operation time and the computer processing time were separately recorded in both MPs and APs design. The manual operation time is defined as the sum of the time taken by the physicist/dosimetrist who operate the computer, and the computer processing time is defined as the sum of the time of the computer’s autonomous operation after the physicist/dosimetrist’s operation ends. In AP, the physicist/dosimetrist required no additional time to edit patient information and overall inspection.
Statistical Analysis
For all the aforementioned dosimetric parameters, Wilcoxon signed rank test was used to investigate the significance of differences in MPs versus APs. A 2-tailed
Results
Comparison of Dose Distribution in the PTVs
All plans met the requirement for the prescribed dose coverage of the target volume. The D95% of PGTVnx+rpn for all plans was 7040 cGy (autoscale to this prescription). Table 4 presented a detailed statistical analysis of PTVs, which was averaged for over 30 patients. There are no statistically significant differences between the MPs group and the APs group in terms of D95% of PTVnd, HI of PTV1, and HI of PTV2. There are significant differences in D95% of PTV1 and PTV2 between the 2 groups, but only a difference of 0.21% and 0.16% in an absolute dose. This clearly showed that the CI of PTVs, HI of PGTVnx+rpn, and HI of PTVnd in the APs group are generally better than those in the MPs group.
Summary of Dosimetric Parameters From the Investigated Techniques of PTVs, OARs, and MUs.
Abbreviations: CI, conformity index; HI, homogeneity index; M, mean; MP, manual planning; MU, monitor unit; OAR, organs at risk; PTV, planning target volume; SD, standard deviation.
Comparison of Dose Distribution of Sparing OARs and Healthy Tissue
The differences in the exposure doses of the OARs between the 2 groups are summarized in Table 4. The D1 received by the brain stem, spinal cord, optic nerves, chiasm, lens, and temporal lobes in the APs group is obviously lower than those in the MPs group (
Comparison of the Monitor Units and Design Time
The number of monitor unit per fraction showed 582.40 ± 45.43 in the MPs group and 578.60 ± 42.28 in the APs group (
The manual operation time in the MPs was (29.37 ± 2.76) minutes, and the computer processing time was (34.27 ± 5.79) minutes, while the manual operation time in APs was (4.93 ± 0.74) minutes, and the computer processing time was (46.00 ± 2.55) minutes. The manual operation time in APs was reduced by 83.21% when compared with MPs, but the computer processing time was increased by 34.22%. The overall time of APs was 20% less than that of MPs.
Discussion
In the design process of AP, the basic idea of AP parameter convergence is to find more suitable optimal solution for individual patients. The basic principle of KBP involves the use of large number of historically similar, high-quality plans to train models. After the model is verified, then it can be used to predict the possible dose distribution results of the new plan and the corresponding DVH parameters. Furthermore, it can be used as an optimized target of the new plan and complete the plan design. Studies have found that the use of KBP resulted in improvement of OARs (such as parotid gland, oral cavity, glottis, and cochlea) to varying degrees in patients with head and neck cancer. 22,23 The quality of the plans in the plan library for training markedly determines the quality of the automatically generated plans, 24 -26 and so diversity of plans is required. In addition, the prediction target is directly applied to the TPS optimizer, and no further adjustment is made to the optimization process. The Varian planning system integrates AP named RapidPlan (V13.5 or later, Varian Medical Systems, Palo Alto, California). 27 The MCO is a novel approach that involves optimization of IMRT for generating a set of Pareto optimal plans by automatically emphasizing different objectives (a treatment plan is Pareto optimal if it cannot be improved in any one of the objectives without worsening another). 28 The user that can reach a satisfactory dose distribution interacts through real-time navigation across the Pareto surface, which is a continuous surface that is approximated by forming convex combinations of these base plans. Previous studies have indicated that the MCO IMRT plan reduces active planning time and the dose of OARs for tumors, 29 -32 while the target coverage remains to be equal or better.
A new simple and effective method for automatic radiotherapy program was developed in this study. The feasibility of automatic design and optimization of radiotherapy plans based on the RayStation system’s IronPython language platform was demonstrated. The RayStation has a script interface inside that runs through IronPython code directly and provides a number of internal patients and plan module application programming interfaces (APIs) for access and modification.
33
Zhang
The initial optimization condition was slightly stricter than the planning objectives. If the initial conditions are too strictly set, it is often impossible to find the results of reverse optimization that meet the clinical requirements. By reducing the solution space step-by-step, it has become much easier to find the better results.
Our results indicated that the APs achieved a similar or better target volume CI and HI than the MPs, as well as lower OARs dose, ensuring program quality consistency and improving the overall program quality. This was because the MP focuses on obtaining a better target dose distribution within the tolerance range of OARs dose, while the idea of this AP was to reduce the dose of OARs based on the target dose meeting the clinical goal. Therefore, the conditional automatic convergence method of AP application and the set of optimization parameters were more strict. In this study, the setting of maximum number of iterations per cycle in the AP was consistent with that of MP. Due to the difficulty of conventional radiotherapy planning, the number of iterations should be manually verified to ensure the convergence of planning results (the reaching tolerance limit stops the optimization of this cycle). The calculation cycle for AP setting (6 times) was more, causing longer calculation time, and the MP was generally only 3 to 4 times. This difference in the number of optimization cycles might also result in difference in the quality of the plans. This was because the AP method did not need to pay special attention to the time of planned calculation, and more cycles could be used to obtain a better dose distribution. If the hardware performance is better, then the time will be shorter. In addition, the reduction in the OARs could reduce the incidence of potential adverse reactions, thereby increasing the chances of improving the quality of life in patients. Also the ease of the use of Python code made the design process of the AP more tunable, and the physicist/dosimetrist could add their own planning ideas to the process of AP, further improving the AP method or optimizing the plans after AP, which assists in improving the quality of plans.
For example, the initial parameters of optimization were set through KBP, which might in turn reduce the number and time of optimization. For especially important organs (such as brain stem, spinal cord, optic nerve, optic crossover, etc), the target volume minus the organ enlargement (plus a 3-10 mm margin) can be used as a new target volume. For organs with lower priority (such as parotid gland, cochlea, temporal lobe, etc), the OARs minus the target volume enlargement (plus a 3-10 mm margin) can be used as new OARs. In this way, the conflict problem associated with plan optimization can be effectively reduced and the efficiency of plan optimization can be improved.
In addition, the work of designing a large number of radiation treatment plans had placed a heavy burden on the physicist/dosimetrist and planning system. During the working hours, the planning system server basically runs at full capacity, and the calculation speed remains very slow. The AP method could utilize the spare time of the equipment at night, and as long as the physicist/dosimetrist called the AP script based on different diseases and prescriptions before leaving work, then a high-quality radiation plan could be obtained in the next morning.
Nasopharyngeal carcinoma VMAT AP met the clinical requirements of target volume prescription dose. Moreover, the dose of normal tissues was lower, and therefore the quality of radiotherapy planning was significantly enhanced. The AP generated higher quality results without any human intervention. Also the manual operation time can be saved and the influence of factors lack in experience on treatment planning can be avoided. In conclusion, for radiotherapy of NPC, AP can be accurately replaced by MP.
Supplemental Material
Supplemental Material, CERTIFICATE-OF-ENGLISH-EDITING - Automatic Planning for Nasopharyngeal Carcinoma Based on Progressive Optimization in RayStation Treatment Planning System
Supplemental Material, CERTIFICATE-OF-ENGLISH-EDITING for Automatic Planning for Nasopharyngeal Carcinoma Based on Progressive Optimization in RayStation Treatment Planning System by Yiwei Yang, Kainan Shao, Jie Zhang, Ming Chen, Yuanyuan Chen and Guoping Shan in Technology in Cancer Research & Treatment
Footnotes
Abbreviations
Declaration of Conflicting Interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by grants from National Key R&D Program of China (2017YFC0113201), Zhejiang Key R&D Program (2019C03003), and Zhejiang Medical and Health Project (2020KY472).
References
Supplementary Material
Please find the following supplemental material available below.
For Open Access articles published under a Creative Commons License, all supplemental material carries the same license as the article it is associated with.
For non-Open Access articles published, all supplemental material carries a non-exclusive license, and permission requests for re-use of supplemental material or any part of supplemental material shall be sent directly to the copyright owner as specified in the copyright notice associated with the article.
