"Bookmark" or save camera view settings

Hey guys,

Is it possible to “bookmark” or save scene camera view settings from the 3D view? I have a specimen where I’d like to show people a few representative views. It would useful to be able to have a list of views to recall.

If this doesn’t exist, I’m happy to implement it (with some guidance) - I’m assuming it would be fetching the view parameters from the scene camera and saving them somewhere, and then setting them when requested.

At any rate, any assistance would be greatly appreciated.



OK, I just found “Scene views”, which appears to do almost exactly what I want, except with two issues:

  1. Selecting the “Scene views” module from the Modules dropdown crashes slicer. The error I get is:

    qSlicerSceneViewsModuleWidgetPrivate::setupUi - Capture link not implemented with Qt5
    qSlicerSceneViewsModuleWidgetPrivate::setupUi - Restore scroll bar position not implemented with Qt5
    Received signal 11 SEGV_MAPERR 000000000028
    Segmentation fault: 11

  2. Restoring the saved scene view (using buttons on toolbar, which works) restores everything but the zoom setting. Simple workaround is to just re-zoom in, but it would be nice to save everything.

Any ideas on the crash?



  1. Yes, the SceneView module is broken due to changes related to Qt5 and QtWebEngine (see here)

Overall, there is some debate about what to do with SceneViews - the current design isn’t working but nobody has come up with something useful but simpler.

  1. @hherhold if you want to just save and restore camera views that would be a nicely defined project (some people use the term “lookmarks” for saved views). The existing SceneViews tries to be more ambitious and save a lot of state and that sometimes causes problems in save/restore.

We should be able to restore working state of 4.8 by changing it to use Qt widgets instead of a web widget.

I agree that scene views wanted to do too much, but I think saving only camera positions would be too limited. Maybe we could take a stab of simplifying scene views at the upcoming project week?

We have discussed this previously and came up witha limited scope for scene views, see https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/MigrationGuide/Slicer50#SceneViews

A discussion at the project week would be very useful. By agreeing on a concrete future design we could make a big step forward and then it would only be a matter of implementation.

It sounds like there’s a desire for something more than “lookmarks” - I’ll hold off and look for what comes out of the project week. I’m willing to help out on the implementation side if you’re looking for a pair of hands - my knowledge of the internals of Slicer (for the moment) is such that I would not be much use on the design side.

As I recall the motivation for using the QtWebKit code in the SceneViews module had to do with some specific layout requirements of the image and title/subtitle of the SceneView info. The layout was pretty trivial in HTML but had been a bottleneck in Qt (i think the original design used a list model/view). We can take a fresh look at making a QWidget implementation of the SceneView module (the exact layout isn’t very important). E.g. it could just be a list with optional popup for the image or whatever is straightforward to implement.

@hherhold the code is here if you want to have a look.

Longer term, yes, getting a concrete design would be great.