SuperElastix / SimpleElastix

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

Most basic example fails to run on Mac OS X 10.15.7 with Python 3.9 SimpleElastix 2.0.0rc2.dev908 #426

Open matthiasschabel opened 3 years ago

matthiasschabel commented 3 years ago

`import SimpleITK as sitk

fixedImageFilename = "fixed.dcm" movingImageFilename = "moving.dcm"

fixedImage = sitk.ReadImage(fixedImageFilename) movingImage = sitk.ReadImage(movingImageFilename)

resultImage = sitk.Elastix(fixedImage, movingImage)

print('Done')`

runs through the ReadImage calls, fails in sitk.Elastix with following error:

Traceback (most recent call last): File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1477, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/Users/schabelm/Desktop/PycharmProjects/ImageRegistration/main.py", line 23, in resultImage = sitk.Elastix(fixedImage, movingImage) File "/Users/schabelm/Desktop/PycharmProjects/ImageRegistration/venv/lib/python3.9/site-packages/SimpleITK/SimpleITK.py", line 11188, in Elastix return _SimpleITK.Elastix(*args) RuntimeError: Exception thrown in SimpleITK Elastix: /Users/francesco/dafne/SimpleElastix/Code/Elastix/src/sitkElastixImageFilterImpl.cxx:259: sitk::ERROR: itk::ExceptionObject (0x7fded202ebb0) Location: "unknown" File: /Users/francesco/dafne/SimpleElastix/build3.9/Elastix/Core/Main/elxElastixFilter.hxx Line: 253 Description: itk::ERROR: ElastixFilter(0x7fded201ab30): Internal elastix error: See elastix log (use LogToConsoleOn() or LogToFileOn()).

Any thoughts? This looks to be beyond my Python/C++/SWIG pay grade...