I am using an ITK BinaryThinningImageFilter3D. However, the code (where mask
is an np.uint8
3D Numpy array filled with 0
s and 1
s - it is a voxel representation of an arthery)
import itk
output = itk.BinaryThinningImageFilter3D.New(
itk.GetImageFromArray(mask)
)
gives
Process finished with exit code -1073741819 (0xC0000005)
This answer points towards Python version - I checked it, everything is x64. I am leaning towards some kind of data type incompatibility. Any hints on how to fix?
Wrap this in a try...catch
block and print the error message. That will tell you what went wrong. Perhaps something like:
try:
import itk
output = itk.BinaryThinningImageFilter3D.New(
itk.GetImageFromArray(mask))
except RuntimeError as e:
print('Got an exception\n' + str(e))
I turns out there was a segfault. Issue fixed in new version of the library.
User contributions licensed under CC BY-SA 3.0