mayavi
mayavi copied to clipboard
itk backend RuntimeError: Could not process the viewer data
Follow the https://github.com/enthought/mayavi/blob/master/examples/mayavi/mayavi_jupyter.ipynb
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
File ~/.local/lib/python3.8/site-packages/IPython/core/formatters.py:920, in IPythonDisplayFormatter.__call__(self, obj)
918 method = get_real_method(obj, self.print_method)
919 if method is not None:
--> 920 method()
921 return True
File ~/anaconda3/envs/WaveletGeneration/lib/python3.8/site-packages/mayavi/tools/notebook.py:31, in _ipython_display_(self)
22 def _ipython_display_(self):
23 '''Method attached to Mayavi objects.
24
25 Note that here `self` is the Mayavi object that is going to be
(...)
29
30 '''
---> 31 return _backend.display(self)
File ~/anaconda3/envs/WaveletGeneration/lib/python3.8/site-packages/mayavi/tools/notebook.py:145, in ITKBackend.display(self, obj)
137 # Works around bug in released itkwidgets-0.32.1.
138 # Can remove when this PR is merged and in a release:
139 # https://github.com/InsightSoftwareConsortium/itkwidgets/pull/438
140 kw = dict(
141 actors=actors, geometries=[], geometry_colors=[],
142 geometry_opacities=[], point_sets=[], point_set_colors=[],
143 point_set_opacities=[]
144 )
--> 145 return idisplay(self._view(**kw))
146 else:
147 return obj
File ~/anaconda3/envs/WaveletGeneration/lib/python3.8/site-packages/itkwidgets/viewer.py:436, in view(data, **kwargs)
322 def view(data=None, **kwargs):
323 """View the image and/or point sets.
324
325 Creates and returns an ImJoy plugin ipywidget to visualize an image, and/or
(...)
434 properties on the object to change the visualization.
435 """
--> 436 viewer = Viewer(data=data, **kwargs)
438 return viewer
File ~/anaconda3/envs/WaveletGeneration/lib/python3.8/site-packages/itkwidgets/viewer.py:136, in Viewer.__init__(self, ui_collapsed, rotate, ui, **add_data_kwargs)
132 def __init__(
133 self, ui_collapsed=True, rotate=False, ui="pydata-sphinx", **add_data_kwargs
134 ):
135 input_data = self.input_data(add_data_kwargs)
--> 136 data = self.init_data(input_data)
137 """Create a viewer."""
138 self.viewer_rpc = ViewerRPC(
139 ui_collapsed=ui_collapsed, rotate=rotate, ui=ui, data=data
140 )
File ~/anaconda3/envs/WaveletGeneration/lib/python3.8/site-packages/itkwidgets/viewer.py:179, in Viewer.init_data(self, input_data)
177 result = _get_viewer_point_sets(data)
178 if result is None:
--> 179 raise RuntimeError(f"Could not process the viewer {input_type}")
180 _init_data[key] = result
181 return _init_data
RuntimeError: Could not process the viewer data
<mayavi.modules.iso_surface.IsoSurface at 0x7f75beffc450>
No suggestions on how to solve this problem?