# BRAINS Registration fails in V4.11.20210226

**URL:** <https://discourse.slicer.org/t/brains-registration-fails-in-v4-11-20210226/20806>\
**Category:** Support\
**Tags:** registration\
**Created:** [November 26, 2021, 7:57pm UTC](https://discourse.slicer.org/t/brains-registration-fails-in-v4-11-20210226/20806 "2021-11-26T19:57:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lutz](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@Lutz](https://discourse.slicer.org/u/Lutz)\
**Post date:** [November 26, 2021, 7:57pm UTC](https://discourse.slicer.org/t/brains-registration-fails-in-v4-11-20210226/20806/1 "2021-11-26T19:57:34Z")

</div>

Hi to all,  
I am using Slicer at the University of Nueremberg to train Master students in addition to some theroretical lessons. One experiment is based on CT Registration Tutorial by Michael Fassbind from youtube. Herein, a pre-op and a post-op CT hip data set are manually and automatically registered using transform and Registration (Brains) module, respectively. This worked well in V4.10.2. In version V4.11.2, however, the automatic registration failed with the following error message:  
General Registration (BRAINS) standard error:

ExceptionObject caught !  
itk::ExceptionObject (000000D53B7E8480)  
Location: “unknown”  
File: D:\D\S\Slicer-1-build\ITK\Modules\Registration\Metricsv4\include\itkMattesMutualInformationImageToImageMetricv4.hxx  
Line: 316  
Description: itk::ERROR: itk::ERROR: MattesMutualInformationImageToImageMetricv4(000002BB7544E710): All samples map outside moving image buffer. The images do not sufficiently overlap. They need to be initialized to have more overlap before this metric will work. For instance, you can align the image centers by translation.

Are there any changes necessary I am not aware of?  
With best regards,  
Lutz  
P.S. the 2 data sets are not aligned, I centered them in advance using the volume module

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 26, 2021, 11:27pm UTC](https://discourse.slicer.org/t/brains-registration-fails-in-v4-11-20210226/20806/2 "2021-11-26T23:27:20Z")

</div>

Registration modules ignore the transforms that are just applied but not hardened to a volume. You need to [harden the transform](https://slicer.readthedocs.io/en/latest/user_guide/modules/transforms.html#harden-transform-on-a-node) before the registration.

I would also recommend to try [Elastix and ANTs extensions](https://slicer.readthedocs.io/en/latest/user_guide/registration.html#automatic-image-registration), as those tend to be work with default parameters, without the need for any parameter tuning.

---

<div class="post-metadata">

**Author:** ![Lutz](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@Lutz](https://discourse.slicer.org/u/Lutz)\
**Post date:** [December 9, 2021, 10:57am UTC](https://discourse.slicer.org/t/brains-registration-fails-in-v4-11-20210226/20806/3 "2021-12-09T10:57:05Z")

</div>

Andras,  
many thanks, the hardening worked. Now, my students can perfom the course completely. I just wondered that the hardening was not necessary in versions \<V4.11  
Best wishes  
Lutz

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 9, 2021, 1:44pm UTC](https://discourse.slicer.org/t/brains-registration-fails-in-v4-11-20210226/20806/4 "2021-12-09T13:44:29Z")

</div>

Centering in \<4.11 was performed by hardening the transform on it, but in current Slicer versions the transform is just applied, to allow the user to access the original position of the image. Hardening is an irreversible operation, after that the original image position is lost.
