# Edge Issues: Displacement Registration

**URL:** <https://discourse.itk.org/t/edge-issues-displacement-registration/5749>\
**Category:** Algorithms\
**Tags:** simpleitk, registration\
**Created:** [February 23, 2023, 8:04pm UTC](https://discourse.itk.org/t/edge-issues-displacement-registration/5749 "2023-02-23T20:04:04Z")\
**Posts on this page:** 1\
**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 23, 2023, 8:04pm UTC](https://discourse.itk.org/t/edge-issues-displacement-registration/5749/1 "2023-02-23T20:04:04Z")

</div>

I have been trying to register the images attached via the displacement registration method provided: [Image Registration Method Displacement 1 — SimpleITK 2.0rc2 documentation](https://simpleitk.readthedocs.io/en/master/link_ImageRegistrationMethodDisplacement1_docs.html)

However, it seems that the edges of my results are flawed…Does anyone have suggestions for how to fix these issues I am having at the corners?

I have tried increasing the gaussian smoothing variance, and that has only seemed to help a little. I also tried to pad the images with a black border to see if that would help, and it did not do anything.

Any suggestions are welcomed! Thank you

fixed:  
[ReferenceImg.tif](https://discourse.itk.org/uploads/short-url/4B2nT12wWIJ9WdmzBSpsNCmDEtE.tif) (256.2 KB)  
moving:  
[DeformedImg.tif](https://discourse.itk.org/uploads/short-url/6cmka2g4FiVaQ2RpLoFmDFPi3EA.tif) (345.5 KB)

Edge Issues Output Image (Resampled w/ outTx):  
[RESAMPLED.tif](https://discourse.itk.org/uploads/short-url/jUkUU7bry6OHg5CRIwYE6S8ih9J.tif) (1.3 MB)
