Adapt 2D/3D two image registration for one image

Hi all,

I’m attempting to adapt the TwoProjectionRegistration module to work with only one X-ray. I’ve changed “itkTwoProjectionImageRegistrationMethod.h” with “itkImageRegistrationMethod.h” and “itkNormalizedCorrelationTwoImageToOneImageMetric.h” with “itkNormalizedCorrelationImageToImageMetric.h”. I haven’t changed anything else (other than removing the second image definitions and instantiations), but unfortunately the image that I get upon running the program is shifted out of the frame. I’m not sure which part of the code I need to change to correct for this.
I’d also like to note that I did find the old IntensityBased2D3DRegistration.cxx file and tried to use it, but I also ran into the same problem of the output not being centered in the written image.

Original two projection output:
Image2D2_Registered.tif (64.2 KB)
Current projection output:
Image2D1_Registered.tif (64.2 KB)