# Registration: Dimensional Differences in Images, Padding

**URL:** https://discourse.itk.org/t/registration-dimensional-differences-in-images-padding/5723
**Category:** Algorithms
**Tags:** itk, registration, image, simpleitk
**Created:** [February 17, 2023, 9:24pm UTC](https://discourse.itk.org/t/registration-dimensional-differences-in-images-padding/5723 "2023-02-17T21:24:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![elapins](https://discourse.itk.org/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@elapins](https://discourse.itk.org/u/elapins)
#### Post date: [February 17, 2023, 9:24pm UTC](https://discourse.itk.org/t/registration-dimensional-differences-in-images-padding/5723/1 "2023-02-17T21:24:16Z")

</div>

How does ITK/SimpleITK account for dimensional differences between images during registration?? OR do they need to be padded accordingly?

---

<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: [February 17, 2023, 10:38pm UTC](https://discourse.itk.org/t/registration-dimensional-differences-in-images-padding/5723/2 "2023-02-17T22:38:16Z")

</div>

Hello @elapins,

ITK/SimpleITK perform registration in **physical** space. The images are treated as physical objects with metric dimensions. The number of pixels/voxels can be very different between the two images and the computations account for that.

For more details see the [registration overview](https://simpleitk.readthedocs.io/en/master/registrationOverview.html) and possibly go through the SimpleITK [Tutorial](https://simpleitk.org/TUTORIAL/), intro, foundations and registration sections should give you a good grasp of how registration is done in ITK/SimpleITK.

---

<div class="post-metadata">

### Author: ![elapins](https://discourse.itk.org/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@elapins](https://discourse.itk.org/u/elapins)
#### Post date: [February 18, 2023, 4:10pm UTC](https://discourse.itk.org/t/registration-dimensional-differences-in-images-padding/5723/3 "2023-02-18T16:10:44Z")

</div>

So when the results are outputted, for example translation values from translation transform, what do they represent? What metric in physical space? and how can I get the pixel distance?

Thank you so much for your help!!

---

<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: [February 18, 2023, 6:43pm UTC](https://discourse.itk.org/t/registration-dimensional-differences-in-images-padding/5723/4 "2023-02-18T18:43:34Z")

</div>

Hello @elapins,

Generally speaking the ITK/SimpleITK algorithms are agnostic to the pixel/voxel size metric unit. The image file readers in ITK/SimpleITK do convert sizes to millimeters.

Consequentially, the translation induced by a transform is usually in mm. To convert metric sizes to pixels you will need to use the pixel/voxel physical sizes, `image.GetSpacing()`. Note that usually pixels/voxels are not isotropic, different size in x,y,z axes.
