-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
When using MultiMetricMultiResolutionRegistration with the object-oriented interface and using SetNumberOfThreads, ITKElastix will throw a segmentation fault when setting more than one thread.
Code to test, this will result in a segmentation fault (based on the example here ).
Using python 3.7.7 and ITK-Elastix 0.14.1
import itk
# Import Images
fixed_image = itk.imread('data/CT_2D_head_fixed.mha', itk.F)
moving_image = itk.imread('data/CT_2D_head_moving.mha', itk.F)
parameter_object = itk.ParameterObject.New()
parameter_object.AddParameterFile('data/parameters_Bspline_Multimetric.txt')
elastix_object = itk.ElastixRegistrationMethod.New(fixed_image,moving_image)
elastix_object.SetParameterObject(parameter_object)
elastix_object.SetLogToConsole(False)
# You can set this to 1, but setting any number > 1 will result in a segmentation fault
elastix_object.SetNumberOfThreads(2)
elastix_object.UpdateLargestPossibleRegion()
result_image = elastix_object.GetOutput()
Metadata
Metadata
Assignees
Labels
No labels