SuperElastix / SimpleElastix

Multi-lingual medical image registration library
http://simpleelastix.github.io
Apache License 2.0
507 stars 149 forks source link

The ElastixImageFilter stuck when using iterative InitialTransformParameterFileName. #494

Open GYDDHPY opened 1 year ago

GYDDHPY commented 1 year ago

Hi all. I'm using SimpleElastix ElastixImageFilter to inverse the transform. The forward registration contains a translation and then the affine method. The procedure returns the TransformParameters.0.txt file for translation operation and the TransformParameters.1.txt for affine operation. The TransformParameters.0.txt is the InitialTransformParameterFileName in the TransformParameters.1.txt. To inverse the transform, following the instruction of SimpleElastix and elastix, I pass the TransformParameters.1.txt file by using the SetInitialTransformParameterFileName function. However, when calling the Execute(), the program seems stuck and return nothing even I have set LogToConsoleOn() explicitly. When I set the InitialTransformParameterFileName in the TransformParameters.1.txt to "NoInitialTransform" manually, the program is able to run and return the registration result. Besides, I try to use a ElastixImageFilter in the forward registration, using an initial transform which also contains an initial transform. The program also stucks. Overall, the registration may stuck when using an initial transform which contains its own initial transform.

Why the program stucks? How to deal this problem?