Elastix module cannot install "Final Linear Interpolator" component

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.

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

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

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?


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

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.

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.

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?


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 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.

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?

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.

1 Like