InsightSoftwareConsortium / ITKThickness3D

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

Problem with ITK 5.1.0 #32

Closed jbi35 closed 3 years ago

jbi35 commented 4 years ago

Hi there, after updating to itk 5.1.0 I am experiencing an issue with the BinaryThinningImageFilter3D which did not occur with previous versions. Below is a minimal example to reproduce this:

import itk
import numpy as np
array = np.zeros((6, 5, 5), np.uint8)
array[:, 1:4, 1:4] = 1
origin = [0.0, 0.0, 0.0]
spacing = [0.5, 0.5, 0.7]

image_itk = itk.GetImageFromArray(array)
image_itk.SetOrigin(origin)
image_itk.SetSpacing(spacing)

skeleton = itk.BinaryThinningImageFilter3D.New(image_itk)
skeleton.Update()

When running this in cobination with the latest itk5.1.0, I get the following error:

RuntimeError: /Users/kitware/Dashboards/ITK/ITKPythonPackage/standalone-build/ITKs/Modules/Core/Common/src/itkProcessObject.cxx:1403:
itk::ERROR: BinaryThinningImageFilter3D(0x7fc108b065e0): Input Primary is required but not set.

When I downgrade to itk5.0.1 the same code runs just fine. Do you have any suggestions?

jmargeta commented 4 years ago

With the above minimal example I am getting this instead:

RuntimeError: /work/standalone-x64-build/ITKs/Modules/Core/Common/src/itkMultiThreaderBase.cxx:424:
itk::ERROR: MultiThreaderBase::GetGlobalDefaultThreader returned Unknown!

Downgrading to itk==5.0.1 and using it with itk-thickness3d==5.1 seems to work fine.

thewtex commented 3 years ago

A new package is available, itk-thickness3d 5.1.1 -- please give it a try.