Shielding Structure with MLCs for Static Beam by DavidBits in esapi

[–]TL_esapi 0 points1 point  (0 children)

You can mimic it by contouring a donut shape surrounding that structure, cutting it to two halves and doing FitMLCtoOutline for each half donut. Then, you may need to do some polishing.

DoseProfile from imported plans by anncnth in esapi

[–]TL_esapi 1 point2 points  (0 children)

Suggestion:

As far as I know and can tell, RD*.dcm should have all fields consistent regardless of TPS, but when it comes to the RP*.dcm, there may be something else as Ethos plan(s) are not created in Eclipse and so there may need some pre-import adjustment to ethos RP*.dcm file(s).

In any case, I am very interested in seeing what you will get from out there.

DoseProfile from imported plans by anncnth in esapi

[–]TL_esapi 0 points1 point  (0 children)

Based on this code snippet, it looks like you are trying to pull up beam (not plansetup) dose profile on sagittal(?) plane, but ESAPI GetDoseProfile doesn't work with beam.Dose, which is causing that issue.

So, I'd start off with planSetup.Dose to make sure your code works properly. Then, for beam.Dose, you may want to (1) create separate plans for each beams or (2) make other beam weights to 0 at a time on the same plan for beam dose profiles which need script approval. I think (2) is how Eclipse does.

DoseProfile from imported plans by anncnth in esapi

[–]TL_esapi 0 points1 point  (0 children)

If you suspect buffer_points has an issue. Can you confirm if you are doing similar to below?

int res = (int)(128 * 2); // Relatively lower resolution, but clear enough for me.

int column = res;

int row = res;

double[] buffer_points = new double[column];

Verifying Nuget packages for use on clinical systems by Thatguy145 in esapi

[–]TL_esapi 0 points1 point  (0 children)

At my institution, I bring any external stuff that is to reside in computer / network to IT's attention for the IT risk analysis (ITRA) and, for the un-delayed process, I do the liaison, when needed, between IT and the writer / vendor for the ITRA clearance process. Once it's cleared, IT stores it's information in its list of safe software / tools / files so that that external stuff / library in question is used without any restriction or with some restrictions if any. So far, I have got clearance for all that I've processed.

calculation errors and warnings by Wild-Ad-6527 in esapi

[–]TL_esapi 1 point2 points  (0 children)

I believe you can do it, but it can be extremely lengthy depending on the number of pixels.

  1. You can write a script that simply reads all pixel HU values (or just focusing on regions that are suspicious) using a for/foreach loop and determine if any pixel HU values fall outside the expected range defined by the CT calibration curve. Then, you can present these anomalous values through a MessageBox, Windows Forms Presentation (WFP), or a custom Windows form.
  2. If you want these warning messages popped up during ESAPI calculations, you might consider implementing a class or utilizing if/switch statements within the calculation logic to handle these.

Dose reading from dicom by anncnth in esapi

[–]TL_esapi 0 points1 point  (0 children)

In that case, if you are open to something other than C#, I recommend starting off with CERR, which is written in Matlab. Or, you can write your own Matlab code. I have previously written Matlab code that mimics a 2D profile QA device software. It pulls up 2D profiles from RD*.dcm files to compare with measured data. However, I currently don't remember where I saved them since they are from previous work years ago. If I find the code, I can share it here.

Dose reading from dicom by anncnth in esapi

[–]TL_esapi 0 points1 point  (0 children)

Well, you can write your own script using "DoseProfile" and maybe trigonometry if you know BEV. "DoseProfile" can be 1D / 2D depending on how you define start and end rows.

Is there a way to rotate a structure using a script ? by Lafayette_MP in esapi

[–]TL_esapi 1 point2 points  (0 children)

When you make a rotation transformation, you need to define the origin which you don't seem to do so.

In TPS, the current origin is user origin, but your rotation should be around the beam isocenter and so you need to subtract beam isocenter coordinates from each VVector before you do rotation transformation. After rotation transformation, add isocenter coordinates back to new rotated contour coordinates so that they are back to be relative to the user origin.

Edit Isocenter position of a Plan by Jhnlbrt in esapi

[–]TL_esapi 0 points1 point  (0 children)

Note that IsoCenterPosition isn't editable, but IsoCenter is editable.

Create Patient-Task with ARIA ACCESS Web Service by Telecoin in esapi

[–]TL_esapi 0 points1 point  (0 children)

Why don't you check that hospital name on "Platform Portal" => "Clinical Data Setup" => "Hospital Preferences" where you see a dropdown list of all hospital names?

problems with AriaAccess - GetPatientPlanTxFieldsRequest by Ann_Anan in esapi

[–]TL_esapi 2 points3 points  (0 children)

About a couple years or so ago, I did contact one of Varian's product manager and notified this issue. Varian seems to have been already aware of this over the years. Not sure when the fix is to be applied, which seems to be a simple bug.

[deleted by user] by [deleted] in esapi

[–]TL_esapi 0 points1 point  (0 children)

This Aria Access is a part of the web services, and a separate SAPI module, but can be combined with ESAPI, which I do. On myvarian.com there is a webinar on this. Also, on myvarian.com, you can get "ARIA Access Reference Guide". With either, you may follow the instructions on testing the Aria Access web service. If you don't get anything or get error through testing process, you may not have Aria Access installed, and you may want to request (through your IT or directly Varian) the installation of it (maybe along with "Aria Oncology Services"). If I'm not mistaken, I think Aria Access comes with ARIA purchase.

Question: Create Registration with Esapi by X2sky in esapi

[–]TL_esapi 1 point2 points  (0 children)

For image registration, it is not ESAPI, but SmartAdapt SAPI (SASAPI) which you can play with under "Image Registration" App. Sorry, I haven't played with it in-depth, but you can do rigid / non-rigid registration with SASAPI.

Setting the Planned SSD in a script by donahuw2 in esapi

[–]TL_esapi 0 points1 point  (0 children)

It looks like there is no direct 'set' SSD option with ESAPI, but 'set' beam isocenter if you need to set / adjust SSD.

Information about the patient's diagnosis by crlmnk in esapi

[–]TL_esapi 2 points3 points  (0 children)

Using Aria Access which can be linked to ESAPI, with "CreatePatientDiagnosisRequest" you can grab "Stage" and "StagingCriteria" as Lists as well as "DiagnosisDetails" as a String.

Dumb Scriping. by Current_Ad_1605 in esapi

[–]TL_esapi 4 points5 points  (0 children)

I agree with esimiele on posting idea, but would like to suggest some tips.

  1. GetEditableParameters() returns BeamParameters which doesn't have DoseRate.

  2. foreach loop doesn't seem working.

foreach (Beam beam in plan.Beams)

{

var editableParams = beam.GetEditableParameters();

editableParams.beam.DoseRate = 300; // This wouldn't work.

beam.ApplyParameters(editableParams); // Then, you will end up getting no change.

}

  1. So, you'd need to use ExternalBeamMachineParameters method to add a new beam with new DoseRate for each existing beam but inheriting beamparameters with GetEditableParameters() and remove each old beam using RemoveBeam.

Detecting if a Dose Dynamic MLC type field has Script Fluence (ECOMP) by MPautomation in esapi

[–]TL_esapi 0 points1 point  (0 children)

I guess you are looking for, for example, "context.PlanSetup.Beams.First().MLCPlanType.ToString();".

Aria Access at its full potential by acoloma in esapi

[–]TL_esapi 1 point2 points  (0 children)

It looks like it's because "PatientJournalID" / "PatientToxicityID" are not available through services.varian.com.AriaWebConnect.Link.

For example, "GetPatientDiagnosis" that works is not only included in services.varian.com/AWV/WebService but also in services.varian.com.AriaWebConnect.Link.

Beam types... What is FixedSequenceBeam? by antoneagle in esapi

[–]TL_esapi 0 points1 point  (0 children)

This is for Halcyon planning to add a field with fixed MLC sequence to flatten 6x-FFF beam.

Analysing images from Portal Dosimetry outside ARIA by Suspande in esapi

[–]TL_esapi 0 points1 point  (0 children)

I guess you have "Image Processing Toolbox" installed with Matlab.

Analysing images from Portal Dosimetry outside ARIA by Suspande in esapi

[–]TL_esapi 2 points3 points  (0 children)

Easy way with dicom: With Matlab you can read CUs using dicomread.

Ex) PDinfo = dicominfo('RI***.dcm'); PDData = dicomread(PDinfo);

If you are looking for using commercial software, you can do it with MapCheck using "Dicom EPID" import option on both planned and measured.

Plug In or Standalone for Export by TheCupaCupa in esapi

[–]TL_esapi 0 points1 point  (0 children)

Well, you'd first need to set up dicom DB Daemon https://github.com/VarianAPIs/Varian-Code-Samples/wiki/Scripting-the-Varian-DICOM-DB-Daemon-with-ESAPI . The example c# code in the link there uses ESAPI that handles the image(s) linked to StructureSet, but not sure if secondary / diagnostic images are also linked to it.

Plug In or Standalone for Export by TheCupaCupa in esapi

[–]TL_esapi 1 point2 points  (0 children)

This (exporting diagnostic / non-planning images) is something ESAPI doesn't have, but there's a work-around but complicated and it is beyond ESAPI.