plan creation & dose calculation

Developer
Mar 25, 2014 at 6:38 PM
Hello everyone~
I need to create plans and calculate dose using ESAPI v13. Is there any example for this?
Thanks!
Jinkoo
Developer
Mar 25, 2014 at 7:38 PM
One more Q:

The following lines of code add an image and a structureset. How can I set the DICOM image origin?
        // add an image
        StructureSet ss = pt.AddEmptyPhantom("image3", PatientOrientation.HeadFirstSupine,
            512, 512, 512.0, 512.0, 128, 3.0);
Thanks.
Jinkoo
Developer
Mar 25, 2014 at 9:01 PM
One more Q:

I am getting exception at the following code. How can I troubleshot this? I guess my question is where to find the right machine parameters to create the ExternalBeamMachineParameters object?

ExternalBeamMachineParameters p = new ExternalBeamMachineParameters("HFHEdgeRM1", "6X-FFF", 600, "STATIC", "FFF");
            VRect<double> jaw = new VRect<double>(10, 10, 10, 10);
            VVector iso = new VVector(128, 128, 128);
            Beam b = plan.AddStaticBeam(p,
                jaw,
                0.0,
                0.0,
                0.0,
                iso);
            b.Id = "Beam" + trial;
System.ApplicationException: Suitable machine configuration was not found
at VMS.TPS.Common.Model.PlanSetup.AddStaticBeam(ExternalBeamMachineParameters
machineParameters, VRect`1 jawPositions, Double collimatorAngle, Double gantryA
ngle, Double patientSupportAngle, VVector isocenter) in b:\va\core\tps.net\commo
n\vms.tps.common.model\plansetup.cpp:line 376

Thanks.
Jinkoo
jkim3@hfhs.org
Coordinator
Mar 25, 2014 at 9:32 PM
Hey Jinkoo,

To answer your latest question:
In Eclipse UI the energy mode for SRS beam is shown as "6X-FFF", but in the ExternalBeamMachineParameters constructor EnergyModeId should be set as "6X". The "FFF" part is then set in the separate parameter, like you have done.
Developer
Mar 25, 2014 at 9:40 PM
The following code worked for the last question:
            ExternalBeamMachineParameters p = new ExternalBeamMachineParameters("HFHEdgeRM1", "6X", 600, "STATIC", "FFF");
            VRect<double> jaw = new VRect<double>(-50, -50, 50, 50); // mm
            VVector iso = new VVector(128, 128, 128);
            Beam b = plan.AddStaticBeam(p,
                jaw,
                0.0,
                0.0,
                0.0,
                iso);
            b.Id = "Beam" + trial;
Thanks.
Jinkoo
Developer
Mar 25, 2014 at 9:41 PM
Thanks, stuomaal!!!
Jinkoo
Developer
Mar 25, 2014 at 9:59 PM
Another question: Is there a way to do the following automatically?
  1. Create an image and write image pixel data? (I see Image.GetVoxels() function but there is no SetVoxels()...)
  2. Or, import DICOM images using ESAPI?
    Thanks, everyone.
    Jinkoo
Coordinator
Mar 28, 2014 at 6:03 PM
  1. Correct, there is no SetVoxels.
  2. Import DICOM images:
Yes, this is possible using the DICOM DB Daemon.

Refer to the DICOM Scripting Article.

Assuming you want to send images from your clinical Aria system to your research Aria system - instead of sending files to the VMS File Daemon as shown in the article, install a DB Daemon on your research system and send your image files directly from your clinical DB Daemon to your research DB Daemon. AE Title “VMSFD” can be replaced with the AE title of your DB Daemon running on your research system.

The Varian DICOM DB Daemon can be used to import and export DICOM data.
Developer
Apr 1, 2014 at 12:03 AM
It works very well. I was able to transfer a plan with CT image & structureset from clinical system (v11) to research system. Very cool!!!
Jinkoo
Developer
Jul 28, 2014 at 8:17 PM
Hi Wayne,

I am trying to do "DB Daemon Configuration" in our V11 research system. When I tried to add new service and typed "VMSDBD1" as AE Title, a default Listen Port ( 57347 ) is displayed. Do I need change it to "5678" based on your document of "Scripting the Varian Daemon with ESAPI + DCMTK"? Also I did not find the "Treatment Daemon Configuration" in my system. Is it required mandatorily ? (note: I DO have DB Daemon Configuration and File Daemon Configuration)

Thanks,

Angell
Coordinator
Jul 28, 2014 at 8:25 PM
The port used is arbitrary, it just needs to be available and consistently configured on all sides.

Treatment Daemon is definitely not required. It is more specialized for treatment consoles. DB Daemon is probably what you need for data extraction use cases.
Developer
Jul 30, 2014 at 4:02 PM
When I tried to Configure the File Daemon (Figure10 in the document - the AE Title and the Port Number are matched the ones in the figure 7), I got the error "This AE Title is already in use. Please change", so I could not go through the next step. Could you please guild me to fix the issue?
Thanks,
Angell
Developer
Aug 4, 2014 at 8:35 PM
If you already have an AE Title/port number, you would not need to add one..., but you may take a look at the configuration to see if the Dicom DB Daemon is in the trusted entities (Fig 12).
Jinkoo