QC3 Phantom Detection

Our QC3 phantom is not detected as reliably after we upgraded pylinac from 2.x to 3.x. The phantom is detected using the planar_imaging “phantom_ski_region” method. Version 2.x uses the following:

phantom_bbox_size_mm2 = 176**2 # phantom is 115 x 134 mm2. At 45degrees that’s 176 x 176mm

fudge_factor = 0.95 # in practice, the detected size is a little bit smaller

phantom_size_pix = phantom_bbox_size_mm2 * (self.image.dpmm ** 2) * fudge_factor

The new version has removed the “fudge factor” and uses

phantom_bbox_size_mm2 = 168**2

I noticed that the new bbox_size (168) approximately equals the orig bbox_size 176 * the fudge factor 0.95. If this is how the fudge factor has been incorporated, then it is effectively applied twice when 168 is squared. Our QC3 phantom is detected much more robustly if I tweak the code as follows:

phantom_bbox_size_mm2 = 168**2/0.95

Is this change justified?

I’m sorry your images are not being detected correctly. I run pylinac against an always-growing image test library. The size parameter is usually empirically determined so as to fit all the test data I have. Feel free to send me the failing images: https://forms.gle/cDkceB5SSLSjdsih9

Thanks James. The extraordinary level of support you provide for Pylinac is much appreciated! I submitted 3 Standard Imaging QC3 EPID images acquired at 150cm SID:

“Trilogy_QC3.dcm” is from a Trilogy machine and was acquired at 6MV.
“TrueBeam_QC3_NoPixelSign.dcm” is from a TrueBeam and was acquired at 2.5MV before our upgrade to ARIA 15.6 (ie before the pixel sign relationship was included in the header).
“TrueBeam_QC3_WithPixelSign.dcm” is a Truebeam image acquired at 2.5MV using ARIA 15.6.

  • When I use the default bbox_size = 168**2 and the default is_right_size rtol = 0.1 the phantom is not detected in these images.
  • If I keep the bbox_size = 168**2 and increase is_right_size rtol to 0.2 the phantom is detected in all cases.
  • If I set the bbox_size = 168**2/0.95 and keep the default is_right_size rtol = 0.1 the phantom is detected for the trilogy images, but not the truebeam images.
  • If I set the bbox_size = 168**2/0.95 and tweak is_right_size rtol up to 0.15 the phantom is detected in all cases.
    I ran a similar analysis on 18months worth of images acquired on 4 Trilogies, and 4 Truebeams. The behavior outlined above was pretty characteristic of what I saw in general. I’m curious if there is something unusual about our acquisition parameters.

I am leaning toward running with bbox_size = 168**2/0.95 and is_right_size rtol = 0.2 to avoid throwing errors to our end users.

Any thoughts or suggestions would be most welcome.

I’m able to analyze all 3 images when setting the SSD to 1500mm.

qc3 = pylinac.StandardImagingQC3(…)
qc3.analyze(ssd=1500)

Thanks so much for checking. I’m not sure what I’m doing differently. I’m calling the analyze method as follows:

qc3.analyze(low_contrast_threshold=0.01, high_contrast_threshold=0.5, ssd = qc3.image.sid)

I have confirmed that qc3.image.sid = 1500. Can I ask what version of pylinac you’re using? I believe I’m at version 3.1.1.

Ah, you’re right. w/ 3.1.1 I need to use ssd=1450. Assuming you’re setting the phantom on the panel the SSD != SID and is a few cm closer.

You’ve got it! When I reduce the “SSD” by the QC3 phantom thickness (36mm) the phantom detection is much better. Incidentally I have now made the same correction for the kV QC1 phantom. The phantom is much thinner in that case (16mm), so the effect was much less noticeable. I’m now using the following with much better results.

qc1.analyze(low_contrast_threshold=0.01, high_contrast_threshold=0.5, ssd=qc1.image.sid-16)

qc3.analyze(low_contrast_threshold=0.01, high_contrast_threshold=0.5,ssd=qc3.image.sid-36)

Thank You!