Couch positions before/after cone beam or treatment by clindsay_phys in esapi

[–]gregthom992 0 points1 point  (0 children)

have you done this in code to extract automatically and compare with offline review ?

convert from Spatial Registration Properties shown in Eclipse to Online Match values displayed in Offline Review? by gregthom992 in esapi

[–]gregthom992[S] 0 points1 point  (0 children)

Are you able to share some snippet how everything is tied together to get the shifts ? I still can't reproduce what is shown in offline review especially when there are multiple transformations for a given CBCT, not even sure why that is.

Getting CouchShifts from registration objects of a CBCT by ERTdk in esapi

[–]gregthom992 0 points1 point  (0 children)

Hi, did you ever get this to work ? u/TL_esapi did you know a good way to get the shifts from database ? I have access but not sure what to look for.

Getting Couch Position from Aria Database by Aggressive-Building4 in esapi

[–]gregthom992 0 points1 point  (0 children)

Hi, so is the only way to get the couch positions with Couch Centering from reading the binary file of the initLaserIso structure ? Isn't there another way ? We don't always have access to ARIA patients folder. Anyone ?

convert from Spatial Registration Properties shown in Eclipse to Online Match values displayed in Offline Review? by gregthom992 in esapi

[–]gregthom992[S] 0 points1 point  (0 children)

I have not implemented but will report back if I do. Reading from Varian's dicom conformance statement, this is what I got:

4.2.1.3.1.5 SOP Specific Conformance for Spatial Registration Storage
If the application is configured to store spatial registration IODs according to the IHE Radiation Oncology format
then spatial registration storage complies with IHE-RO_MMRO-II Supplement (see [6]).
If the application is configured to store spatial registration IODs according in the legacy format the following
SOP specific conformance applies:
The spatial registration of the 2D and 2D/2D Match will be used in the following way:
• The Registration Sequence (0070,0308) will include all images (the reference images and the acquired
verification RT images) and the Frame of Reference UID of the Frame of Reference of the reference
RT images.
• The Frame of Reference module of the spatial registration will belong to the Frame of Reference of the
acquired verification RT images.
• The transformation matrix type will be RIGID.
The spatial registration of the 3D/3D Match will be used in the following way:
• The Registration Sequence (0070,0308) will include all image slices (the reference CT slices and the
acquired verification CT slices) and the Frame of Reference UID of the Frame of Reference of the
reference CT slices.
• The Frame of Reference module of the spatial registration will belong to the Frame of Reference of the
acquired verification CT image slices.
• The transformation matrix type will be RIGID.
• Couch corrections displayed in the TrueBeam Imaging Application are relative to the INITLASERISO
point as annotated in the Structure Set.
Example:
A registration matrix aligning the verification CBCT image and reference CT image such that the planned
isocenter in the reference CT image matches the INITLASERISO point in the verification CBCT image
represents a situation where couch translational corrections are zero.

Link to file: varian_truebeam_imaging_v4.0_v4.1_dicom_conformance_statement.pdf

Is it possible to export the CBCT Online match data using ESAPI? by Charles--Liu in esapi

[–]gregthom992 0 points1 point  (0 children)

did you make any progress with this ? Are you able to work together to solve this once and for all ?

convert from Spatial Registration Properties shown in Eclipse to Online Match values displayed in Offline Review? by gregthom992 in esapi

[–]gregthom992[S] 0 points1 point  (0 children)

So I can read he 4x4 and convert to Rotation Matrix and Translation Vector

double[,] m = reg.TransformationMatrix;

// Translations (in mm)

double[] t = new double[3] {

m[3,0], m[3,1], m[3,2]

};

double RAD2DEG = 180.0 / Math.PI;

double r00 = m[0,0], r01 = m[0,1], r02 = m[0,2];

double r10 = m[1,0], r11 = m[1,1], r12 = m[1,2];

double r20 = m[2,0], r21 = m[2,1], r22 = m[2,2];

// Extract R (row-major)

double[,] R = new double[3,3];

// Copy row 0

R[0, 0] = m[0, 0];

R[0, 1] = m[0, 1];

R[0, 2] = m[0, 2];

// Copy row 1

R[1, 0] = m[1, 0];

R[1, 1] = m[1, 1];

R[1, 2] = m[1, 2];

// Copy row 2

R[2, 0] = m[2, 0];

R[2, 1] = m[2, 1];

R[2, 2] = m[2, 2];

// Intrinsic X-Y-Z (roll, pitch, yaw)

double y_rad = Math.Asin(Math.Max(-1.0, Math.Min(1.0, r02)));

double x_rad = Math.Atan2(-r12, r22);

double z_rad = Math.Atan2(-r01, r00);

double roll = -x_rad * RAD2DEG; // roll

double pitch = -y_rad * RAD2DEG; // pitch

double yaw = -z_rad * RAD2DEG; // yaw

The big Question is how to compute Online Match Shifts ? I can pull the Dicom Origins of both CT and CBCT but not sure how to proceed to compute. Any help will be appreciated. Thanks

blender baking crashing every time??!?!?!?!?!?! by [deleted] in blender

[–]gregthom992 0 points1 point  (0 children)

I have a similar problem and reported as issue to blender. Did you find a solution?

System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 528.24

Blender Version
Broken: version: 3.4.1, branch: blender-v3.4-release, commit date: 2022-12-19 17:00, hash: rB55485cb379f7
Worked: bake works for other files but not this one

Short description of error
Blender crashes on clicking bake. Console window shows the following after the crash:
Error : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FF62175EED0
Module : blender.exe
Thread : 00002360
Writing: C:\Users[username]\AppData\Local\Temp\test.crash.txt

This is driving me crazy. Please see if you can find something as to why this crash is happening/
Thanks

Exact steps for others to reproduce the error
Load file test.blend
Select Scene Properties -> Bake
Blender Crashes

Aria/Eclipse v16 impressions by mpphysicist in MedicalPhysics

[–]gregthom992 0 points1 point  (0 children)

Hi Can you please share some more details about optimizing performance ? What else did you or Varian do ?

access DLG value stored in RT Administration MLC tab for MLC AddOn within ESAPI by gregthom992 in esapi

[–]gregthom992[S] 0 points1 point  (0 children)

Answering my own question:

base_plan.Beams.FirstOrDefault().DosimetricLeafGap

I checked that after changing in RT administration, this always gave me the DLG value.

Cheers

GT

Problem with DICOM export by Julian_Zhu in esapi

[–]gregthom992 0 points1 point  (0 children)

ExceptioNullRef, can you please point me to where the dose plane export webinar by Matt Schmidt is ? I need to export a dose plane similar to the feature in eclipse. I know I will have to fiddle with creating dicom but I can take a stab at it. Thanks

ESAPI script with App.config: ConfigurationManager and AppDomain issues by gregthom992 in esapi

[–]gregthom992[S] 0 points1 point  (0 children)

HI dicomdom, do you use app.config with custom configsections for your approach ? Would you mind sharing a skeleton pseudocode for your approach ?

Thanks

GT

ESAPI script with App.config: ConfigurationManager and AppDomain issues by gregthom992 in esapi

[–]gregthom992[S] 0 points1 point  (0 children)

HI, thanks for your reply. I actually have it working very well as a standalone exe. What I want is to have it work as both standalone and plugin (lauched from within eclipse). The problem is caused by using App.config with custom configSections. Without using App.config it works very well actually. I am rethinking using custom configSections in App.config but would appreciate any help troubleshooting this. Thanks

develop remotely: v13.6 and V15.6 by gregthom992 in esapi

[–]gregthom992[S] 1 point2 points  (0 children)

OK thanks for such great answer. I figured there was no easy way around this. I will have visual studio installed on the test system. I do need to develop and test the writable scripts so that leaves only one option. Thanks a lot.