-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unable to run example notebooks #52
Comments
@llangholz89 there is a known issue with the current NumPy notebook and ITKElastix, |
@thewtex I'm not familiar with the issue you're referencing, but as I've encountered this issue on the other notebooks as well I'd guess it's probably not the same. Looking at the elastic output logs, it seems that the registration process actually completes, but then hangs when trying to write out or return the resulting image (this was the case on the notebook examples and on my attempts with my own data, though attempts to write out intermediate images in my own example worked...). I thought perhaps it could be related to #51?? |
@llangholz89 the notebook and |
@thewtex thanks for the update. Unfortunately I'm still seeing the same behavior. Across each of the example notebooks (and my own attempts), things crash during the Perhaps there's something else I'm missing, because the examples seem to work fine for you, correct? If there's a relevant log or something else you'd like me to try, let me know! |
@llangholz89 thanks for the follow-up note. Yes, the examples are working fine for me locally, and they are tested with every change following #54 I am wondering if there is something different with your system -- what is your operating system, Python version, Python distribution, and processor? |
Strange... |
As a follow up, I tried running the same registration presented in the
And get a Looking at the output log, it seems like everything completed and processed as expected. I'll skip most of it, but the last few lines read:
From what I can tell it processes fine, but does not return correctly. In fact, I tried adjusting the parameters to write intermediate images, and those get produced just fine as well. Maybe you have some ideas on what could be causing the seg fault? |
The segfault is a Mac issue, a workaround can be found in the newly added notebooks, but a fix for the segfault is still in progress. |
I have the same issue running MacOS 10.15.7 (Catalina). Within Jupyter Notebook, the kernel gets restarted once calling the registration module. Running as a regular python file results in a segmentation fault. You mentioned a workaround, but where do I find it? |
@ViktorvdValk : Thanks for the prompt reply. I had only tested the0_HelloRegistrationWorld.ipynb notebook which does not contain the important import statement from itk import itkElastixRegistrationMethodPython which makes it running on MacOS. |
For more information, and a script to run on the Python package binaries and elastix, see the commit messages in: |
The segmentation fault is triggered by the Update() and UpdateLargestPossibleRegion() functions of the itk.ElastixRegistrationMethod, these are inherited from the iktProcessObject. In the Update() functions the GetPrimaryOutput function is called, which returns a DataObject. However in the itkDataObject.h the classes are given this macro aswell: Could this be the reason for the segfault on macos? Should these classes have the macro ITK_TEMPLATE_EXPORT aswell? |
👍 good progress. A few next steps:
|
The full backtrace of the segfault with lldb gives this: 2020-12-28 10:29:23.448298+0100 python[1300:29062] dynamic_cast error 1: Both of the following type_info's should have public visibility. At least one of them is hidden. N3itk10DataObjectE, N3itk5ImageIfLj2EEE. The complete list of type info's that should have public visibility for regular registration (Euler Transform) call is the following: N3itk10DataObjectE N7elastix21EulerTransformElastixINS_15ElastixTemplateIN3itk5ImageIfLj2EEES4_EEEE This would mean that it's both ITK and Elastix that lack the public visibility, right? My attempts of improving this visibility in both ITK and Elastix haven't been fruitful so far, but I'll keep on debugging. |
thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
|
@ViktorvdValk correct. However, the CMake setting that should be set to |
@ViktorvdValk great work! I am not sure why it is complaining about the The other symbols identify issues that we can correct. These are symbols that encode the API of the human-readable source code into the binary. You can decode them with the
Checking some of these associated classes, they need the For an example of what to add: |
Yes, I tried that on this branch of elastix, but running an ITKElastix package build with that branch gave exactly the same errors and backtrace. |
We should just re-use the |
Yes I re-used that macro in elxMacro.h (I tried using in in CMakelist.txt as well). |
It does not need to be copied at all -- it is available in itkMacro.h. |
@llangholz89 @dvdm please try |
This should be addressed now -- if not, please open another issue. |
@thewtex thanks for the update. I haven't had a chance to test it yet as I'm currently battling issues with pip not being able to find version Thanks for the updates and the work on this though! |
@llangholz89 thanks for the update. Something to try for the pip issues -- upgrade the version of pip with |
Thanks for the tip, unfortunately that did not work either... My colleague was able to pull it though, and I don't want to pollute this thread with problem solving pip issues, so I'll try to figure it out (I appreciate the help though!). |
Attempting to run the example notebooks causes the kernel to die when executing the registration step.
After running into issues attempting my own registrations, I gave the examples a try without any luck. Not sure that the issues are necessarily related, but figured I'd start here with the examples.
I'm using the python package for itk:
itk 5.1.0.post3
(<-- perhaps this is the issue???) and the most recent ITKElastix (0.6.2
).Perhaps I'm missing something simple, but any help, tips, or guidance is appreciated! Thanks!
The text was updated successfully, but these errors were encountered: