# Elastix module cannot install "Final Linear Interpolator" component

**URL:** <https://discourse.slicer.org/t/elastix-module-cannot-install-final-linear-interpolator-component/653>\
**Category:** Support\
**Tags:** registration\
**Created:** [July 7, 2017, 8:15pm UTC](https://discourse.slicer.org/t/elastix-module-cannot-install-final-linear-interpolator-component/653 "2017-07-07T20:15:18Z")\
**Posts on this page:** 8\
**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 7, 2017, 8:15pm UTC](https://discourse.slicer.org/t/elastix-module-cannot-install-final-linear-interpolator-component/653/1 "2017-07-07T20:15:18Z")

</div>

Hi all,

I’m using Elastix to do rigid registration in slicer. However, when I use the option (ResampleInterpolator “FinalLinearInterpolator”) in the elastix parameter file, I get an error (from the log file):

```
Installing all components.
InstallingComponents was successful.

Error:
FinalLinearInterpolator(index 3) - This component is not installed!
ERROR: error occurred while creating ResampleInterpolator 0.

itk::ExceptionObject (000000000012EE58)
Location: "unknown"
File: C:\D\N\E-0\SlicerElastix-build\elastix\src\Core\Kernel\elxElastixMain.cxx
Line: 819
Description: itk::ERROR: ElastixMain(0000000003BCA930): The following component could not be created: FinalLinearInterpolator

ERROR:
One or more components could not be created.
Errors occurred!
vtkDebugLeaks has found no leaks.
Error: 

```

When I use this parameter file directly with elastix outside slicer, there are no errors and the registration is successful. Any reason why the linear resample interpolator does not work?

Thanks,  
Prash

---

<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 7, 2017, 8:17pm UTC](https://discourse.slicer.org/t/elastix-module-cannot-install-final-linear-interpolator-component/653/2 "2017-07-07T20:17:28Z")

</div>

In fact I have noticed that only the B-spline resample interpolator seems to work in Slicer.  
`(ResampleInterpolator "FinalBSplineInterpolator")`

---

<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 7, 2017, 8:18pm UTC](https://discourse.slicer.org/t/elastix-module-cannot-install-final-linear-interpolator-component/653/3 "2017-07-07T20:18:50Z")

</div>

It seems that you have a different installation of Elastix than the one bundled with 3D Slicer (it may be either newer or older, or built with different options). If you prefer to use your local installation then specify the path of your local Elastix in the Advanced section / Custom Elastix toolbox location.

---

<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 7, 2017, 8:32pm UTC](https://discourse.slicer.org/t/elastix-module-cannot-install-final-linear-interpolator-component/653/4 "2017-07-07T20:32:23Z")

</div>

> [@Prashant\_Pandey](#):
>
> In fact I have noticed that only the B-spline resample interpolator seems to work in Slicer.

B-spline gives higher quality results than linear resampling and typically it is not significantly slower. I would recommend to use that instead of linear.

---

<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 7, 2017, 8:32pm UTC](https://discourse.slicer.org/t/elastix-module-cannot-install-final-linear-interpolator-component/653/5 "2017-07-07T20:32:54Z")

</div>

I see, thanks. Is there documentation on the version of Elastix bundled with slicer and the available modules that can be configured in the parameter file?

Thanks,  
Prash

---

<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 7, 2017, 8:45pm UTC](https://discourse.slicer.org/t/elastix-module-cannot-install-final-linear-interpolator-component/653/6 "2017-07-07T20:45:24Z")

</div>

It’s the latest Elastic version built with default options. If you have any specific request for enabling an additional option then modify the build options [here](https://github.com/lassoan/SlicerElastix/blob/master/SuperBuild/External_elastix.cmake) and send a pull request.

Probably the linear interpolator is not included by default for a good reason - but you can double-check that with Elastix developers.

---

<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 7, 2017, 9:01pm UTC](https://discourse.slicer.org/t/elastix-module-cannot-install-final-linear-interpolator-component/653/7 "2017-07-07T21:01:49Z")

</div>

Okay, thanks for the advice!  
On a somewhat related note, I’ve noticed that the transform output by the elastix module is a displacement field. In the case of a rigid registration, it would be nice to get a homogeneous matrix composed of a rotation and translation. Is there a way in slicer to get this representation from the elastix output?

---

<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 7, 2017, 9:31pm UTC](https://discourse.slicer.org/t/elastix-module-cannot-install-final-linear-interpolator-component/653/8 "2017-07-07T21:31:17Z")

</div>

Yes, it would be nice. Unfortunately, elastix cannot write registration result to an ITK transform. As soon as this feature will be added to Elastix, I can add it to SlicerElastix. I would recommend to submit a feature request at [https://github.com/SuperElastix/elastix/issues](https://github.com/SuperElastix/elastix/issues).
