# Elastix outputs incorrect transform even though registration is successful

**URL:** <https://discourse.slicer.org/t/elastix-outputs-incorrect-transform-even-though-registration-is-successful/7792>\
**Category:** Support\
**Created:** [July 29, 2019, 1:28am UTC](https://discourse.slicer.org/t/elastix-outputs-incorrect-transform-even-though-registration-is-successful/7792 "2019-07-29T01:28:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prashant\_Pandey](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@Prashant\_Pandey](https://discourse.slicer.org/u/Prashant_Pandey)\
**Post date:** [July 29, 2019, 1:28am UTC](https://discourse.slicer.org/t/elastix-outputs-incorrect-transform-even-though-registration-is-successful/7792/1 "2019-07-29T01:28:37Z")

</div>

I’m on the stable Windows release: 4.10.2

I’m using the Slicer Elastix module to perform rigid registration. I know the registration is successful because the output volume computed by elastix/transformix is correctly aligned with the reference volume.

However I’m getting a weird bug where the transform output by elastix is incorrect: the image not aligned and I’m also getting lots of scaling even though it’s a rigid transform. Moreover if I invert the transformation in the Transforms module, there are no visible changes in Slicer.

I have been using the same parameter file and images since Oct 2018, when everything was working fine. The only thing that has changed since then is the Slicer version and maybe the Slicer Elastix extension?

---

<div class="post-metadata">

**Author:** ![Prashant\_Pandey](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@Prashant\_Pandey](https://discourse.slicer.org/u/Prashant_Pandey)\
**Post date:** [July 29, 2019, 1:37am UTC](https://discourse.slicer.org/t/elastix-outputs-incorrect-transform-even-though-registration-is-successful/7792/2 "2019-07-29T01:37:10Z")

</div>

Actually I think the problem is in the volume rendering module. In slice view the output transformation aligns the images as expected, but when rendered through the volume rendering module the images don’t line up at all.

---

<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:** [July 29, 2019, 3:18am UTC](https://discourse.slicer.org/t/elastix-outputs-incorrect-transform-even-though-registration-is-successful/7792/3 "2019-07-29T03:18:04Z")

</div>

Volume renderer does not support dynamic application of non-linear transforms. You need to harden the transform on the volume to make it appear correctly in volume rendering. I’ve added an [issue to the bugtracker](https://issues.slicer.org/view.php?id=4701) to communicate this limitation to users better.

---

<div class="post-metadata">

**Author:** ![Prashant\_Pandey](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@Prashant\_Pandey](https://discourse.slicer.org/u/Prashant_Pandey)\
**Post date:** [July 29, 2019, 6:10pm UTC](https://discourse.slicer.org/t/elastix-outputs-incorrect-transform-even-though-registration-is-successful/7792/4 "2019-07-29T18:10:57Z")

</div>

I’m surprised I haven’t come across this issue before, I’ve been using slicer elastix transforms in Slicer for more than two years and I’m sure I must have used volume rendering at some point to visualize results
