# 3D Affine registration: different datasets

**URL:** https://discourse.itk.org/t/3d-affine-registration-different-datasets/5127
**Category:** Uncategorized
**Created:** [June 23, 2022, 4:47pm UTC](https://discourse.itk.org/t/3d-affine-registration-different-datasets/5127 "2022-06-23T16:47:48Z")
**Posts on this page:** 4
**Page:** 2

<div class="post-metadata">

### Author: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [June 27, 2022, 3:20pm UTC](https://discourse.itk.org/t/3d-affine-registration-different-datasets/5127/21 "2022-06-27T15:20:11Z")

</div>

Hello @DushiFdo,

Did you follow @mauigna06’s advice? Based on the images, I’m surprised that for the top image the median of the four corners is -1024. If this is indeed correct, then use the median of a slightly larger region next to the corners and that should be closer to -3024.

---

<div class="post-metadata">

### Author: ![DushiFdo](https://discourse.itk.org/letter_avatar_proxy/v4/letter/d/c68b51/32.png) [@DushiFdo](https://discourse.itk.org/u/DushiFdo)
#### Post date: [June 27, 2022, 3:47pm UTC](https://discourse.itk.org/t/3d-affine-registration-different-datasets/5127/22 "2022-06-27T15:47:54Z")

</div>

I am sorry, actually the median for the top image is -3024. Everything works now. Thank you so much for all your help guys. Appreciate it!

---

<div class="post-metadata">

### Author: ![DushiFdo](https://discourse.itk.org/letter_avatar_proxy/v4/letter/d/c68b51/32.png) [@DushiFdo](https://discourse.itk.org/u/DushiFdo)
#### Post date: [July 1, 2022, 5:49pm UTC](https://discourse.itk.org/t/3d-affine-registration-different-datasets/5127/23 "2022-07-01T17:49:58Z")

</div>

Hi @zivy ,

Is it possible to do registration so that the slices match in the two images (two different datasets) after registration. For example, slice 50 (let’s say it shows the liver region) in image1 from dataset1 matches with the slices 50 in image2 from dataset2?

---

<div class="post-metadata">

### Author: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [July 1, 2022, 7:09pm UTC](https://discourse.itk.org/t/3d-affine-registration-different-datasets/5127/24 "2022-07-01T19:09:44Z")

</div>

Hello @DushiFdo,

The result of registration is a transformation mapping points from the fixed image to the moving image. Most often, we use that transformation to _resample_ the moving image onto the fixed image grid, which is exactly what you are asking for.

Take a look at the jupyter notebooks, you’re looking for `moving_resampled = ...`

[Previous page](https://discourse.itk.org/t/3d-affine-registration-different-datasets/5127.md?page=1)
