Varian ESAPI Workshop: Brazilian Medical Physics Conference (CBFM)

Hello! Been gone for some time, but back for business! 😁😁

In June 8 (2022), Anselmo Mancini and I presented the Varian Eclipse Scripting WorkShop at the the Brazilian Medical Physics Conference (CBFM).

It was the first time since 2019 we’ve had an “offline” conference. It was a 4 hour long event, and we had 30–40 people attending!

First part was one hour lecture of C# and ESAPI basics, we jumped into a very similar example as presented in my 5 steps to start ESAPI scripting post.

We create a class called Patient, then we read from a csv file and we create a patients list from it. Then we filter the urgent patients from the list and print their info.

The second part was live coding two binary plugins with WPF User Interfaces:

Code is here: https://github.com/joecastelo/JuneWorkShopCBFM22

User Interface

In the main Script file, we create a class called Check, which has 3 properties, Title, Result and Comment.

This Class has a constructor with two default arguments, an empty comment and an OK Result. When you create a check with the Title “Check whatever”, you’ll have to code the business logic and change the Result and Comment on the fly.

A MainWindow.xaml is created to hold a List View of CheckScreen.xaml, that displays the Check’s Title and Result, changes it’s color based on the test result, and when you click on the check, it pops the Comment.

Code is here: https://github.com/anselmomancini/CreateOptStructures

In this plugin, the overlapping region between the OARs and the PTVs sum + margin is checked and it crops the OARs with the margin chose by the user in a WPF window.

Since it is a showcase code, it does not handle operations between Structures with High Resolution and Default.

User interface
Result

Hope you enjoy!

Thanks to Anselmo and Varian for this great experience, I hope we can repeat it in the future!

Thanks to Jonas for reviewing!

--

--

Radiation Therapy Medical Physicist and Programmer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store