# Registration method for two images with different origin and spacing

**URL:** https://discourse.itk.org/t/registration-method-for-two-images-with-different-origin-and-spacing/3047
**Category:** Algorithms
**Tags:** registration
**Created:** [May 8, 2020, 10:04am UTC](https://discourse.itk.org/t/registration-method-for-two-images-with-different-origin-and-spacing/3047 "2020-05-08T10:04:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![EE18D504\_SINDHURA\_C](https://discourse.itk.org/letter_avatar_proxy/v4/letter/e/b3f665/32.png) [@EE18D504\_SINDHURA\_C](https://discourse.itk.org/u/EE18D504_SINDHURA_C)
#### Post date: [May 8, 2020, 10:04am UTC](https://discourse.itk.org/t/registration-method-for-two-images-with-different-origin-and-spacing/3047/1 "2020-05-08T10:04:32Z")

</div>

I have an image with slices of 5mm thickness and I want to use deformable registration to register it with an image of 1mm thickness slices. Also, the origin is different for both the images.  
Is there any method to overcome this problem?

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [May 8, 2020, 12:11pm UTC](https://discourse.itk.org/t/registration-method-for-two-images-with-different-origin-and-spacing/3047/2 "2020-05-08T12:11:46Z")

</div>

ITK uses physical space for registration, so both of these are handled well.

---

<div class="post-metadata">

### Author: ![EE18D504\_SINDHURA\_C](https://discourse.itk.org/letter_avatar_proxy/v4/letter/e/b3f665/32.png) [@EE18D504\_SINDHURA\_C](https://discourse.itk.org/u/EE18D504_SINDHURA_C)
#### Post date: [May 9, 2020, 3:01am UTC](https://discourse.itk.org/t/registration-method-for-two-images-with-different-origin-and-spacing/3047/3 "2020-05-09T03:01:32Z")

</div>

But it throws an error, that the images do not occupy same physical space . Also it displays the origin and spacing of the images saying they are different

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [May 9, 2020, 3:50am UTC](https://discourse.itk.org/t/registration-method-for-two-images-with-different-origin-and-spacing/3047/4 "2020-05-09T03:50:18Z")

</div>

You need a different initialization, then. Perhaps use [CenteredTransformInitializer](https://itk.org/Doxygen/html/classitk_1_1CenteredTransformInitializer.html).
