# Custom border extrapolation of ShapedImageNeighborhoodRange by ImageNeighborhoodPixelAccessPolicy

**URL:** <https://discourse.itk.org/t/custom-border-extrapolation-of-shapedimageneighborhoodrange-by-imageneighborhoodpixelaccesspolicy/879>\
**Category:** Engineering\
**Created:** [April 30, 2018, 6:02pm UTC](https://discourse.itk.org/t/custom-border-extrapolation-of-shapedimageneighborhoodrange-by-imageneighborhoodpixelaccesspolicy/879 "2018-04-30T18:02:39Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![Niels\_Dekker](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/9d8465/32.png) [@Niels\_Dekker](https://discourse.itk.org/u/Niels_Dekker)\
**Post date:** [October 9, 2018, 10:37pm UTC](https://discourse.itk.org/t/custom-border-extrapolation-of-shapedimageneighborhoodrange-by-imageneighborhoodpixelaccesspolicy/879/22 "2018-10-09T22:37:21Z")

</div>

@phcerdan I just posted a possible implementation of `ConstantBoundaryImageNeighborhoodPixelAccessPolicy`, which has the same functionality of the policy classes we have been discussing here in July… but this one does allow specifying the _constant value_ at run-time: [WIP: Added policy for constant NeighborhoodRange values outside image](http://review.source.kitware.com/#/c/23795/)

While I think it’s fully functional already, I just marked it _WIP_, because I don’t know if it has priority for the release of ITK 5.0. What do you think?

Eventually it could replace existing use cases of the old `itk::ConstantBoundaryCondition`, and possibly yield a performance improvement…

---

_[View the full topic](https://discourse.itk.org/t/custom-border-extrapolation-of-shapedimageneighborhoodrange-by-imageneighborhoodpixelaccesspolicy/879)._
