InsightSoftwareConsortium / InsightSoftwareConsortium/itkwidgets
Updating image of the widget is slow
- Dominant language
- Python
- Stars
- 624
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to create a 3D-5D viewer to display 2D images with some sliders to navigate along other dimensions such as time, channel and z.
To update the image I just set the `image` attribute of the widget to the new image:
```python
if not self.image_widget:
self.image_widget = itkwidgets.view(self.current_image, ui_collapsed=False, annotations=True,
interpolation=False, cmap='Viridis (matplotlib)', mode='v',
shadow=True, slicing_planes=False, gradient_opacity=0.22)
else:
self.image_widget.image = self.current_image
```
It works well but the image update is slow when moving the sliders. The same issue happens with a low-resolution image.
Here is a binder that reproduces the issue: https://mybinder.org/v2/gh/hadim/binder-sandbox/master?urlpath=lab/tree/notebooks/Image%20Viewer.ipynb
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.