[ITK-users] ITKModuleTemplate and external modules for use with python

Dženan Zukić dzenanz at gmail.com
Mon Jul 16 12:35:28 EDT 2018


Hi Darren,

can you please re-post this question on the forum
<https://discourse.itk.org/>? Many of us were on vacation in the last few
weeks.

Regards,
Dženan

On Thu, Jul 12, 2018 at 7:47 AM <Darren.Thompson at csiro.au> wrote:

> 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
>
>
> The ITK community is transitioning from this mailing list to
> discourse.itk.org. Please join us there!
> ________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> https://itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://itk.org/pipermail/insight-users/attachments/20180716/465a1ad2/attachment.html>


More information about the Insight-users mailing list