Closed t-milan closed 4 months ago
There's a PR and discussion about this here: https://github.com/jrkerns/pylinac/pull/426.
What version are you using? In v3.19 the 604 origin slice algorithm was adjusted: https://pylinac.readthedocs.io/en/latest/changelog.html#ct
Thanks for that - You're right, I tested the latest version but didn't see the fix because I was using my own custom CatPhan604 class overriding CatPhanBase, which therefore didn't have the refine_origin_slice method. The fix from #426 seems to work fine for me so you can ignore my solution.
Your solution is a lot more clever than mine! Good work.
We noticed the CBCT module for our CatPhan604 was failing to find the proper keyslice of the CBCT - the find_origin_slice method looks for the middle slice within a range, but that range is too large. As you can see in the image below, there are extra slices which don't contain all the HU modules, which we want to ignore. My solution is to add an extra check that the proper slices should have 2 peaks in the Circular Profile. Once we added this, the proper key slice was found. Hope that makes sense. Unfortunately I haven't been able to test this for other CatPhan models.![CBCT_Peak_Examples](https://github.com/jrkerns/pylinac/assets/9035417/2bb116f5-8bb0-46e3-a3c2-17932d203fb6)