I displayed MRHead_1 (foreground) and MRHead (background) on the red view of Slicer. Then, I saved the scene and reloaded it, and MRHead_1 was switched to MRHead. See image attached. Could this be a bug on Slicer?
I just tested the very same thing using the latest preview version and for me it works well.
- What Slicer version do you use?
- What is the layout in the saved scene?
- Are the slice views linked?
I used Slicer 4.13.0-2022-03-26 for Windows. The layout is “Red slice only”. The views are not linked. I clicked on “Create a Medical Record Bundle containing the scene” before saving it.
I checked with the latest version and I got the same problem.
Using these settings I could reproduce the issue you reported with the latest version.
Can you please check if the layout or the linked slices is the setting that matters in this case?
I selected different layouts, with linked and unlinked slice views, but the problem still appears.
I just noticed this warning on Slicer, while saving the scene: class QList<class qSlicerFileWriter *> __cdecl qSlicerCoreIOManagerPrivate::writers(const class QString &,const class QMap<class QString,class QVariant> &,class vtkMRMLScene *) const warning: Unable to find node with ID “” in the given scene.
Strange because as I said when saving the scene with Four-Up layout and linked slices it loaded OK for me…
The error seems unrelated since it is definitely not because of a missing file as the error may suggest (that writing a file failed).
If I click the link views button before doing any changes and then set the volumes and their opacity, the scene is reloaded correctly after saving. This happens independently of the type of layout.
If I turn link views off, and then modify the opacity of one of the views, the scene is reloaded with the wrong settings.
It seems as if, in general, I need to activate the linked views before saving to keep the right settings.
This is useful. Can you please add an Issue on Issues · Slicer/Slicer · GitHub including these findings?