SI QC-3 Phantom Analysis Problems


We recently updated to the newest version of PyLinac. I’m not 100% certain that this wasn’t happening before, but the problem is definitely happening now. When our MV images are taken on a clinac we get that the ROIs are rotated (what appears to be) 90 degrees (image 1). The exact same analysis on a TrueBeam image does not show this problem. (image 2)

Similarly, we were trying to run this same module on the QC-kV1 and now we’re having issues with analysis (image 3).

Actually, I ran the analysis on a different clinac image and the ROIs are way out to lunch. (image 4)

Any insight is appreciated

Apparently all the images are broken.

Turns out not all TrueBeam images are analyzed properly anyway. Hopefully the attached images work this time

qc-kv1 problem.png

qc3 problem clinac.png

qc3 good truebeam.png

qc3 problem truebeam.png

For the kV images, are they taken at the same mA and ms? I wonder if there is a range that is better than others? I seem to have good luck with 20 mA and 40 ms. I typically use 15cm x 15cm for everything also (I’m not sure if that matters).

kV images were taken (almost all) at 75 kVp, 100 mA, 50ms.

The MV image field size was set to 11x11 for some strange reason. Pretty sure our kV images just have the blades wide open.

I am seeing the same issue with one of my truebeams as well with QC3. I’ve been using this for quite a while and nothing in the setup has changed.

See the short troubleshooting guide here:

While I understand that jaws closed tight is a best practice, it causes image detection to be very difficult because different people use different sizes, and being too tight (as in cutting off the edges) is also a common issue. If adding invert=True doesn’t solve the problem, try with the jaws open.

Is there a way to display the detected phantom edges on the image or anything as a troubleshooting tip?

I’ve tried with inversion both on and off and I haven’t seen any difference.

I would have thought that if the problem was the field edges we wouldn’t see that problem with the kV images, which have relatively wide open blades.

Are you saying that even the blade settings of the attached image is problematic?


qc3 open field rotated bad.png

qc3 open field bad.png

I tried opening up the jaws quite large and still it didn’t help. I then tried to rotate the phantom so that the ‘4’ was pointing towards the gantry to see if I could ‘trick’ pylinac into doing it correctly and still no dice.

Any more suggestions?

It actually seems like I can’t even run it properly from demo images. The ROIs are incorrectly placed in the same fashion as when I run the analysis on my own images.

Have you tried printing out phantom_ski_region, phantom_radius, phantom_angle, and phantom_center. I’m not sure how helpful this would be but maybe something to see if anything is wrong in the pre-analysis step.
I’m having the same issues but haven’t been able to check these things. Also, interesting you are seeing this with the demo. When I get a chance I’ll check as well.

Working on it. There’s a few things I can optimize but in your images the size appears roughly correct; it’s only the angle. Try removing the negative sign here.

Okay, rather than start without any assumptions I’ve added the assumption that the user is using the stand and has correctly oriented the phantom. Under those assumptions analysis becomes a lot more reliable. I need to write some tests, but you can apply these changes for now:

I implemented the new code and it worked for the QC3 phantom. Thank you.

I have the same problem. In version 1.9 I didn’t have the problem with QC3, but the new version doesn’t detect the angle correctly. I attached an example image.


qc3.dcm (2 MB)

Hey Denis

Your analyzed image looks like mine did before the update. James did change a few lines of code within the planar imaging module. I would check to see if those updates are also included in your code. After I made the changes my analysis had the correct orientation and was analyzed properly. I know not too helpful but maybe a place to start.


Thanks Bryan!
I didn’t read all the posts. The solution works.