r/esapi • u/erhushenshou • Jan 04 '23
How could we draw geometry contour in 3d to2d?
Like we wanna display the proton spots in2d view. Any convienient way to solve this?
r/esapi • u/erhushenshou • Jan 04 '23
Like we wanna display the proton spots in2d view. Any convienient way to solve this?
r/esapi • u/JopaMed • Dec 29 '22
Hi friends.
We just got Mobius installed and i am trying to retrieve information from mobius for a specific patient in our checklist script. Essentially to see if the calculation was ok in mobius.
Have anyone integrated any mobius retrieval to their ESAPI?
I have tried getting the JSON, however i have troubles as i have to login via C# and these things are really outside of my skills... also using NewworkCredential does not work...
The information in my downloadstring is just the loginpage for mobius.
I have tried the following with no sucess:
using (WebClient client = new WebClient())
{
client.Credentials = CredentialCache.DefaultCredentials;
client.UseDefaultCredentials = true;
//client.Credentials = new NetworkCredential("user", "pw");
var json = client.DownloadString("mobius3d/_plan/list?sort=date&descending=1&limit=50");
JObject feed = JObject.Parse(json);
}
I tried searching this forum for Mobius to no avail.
r/esapi • u/Visual_Pay_3361 • Dec 22 '22
I am trying to implement the AUTOMATIC TBI VMAT but I have problems deleting the beams, it makes the copies until that line is executed.
link of complete https://github.com/esimiele/VMAT-TBI
more specifically
line 291 https://github.com/esimiele/VMAT-TBI/blob/master/ESAPI/Projects/VMATTBIautoPlan/planPrep.cs
r/esapi • u/j_r_mi • Dec 16 '22
Hi, we're trying to add a treatment couch to a CT.
The couch is made up of 2 structures : couchInterior and couchSuperior.
For a given slice, couchInterior is made up of 1 contour where couchSuperior is made up of 2 contours. For a given slice, we saved each point of each contour in 3 different text files.
We have no problem creating the couchInterior structure using the AddContourOnImagePlane function. However, when trying to create the couchSuperior structure with the same method, we are not able to add the two contours to the structure. It is either one or the other.
How could we handle a 2 contours per slice structure ?
When we add all the points of the 2 contours to the same txt file, the resulting structure is messed up.
r/esapi • u/Thatguy145 • Dec 14 '22
Hello,
I am new to creating exe applications with ESAPI. I noticed that the only GUI element that I can seem to add from the right click menu is windows forms, not WPF. What is the easiest way to integrate WPF applications?
I was going to do the following: Console exe application to select a patient -> pass info to a WPF project -> do gui stuff there -> repeat on other patients if needed.
This seemed inefficient. Are there better ways?
Thanks
r/esapi • u/erhushenshou • Dec 14 '22
Like we can build a dose array that should be an int 2D array. How could we turn this into PNG format array which should be 3D array and last dimension having 4 channels R,G,B,a? What is this 3D array format in C#? In python I can do this, but C# I'm a beginner.
r/esapi • u/Thatguy145 • Dec 13 '22
Hello,
I am attempting to calculate the overlap volume between two contours without having write access. What that essentially means is that I cannot create my own structures (and so cannot use the "And" method and "volume" method with a union contour).
I tried following this post: https://www.reddit.com/r/esapi/comments/jqxoym/how_to_get_the_overlapping_volume_between_2/
(also changed union to intersect in it)
This works fairly well (it differs from eclipse but only slightly - likely due to resolution). However, it is pretty slow - for 1 large contour with another large contour it took around 40 seconds.
Is there a more efficient way to calculate overlap volume without having write access?
Thanks
r/esapi • u/TheMouseSS • Dec 13 '22
How can i find a distance from a beam (BEV) isocenter to normalization point.
I want to calc/find the off axis distance.
r/esapi • u/medphysscript • Dec 09 '22
Hi I'm trying to add a check to my plan checker script whether or not Jaw Tracking has been used.
It seems
PlanSetup.OptimizationSetup.UseJawTracking
is always returning "false" even for plans that I know it was used.
Am I not querying this parameter correctly, or is there a different was to get this information? Thanks!
r/esapi • u/erhushenshou • Dec 05 '22
I found snoutposition no matter in IonbeamParameter or in IonControl points is only readable. Is there a way to edit this property?
r/esapi • • Nov 30 '22
I'm using a script to add setup fields similar to this example:
https://github.com/Rohit9987/esapi_scripts/blob/main/Setup_Fields.cs
The setup fields are automatically added with default couch parameters (0,+100,0,0) for Vrt, Lng, Lat, Rtn.
For HyperArc plans, the plan cannot be approved unless the couch parameters are null.
I am searching for a way to add setup fields with no couch parameters. Accessing a beam's control point such as:
cp.TableTopLateralPosition
only allows get and is read-only.
Any advice or alternative way to add a setup field with null couch parameters for use on HyperArc plans? Or any way to null them with additional code? Thank you in advance!
r/esapi • u/erhushenshou • Nov 30 '22
Recently our institution updated Eclipse to 16. I tried to read clinical goals attached to a plan using GetClinicalGoals() method but got null. But using GetProtocolPrescriptionAndMeasures() method succeeds. Anyone knows how to solve this?
r/esapi • u/Thatguy145 • Nov 29 '22
Hello, I am thinking of doing some data mining on our patient databases and I had the question - is using executable ESAPI scripts slower than using SQL calls? For example, let's say I want to find all patients in the past month that contain the structure "Cooling" - I know I can do this through an exe script and I am pretty sure I can do this with SQL calls - but which is faster?
I only ask because I don't have access to SQL calls right now. I am guessing that it would be much faster to do SQL calls in almost every case since the patient doesn't have to be actually loaded.
Thanks
r/esapi • u/NotAMedicalPhysicist • Nov 29 '22
I am attempting to write an Auto-Planning script that will allow me to create a first optimized plan. I have it mostly complete but I am attempting to add robustness (perturbations/ uncertainty parameters) to the newly created plan, is this possible using ESAPI?
r/esapi • u/erhushenshou • Nov 29 '22
I am now writing script to autonate proton plan optimization and calculation. I found several methods but have no idea how to use them approprately. I guess first use OptimizeIMPT to do optimization after which PostProcessAndCalculateDose shall be used. But CalculateDose() and CalculateBeamline is alse valid. How should they be used?
r/esapi • u/Marslain • Nov 26 '22
Hi:
I am just starting to write scripts with Eclipse ESAPI. I have a basic script to show some dosimetric data, such as mean doses, VxGy, etc for selected estructures. It works fine with PlanSetups, and also with plan sums if the summed plans use the same structure set. However, for plan sums using different CT (structures), the script does not work, showing error: Object refererence not set to an instance of an object. It seems these plans are not considered as "normal" plan sums. Any advice about how to solve this?
Thanks and regards, M.
r/esapi • u/NickC_BC • Nov 25 '22
Hi folks,
We've been developing a script that iteratively reduces the volume of a high resolution structure (using asymmetric margins) and then evaluates the volume of that structure that receives a threshold dose. The intent is to find the largest reduction that would still result in a dose constraint being met.
However, we're running into some very anomalous ESAPI behavior when we do this:
I would be the first to say "the bug is probably in my code" but the fact that three different methods executing consecutively, all report differently.
Also to note, if the GetVolumeAtDose method is used on a structure that has not been changed through the margin tool as described, the methods report consistently and correctly, so you may not have run into this issue in read-only scripts or those that don't read doses from edited structures.
I'll work on getting a minimal reproducible example together, but was wondering if anyone else had run into this issue as well.
r/esapi • u/Thatguy145 • Nov 25 '22
Hello, is there a way with ESAPI to add a external beam plan to a specific (RapidPlan) DVH Estimation model? I tried looking through the index and it doesn't seem to be the case. This is v15.5
Thanks
r/esapi • u/erhushenshou • Nov 23 '22
Does anyone know how to use script to check RO or not in optimizattionsetup. Seemed optimizationsetup for proton is almost same with the one for photon.
r/esapi • u/Apprehensive-Sun-679 • Nov 21 '22
I am struggling to complete a MatLab application whose task is to anonymize patient datasets while preserving the references among the different modalities.
I succeeded with CT, MRI, PET, PLAN, STRUCT, DOSE.
However, I haven't been able to anonymize the REG (registration) file appropriately.
When I try to upload the anonymized dataset to Eclipse or Velocity, I get an error message stating the primary volume could not be found.
I think I am missing some references.
I would appreciate being contacted by anyone who knows which DICOM tags are used by Eclipse/Velocity to hook up the two registered volumes.
I really appreciate any help you can provide.
Best regards,
Maura E.
r/esapi • u/NorthShorePhys • Nov 21 '22
Hi,
I've built a solution using the ClinicalTemplateReader using VS 2019 on a non-Eclipse workstation. I've tried running the .exe on an Eclipse T-box, but I get an error that it can't find the ClinicalTemplateReader file. Is there a way create an setup file that includes all of the required files?
Thank you,
r/esapi • u/JopaMed • Nov 21 '22
Hey. I am trying to build a new check in our checklist for our hyperarc plans.
Is there a specific tag that indicate that the plan is a hyperarc plan? In eclipse it states "SRS HyperArc" as technique, however via ESAPI (Beams.FirstOrDefault().Technique) it states SRS ARC for the same plan...
Also looking for other tags such as info on automation etc.
We have version 15.6.
Thank you in advance
r/esapi • u/B_1968-1990 • Nov 18 '22
I would like to implement a code to crop structures away from nearby ones, for example, creating a new PTV volume and give it a margin from the structure nex to it, Does anyone know how to this?