You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classAnyNiivue(OptionsMixin, anywidget.AnyWidget):
_save_scene=t.Bool(False).tag(sync=True)
defsave_scene(self):
"""Saves the current scene to a file"""self._save_scene=True
This does work, but only once, as _save_scene is not being reset to False.
After nv.saveScene(); is called, a pop-up window opens where one can define the filename.
Alternatively, there is also an option to directly pass a file name like this: nv1.saveScene("ScreenShot.png"); which could be also be implemented on the python side.
I guess the best approach here is to have a JSON traitlet like this _save_scene_as = t.Dict({"name": "screenshot.png", "counter": 1}).tag(sync=True)
As @alexisthual suggested in today's meeting, it would be nice to expose
nv.saveScene
in order to generate static iamges.Here's an example on how
nv.saveScene
is used in niivue:https://github.com/niivue/ipyniivue-experimental/blob/main/original_gallery.md#color-maps-for-voxels
The text was updated successfully, but these errors were encountered: