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)
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).
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.
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.
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: https://github.com/jrkerns/pylinac/commit/698254258ff4cb87812840c42b34c93ae32a4693
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.
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.