Automatic Image Registration in Pylinac

I’d like to know where in Pylinac I can find how images are automatically registered - for example, in the CatPhan module.

I’m in an intro class on medical image analysis and we learned and implemented some automatic image registration algorithms in Python. Our last assignment is just to present an open-source project that somehow relates to our coursework and demo some of it. I’d also like to present what techniques Pylinac might be using that relate to image registration. I tried looking at pylinac.ct, but I’m having trouble finding where the image registration occurs.

Any information about the image registration method used in Pylinac or where in the code I should be looking would be appreciated.

Pylinac does not use image registration in the intensity-based way most people might think, such as SSIM because there is no reference image to register to. Pylinac bootstraps everything (i.e. there are no reference images) and as such it is based on feature engineering, meaning it looks for certain features to be present (or not present) in order to classify images.

The two areas where pylinac.ct is doing some sort of registration is finding the CTP404 slice out of all the slices in the dataset and finding the phantom roll. After those two things, everything else is (basically) based on offsets from there.

Here is the CTP404-finding algorithm: pylinac/ at master · jrkerns/pylinac · GitHub
And here is the CTP404 roll-finding algorithm: pylinac/ at master · jrkerns/pylinac · GitHub

The docstrings outline what it’s doing. Both methods are pretty short so it should be relatively easy to digest =)

Good luck