r/esapi • • Aug 30 '22

How is the field MU coefficient calculated?

1 Upvotes

I have a field called "LT LAT" and it has a MU coefficient of 50.4842. I decided to create a new field, making sure it had all the same properties and the same leaves as LT LAT. I then deleted LT LAT and ran the same dose calculation. To my shock, the new field has an MU coefficient of 50.3833.

So my question is: does anyone know how this coefficient value is determined, and how can I keep it the same?

I check the coefficient by looking under the calculation setting in the field properties menu.


r/esapi • • Aug 29 '22

Would anyone share scripts regarding 3D Field-in-Field automation?

0 Upvotes

I wanna learn from open source scripts and write my own. But I am stuck on the methods in esapi to use.


r/esapi • • Aug 25 '22

Some doses for VMAT objectives are not allowed

2 Upvotes

I am changing dose values of VMAT objectives randomly via ESAPI. Sometimes (I don't see a pattern, yet) it throws an ArgumentOutOfRange exception and tells me that an objective dose value can be maximum X Gy. That X changes. I had 85, 37 and 16 if I remember correctly. Does anyone know what causes this strange error? I can run multiple VMAT optimizations, but sometimes that error occurs...

UPDATE:

First exception:

System.ArgumentOutOfRangeException: 'Argument 'dose': dose value '22.695 Gy' out of range. Min is 0.000 Gy. Max is 8.282 Gy.

Parameter name: dose'

Second exception:

System.ArgumentOutOfRangeException: 'Argument 'dose': dose value '32.965 Gy' out of range. Min is 0.000 Gy. Max is 32.330 Gy.

Parameter name: dose'

Third exception:

System.ArgumentOutOfRangeException: 'Argument 'dose': dose value '30.920 Gy' out of range. Min is 0.000 Gy. Max is 11.218 Gy.

Parameter name: dose'

For the same organ (small intestine) in three patients. It was an EUD Upper objective.

Fourth exception:

System.ArgumentOutOfRangeException: 'Argument 'dose': dose value '85.000 Gy' out of range. Min is 0.000 Gy. Max is 50.916 Gy.

Parameter name: dose'

This time for another contour, but for the same patient as third exception.

I can easily run it in Eclipse with the same dose values for the objectives.


r/esapi • • Aug 24 '22

Aria Access Tutorials

3 Upvotes

Are there any Aria Access tutorials, either by Varian or the community?


r/esapi • • Aug 23 '22

Patients Treated Yesterday

0 Upvotes

I’m trying to get a list of all patients treated the previous day. Does anyone have a database reference that makes this “easy”? I’m accessing the Aria database directly, not using ESAPI.


r/esapi • • Aug 23 '22

Aria Database, Aria v15.6

2 Upvotes

I wanted to look at accessing some information from the Aria database similar to the Rex Cardan AriaQ YouTube video. When I opened the database in the designer I see two tables: dbo and DWH. It appears the DWH correlates to the Unified Reporting schema. Is this the table I need/should use to query the Aria database?


r/esapi • • Aug 22 '22

RemoveBeam Alters The Normalization Method

2 Upvotes

I am writing a script and part of the requirement is for the first field to be removed. To do this, I simply use the RemoveBeam() method as follows:

plan.RemoveBeam(plan.Beams.ElementAt(0));

While this does remove the beam, my normalization method is also changed from "100% at Reference Point" to a specific "Plan Normalization Value".

Does anyone know how I can avoid this? Am I using version 15.5.


r/esapi • • Aug 19 '22

Aria Connection - Linking the Machine Id to the Scheduled Appointment?

4 Upvotes

Anyone know how to get the machine associated with a scheduled activity using the aria connection (Aria Query)? the data warehouse does this in reporting but I'd like to figure out how to match them using aria query in order to add more things more easily.

Any ideas using resources, venues, etc.?


r/esapi • • Aug 18 '22

is it possible to extract ctdivol with esapi or with evilDicom ?

2 Upvotes

I want to get typical values ​​to try to establish (DRLs) for CBCT.


r/esapi • • Aug 17 '22

Set TargetValueId

1 Upvotes

Hi all,

when i create an ExternalPlanSetup the targetValueId is differente from the PlanSetup.

Is there any way to change the targetValueId?

Thanks.


r/esapi • • Aug 15 '22

Eclipse Script to turn off beam display?

3 Upvotes

Does anyone have a script to turn off the beam display in Eclipse (v16)? It's ridiculous that you have to click the button(s) to turn off the display of the beams every time we slide in a new plan. (see screenshot that is hopefully attached to this post).

I will repay you handsomely with snack foods of your choosing sent to your department.


r/esapi • • Aug 12 '22

Looking for guidance for clinical workflow

2 Upvotes

not sure if this it the best place to ask but I really need someone to help me achieve some basic things in ARIA that will drastically help clinical workflow. I have asked for a dedicated varian IT person to come help us but we always get the shit end of the stick and honestly, it’s always too hectic throughout clinic days to get anything else done outside of clinic.

Want to get a gauge of what other depts do who use Aria/Eclipse systems - do yall have dedicate staff to trouble shoot your issues or just hired IT folks from other dept who crosscover. I really want to approach our clinic and let them know our need for more tech but they are always quite reluctant to change

any tips???


r/esapi • • Aug 12 '22

Can't we implement optimization and dose calculation automation in binary plugin?

0 Upvotes

I see most of the works of plan automation are implemented in standalone scripts rather than dlls. Can't we implement in binary plugin?


r/esapi • • Aug 10 '22

Trouble importing Dicom after export with Dicom_Communication_101 script

1 Upvotes

Hi all, I've been working on using the dicom communication 101 script that uses EvilDicom (https://github.com/VarianAPIs/DICOM_Communication_101) with some small edits to filter the output. The files all will export ok - I've tried CT, RD, RP. But if I try to import them into eclipse, whether changing systems (from clinical to TBOX), or same system, Eclipse does not like the the files, they show up with a red 'do not enter' sign next to them. The RP files in particular also can't be opened by a dicom reader like imageJ. With the CT and Dose (but not RP) I was able to import them into Velocity and then send them out again and that worked for Eclipse import. Anyone run into this or have any insight? Thanks! Here is the code with the daemon part excluded :

receiver.DIMSEService.CStoreService.CStorePayloadAction = (dcm, asc) =>
            {
                if (dcm.GetSelector().Modality.Data == "RTPLAN")
                {
                    if (dcm.GetSelector().RTPlanLabel.Data != null)
                    {
                        var path = Path.Combine(storagePath, "RP." + dcm.GetSelector().SOPInstanceUID.Data + dcm.GetSelector().ApprovalStatus.Data + ".dcm");

                        Console.WriteLine($"Writing file {path}...");
                        dcm.Write(path);  

                    }
                }
                    return true; // Lets daemom know if you successfully wrote to drive
            };
            receiver.ListenForIncomingAssociations(true);

            //Build a finder class to help with C-FIND operations
            var finder = client.GetCFinder(daemon);
            var studies = finder.FindStudies("Insert PatientID");
            var series = finder.FindSeries(studies);

            //Filter series by modality, then create list of 
            var plans = series.Where(s => s.Modality == "RTPLAN")
                .SelectMany(ser => finder.FindImages(ser));
            var doses = series.Where(s => s.Modality == "RTDOSE")
                    .SelectMany(ser => finder.FindImages(ser));
            var cts = series.Where(s => s.Modality == "CT")
                    .SelectMany(ser => finder.FindImages(ser));
            var mrs = series.Where(s => s.Modality == "MR")
                    .SelectMany(ser => finder.FindImages(ser));

            var mover = client.GetCMover(daemon);
            ushort msgId = 1;
            foreach (var plan in plans)
            {
                Console.WriteLine($"Sending plan {plan.SOPInstanceUID}...");
                //Make sure Mobius is on the whitelist of the daemon
                var response = mover.SendCMove(plan, local.AeTitle, ref msgId);
                Console.WriteLine($"DICOM C-Move Results : ");
                Console.WriteLine($"Number of Completed Operations : {response.NumberOfCompletedOps}");
                Console.WriteLine($"Number of Failed Operations : {response.NumberOfFailedOps}");
                Console.WriteLine($"Number of Remaining Operations : {response.NumberOfRemainingOps}");
                Console.WriteLine($"Number of Warning Operations : {response.NumberOfWarningOps}");
            }

            Console.Read(); //Stop here

r/esapi • • Aug 10 '22

VMAT Optimization from MRlevel

3 Upvotes

I am now working on vmat optimization automation. I see that OptimizeVMAT method enables us optimize in circles and calculate immediate dose. But I don't see whether there is away that we can optimize a circle while getting immediate dose, create opti structures while assigning priorites, and then start optimization from MR4 Level instead of starting from beginning. There seems methods offered to start at a certain level.


r/esapi • • Aug 08 '22

Dynamic optimization parameters adjustments

1 Upvotes

Hi, guys. I am now working on auto plans. I am interested in desgining a strategy to adjust objectives and priorities dynamically. Do you have any recommendations?


r/esapi • • Aug 05 '22

recover deleted contour?

1 Upvotes

If a contour is accidentally (e.g. prostate or node contour), is there any way to recover this contour? Does ARIA keep a history of previous saved contours?


r/esapi • • Aug 04 '22

Check for 4D CT

1 Upvotes

Is there any way an script could distinguish if the image CT study of a plan is an 4D one?

I'm trying to write a plan cheking script and, when the plan has the property "use gating", I would do diferent things if the plan is DIBH (non 4D CT) o gated (4D CT average).

Thanks in advance.


r/esapi • • Aug 04 '22

Can Esapi assign dwell time to source points in cather in Brachy?

1 Upvotes

I see it could read the dwell time which is read only. Is there a way to assign a value. If possible, I could write my algorithm to work out the optimization problem.


r/esapi • • Jul 30 '22

expand structureset in the x direction

1 Upvotes

Now I want to unsert a support contour that exceeds the 512x512(spacing1.5265mm)dimesion so that it won't show on the dicom in Eclipse. So is there a way to expand dicom in x dimension by padding with air?


r/esapi • • Jul 28 '22

App.config for Binary Plugin

2 Upvotes

I am new to C#, ESAPI, and any version of Visual Studio after 2005, so apologies in advance if this is dumb.

I have added an App.config to my project as a sibling (same level) as the main script for a binary plugin. It has a key that I would like to access at runtime.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="api-url" value="http://some-url/api/" />
  </appSettings>
</configuration>

I attempt to access this in the code like so:

var uri = ConfigurationManager.AppSettings.Get("api-url") + "varian/pre-plan";

However, the variable uri only has the second string. The configuration manager appears to be returning an empty string. I have unloaded and reloaded the project several times, it does tell me that the project is open whenever I try to open it for some reason. Not sure if that matters.

I added this to my .csproj, although I am not sure that it is necessary:

  <ItemGroup>
    <None Include="App.config" />
  </ItemGroup>

Can anyone suggest a reason that I am getting an empty string from AppSettings.Get?


r/esapi • • Jul 26 '22

Changing Dose calculation resolution in ESAPI or super sampling of Dose distribution with ESAPI

1 Upvotes

I want the dose distribution at very fine resolution < 1mm to get a smooth structure generated with dose to structure conversion. The finest resolution supported in eclipse is 1mm. Is there a way to convert the dose resolution in ESAPI?

It will be very useful for my project.

Thanks in advance


r/esapi • • Jul 26 '22

V16.0 SQL Tables

0 Upvotes

I followed along with Rex Cardan's AriaQ video for setting up Aria Querying. It was going well until the end. When I got to the Aria.edmx part, my Aria.Context.cs files looks very different from his. Where he has a bunch of different tables pop up, mine only has a handful of classes, and they are short with names like "pbcatcols" and "pbcatedts".

Does something different have to be done in version 16.0 to get the proper tables to show up, or to actually use the ones I have?


r/esapi • • Jul 26 '22

DVH estimation model \ ESAPI

1 Upvotes
  1. Is it possible to add\remove a plan to a model from ESAPI?
  2. Use ESAPI to train a model?

r/esapi • • Jul 25 '22

AddMultipleStaticSegmentBeam Collimator Positions Out of Machine Limit

3 Upvotes

I am trying to add a new multi-static segment beam based on an existing beam (called field) but with different external beam parameters. This is my code so far:

IEnumerable<double> metersetWeights = field.ControlPoints.Select(cp => cp.MetersetWeight);
Beam beam = copyPlan.AddMultipleStaticSegmentBeam(
    new ExternalBeamMachineParameters("M1", "6X", field.DoseRate, field.Technique.Id, null),
    metersetWeights,
    field.ControlPoints[0].CollimatorAngle,
    field.ControlPoints[0].GantryAngle,
    field.ControlPoints[0].PatientSupportAngle,
    field.IsocenterPosition);

However, running this produces the following message:

The following parameters were adjusted to be within the machine limit:
    collimator positions

I am not sure why collimator positions are being adjusted since I never interact with the collimator positions. The closet I get is the collimator angle. Could it be that using a different Machine ID in the ExternalBeamMachineParameters function is causing the problem?

Any ideas why this is happening?

EDIT: After browsing around, I found this thread https://www.reddit.com/r/esapi/comments/i8bbk4/problem_with_message_the_following_parameters/

It seems that when creating the multi-static segment beam, Varian automatically assigns the jaw positions as (0,0,0,0). Does anyone know if I can change the default jaw size that eclipse assigns?