module 'itk' has no attribute 'BinShrinkImageFilter'
See original GitHub issueWhen displaying large images I get the error bellow. I can set size_limit_2d large enough to avoid downsampling as a workaround.
This is from a relatively bare docker container. I installed with pip install itkwidgets. To my knowledge no other packages requires itk. import itk;itk.Version.GetITKVersion() yields 4.13.0.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-26-4c0603b3ae2d> in <module>
----> 1 view(pixels,annotations=False, ui_collapsed=True, cmap=cm.grayscale)
/usr/local/lib/python3.6/dist-packages/itkwidgets/widget_viewer.py in view(image, ui_collapsed, annotations, interpolation, cmap, mode, shadow, slicing_planes, gradient_opacity, **kwargs)
436 annotations=annotations, interpolation=interpolation, cmap=cmap,
437 mode=mode, shadow=shadow, slicing_planes=slicing_planes,
--> 438 gradient_opacity=gradient_opacity, **kwargs)
439 return viewer
/usr/local/lib/python3.6/dist-packages/itkwidgets/widget_viewer.py in __init__(self, **kwargs)
225 self.extractor = itk.ExtractImageFilter.New(self.image)
226 self.extractor.InPlaceOn()
--> 227 self.shrinker = itk.BinShrinkImageFilter.New(self.extractor)
228 self._update_rendered_image()
229 if self._downsampling:
/usr/local/lib/python3.6/dist-packages/itkLazy.py in __getattribute__(self, attr)
38
39 def __getattribute__(self, attr):
---> 40 value = types.ModuleType.__getattribute__(self, attr)
41 if value is not_loaded:
42 module = self.__belong_lazy_attributes[attr]
AttributeError: module 'itk' has no attribute 'BinShrinkImageFilter'
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
module 'itk' has no attribute 'BinShrinkImageFilter' #118 - GitHub
I installed with pip install itkwidgets . To my knowledge no other packages requires itk. import itk;itk.Version.GetITKVersion() yields 4.13.0 .
Read more >AttributeError: module 'itk' has no attribute ... - ITK Discourse
I have install through pip ITK 5.2 into an anaconda virtual environment running python 3.8.
Read more >Python error: module 'itk' has no attribute 'ParameterObject'
If you are building ITK from source, you need to build ITKElastix from source and point to the main ITK build.
Read more >itk::simple::BinShrinkImageFilter Class Reference - SimpleITK
Reduce the size of an image by an integer factor in each dimension while performing averaging of an input neighborhood. ... This filter...
Read more >simvascular.stanford.edu/downloads/public/simvascu...
Version 3.0.12 # # Do not make changes to this file unless you know what you are ... raise AttributeError("'%s' object has no...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Manually installing itk with
pip install itkfixed it.import itk;itk.Version.GetITKVersion()still yields ‘4.13.0’, but now itk.BinShrinkImageFilter is available.@jpambrun great catch! 🦅 Would you mind creating a PR to add
itk-filteringto setup.py?