Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last pip package doesn't work with itk>5.3 #127

Open
bootsma opened this issue Feb 21, 2025 · 3 comments
Open

Last pip package doesn't work with itk>5.3 #127

bootsma opened this issue Feb 21, 2025 · 3 comments

Comments

@bootsma
Copy link

bootsma commented Feb 21, 2025

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')
@thewtex
Copy link
Collaborator

thewtex commented Feb 21, 2025

Hi, package bump in progress in:

#128

@bootsma
Copy link
Author

bootsma commented Feb 28, 2025

I see the changes have been merged for #128. Any idea when a new ITK package will be released?

@dzenanz
Copy link
Member

dzenanz commented Feb 28, 2025

I just created a new tag. If this CI run is successful, the packages should appear on PyPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants