Last pip package doesn't work with itk>5.3
If you install pip itk package with itk>5.3 and install itk-morphologicalcontourinterpolation 1.1.0 then your python code will exit without completing or any exception thrown when the itk.morphological_contour_interpolator function is called.
Can be tested using a virtual environment with (I've only tested with python==3.10): pip install itk==5.4 pip install itk-morphologicalcontourinterpolation When running the code below the program will exit at line:
itk_interp = itk.morphological_contour_interpolator(itk_im)
and print('finished') will not be reached, if you revert to itk==5.3 it works.
Example python code:
import numpy as np
import itk
def create_np_test_image():
im_array = np.zeros([30,30,30],dtype=np.uint8)
pad = 4
for i in range(pad,im_array.shape[0]-pad):
if i%2:
im_array[i,+i:-i,+i:-i] = 1
itk_im = itk.image_from_array(im_array )
return itk_im
if __name__ == '__main__':
itk_im = create_np_test_image()
i_np = itk.array_from_image(itk_im)
try:
itk_interp = itk.morphological_contour_interpolator(itk_im)
itk_interp_np = itk.array_from_image(itk_interp)
except Exception as e:
print(f'Exception {e}')
print('finished')
Hi, package bump in progress in:
https://github.com/KitwareMedical/ITKContourInterpolation/pull/128
I see the changes have been merged for https://github.com/KitwareMedical/ITKContourInterpolation/pull/128. Any idea when a new ITK package will be released?
I just created a new tag. If this CI run is successful, the packages should appear on PyPI.