SuperElastix / SimpleElastix

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

Transformix not working and leading to console/kernel restarting #445

Open phillipmuza opened 2 years ago

phillipmuza commented 2 years ago

I'm trying to run transformix using python 3.9, however whenever I do it begins initialising transformix, nothing else happens for a while, and then the kernel restarts. I've tried running this in Spyder and Conda prompt with the same results. This is the code I'm using:

transformix_parameters = os.path.join(elastix_path, "TransformParameters.1.txt")
parameterMap_transformix = sitk.ReadParameterFile(transformix_parameters)
parameterMap_transformix["FinalBSplineInterpolationOrder"] = ["0"]

transformixImageFilter = sitk.TransformixImageFilter() 
transformixImageFilter.SetMovingImage(transformix_movingImage)
transformixImageFilter.SetTransformParameterMap(parameterMap_transformix)

transformixImageFilter.Execute()
transformix_resultImage = transformixImageFilter.GetResultImage()
sitk.WriteImage(transformix_resultImage,"transformix/result.mhd")

And this is the log output:

ELASTIX version: 5.000
Command line options from ElastixBase:
-out      ./
-threads  unspecified, so all available threads are used
-def      unspecified, so no input points transformed
-jac      unspecified, so no det(dT/dx) computed
-jacmat   unspecified, so no dT/dx computed

Reading input image ...
  Reading input image took 0.000056 s
Calling all ReadFromFile()'s ...