Thanks for the suggestions, @Stephen_Aylward . For your first option,
I get the following error:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Input In [4], in <module>
----> 1 resample = ttk.ResampleImage.New(Input=im1, MakeIsotropic=True)
2 resample.Update()
3 im1Iso = resample.GetOutput()
File ~/anaconda3/envs/PT2/lib/python3.9/site-packages/itk/support/lazy.py:137, in LazyITKModule.__getattribute__(self, attr)
135 module = self.__belong_lazy_attributes[attr]
136 namespace = {}
--> 137 base.itk_load_swig_module(module, namespace)
138 self.loaded_lazy_modules.add(module)
139 for k, v in namespace.items():
File ~/anaconda3/envs/PT2/lib/python3.9/site-packages/itk/support/base.py:102, in itk_load_swig_module(name, namespace)
100 deps = l_data.get_module_dependencies()
101 for dep in deps:
--> 102 itk_load_swig_module(dep, namespace)
104 if itkConfig.ImportCallback:
105 itkConfig.ImportCallback(name, 0)
File ~/anaconda3/envs/PT2/lib/python3.9/site-packages/itk/support/base.py:102, in itk_load_swig_module(name, namespace)
100 deps = l_data.get_module_dependencies()
101 for dep in deps:
--> 102 itk_load_swig_module(dep, namespace)
104 if itkConfig.ImportCallback:
105 itkConfig.ImportCallback(name, 0)
[... skipping similar frames: itk_load_swig_module at line 102 (3 times)]
File ~/anaconda3/envs/PT2/lib/python3.9/site-packages/itk/support/base.py:102, in itk_load_swig_module(name, namespace)
100 deps = l_data.get_module_dependencies()
101 for dep in deps:
--> 102 itk_load_swig_module(dep, namespace)
104 if itkConfig.ImportCallback:
105 itkConfig.ImportCallback(name, 0)
File ~/anaconda3/envs/PT2/lib/python3.9/site-packages/itk/support/base.py:98, in itk_load_swig_module(name, namespace)
86 this_module.__templates_loaded = True
88 # Now, we definitely need to load the template_feature instantiations from the
89 # named module, and possibly also load the underlying SWIG module. Before
90 # we can load the template_feature instantiations of this module, we need to load
(...)
96 # via the itk_base_global_module_data instance defined at the bottom of this file, which
97 # knows how to find those configuration files.
---> 98 l_data = itk_base_global_module_data[name]
99 if l_data:
100 deps = l_data.get_module_dependencies()
KeyError: 'ITKImageGrid'
If so, could you please show me the output of pip list? It seems like there might be a version mis-match of itk and tubetk wheels.
Ideally the follow should work:
pip install --pre itk (to get itk v5.3rc03)
pip install itk-tubetk (to get itk-tubetk 1.1)
I suspect you’re using the (should be correct but might not be working) following
pip install itk
pip install itk-tubetk
The current version of tubetk is meant to work with the soon to be released v5.3…but I see that it still hasn’t been released on pypi yet, so that might be the source of your troubles. It is weird, however, that your itk.version_ reports 5.3.0, so I really need to learn more about your setup and then check with ITK gurus.
If you are compiling, then please let me know what OS, compiler, and ITK source code git tag you’re using.
You are correct. With the first command it installed ITK 5.2.1, but when I use the second command, it uninstalled the previous version and installed 5.3rc3.
Based on your explanation this should work.
I tried a clean install in a different python environment and still the same result.
Great! Just in case someone else wants to replicate this, here is a video that shows a workflow that automatically closes open ends of the vessel tree using shrink-wrapping: