WinstonLutz unable to find the gantry isocenter

Hi James,

First of all, thank you very much for creating and developing Pylinac. Open source projects is, in my humble opinion, a huge contribution to medical physics. (Same goes for PyDICOM… makes my everyday life so much easier.)

I am currently testing pylinac’s Winston-Lutz analysis. I observed some discrepancies in the gantry isocenter position that I would like to discuss on this forum.

For everyone to know, pylinac works great with Elekta EPID (iview) as long as you edit the DICOM’s metadata to add the collimator angle and couch angle. I used the standard Elekta Ballbearing to perform various WL tests.

I ran a Gantry WL where the ballbearing was shifted by a known distance (1 cm towards B). I took 8 images at different gantry angles. Colli=0 and Couch=0. I attached the images for the 4 cardinal angles to this post

Pylinac obtained the following result :

In [292]: wl.gantry_iso2bb_vector
Out[292]: Vector(x=-0.87, y=0.00, z=-0.06)

This result is very far from the expected 1 cm shift in X.

I did some debugging… All WLImages have consistent x_offset and y_offset, therefore I think that I didn’t make any mistakes in my DICOM metadata edition… but I cannot be sure.

There may be a bug in the cax_line_projection function… the Vector G=0 is ~20 cm away from the Vector at G=180.

What do you think ?

Michel

Shift1cmB_4ch.zip (5.28 MB)

Michel,
Thanks for bringing this to my attention and for the kind words. I actually don’t have any Elekta images to work off of, just Varian, so I’m glad it seems to work adequately. If you have more images (like bb at iso) I’d be happy to test the WL algorithm on them to make the whole thing more robust for everyone. You can upload additional images privately here if you like.

I can repeat your results, and it does indeed seem like there’s a problem. The gantry iso size is 19mm haha. To figure this out, can you identify where you set the BB using my coordinate space? Then I can make sure there’s not a sign error, etc. Also, can you confirm which direction the gantry is facing when at 0 degrees? Toward the floor or toward the ceiling?

Thanks!

Gantry = 0 degree is where the gantry is up and irradiates towards the floor.

The BB is positionned at X=10 mm Y = 0 mm and Z = 0 mm using your coordinate space.

I will upload the 8 image set shortly to your dropbox link.

Thanks for the quick response.

Michel