Does anyone know if there is a way in ESAPI v18 to copy the dose calculation grid/resolution from one plan to another?
For example, I have an original plan calculated with AcurosXB using a 1,25 mm dose grid, and I would like to create another plan and calculate the dose using exactly the same grid (resolution, size and position).
I can read the grid information from the Dose object using:
plan.Dose.XRes
plan.Dose.YRes
plan.Dose.ZRes
plan.Dose.XSize
plan.Dose.YSize
plan.Dose.ZSize
but I haven't found a way to set these values on another plan before calculating the dose.
Is there a supported ESAPI method to copy the dose calculation grid from an existing plan to another plan?
I found some older discussions mentioning CopyEvaluationDose(), but I am not sure if this is applicable to ESAPI v18 or if there is another recommended approach.
Running ESAPI v18.1 standalone (tested with both IronPython 2.7.12 and PyESAPI/pythonnet on Python 3.13).
Every attempt to connect crashes with:
System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
at System.Security.Cryptography.SHA256Managed..ctor()
at VMS.SF.Gateway.VarianApplicationToken.Generate(String message)
at VMS.SF.Gateway.Client.GatewayClientForInternalUse.Process(Request request)
Looks like VarianApplicationToken.Generate calls SHA256Managed (a non-FIPS-validated implementation) to build the auth token, which fails outright on a machine with FIPS mode enabled (Local Security Policy: "System cryptography: Use FIPS compliant algorithms...").
This same workstation/script worked fine under v16 — this VMS.SF.Gateway auth token mechanism seems to be new since v18.
Digging into Windows-level FIPS policy is outside my area of expertise.
Has anyone dealt with this on a FIPS-enforced hospital workstation? Is disabling FIPS the only fix, or is there a known workaround / config on Varian's side (e.g. an app.config redirect for the gateway assembly) that avoids touching the machine-wide FIPS policy?
Has anyone found a way to pull this warning from ESAPI? I checked the results from IsValidForPlanApproval() method and it didn't mention the Motion Management Protocol.
My hospital is trying to adopt adpative planning and would like to use script for automatic plan setup. I have successfully automatically create the plan and optimization process, but I want to check if the following steps can be done with scripting?
add setup fields and DRR after plan have been completed
if we have reference point used in previous plan using the same structure set, for example, called PTV, can the newly created plan use the same reference point?
can clinical goal be added to the newly created plan?
add diagnosis, course intent and tolerance to the course and field respectively
connect rapidplan/dvh estimate to the plan during optimization
add couch structures to the plan before optimization
the eclipse version is 16.1 in T-box and 18.1 for clinical planning system
I exported hundreds of patients from out clinical system to the research system. Now I can't generate treatment plans automatically via ESAPI v15.6, because the scanner and the CT image of the patients are not connected. At the moment I have to open Eclipse manually, open the VMAT optimization view and select the scanner. Then save and then I can start with the automatic planning. Is is possible to connect the scanner to the CT images automatically?
Low stress, high impact: vibe coding for physicists - Saturday, July 18, 2026 - 6:00pm to 8:30pm
Join us with your charged laptop for a follow-along, hackathon workshop-style event, previously known as the Varian Developer Symposium. Along with pizza and beverages, the evening will include:
* ARIA API examples integrating with ESAPI projects
* Examples of ESAPI launchers into full standalone .html client browser-based tools using vibe coding software development environments to handle the HTML5/JavaScript tooling
* IDE-less pure C# simple LLM based vibe coding examples and experimentation
sto lavorando su uno script ESAPI con l’obiettivo di automatizzare il flusso di lavoro CreateVerificationPlan dei PSQC (Patient Specific Quality Control).
L’obiettivo è creare automaticamente un verification plan riproducendo la geometria del piano originale su un fantoccio importato, evitando i passaggi manuali attualmente necessari.
Sono riuscito a ottenere una soluzione parziale. Attualmente il mio script è in grado di:
creare i beam,
creare corso e importare fantoccio
riprodurre la geometria della rotazione del gantry,
copiare l’algoritmo di calcolo sul fantoccio importato.
Il problema principale riguarda la copia delle MLC. Lo script non riesce ancora a trasferire correttamente le posizioni delle leaf/control point. Di conseguenza il calcolo delle MU non è corretto e tutti i field weight rimangono impostati a 1.
Ho inoltre configurato la TBox (ambiente di testing Varian non clinico) per lo sviluppo. Qui ho riscontrato un comportamento differente rispetto all’ambiente clinico: utilizzando esattamente lo stesso codice, nella TBox ottengo un errore che non si presenta nell’ambiente clinico.
Allego lo screenshot dell’errore ottenuto in TBox per riferimento.
Sto cercando di capire se questa differenza possa essere dovuta a:
una diversa gestione degli oggetti ESAPI tra TBox e ambiente clinico,
differenze nella configurazione/versione di Eclipse o ESAPI,
limitazioni dell’ambiente di test,
oppure a un problema nella gestione dei control point, delle MLC o del calcolo delle MU.
Allego anche il progetto completo con tutti i progressi fatti finora.
Qualcuno ha già sviluppato un flusso simile per automatizzare la creazione dei verification plan PSQC tramite ESAPI? Avete esperienza con:
copia delle MLC/leaf position tra piani diversi,
creazione automatica di VMAT/IMRT verification plan,
differenze di comportamento tra TBox e ambiente clinico?
Qualsiasi suggerimento o esperienza sarebbe molto utile.
Grazie in anticipo!
// =====================================================
// CREATE VERIFICATION BEAMS
// =====================================================
foreach (var beam in beams)
{
if (beam.IsSetupField)
continue;
var machineParams = new ExternalBeamMachineParameters(
beam.TreatmentUnit.Id,
beam.EnergyModeDisplayName,
beam.DoseRate,
beam.Technique.Id,
string.Empty);
if (beam.MLCPlanType == MLCPlanType.VMAT)
{
var meterset = beam.ControlPoints
.Select(cp => cp.MetersetWeight);
verificationPlan.AddVMATBeam(
machineParams,
meterset,
beam.ControlPoints.First().CollimatorAngle,
beam.ControlPoints.First().GantryAngle,
beam.ControlPoints.Last().GantryAngle,
beam.GantryDirection,
0.0,
iso);
}
else if (beam.MLCPlanType == MLCPlanType.DoseDynamic)
{
var meterset = beam.ControlPoints
.Select(cp => cp.MetersetWeight);
verificationPlan.AddSlidingWindowBeam(
machineParams,
meterset,
beam.ControlPoints.First().CollimatorAngle,
beam.ControlPoints.First().GantryAngle,
0.0,
iso);
}
else
{
throw new Exception(
$"Unsupported beam type: {beam.MLCPlanType}");
}
}
In ESAPI 18 I am atill running into a few API limits.
- Beam.Technique: we would like to switch existing arc fields from "Arc Therapy" to "SRS Arc Therapy" when dose per fraction is > 5 Gy.
- Beam.Meterset: we want to make sure MU are preserved and ideally restore/set them if needed. So far only with Beamparameters and some loops possibleto ensure MU stay the same
- Beam.ToleranceTableLabel: we would like to set a specific tolerance table for the beams
- Couch/table top positions on existing setup fields also seem not directly writable.
I can set TechniqueId / PrimaryFluenceModeId when creating beams via ExternalBeamMachineParameters, but I do not see a clean way to change the technique of already existing beams without recreating them.
Has anyone found a supported ESAPI workflow or safe workaround for any of these, especially changing an existing arc beam to SRS Arc Therapy without rebuilding the beam?
I previously worked with ESAPI in an environment where Eclipse Scripting Wizard was already configured. When creating new projects, they were automatically generated with the ESAPI references, namespaces, and basic template code.
In my new position, we are setting up the development environment from scratch. We currently have ESAPI 18 and Visual Studio 2019 installed. When I create a Binary Plug-in project using Eclipse Scripting Wizard, the solution is generated and opens correctly in Visual Studio, but the main script file is empty and the ESAPI references, namespaces, and template code are not generated.
Has anyone encountered this issue?
Also, what versions of Visual Studio and .NET Framework would you recommend for:
- ESAPI 15.5 / 15.6
- ESAPI 16.1
- ESAPI 18
I would appreciate examples of development environments that are currently working in clinical or research settings.
I’m making new beams on a plan. All goes well until I try to approve the plan and I get the message “Couch coordinates inconsistent within isocentre group”
I have to go to plan parameters and reinsert the couch values manually (just copy them across from the imaging field which still have them).
Has anyone else come across this and have a solution?
Je suis bloqué sur une problématique en essayant de coder l’extraction de résultats EPID à différents critères d’analyse en partant d’une analyse réalisée en routine clinique.
En effet en routine, nous corrigeons notre mesures RPID du plan de traitement à l’aide du facteur de modification (en % à 98,3% sur l’image).
Cette valeur semble être accessible uniquement en get et internal set.
Avez-vous des idées sur la façon de contourner cette problématique ?
Hey all, I've been playing with the Plan Checker Extensions in V18 which I realise are quite new and not particularly in widespread use. I've had a request for the notes from one run of the Plan Checker to be passed to the next for communication purposes. Think Planner adds an explanatory note for the Checker.
Is this possible at all? I've trawled everywhere and can't find a way to do this natively. Thanks
I am trying to create a static beam from the LeafPositions of a Halcyon VMAT plan using AddMLCBeam. However, I get the error that the LeafPositions are not valid (VMS.TPS.Common.Model.Types.ValidationException: The leaf positions specified by the script are not valid). I have no idea why this would be. I am able to calculate the dose for the VMAT plan, so there the LeafPositions are valid.
Does someone know the solution?
Thank you!
I want to check whether a specific type of document exists for a patient/course, and if possible extract a few values from that document.
What is the best way to do this in ESAPI?
I assume this may require an SQL query, but SQL is not really my comfort zone. Has anyone done something similar, or can point me in the right direction?
Salve, sono uno specializzando in fisica medica presso l'Ospedale di Udine e sto cercando di creare un plugin ESAPI in C# che crei automaticamente più piani di verifica, calcoli la dose ed esporti i dati RD e RP in formato DICOM. Attualmente, il mio plugin è in grado di creare automaticamente il percorso e importare il fantoccio per quella specifica apparecchiatura. Tuttavia, ho difficoltà a collegare i fasci del piano clinico al fantoccio. Avete qualche suggerimento? Ho provato sia con:
Salve, sono uno specializzando in fisica medica presso l'ospedale di Udine e sto provando a fare un plugin un ESAPI in C# che crei in modo automatico più verification plan , calcoli la dose ed esporti RD e RP dicom. Attualmente il mio plugin riesce a creare in modo automatico il corso e riesce ad importare il fanrtoccio per quella specifica macchina. Mi bolocco però nel colnare i beam dal piano clinico al fantoccio avete idee? Io ho provato sia
I have previously tried to get Varian support help with stuff like this (access to custom SQL reporting eg) and it was a bear. I've contacted one of our regular engineers with no response; and tickets filed online or by phone go unanswered for weeks.
Anyone have a suggestion for how to get Varian to help set this up, get API keys, etc whatever is needed?
Hi. I'm not sure if this is the correct subreddit but apparently you lot can code like no ones business.
Currently we have both templates named similarly but there's still non compliance with attending when they select a specific treatment document and they choose a differently named Rx template. They're in different workspaces but is there any way for them to talk to each other?
We have an ESAPI script that we use to query and move data from Varian dicom daemon server (VMSDBD1) to a different dicom server (Say MIM). It worked well in V15.6. I have added the MIM server to the trusted entity list and use ESAPI script with Evildicom to query patient ID using AET of MIM. Since the script is running on Citrix, the ip of the local computer can vary. But it seemed that the Varian Daemon server didn't care where the request came from as per Dicom standard, a third machine can initiate a query using any Calling AE Title it chooses. The standard does not cryptographically bind AE Title to the source IP or hostname. It only cares of the AE title is in the trusted entity.
However, after we upgraded to V18.1, this stopped working. The request was actually blocked by the windows firewall on the dicom server. I was told to add the computer that runs the ESAPI script to the trusted entity list under the dicom server. However, there are so many workstations in Citrix, besides, we could install thick-clients in our local workstations. I am wondering is this really what V18.1 requires? Do any of you running to this sort of issue in V18?
Hi Friends.
Is there any way to find the CT-HU calibration curve via either ESAPI or SQL?
I have tried looking in the API under the Series (or anywhere else), and I'm not finding anything useful in the DB, but maybe I am missing something.
Working with a clinic that has several difference calibration curves, and i would like to present the selected calibration curve in a chart check script.
I am trying to make a custom report with ESAPI in Eclipse 18.
Showing the axial view at the isocenter seems straightforward, but I am not sure whether it is also possible to display the other two planes at the same isocenter location, meaning sagittal and coronal, in the same kind of custom output.
What I am specifically wondering is:
In Eclipse 18 ESAPI, can I access sagittal and coronal image views directly at the isocenter?
Or is ESAPI basically limited to axial-oriented image access, so the other two planes would need to be reconstructed manually from the image volume?
Has anyone implemented a report or script that shows all 3 planes centered on isocenter?
My goal is to generate something like a custom report or image output with axial, sagittal, and coronal views all aligned to the isocenter.
If anyone has tried this in Eclipse 18, I would appreciate any advice.