# defautl pixel value for out of bounds during registration

**URL:** https://discourse.itk.org/t/defautl-pixel-value-for-out-of-bounds-during-registration/605
**Category:** Beginner Questions
**Created:** [January 19, 2018, 12:30pm UTC](https://discourse.itk.org/t/defautl-pixel-value-for-out-of-bounds-during-registration/605 "2018-01-19T12:30:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![asertyuio](https://discourse.itk.org/letter_avatar_proxy/v4/letter/a/e68b1a/32.png) [@asertyuio](https://discourse.itk.org/u/asertyuio)
#### Post date: [January 19, 2018, 12:30pm UTC](https://discourse.itk.org/t/defautl-pixel-value-for-out-of-bounds-during-registration/605/1 "2018-01-19T12:30:32Z")

</div>

Dear all,

I’m wondering if there is a way of forcing a default pixel value in the registration metric for out of bounds pixels. I don’t know if I’m clear. Basically I have images for which I know that out of bound value is 0, so how can I make that the metric take that into account…

Thanks for your help!  
Yann

---

<div class="post-metadata">

### Author: ![tim-evain](https://discourse.itk.org/user_avatar/discourse.itk.org/tim-evain/32/220_2.png) [@tim-evain](https://discourse.itk.org/u/tim-evain)
#### Post date: [January 19, 2018, 1:00pm UTC](https://discourse.itk.org/t/defautl-pixel-value-for-out-of-bounds-during-registration/605/2 "2018-01-19T13:00:34Z")

</div>

Hi,

As far as I know, metrics don’t use out-of-bound values.  
If these values matter for you, one way to do it is to [pad](https://itk.org/Doxygen/html/classitk_1_1PadImageFilter.html) your image with wanted value, thus increasing the extent of considered space.  
Note that now that the v4 framework use an intermediate virtual domain to register, I don’t know how the registration behaves if you set a bigger domain than the fixed image one (as I usually set the virtual domain to be the one of the fixed image).

HTH,

Tim

---

<div class="post-metadata">

### Author: ![asertyuio](https://discourse.itk.org/letter_avatar_proxy/v4/letter/a/e68b1a/32.png) [@asertyuio](https://discourse.itk.org/u/asertyuio)
#### Post date: [January 20, 2018, 4:51pm UTC](https://discourse.itk.org/t/defautl-pixel-value-for-out-of-bounds-during-registration/605/3 "2018-01-20T16:51:45Z")

</div>

Ok Thanks Tim, I’ll investigate the padding !
