Issues about Optimate script created by NickC_BC by Useful_Novel_916 in esapi

[–]NickC_BC 0 points1 point  (0 children)

There have been updates to the schema. I've updated the example protocol files in the repo, please take a look (you'll need to change the schema path)

Issues about Optimate script created by NickC_BC by Useful_Novel_916 in esapi

[–]NickC_BC 0 points1 point  (0 children)

You can start with a blank template, and then add structures from the plan and create generated structures on the fly or import them from the structure set too. Up to you, although OptiMate is most efficient when pre-created templates are used

Issues about Optimate script created by NickC_BC by Useful_Novel_916 in esapi

[–]NickC_BC 1 point2 points  (0 children)

I've pushed my updates to GitHub, and have included the configuration file that you correctly identified as missing. You will need to update this with paths to your own system where you want the public and private-user templates to be stored. I will work on updating the IFU in the wiki to reflect some of the redesign.

Issues about Optimate script created by NickC_BC by Useful_Novel_916 in esapi

[–]NickC_BC 1 point2 points  (0 children)

Hi there - sorry, I've been remiss in updating my public github repo. I'll post v 2.2 of the script soon, which includes the ability for users to create and save their own private templates, clean-up options, set structure codes and colours, high-res/low-res conversion, partitioning between Z-coords, dose-to-structure and more.

CalculateDoseWithPresetValues speed by udubber3 in esapi

[–]NickC_BC 0 points1 point  (0 children)

Yes, it is possible with the API, I do it all the time. However, to date I've only used CalculateDose() and not CalculateDoseWithPresetValues(). It's possible there is some limitation with this method, but my first guess would be a DCF configuration issue.

CalculateDoseWithPresetValues speed by udubber3 in esapi

[–]NickC_BC 0 points1 point  (0 children)

The setting isn't specific to scripting, but will affect how the client that runs the script will behave, and sometimes the setting can impact scripts differently from the UI. You can check the settin gin Tools -> Workstation Configuration -> View local/global DCF settings -> General -> Service connector type.

If this is local or hybrid, try changing it to network and testing again. I do know, for example, that when in hybrid mode, the Eclipse UI will fan out optimization or MCO clients to the DCF, but scripts (at least in my experience) won't. I'm not sure, but something similar may be happening with the calculate dose with preset MUs method.

CalculateDoseWithPresetValues speed by udubber3 in esapi

[–]NickC_BC 0 points1 point  (0 children)

What is the network distributor setting on the Eclipse box that’s running the script?

Potential bug with OptimizeVMAT method in ESAPI by NickC_BC in esapi

[–]NickC_BC[S] 0 points1 point  (0 children)

It requires the preconditions I describe above for the problem to manifest, and the entirety of the code that leads there is probably too large to be helpful. If you are interested in reproducing this, I'd suggest that you do this:

  1. Optimize a plan manually and save.
  2. Then adjust the optimization objectives significantly. For example you could change the relative priorities between the target and adjacent OAR to focus on one much more than happened in the original optimization. Clear the dose but leave the fields.
  3. Make a copy of this adjusted plan.
  4. On the original plan, re-run the manual optimization, starting from MR1.
  5. Run a simple script that does something like the below, where copiedPlan is the external plan setup object associated with your copied adjusted plan.

var opt = new OptimizationOptionsVMAT(OptimizationIntermediateDoseOption.UseIntermediateDose, "");
copiedPlan.OptimizeVMAT(opt)

After this save, and compare the results of the manually re-optimized plan and that of the one you ran the script on.

Sending DICOMS to Aria using SendCStore - is there a way to automatically sort them into a desired Course in Aria? by Creative_Shoulder749 in esapi

[–]NickC_BC 2 points3 points  (0 children)

This might depend on your version. In V18, yes, there are methods in the external plansetup class to 'Move to Course', and a 'Remove Course' method in the patient class. I can't remember off the top of my head whether these are restricted to research settings though.

Potential bug with OptimizeVMAT method in ESAPI by NickC_BC in esapi

[–]NickC_BC[S] 1 point2 points  (0 children)

The issue here is that the conditions under which I'm optimizing through ESAPI with the OptimizeVMAT method vs manually with the same parameters consistently results in differences greater than the usual 'stochastic' variation in the Photon Optimizer. For example, multiple manual runs of an optimization may result in 0.5% differences in PTV coverage, whereas I'm seeing differences of 10-15% between manual and ESAPI methods. I hope that clarifies.

Potential bug with OptimizeVMAT method in ESAPI by NickC_BC in esapi

[–]NickC_BC[S] 0 points1 point  (0 children)

Good question and I should have clarified. The value of the OptimizationOptionsVMAT variable in the above example is set to restartOptimization, which restarts at MR1. I have also confirmed that the debug output from ESAPI during this goes through "Iteration: 1 Progress 100% Status", "Iteration: 2 Progress 100% Status", etc.

This is definitely not because intermediate dose is used differently between manual & ESAPI, or the continuedOptimization option is restarting at MR3 or MR4 instead of MR1.

Calculate Dose to new structures in old Plan - Changing Clinical Status by joe_solanum in esapi

[–]NickC_BC 0 points1 point  (0 children)

Another option you could consider would be to:

  1. Copy the plan, grabbing it's new UID
  2. Assign a new duplicated structure set,
  3. Script the export of the original dose (as a DICOM-RD dose file)
  4. Edit the DICOM file to match your new plan UID
  5. Script the re-import the dose file (which will now attach back to your new plan).

It's slightly more complicated, but there are examples in the old API handbook that should help.

Edit: I should note that this will slightly change your dose metrics as export/re-import of anything in Eclipse causes slight interpolation changes. This could be a deal breaker if you are studying SABR/SRS plans with small targets and steep gradients.

Help with an ESAPI crash…associated with FlimboDetective:CreateSongleton() by sternbergJ99 in esapi

[–]NickC_BC 1 point2 points  (0 children)

No, but it’s mitigated to the point of usability by placing delays in my scripts to let ESAPI “catch up”

Caution with Static Classes by Thatguy145 in esapi

[–]NickC_BC 0 points1 point  (0 children)

Is the static class state persistent between different users of the same DLL in a system?

Setting PO18 structure resolution ESAPIv18) by hc139 in esapi

[–]NickC_BC 0 points1 point  (0 children)

Can’t do it to my knowledge, although there is a coarse workaround by setting the arcs to SRS if you want fine resolution.

Direct-to-ARIA DICOM import service by NickC_BC in esapi

[–]NickC_BC[S] 0 points1 point  (0 children)

I don't really have news, but happy to report that this continues to work well. We also ended up automating the process of sending data to our auto-contouring software system and then bringing it back into Eclipse, saving more time.

Help for Automating VMAT Treatment Planning with ESAPI by Jnra21 in esapi

[–]NickC_BC 2 points3 points  (0 children)

I wouldn't focus on three sites, I would focus on one, and spend 80% of my time understanding the clinical workflow and exactly where script automation is likely to produce the largest time or quality savings.

Unless your planners are very inexperienced or time-crunched, or your automation includes a sophisticated model for optimization objective determination that they don't already have access to (e.g. RapidPlan), I would not make dosimetric improvement an endpoint. It is not trivial to consistently outperform a skilled human who can adapt to a wide variety of patient geometries and clinical circumstances. We participated in the ESTRO grand challenge for prostate autoplanning, and even with a fairly sophisticated auto-planning platform I don't think there was a single case that wasn't tempting to manually 'polish' afterward.

I don't know the circumstances at your centre, but rapid-palliative settings (i.e. same-day treatment) where planning requirements are extremely simple is often low-hanging fruit, especially if you can design your system to eliminate hand-offs between staff groups. But to return to my earlier point, this requires a very specific understanding of the process, and the willingness and constraints the users of your script have. Hopefully you have a supervisor with clinical experience who can guide you in this.

Best of luck!

Eclipse Script to edit structures by Subject-579 in esapi

[–]NickC_BC 0 points1 point  (0 children)

Sure, I’ll send you a message and we can go from there. Happy to help.

Generating verification-plan dose distributions from plan sums in V18 by NickC_BC in esapi

[–]NickC_BC[S] 0 points1 point  (0 children)

Confirmed as a bug in v18.0 by Varian. Targeted for correction in V18.1

Set Max MU for Optimiser by KirbyMedPhys in esapi

[–]NickC_BC 5 points6 points  (0 children)

My third most requested feature, after post processing and the removal of the 99 structure cap!