jrkerns / pylinac

An image analysis library for medical physics
MIT License
145 stars 94 forks source link

Max error reported leaf pair incorrect #405

Closed bearner-hca closed 2 years ago

bearner-hca commented 2 years ago

Describe the bug When using the Varian DICOM test file with induced error, we get the following image: pf-image-truebeam-2021-01-18_2021-09-08_23a15a

However, the max_error_leaf pair is reported as 9, which is not correct as the leaf pair according to the image is 31 (Varian numbering) or leaf 20 (counting top to bottom of image). This seems to be a regression from previous versions (2.3.2) which reported the correct value?

To Reproduce pip install pylinac

import pylinac
pf = pylinac.PicketFence("rtimage.dcm")
pf.analyze()
print(pf.max_error_leaf)

9

pip install pylinac==2.3.2

import pylinac
pf = pylinac.PicketFence("rtimage.dcm")
pf.analyze()
print(pf.max_error_leaf)

20

Expected behavior Leaf pair 20 to be the maximum leaf error pair.

jrkerns commented 2 years ago

Closed in v3.1, out soon