Elastix registration returns with error status

This is great,
Any Idea why I am getting an error on Slicer 4.8.0 r26489 Linux ?
It shows that It has finished doing the registration but an error happens after that

  Progress: 98%
  Progress: 99%
  Progress: 100%
  Progress: 100%
  Writing image ...
  Applying final transform took 0.89s

Final metric value  = -0.616632
Settings of AdaptiveStochasticGradientDescent for all resolutions:
( SP_a 20060.421365 71030.105546 120402.996469 81953.145725 )
( SP_A 20.000000 20.000000 20.000000 20.000000 )
( SP_alpha 1.000000 1.000000 1.000000 1.000000 )
( SigmoidMax 1.000000 1.000000 1.000000 1.000000 )
( SigmoidMin -0.055680 -0.202084 -0.604650 -0.914502 )
( SigmoidScale 0.000000 0.000000 0.000000 0.000000 )

Time spent on saving the results, applying the final transform etc.: 904 ms.
Running elastix with parameter file 1: "/home/user/.config/NA-MIC/Extensions-26489/SlicerElastix/lib/Slicer-4.8/qt-scripted-modules/Resources/RegistrationParameters/Parameters_BSpline.txt", has finished.

Current time: Thu Nov 16 17:47:16 2017.
Time used for running elastix with this parameter file:


Total time elapsed: 17.4s.

Command 'elastix' returned non-zero exit status -11
Traceback (most recent call last):
  File "/home/user/.config/NA-MIC/Extensions-26489/SlicerElastix/lib/Slicer-4.8/qt-scripted-modules/Elastix.py", line 325, in onApplyButton
    movingVolumeMaskNode = self.movingVolumeMaskSelector.currentNode())
  File "/home/user/.config/NA-MIC/Extensions-26489/SlicerElastix/lib/Slicer-4.8/qt-scripted-modules/Elastix.py", line 556, in registerVolumes
  File "/home/user/.config/NA-MIC/Extensions-26489/SlicerElastix/lib/Slicer-4.8/qt-scripted-modules/Elastix.py", line 496, in logProcessOutput
    raise subprocess.CalledProcessError(return_code, "elastix")
CalledProcessError: Command 'elastix' returned non-zero exit status -11

Please check “Keep temporary files” checkbox in advanced section before starting the registration. When it completes, click “Show temp folder” button and see if the most recently created folder contains input and result-transform folders. Are there result.0.mhd and result.1.mhd files in there?

Have you installed or built Elastix yourself, or you use Elastix that is bundled with the Slicer extension?

Thanks for the help,
I checked and It contains the input and result-transform folders and the results.0.mhd and results.1.mhd are also in there.

I have downloaded the Linux 64 bit binaries from their website and after extracting, I’m selecting the bin folder location for the custom elastix toolbax location section of the Advance section

We’ve made some fixes, so if you use most recent nightly versions then it may not be necessary to set up your own Elastix (the one bundled with the extension should work).

If it still doesn’t work then set up your own Elastix. Downloading and extracting Elastix is not enough but you also need to “install” it as described here.