VarianAPIs / Varian-Code-Samples

Code samples for ESAPI and other Varian APIs and web services.
MIT License
117 stars 108 forks source link

Patient orientation change & Removing a beam with DRR #126

Open chunhuih opened 2 years ago

chunhuih commented 2 years ago

Two questions:

  1. Can the patient orientation in an external beam plan be changed by ESAPI? I would like to change the orientation from "head-in supine" to "feet-in supine". I did not find a way either in updating an existing plan or in creation of a new plan.

  2. ESAPI does not allow removing a beam in a plan if there is a DRR image under the beam. A run-time exception will occur if one tries to remove a beam with a DRR image. I did not find a method to delete the DRR under a given beam. Is it possible to remove a beam with ESAPI code when a DRR exists for that beam?

Thanks.

Kiragroh commented 2 years ago
  1. I would create a plan with less fields than the original plan and apply beamparameters from the original plan
Erhushenshou commented 2 years ago

I also wonder how we could change patient orientation in FFS or HFS, that is how we rotate the patient in dicom. It's simple to do this in python by matrix multiplication. But I don't know how we can get the dicom matrix in esapi.