InsightSoftwareConsortium / InsightSoftwareConsortium/itkwidgets
Unable to Save Widget State
- Dominant language
- Python
- Stars
- 624
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Description
Hi Folks,
I'm looking at how to interact with itkwidget's state in the jupyter notebook and jupyer lab. Although I can:
- open jupyter lab
- open a notebook with an ITK plotter in use
- run the cell to get the 3D widget rendered
- save close and reopen the notebook (without closing lab)
- the 3D widget still appears immediately.

But if I close jupyter lab completely, or kill the active kernel, then reopen it and the notebook, the 3D plot is not visible and I get a message from the extension that it cannot find the model.
In Jupyter lab, i have selected the "Save Widget State Automatically" setting which for ipywidgets serialises the model to the notebook metadata, so that widgets are re-rendered when the notebook is opened.

However, the itk widgets state is not saved.
In parallel, when using the classic notebook there are various controls in the Widgets menu allowing a user to save/download/embed widgets state and these do nothing for my notebook containing the ITKPlotter.
Is this because the itkwidget extension needs to implement something in order to support saving/serialisation of the state?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.