# Question regarding masked registration with different shapes

**URL:** <https://discourse.itk.org/t/question-regarding-masked-registration-with-different-shapes/6127>\
**Category:** Beginner Questions\
**Tags:** itk, registration\
**Created:** [August 7, 2023, 9:57am UTC](https://discourse.itk.org/t/question-regarding-masked-registration-with-different-shapes/6127 "2023-08-07T09:57:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenrickmoke](https://discourse.itk.org/letter_avatar_proxy/v4/letter/k/da6949/32.png) [@kenrickmoke](https://discourse.itk.org/u/kenrickmoke)\
**Post date:** [August 7, 2023, 9:57am UTC](https://discourse.itk.org/t/question-regarding-masked-registration-with-different-shapes/6127/1 "2023-08-07T09:57:53Z")

</div>

Heya,

I’m wondering how the sampling works when performing registration with masks.  
In the elastix manual its written its sufficient to provide a image for the fixed image when there is no severe noise in the moving image ROI area.

What I’m confused about, is that the mask for the fixed image that i provide contains less channels/slices than my fixed image, but it still works.  
For example when having 2 3D volumes and a mask matching the dimensions of the moving image:  
fixed image: 100x10x10  
moving image: 50x10x10  
mask: 50x10x10

So how are samples drawn when the masks for the fixed image has less channels (or more) than the fixed image itself.

I’d be very thankful for any insights!

---

<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:** [August 7, 2023, 12:37pm UTC](https://discourse.itk.org/t/question-regarding-masked-registration-with-different-shapes/6127/2 "2023-08-07T12:37:39Z")

</div>

Hello @kenrickmoke,

This has to do with a fundamental concept of ITK, **images occupy a physical/continuous region in space**. For more details, see discussion in [this post](https://discourse.itk.org/t/centering-an-image/6126).
