[ITK-users] ITKModuleTemplate and external modules for use with python
Darren.Thompson at csiro.au
Darren.Thompson at csiro.au
Thu Jul 12 07:36:06 EDT 2018
Hi All,
I'm revisiting making my own external ITK module (for use in Python) after an initial attempt a while back. This time I've managed to get much further and have managed to successfully create python wheels following the directions on https://github.com/InsightSoftwareConsortium/ITKPythonPackage/blob/master/docs/Build_ITK_Module_Python_packages.rst , I've created Windows wheels via AppVeyor and linux wheels with CircleCI in addition to locally built versions via the docker based method. All tests are passed successfully.
However, after installing them with pip in a fresh virtual environment in a Python 3.6 instance (Anaconda), I seem to always get a kernel crash (segmentation fault) when I try and actually use or create one of my custom filters.
To strip everything back to basics I generated a vanilla external module, using only default values with:
python -m cookiecutter gh:InsightSoftwareConsortium/ITKModuleTemplate
I then built the wheels as described and installed them into the virtual environment.
Using the following basic python script below results in a seg fault,
import itk
InputType = itk.Image[itk.F,2]
OutputType = itk.Image[itk.F,2]
test = itk.MinimalStandardRandomVariateGenerator.New()
I get the same result if I try and create any of the classes defined in ITKModuleTemplate, however I can successfully create standard itk filters.
After running the script with gdb I see that it crashes in the call as follows:
#1 0x00007fffe7405373 in PyInit__ModuleTemplatePython () from /home/tho78s/anaconda3/lib/python3.6/site-packages/itk/Configuration/../_ModuleTemplatePython.so
I'm currently out of ideas as to where the problem lies and I seem to get the identical problem in Windows too.
Any help or pointers in to what is going wrong would be greatly appreciated!
I you want any extra info, feel free to contact me.
Regards,
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://itk.org/pipermail/insight-users/attachments/20180712/9ab6de77/attachment.html>
More information about the Insight-users
mailing list