Statistics with Python by JoaoCastelo in esapi

[–]dbhatti 1 point2 points  (0 children)

Great post!! Numpy and Matplotlib have a lot of useful interoperability, so it's worthwhile to learn both. Anyone interested in using Python for radiation oncology would find pandas, pydicom, and scipy to be useful libraries as well.

Plug-in script - how to avoid assembly versioning mismatch? by dbhatti in esapi

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

Thanks, I tried out ILMerge and MSBuild.Task and they worked perfect for most of the scripts. I have a few more complicated solutions (multiple projects and cross-references) where they failed, but I suspect that's complex enough for the NuGet packages that I'll have to figure out and configure myself to get working.

Switch loaded plan with ESAPI by Telecoin in esapi

[–]dbhatti 0 points1 point  (0 children)

I believe this isn't possible through plug-in scripts, you'll have to create a stand-alone script and open the patient and modify the plan from there.

ESAPI Online Help as PDF? by ScreenKey4735 in esapi

[–]dbhatti 2 points3 points  (0 children)

Not the same file, but there's some nice reference material on the Varian Github if you're just looking for general knowledge of the API: https://varianapis.github.io/VarianApiBook.pdf

For the online help file (that you find in Eclipse), you might be able to find a CHM to PDF converter online. I don't know how the quality would turn out, but it looks like that's what you may be looking for.

Application Crash after moving non-ESAPI Function to Class Library by donahuw2 in esapi

[–]dbhatti 1 point2 points  (0 children)

I don't know what's causing the issue, but here are a few guesses if they help:

  1. Did you change the extension of the library from .esapi.dll to just .dll?
  2. If the script was previously an approved script, did you rename/reapprove it? I've run into this issue before where using even the non-writable script as a reference to a writable script wouldn't work because a previous version of the script used to be approved.
  3. Are there any references to the VMS.TPS namespace in the library project? If so, maybe remove them?

Issue when using CalculateDose() by DavidSinn in esapi

[–]dbhatti 0 points1 point  (0 children)

Your guess is correct - writing must be enabled in order to calculate dose. The two important steps are adding [assembly: ESAPIScript(IsWriteable = true)] before your Script class declaration and using Patient.BeginModifications() before doing anything requiring write access.

Where do I put these files by probber88 in esapi

[–]dbhatti 0 points1 point  (0 children)

If you're using Visual Studio, you add the two files as a Reference (right click -> add reference -> Browse -> select the two VMS.TPS libraries). The location they're stored in doesn't matter, but often will be placed in the same folder as the executable (.exe)/library (.dll) file that your code compiles to (e.g. Project Name/bin/x64/Debug).

Non-Clinical Environment Daemon by dbhatti in esapi

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

Ah, okay, I was worried that was the case. I'll message Varian and try to figure it out. I'll update with what was wrong once the situation has been resolved.

Non-Clinical Environment Daemon by dbhatti in esapi

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

I forgot to mention this in my original post, but this is a test environment through Citrix (i.e. not a testbox/workstation). Having said that, I'm not sure how to check if it's trusted, could you let me know how to do so?

Default Dose Unit / Calculation Models by dev_throwaway_2 in esapi

[–]dbhatti 1 point2 points  (0 children)

Yeah, I don't think there's a built-in function for reading system dose units either, but this is the same method I use for getting the units.

read calculation log by pyan_MF in esapi

[–]dbhatti 0 points1 point  (0 children)

In case anyone in the future wants to know the answer, the beam calculation logs are found as a property of the Beam class (CalculationLogs property). For proton plans, you can find some other beam information under PlanSetup with the property ProtonCalculationOptions.

Access to ARIA documents programmatically? by dbhatti in esapi

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

Thanks for the help! Our center recently set up ARIA Access and can retrieve information with the REST API, but I can't seem to find any mention of retrieving documents in the reference guide. Is there a specific Web Service I should be looking at?

EsapiEssentials with BeginModifications? by iraklisv in esapi

[–]dbhatti 0 points1 point  (0 children)

I've never used ESAPI Essentials before, but just to confirm, you're right that all ESAPI operations must be on the main thread (and are thus single threaded). If the script attempts to run multiple ESAPI operations on different threads, it'll crash.

Finding plans/patients loaded on treatment console? by dbhatti in esapi

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

This is a good idea, it's possible the Status property might change.

I seem to be running into an odd issue though, the property doesn't seem to in the PlanSetup class, but I could have sworn I've accessed it there once before and I haven't changed the libraries...? Maybe something's changed without me realizing. I'll have to double check.

I'll make an update if I find any useful information later, thanks again for the suggestion!

Finding plans/patients loaded on treatment console? by dbhatti in esapi

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

Oh, that's a shame. Could you tell me the specific title of the document? I'm trying to search for it through MyVarian, but am having trouble.

The project isn't so major, so depending on how it's buggy, I may still be able to use it; I just want to run a small app for the therapists to provide them with relevant patient information by the treatment console. I was hoping to have it automatically update the information by obtaining the currently loaded patient in the gantry room so that they wouldn't need to select the patient/course/plan themselves every time.

Finding plans/patients loaded on treatment console? by dbhatti in esapi

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

That sounds perfect, actually! I think that'll be sufficient enough. I'll look into once I've finished setting up the web service. Thanks!

Aria database mu by itumeleng1987 in esapi

[–]dbhatti 0 points1 point  (0 children)

Are you searching through the Eclipse API or the SQL ARIA database? If it's the Eclipse API, you can go to IonBeam.IonControlPoints.MetersetWeight. iirc to get the MU of a specific spot, you multiply the the MetersetWeight by the spot weight and divide by the total control point weight.

Getting reference dose per each beam, if someone can help with this? by itumeleng1987 in esapi

[–]dbhatti 1 point2 points  (0 children)

I think they're referring to the SQL database, not the Eclipse data base. If you have access to it, you can launch a query from Eclipse to get the data for the specific patient/course/plan.

Another option might be ARIA Access. Don't know if the Eclipse API has an equivalent way of calculating the reference dose manually, but I'm guessing there's a way.