itkwidgets icon indicating copy to clipboard operation
itkwidgets copied to clipboard

itkwidgets installation missing compare

Open tenres opened this issue 10 months ago • 4 comments

I get the below error when trying to import compare. I would like to use it with ITKElastix.

from itkwidgets import compare, checkerboard, view Traceback (most recent call last): File "", line 1, in ImportError: cannot import name 'compare' from 'itkwidgets' (anaconda3/envs/itk_elastix/lib/python3.8/site-packages/itkwidgets/init.py)

I used the following command for installation: pip install 'itkwidgets[all]>=1.0a23'

Thanks!

tenres avatar Mar 29 '24 22:03 tenres

Right now a lot of our docs reference and older version of itkwidgets that people are having issues with. I have a PR open to fix this. In the meantime I would use 1.0a49: pip install itkwidgets[all]>=1.0a49.

bnmajor avatar Mar 31 '24 18:03 bnmajor

Thanks, but still have the same issue.

tenres avatar Apr 01 '24 14:04 tenres

I'm sorry I missed this at first but it looks like it's compare_images, not compare. See this example.

bnmajor avatar Apr 01 '24 14:04 bnmajor

Great. So, it seems the checkerboard function has been integrated into the "compare_images" function and the older "compare" function for side-by-side image comparison has been removed.

tenres avatar Apr 01 '24 14:04 tenres