SuperElastix / SimpleElastix

Multi-lingual medical image registration library

Home Page:http://simpleelastix.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change default optimizer with python wrapper

MMRohe opened this issue · comments

Hello,

I would like to use exhaustive search optimizer with python wrapper, but I do not seem to find the correct way to do it even though I have read extansivly the documentation.

Currently here is my code :

elastixImageFilter = sitk.ElastixImageFilter()
elastixImageFilter.SetFixedImage(image_fixed)
elastixImageFilter.SetMovingImage(image_moving)
parameters = sitk.GetDefaultParameterMap("translation")
parameters['Optimizer'] = ['FullSearch']
elastixImageFilter.SetParameterMap(parameters)
elastixImageFilter.Execute()

I have tried with changing 'FullSearch' for 'ExhaustiveSearch' which seems to be another way to call the method but I always end up getting :
Description: itk::ERROR: ElastixMain(0x7fffdfdee090): The following component could not be created:

any idea on how to do it with SimpleElastix for sitk ?