# 4D registration error with Elastix Registration

**URL:** https://discourse.slicer.org/t/4d-registration-error-with-elastix-registration/15155
**Category:** Support
**Created:** [December 20, 2020, 4:00pm UTC](https://discourse.slicer.org/t/4d-registration-error-with-elastix-registration/15155 "2020-12-20T16:00:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![marianaslicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/marianaslicer/32/8555_2.png) [@marianaslicer](https://discourse.slicer.org/u/marianaslicer)
#### Post date: [December 20, 2020, 4:00pm UTC](https://discourse.slicer.org/t/4d-registration-error-with-elastix-registration/15155/1 "2020-12-20T16:00:50Z")

</div>

Hi everyone,

I’m on the preview release version (4.13) and I’m using the Slicer Elastix module to perform non-rigid registration in the 4D CT dataset of lungs. Firstly, I tried to use the default preset (rigid + bspline parameters) with success since the warped volume was correctly aligned with the reference volume.

Even so, since the patient’s anatomy is nearly the same over the breathing phases (the movement is predominantly in the lungs and diaphragm), I just want to use b-spline parameters. To do so, I added the ‘par0007’ preset to the parameter file database ([http://elastix.bigr.nl/wiki/index.php/Par0007](http://elastix.bigr.nl/wiki/index.php/Par0007)) which seems to be more suitable for my data type. However, when I tried to run the registration, I got the following message regarding the last parameter file (Parameters.MI.RP.Bspline\_tuned.txt):

> Running elastix with parameter file 2: “C:\Users\MIM\AppData\Roaming\NA-MIC\Extensions-29506\SlicerElastix\lib\Slicer-4.13\qt-scripted-modules\Resources\RegistrationParameters\Parameters.MI.RP.Bspline\_tuned.txt”.
> 
> Current time: Sun Dec 20 15:13:23 2020.  
> Reading the elastix parameters from file …
> 
> Error:  
> MattesMutualInformationWithRigidityPenalty(index 3) - This component is not installed!  
> ERROR: error occurred while creating Metric 0.
> 
> itk::ExceptionObject (000000000024F710)  
> Location: “unknown”  
> File: D:\D\P\S-0-E-b\SlicerElastix-build\elastix\Core\Kernel\elxElastixMain.cxx  
> Line: 827  
> Description: itk::ERROR: itk::ERROR: ElastixMain(00000000022942B0): The following component could not be created: MattesMutualInformationWithRigidityPenalty
> 
> ERROR:  
> One or more components could not be created.  
> Errors occurred!  
> vtkDebugLeaks has found no leaks.
> 
> Command ‘elastix’ returned non-zero exit status 1.  
> Traceback (most recent call last):  
> File “C:/Users/MIM/AppData/Roaming/NA-MIC/Extensions-29506/SlicerElastix/lib/Slicer-4.13/qt-scripted-modules/Elastix.py”, line 335, in onApplyButton  
> forceDisplacementFieldOutputTransform = self.forceDisplacementFieldOutputChecbox.checked)  
> File “C:/Users/MIM/AppData/Roaming/NA-MIC/Extensions-29506/SlicerElastix/lib/Slicer-4.13/qt-scripted-modules/Elastix.py”, line 807, in registerVolumes  
> self.logProcessOutput(ep)  
> File “C:/Users/MIM/AppData/Roaming/NA-MIC/Extensions-29506/SlicerElastix/lib/Slicer-4.13/qt-scripted-modules/Elastix.py”, line 728, in logProcessOutput  
> raise subprocess.CalledProcessError(return\_code, “elastix”)  
> subprocess.CalledProcessError: Command ‘elastix’ returned non-zero exit status 1.

Does anyone know why this is happening? and how to fix it?

Thank you!
