Hello
I also have some problem with this extension. Tried it yesterday twice on different CTs. I’m pasting whole code from python interaction. I think the problem is with elastix, it can’t get the measurements right. If you can help me I’d be grateful.
which elastix: /Applications/Slicer.app/Contents/Extensions-30893/SlicerElastix/lib/Slicer-5.0/elastix
which elastix: /Applications/Slicer.app/Contents/Extensions-30893/SlicerElastix/lib/Slicer-5.0/elastix
elastix runs at: Mac-mini-Micha.local
elastix runs at: Mac-mini-Micha.local
macOS 12.6 (x64), 21G115
macOS 12.6 (x64), 21G115
with 8192 MB memory, and 8 cores @ 2400 MHz.
with 8192 MB memory, and 8 cores @ 2400 MHz.
-------------------------------------------------------------------------
-------------------------------------------------------------------------
Running elastix with parameter file 0: "/Applications/Slicer.app/Contents/Extensions-30893/ABLTemporalBoneSegmentation/lib/Slicer-5.0/qt-scripted-modules/Resources/Parameters/Parameters_Rigid.txt".
Running elastix with parameter file 0: "/Applications/Slicer.app/Contents/Extensions-30893/ABLTemporalBoneSegmentation/lib/Slicer-5.0/qt-scripted-modules/Resources/Parameters/Parameters_Rigid.txt".
Current time: Sun Oct 2 08:45:18 2022.
Current time: Sun Oct 2 08:45:18 2022.
Reading the elastix parameters from file ...
Reading the elastix parameters from file ...
Installing all components.
Installing all components.
InstallingComponents was successful.
InstallingComponents was successful.
ELASTIX version: 5.0.1
ELASTIX version: 5.0.1
Command line options from ElastixBase:
Command line options from ElastixBase:
-f /private/var/folders/l7/h7lnn18d3zdc6vc84b_yvcxc0000gn/T/Slicer-michalkaczmarczyk/Elastix/20221002_084517_248/input/fixed.mha
-f /private/var/folders/l7/h7lnn18d3zdc6vc84b_yvcxc0000gn/T/Slicer-michalkaczmarczyk/Elastix/20221002_084517_248/input/fixed.mha
-m /private/var/folders/l7/h7lnn18d3zdc6vc84b_yvcxc0000gn/T/Slicer-michalkaczmarczyk/Elastix/20221002_084517_248/input/moving.mha
-m /private/var/folders/l7/h7lnn18d3zdc6vc84b_yvcxc0000gn/T/Slicer-michalkaczmarczyk/Elastix/20221002_084517_248/input/moving.mha
-fMask /private/var/folders/l7/h7lnn18d3zdc6vc84b_yvcxc0000gn/T/Slicer-michalkaczmarczyk/Elastix/20221002_084517_248/input/fixedMask.mha
-fMask /private/var/folders/l7/h7lnn18d3zdc6vc84b_yvcxc0000gn/T/Slicer-michalkaczmarczyk/Elastix/20221002_084517_248/input/fixedMask.mha
-mMask /private/var/folders/l7/h7lnn18d3zdc6vc84b_yvcxc0000gn/T/Slicer-michalkaczmarczyk/Elastix/20221002_084517_248/input/movingMask.mha
-mMask /private/var/folders/l7/h7lnn18d3zdc6vc84b_yvcxc0000gn/T/Slicer-michalkaczmarczyk/Elastix/20221002_084517_248/input/movingMask.mha
-out /private/var/folders/l7/h7lnn18d3zdc6vc84b_yvcxc0000gn/T/Slicer-michalkaczmarczyk/Elastix/20221002_084517_248/result-transform/
-out /private/var/folders/l7/h7lnn18d3zdc6vc84b_yvcxc0000gn/T/Slicer-michalkaczmarczyk/Elastix/20221002_084517_248/result-transform/
-p /Applications/Slicer.app/Contents/Extensions-30893/ABLTemporalBoneSegmentation/lib/Slicer-5.0/qt-scripted-modules/Resources/Parameters/Parameters_Rigid.txt
-p /Applications/Slicer.app/Contents/Extensions-30893/ABLTemporalBoneSegmentation/lib/Slicer-5.0/qt-scripted-modules/Resources/Parameters/Parameters_Rigid.txt
-threads unspecified, so all available threads are used
-threads unspecified, so all available threads are used
WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all.
WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all.
The default value "true" is used instead.
The default value "true" is used instead.
WARNING: The option "UseDirectionCosines" was not found in your parameter file.
WARNING: The option "UseDirectionCosines" was not found in your parameter file.
From elastix 4.8 it defaults to true!
From elastix 4.8 it defaults to true!
This may change the behavior of your registrations considerably.
This may change the behavior of your registrations considerably.
Command line options from TransformBase:
Command line options from TransformBase:
-t0 unspecified, so no initial transform used
-t0 unspecified, so no initial transform used
Reading images...
Reading images...
Reading images took 477 ms.
Reading images took 477 ms.
WARNING: the fixed pyramid schedule is not fully specified!
WARNING: the fixed pyramid schedule is not fully specified!
A default pyramid schedule is used.
A default pyramid schedule is used.
WARNING: the moving pyramid schedule is not fully specified!
WARNING: the moving pyramid schedule is not fully specified!
A default pyramid schedule is used.
A default pyramid schedule is used.
WARNING: The parameter "AutomaticTransformInitializationMethod", requested at entry number 0, does not exist at all.
WARNING: The parameter "AutomaticTransformInitializationMethod", requested at entry number 0, does not exist at all.
The default value "GeometricalCenter" is used instead.
The default value "GeometricalCenter" is used instead.
Transform parameters are initialized as: [0, 0, 0, -25.126531652343715, -31.40466437890626, -40.37869225390621]
Transform parameters are initialized as: [0, 0, 0, -25.126531652343715, -31.40466437890626, -40.37869225390621]
Scales are estimated automatically.
Scales are estimated automatically.
Scales for transform parameters are: [3401.561698635128, 3491.2521564018725, 2502.4099204386434, 1, 1, 1]
Scales for transform parameters are: [3401.561698635128, 3491.2521564018725, 2502.4099204386434, 1, 1, 1]
Initialization of all components (before registration) took: 9 ms.
Initialization of all components (before registration) took: 9 ms.
Preparation of the image pyramids took: 2600 ms.
Preparation of the image pyramids took: 2600 ms.
Resolution: 0
Resolution: 0
WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all.
WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all.
The default value "false" is used instead.
The default value "false" is used instead.
WARNING: The parameter "CheckNumberOfSamples", requested at entry number 0, does not exist at all.
WARNING: The parameter "CheckNumberOfSamples", requested at entry number 0, does not exist at all.
The default value "true" is used instead.
The default value "true" is used instead.
WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all.
WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all.
The default value "true" is used instead.
The default value "true" is used instead.
WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all.
WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all.
The default value "false" is used instead.
The default value "false" is used instead.
WARNING: The parameter "ErodeMovingMask", requested at entry number 0, does not exist at all.
WARNING: The parameter "ErodeMovingMask", requested at entry number 0, does not exist at all.
The default value "false" is used instead.
The default value "false" is used instead.
Setting the fixed masks took: 1 ms.
Setting the fixed masks took: 1 ms.
Setting the moving masks took: 0 ms.
Setting the moving masks took: 0 ms.
WARNING: The parameter "NumberOfFixedHistogramBins", requested at entry number 0, does not exist at all.
WARNING: The parameter "NumberOfFixedHistogramBins", requested at entry number 0, does not exist at all.
The default value "32" is used instead.
The default value "32" is used instead.
WARNING: The parameter "NumberOfMovingHistogramBins", requested at entry number 0, does not exist at all.
WARNING: The parameter "NumberOfMovingHistogramBins", requested at entry number 0, does not exist at all.
The default value "32" is used instead.
The default value "32" is used instead.
WARNING: The parameter "FixedLimitRangeRatio", requested at entry number 0, does not exist at all.
WARNING: The parameter "FixedLimitRangeRatio", requested at entry number 0, does not exist at all.
The default value "0.01" is used instead.
The default value "0.01" is used instead.
WARNING: The parameter "MovingLimitRangeRatio", requested at entry number 0, does not exist at all.
WARNING: The parameter "MovingLimitRangeRatio", requested at entry number 0, does not exist at all.
The default value "0.01" is used instead.
The default value "0.01" is used instead.
WARNING: The parameter "FixedKernelBSplineOrder", requested at entry number 0, does not exist at all.
WARNING: The parameter "FixedKernelBSplineOrder", requested at entry number 0, does not exist at all.
The default value "0" is used instead.
The default value "0" is used instead.
WARNING: The parameter "MovingKernelBSplineOrder", requested at entry number 0, does not exist at all.
WARNING: The parameter "MovingKernelBSplineOrder", requested at entry number 0, does not exist at all.
The default value "3" is used instead.
The default value "3" is used instead.
WARNING: The parameter "UseFastAndLowMemoryVersion", requested at entry number 0, does not exist at all.
WARNING: The parameter "UseFastAndLowMemoryVersion", requested at entry number 0, does not exist at all.
The default value "true" is used instead.
The default value "true" is used instead.
WARNING: The parameter "UseJacobianPreconditioning", requested at entry number 0, does not exist at all.
WARNING: The parameter "UseJacobianPreconditioning", requested at entry number 0, does not exist at all.
The default value "false" is used instead.
The default value "false" is used instead.
WARNING: The parameter "FiniteDifferenceDerivative", requested at entry number 0, does not exist at all.
WARNING: The parameter "FiniteDifferenceDerivative", requested at entry number 0, does not exist at all.
The default value "false" is used instead.
The default value "false" is used instead.
WARNING: The parameter "SP_A", requested at entry number 0, does not exist at all.
WARNING: The parameter "SP_A", requested at entry number 0, does not exist at all.
The default value "20" is used instead.
The default value "20" is used instead.
WARNING: The parameter "MaximumNumberOfSamplingAttempts", requested at entry number 0, does not exist at all.
WARNING: The parameter "MaximumNumberOfSamplingAttempts", requested at entry number 0, does not exist at all.
The default value "0" is used instead.
The default value "0" is used instead.
WARNING: The parameter "SigmoidInitialTime", requested at entry number 0, does not exist at all.
WARNING: The parameter "SigmoidInitialTime", requested at entry number 0, does not exist at all.
The default value "0" is used instead.
The default value "0" is used instead.
WARNING: The parameter "MaxBandCovSize", requested at entry number 0, does not exist at all.
WARNING: The parameter "MaxBandCovSize", requested at entry number 0, does not exist at all.
The default value "192" is used instead.
The default value "192" is used instead.
WARNING: The parameter "NumberOfBandStructureSamples", requested at entry number 0, does not exist at all.
WARNING: The parameter "NumberOfBandStructureSamples", requested at entry number 0, does not exist at all.
The default value "10" is used instead.
The default value "10" is used instead.
WARNING: The parameter "UseAdaptiveStepSizes", requested at entry number 0, does not exist at all.
WARNING: The parameter "UseAdaptiveStepSizes", requested at entry number 0, does not exist at all.
The default value "true" is used instead.
The default value "true" is used instead.
WARNING: The parameter "AutomaticParameterEstimation", requested at entry number 0, does not exist at all.
WARNING: The parameter "AutomaticParameterEstimation", requested at entry number 0, does not exist at all.
The default value "true" is used instead.
The default value "true" is used instead.
WARNING: The parameter "UseConstantStep", requested at entry number 0, does not exist at all.
WARNING: The parameter "UseConstantStep", requested at entry number 0, does not exist at all.
The default value "false" is used instead.
The default value "false" is used instead.
WARNING: The parameter "MaximumStepLengthRatio", requested at entry number 0, does not exist at all.
WARNING: The parameter "MaximumStepLengthRatio", requested at entry number 0, does not exist at all.
The default value "1" is used instead.
The default value "1" is used instead.
WARNING: The parameter "MaximumStepLength", requested at entry number 0, does not exist at all.
WARNING: The parameter "MaximumStepLength", requested at entry number 0, does not exist at all.
The default value "0.190429" is used instead.
The default value "0.190429" is used instead.
WARNING: The parameter "NumberOfGradientMeasurements", requested at entry number 0, does not exist at all.
WARNING: The parameter "NumberOfGradientMeasurements", requested at entry number 0, does not exist at all.
The default value "0" is used instead.
The default value "0" is used instead.
WARNING: The parameter "NumberOfJacobianMeasurements", requested at entry number 0, does not exist at all.
WARNING: The parameter "NumberOfJacobianMeasurements", requested at entry number 0, does not exist at all.
The default value "1000" is used instead.
The default value "1000" is used instead.
WARNING: The parameter "NumberOfSamplesForExactGradient", requested at entry number 0, does not exist at all.
WARNING: The parameter "NumberOfSamplesForExactGradient", requested at entry number 0, does not exist at all.
The default value "100000" is used instead.
The default value "100000" is used instead.
WARNING: The parameter "SigmoidScaleFactor", requested at entry number 0, does not exist at all.
WARNING: The parameter "SigmoidScaleFactor", requested at entry number 0, does not exist at all.
The default value "0.1" is used instead.
The default value "0.1" is used instead.
Elastix initialization of all components (for this resolution) took: 2 ms.
Elastix initialization of all components (for this resolution) took: 2 ms.
Computing the fixed image extrema took 1 ms.
Computing the fixed image extrema took 1 ms.
Computing the moving image extrema took 1 ms.
Computing the moving image extrema took 1 ms.
Initialization of AdvancedMattesMutualInformation metric took: 5 ms.
Initialization of AdvancedMattesMutualInformation metric took: 5 ms.
Starting automatic parameter estimation for AdaptiveStochasticGradientDescent ...
Starting automatic parameter estimation for AdaptiveStochasticGradientDescent ...
WARNING: The parameter "ASGDParameterEstimationMethod", requested at entry number 0, does not exist at all.
WARNING: The parameter "ASGDParameterEstimationMethod", requested at entry number 0, does not exist at all.
The default value "Original" is used instead.
The default value "Original" is used instead.
Computing JacobianTerms ...
Computing JacobianTerms ...
Computing the Jacobian terms took 0.001969s
Computing the Jacobian terms took 0.001969s
NumberOfGradientMeasurements to estimate sigma_i: 10
NumberOfGradientMeasurements to estimate sigma_i: 10
Sampling gradients ...
Sampling gradients ...
Progress: 0%Time spent in resolution 0 (ITK initialization and iterating): 0.010 s.
Progress: 0%Time spent in resolution 0 (ITK initialization and iterating): 0.010 s.
Stopping condition: Error in metric.
Stopping condition: Error in metric.
Settings of AdaptiveStochasticGradientDescent in resolution 0:
Settings of AdaptiveStochasticGradientDescent in resolution 0:
( SP_a 1.000000 )
( SP_a 1.000000 )
( SP_A 20.000000 )
( SP_A 20.000000 )
( SP_alpha 0.602000 )
( SP_alpha 0.602000 )
( SigmoidMax 1.000000 )
( SigmoidMax 1.000000 )
( SigmoidMin -0.800000 )
( SigmoidMin -0.800000 )
( SigmoidScale 0.000000 )
( SigmoidScale 0.000000 )
itk::ExceptionObject (0x7f8ed8009e70)
itk::ExceptionObject (0x7f8ed8009e70)
Location: "ElastixTemplate - Run()"
Location: "ElastixTemplate - Run()"
File: /Volumes/D/S/S-0-E-b/SlicerElastix-build/elastix/Common/CostFunctions/itkAdvancedImageToImageMetric.hxx
File: /Volumes/D/S/S-0-E-b/SlicerElastix-build/elastix/Common/CostFunctions/itkAdvancedImageToImageMetric.hxx
Line: 916
Line: 916
Description: ITK ERROR: AdvancedMattesMutualInformationMetric(0x7f8ecf813a00): Too many samples map outside moving image buffer: 0 / 1119
Description: ITK ERROR: AdvancedMattesMutualInformationMetric(0x7f8ecf813a00): Too many samples map outside moving image buffer: 0 / 1119
Error occurred during actual registration.
Error occurred during actual registration.
Errors occurred!
Errors occurred!
Error: Command 'elastix' returned non-zero exit status 1.
Traceback (most recent call last):
File "/Applications/Slicer.app/Contents/Extensions-30893/ABLTemporalBoneSegmentation/lib/Slicer-5.0/qt-scripted-modules/ABLTemporalBoneSegmentationModule.py", line 635, in process_transform
output = function()
File "/Applications/Slicer.app/Contents/Extensions-30893/ABLTemporalBoneSegmentation/lib/Slicer-5.0/qt-scripted-modules/ABLTemporalBoneSegmentationModule.py", line 808, in transform
return ABLTemporalBoneSegmentationModuleLogic().apply_elastix_rigid_registration(elastix=self.elastixLogic,
File "/Applications/Slicer.app/Contents/Extensions-30893/ABLTemporalBoneSegmentation/lib/Slicer-5.0/qt-scripted-modules/ABLTemporalBoneSegmentationModule.py", line 1311, in apply_elastix_rigid_registration
elastix.registerVolumes(
File "/Applications/Slicer.app/Contents/Extensions-30893/SlicerElastix/lib/Slicer-5.0/qt-scripted-modules/Elastix.py", line 818, in registerVolumes
self.logProcessOutput(ep)
File "/Applications/Slicer.app/Contents/Extensions-30893/SlicerElastix/lib/Slicer-5.0/qt-scripted-modules/Elastix.py", line 739, in logProcessOutput
raise subprocess.CalledProcessError(return_code, "elastix")
subprocess.CalledProcessError: Command 'elastix' returned non-zero exit status 1.