Automation: All Part of the Script for Eclipse | Varian

Automation: All Part of the Script for Eclipse

The ability to automatically generate treatment plans in Eclipse using scripting can have a major impact on how clinicians conduct treatment planning for radiation therapy. In this article, we look at how the medical team at Amsterdam University Medical Centers (UMC) recently treated their first patient using an automatically generated scripted plan and saved significant time in the process.


Paul van Duijvenvoorde, treatment planner/C# developer; Roy Kossen, database specialist/C# developer; Andre Brouwer, C# developer; Tezontl Rosario MSc, medical physicist

When Varian introduced automation scripting functionality for its Eclipse™ treatment planning system two years ago, the team at Amsterdam UMC’s department of radiation oncology saw an opportunity to significantly improve their workflow by speeding up treatment planning and reducing the chance of human error.

Whereas the process for developing treatment plans had been highly manual and involved a lot of steps, the new scripting functionality offered a world of streamlined possibilities that they were keen to explore. Tezontl Rosario, medical physicist at Amsterdam UMC, and other members of his team spent a couple of years gaining the expertise they needed to use the Eclipse application programming interface (API) and have now treated their first patient using an automatically-generated scripted plan.  They are impressed by the results and plan to extend the program.     

“The manual clicks and waiting time saved in each treatment plan equates to up to 120 minutes of overall time saved,” says Rosario. “Our scripts can handle 40 to 50 check items in a couple of seconds. In addition to that, we were able to write to the database, set up the beam, put in collimator angles, optimize the plan, and do other calculations automatically. In short, we could script a fully automated treatment plan, referred to by Varian as automation.”

The new approach was so effective that the pilot – for breast cancer – will be followed up by using the same scripted approach for prostate and rectal cancer patients. “We want to add similar calculations for up to three additional indications each year and come up with fully automated, one-button-click plans for each,” Rosario adds.  “It’s clear to us that scripting is a very valuable tool for increasing plan quality and improving efficiency. It will become more and more important as we move to an (online) adaptive workflow environment.”

Start of an Automation Journey

To understand how the Amsterdam UMC team reached this point, it is worth examining the origins of their scripting program and how they gained expertise in writing to the API.

The Eclipse Scripting API is a programming interface and software library for Eclipse, allowing software developers to write scripts to access and alter the treatment planning information in Eclipse. The scripts can be integrated as small modules into the Eclipse user interface, or they can be run as separate programs.

Although the Amsterdam UMC team was delighted to see scripting functionality in Eclipse, none of their in-house team had any experience in using C#, the programming language used in the Eclipse API. So, they gathered a team together and sent them to Microsoft and Varian courses to expand their knowledge, which quickly enabled them to develop their own plan and process for checking scripts. They could put this new knowledge fully into practice when their center was upgraded to Eclipse 15.6 earlier this year when automation became available.

The next hurdle was convincing the planning team that scripting was the way forward. “We needed to involve our treatment planners from the outset because they can sometimes view automation as a threat to their jobs,” Rosario says. “We explained the twin benefits of a reduction in the risk of human error – such as transcription typos, incorrect entry of plan parameters, or incorrect transfer of information -- while maintaining plan quality. We asked them to suggest what type of treatment plan had the most routine steps that they would most like to see automated. They suggested breast. It sounds counter-intuitive, but breast cases can be both the most complex and the most routine.”

Utilizing breast scripting work pioneered a few years earlier by their colleague Wilko Verbakel, who was supported by a Varian research grant, they automatically generated a scripted plan for a breast cancer patient, consisting of two tangential fields and two IMRT fields.

Adding Features

For Wayne Keranen, manager of Varian’s Ecosystem Innovation Team, the work at Amsterdam UMC is particularly rewarding. “It's exciting to see these planning automation efforts enabled by Eclipse Scripting moving out of the research lab into the clinic!  Congratulations to Dr. Rosario and team for this great work."

With the release of Eclipse 15.6 last year, the automation scripting capabilities of Eclipse have been enhanced by additional features such as script approval, an additional safety feature that gives the chief medical physicist central control of the scripts that are permitted to be used in the clinic.       


Amsterdam UMC, located at VU Medical Center, treats more than 3,500 new patients each year. The Department of Radiation Oncology treats patients using seven Varian linear accelerators, including five TrueBeam systems, a Novalis TX, and a Clinac iX. The automated script for this first patient treatment was based on a 2017 proof of principle script from Van Duren-Koopman et al. and involved automation of a breast plus locoregional lymph nodes plan.  


The information captured herein represents the genuine experience of the attributed individuals and may not necessarily represent the views of Varian or the above-referenced institution. Individuals were not compensated for their participation. Radiation treatment may not be appropriate for all cancers. Individual results may vary.