InsightSoftwareConsortium / ITKThickness3D

An ITK module to compute 3D thickness
Apache License 2.0
41 stars 18 forks source link

Segmentation fault when calling MedialThicknessImageFilter3D on Linux #16

Closed jbi35 closed 5 years ago

jbi35 commented 5 years ago

Hi, I've been using the BinaryThinningImageFilter3D and the MedialThicknessImageFilter3D on my Mac (OS 10.14.3 with Python 3.6 ) for some time now. However, I keep getting a segmentation fault when calling the MedialThicknessImageFilter3D under Linux, while the same code executes flawlessly under osx. I am a bit out of my depth here and don't know whether the issue lies in the data I pass to the filter of if this is a Bug.

The problem can be reproduced with the attached code snipped and the docker container by following these steps:

  1. Build the docker image: docker build -t test/modgen .
  2. Run docker container: docker run -it test/modgen /bin/bash
  3. Install ITKThickness3D: pip install itk-thickness3d
  4. Run the code provide in medial_axis_min.py in the container
T4mmi commented 5 years ago

Hi @jbi35 thanks for your feedback, indeed there is a segfault with the 5.2b2 no matter wich OS you use...

way to reproduce:

git clone https://github.com/InsightSoftwareConsortium/ITKThickness3D
cd ITKThickness3D/test
pip install itk-thickness3d==5.1b1
python itkThickness3DTest.py
pip install itk-thickness3d==5.1b2
python itkThickness3DTest.py

I'll dig into this, meanwhile a temporary fix is to force the 5.1b1 pip install itk-thickness3d==5.1b1 be careful, in this version the medial thickness is <0 and only half what it should be, you have to multiply the result by -2 to get the proper behavior (see PR#13)

jbi35 commented 5 years ago

Hi @T4mmi, thanks for your help. I should have checked for the version, sorry. Also thanks for the heads up regarding PR#13, I'll keep that in mind and stick with 5.1b1 for now.

T4mmi commented 5 years ago

@jbi35 the problem is solved, you can now install the latest stable version of ITKThickness3D

pip install itk-thickness3d