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

**URL:** https://discourse.itk.org/t/adapt-2d-3d-two-image-registration-for-one-image/3394
**Category:** Engineering
**Created:** [August 14, 2020, 2:09pm UTC](https://discourse.itk.org/t/adapt-2d-3d-two-image-registration-for-one-image/3394 "2020-08-14T14:09:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Henco](https://discourse.itk.org/letter_avatar_proxy/v4/letter/h/cab0a1/32.png) [@Henco](https://discourse.itk.org/u/Henco)
#### Post date: [August 14, 2020, 2:09pm UTC](https://discourse.itk.org/t/adapt-2d-3d-two-image-registration-for-one-image/3394/1 "2020-08-14T14:09:23Z")

</div>

Hi all,

I’m attempting to adapt the [TwoProjectionRegistration](https://github.com/InsightSoftwareConsortium/ITKTwoProjectionRegistration) 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](https://github.com/InsightSoftwareConsortium/ITKApps/blob/master/IntensityBased2D3DRegistration/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](https://discourse.itk.org/uploads/short-url/xFVHAwJRsOTf1hnn5WW9c3Dm2Lr.tif) (64.2 KB)  
Current projection output:  
[Image2D1\_Registered.tif](https://discourse.itk.org/uploads/short-url/fuIl6kfE13MZVVKfHdTlY2DWBf0.tif) (64.2 KB)
