I am trying to use ITK and VTK together in python. I installed everything through pip. Quickly trying I get the following error:
$ conda create -n proc python=3 $ source activate proc $ pip install itk $ conda install -c clinicalgraphics vtk $ python >>> import itk >>> image_type = itk.Image[itk.UC, 3] >>> itk_vtk_converter = itk.ImageToVTKImageFilter[image_type].New() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/babesler/anaconda3/envs/imapro/lib/python3.6/site-packages/itkLazy.py", line 40, in __getattribute__ value = types.ModuleType.__getattribute__(self, attr) AttributeError: module 'itk' has no attribute 'ImageToVTKImageFilter'
From the online example I can see that:
This requires Module_ITKVtkGlue to be turned on in ITK’s CMake configuration.
It is nice to build be able to prototype ITK/VTK in python without having to build from scratch.
I’m wondering if it’s possible to build a Python wheel with Module_ITKVtkGlue? Is it possible to do the same thing as is done with
itk-bonemorphometry? What would be involved in this?