View Issue Details

IDProjectCategoryView StatusLast Update
0001887Slicer4Core: MRMLpublic2012-10-21 12:55
Reporterkikinis Assigned Tofinetjul  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformAppleOSOS XOS Version10.7.3
Product VersionSlicer 4.1.0 RC 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.2.0 
Summary0001887: sceneview roundtrip problem with LUT and with VR
Description

I saved a scene from slicer 4-9, which contains a segmentation, a 3D model and a volume rendering.
Upon restore:

  1. the label map is associated with the wrong LUT (labels) instead of GenericAnatomyColors
  2. the volume rendering is not working upon load or upon restoring a sceneview after loading. Check out the thumbnails of the sceneviews to see how things should look like.

dropbox ronsexamples RonsDemo2012-04-09 contains the materials.

TagsNo tags attached.

Relationships

related to 0001629 closednicole different sceneviews available depending on how a scene is loaded 
related to 0001856 closednicole sceneview does not survive a roundtrip 
child of 0001744 closedfinetjul sceneview with volume rendering does not survive roundtrip 

Activities

nicole

nicole

2012-04-11 08:39

administrator   ~0004001

Last edited: 2012-04-11 08:42

For 0000001, it looks like a new volume display node is being created on scene restore, rather than using the one already defined for the label map. The back trace shows a problem with an event being caught by the slice layer logic, leading to this snippet of code:
Slicer4/Libs/MRML/Logic/vtkMRMLSliceLayerLogic.cxx at line 343:
// TODO: this is a hack
vtkErrorMacro("UpdateNodeReferences: Volume Node " << this->VolumeNode->GetID() << " doesn't have a display node, adding one.");

In the back trace at frame 19, the node id is vtkMRMLScalarVolumeNode4 which is the label map volume.

vtkMRMLDisplayableNode::UpdateScene clears out all the display nodes first.

Back trace from creating the new label map display node:
(gdb) bt
#0 vtkMRMLLabelMapVolumeDisplayNode::vtkMRMLLabelMapVolumeDisplayNode (this=0x715e5f0)
at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLLabelMapVolumeDisplayNode.cxx:33
0000001 0x00007f5fe94cb8c5 in vtkMRMLLabelMapVolumeDisplayNode::New () at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLLabelMapVolumeDisplayNode.cxx:28
0000002 0x00007f5fefafe7e4 in vtkMRMLSliceLayerLogic::UpdateNodeReferences (this=0x2e9fe80) at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Logic/vtkMRMLSliceLayerLogic.cxx:367
0000003 0x00007f5fefafee13 in vtkMRMLSliceLayerLogic::UpdateTransforms (this=0x2e9fe80) at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Logic/vtkMRMLSliceLayerLogic.cxx:451
0000004 0x00007f5fefafe0a1 in vtkMRMLSliceLayerLogic::UpdateLogic (this=0x2e9fe80) at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Logic/vtkMRMLSliceLayerLogic.cxx:236
0000005 0x00007f5fefafe224 in vtkMRMLSliceLayerLogic::OnMRMLNodeModified (this=0x2e9fe80, node=0x353b980)
at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Logic/vtkMRMLSliceLayerLogic.cxx:277
0000006 0x00007f5fefad26e7 in vtkMRMLAbstractLogic::ProcessMRMLNodesEvents (this=0x2e9fe80, caller=0x353b980, event=33)
at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Logic/vtkMRMLAbstractLogic.cxx:448
0000007 0x00007f5fefafe153 in vtkMRMLSliceLayerLogic::ProcessMRMLNodesEvents (this=0x2e9fe80, caller=0x353b980, event=33, callData=0x0)
at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Logic/vtkMRMLSliceLayerLogic.cxx:256
0000008 0x00007f5fefad1b1b in vtkMRMLAbstractLogic::MRMLNodesCallback (caller=0x353b980, eid=33, clientData=0x2e9fe80, callData=0x0)
at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Logic/vtkMRMLAbstractLogic.cxx:184
---Type <return> to continue, or q <return> to quit---
0000009 0x00007f5fde0f45f7 in vtkCallbackCommand::Execute (this=0x2ea00c0, caller=0x353b980, event=33, callData=0x0)
at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkCallbackCommand.cxx:42
0000010 0x00007f5fe941c31c in vtkEventBroker::InvokeObservation (this=0xdd91e0, observation=0x72a1c30, callData=0x0)
at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkEventBroker.cxx:853
0000011 0x00007f5fe941b9c1 in vtkEventBroker::ProcessEvent (this=0xdd91e0, observation=0x72a1c30, caller=0x353b980, eid=33, callData=0x0)
at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkEventBroker.cxx:707
0000012 0x00007f5fe941c8fb in vtkEventBroker::Callback (caller=0x353b980, eid=33, clientData=0x72a1c30, callData=0x0)
at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkEventBroker.cxx:928
0000013 0x00007f5fde0f45f7 in vtkCallbackCommand::Execute (this=0x72a1f90, caller=0x353b980, event=33, callData=0x0)
at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkCallbackCommand.cxx:42
0000014 0x00007f5fde1d4c5d in vtkSubjectHelper::InvokeEvent (this=0x5f4d3f0, event=33, callData=0x0, self=0x353b980)
at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkObject.cxx:602
0000015 0x00007f5fde1d516d in vtkObject::InvokeEvent (this=0x353b980, event=33, callData=0x0) at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkObject.cxx:770
0000016 0x00007f5fde1d533c in vtkObject::Modified (this=0x353b980) at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkObject.cxx:836
---Type <return> to continue, or q <return> to quit---
0000017 0x00007f5fe9c02bc7 in vtkMRMLNode::Modified (this=0x353b980) at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLNode.h:342
0000018 0x00007f5fe94837b1 in vtkMRMLDisplayableNode::SetAndObserveNthDisplayNodeID (this=0x353b980, n=0, displayNodeID=0x0)
at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLDisplayableNode.cxx:326
0000019 0x00007f5fe9482c1e in vtkMRMLDisplayableNode::UpdateScene (this=0x353b980, scene=0xe867b0)
at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLDisplayableNode.cxx:171
0000020 0x00007f5fe96329b0 in vtkMRMLVolumeNode::UpdateScene (this=0x353b980, scene=0xe867b0) at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLVolumeNode.cxx:673
0000021 0x00007f5fe95aaaa3 in vtkMRMLSceneViewNode::RestoreScene (this=0x2d62890) at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLSceneViewNode.cxx:490

nicole

nicole

2012-04-11 08:57

administrator   ~0004002

Last edited: 2012-04-11 09:43

Possible fix might be to check IsRestoring() on the scene before creating new nodes in vtkMRMLSliceLayerLogic::UpdateNodeReferences, possibly checking for it in vtkMRMLSliceLayerLogic::OnMRMLNodeModified.
Update: didn't work.

finetjul

finetjul

2012-04-11 09:50

administrator   ~0004003

Why vtkMRMLSliceLayerLogic thinks there is no display node associated with the displayable node (ScalarVolumeNode4) ?

finetjul

finetjul

2012-04-11 09:51

administrator   ~0004004

2) Volume Rendering failed when "Right Kidney..." scene view is restored because the scene is loaded using "Add Data" and not "Load Scene". When loading a scene using "Add Data", it creates a duplicate "vtkMRMLViewNode2" and "vtkMRMLCameraNode 2". When restoring, the scene view volume rendering display node is visible only in vtkMRMLViewNode2 which is not the one visible in layout, but vtkMRMLViewNode1.

2a) "Add data" of a scene should be the same as "Load scene" or "Import scene".
optional 2b) "Add data" of a scene adds vtkMRMLViewNode2 however it is vtkMRMLViewNode1 that is visible in layout.

nicole

nicole

2012-04-11 09:57

administrator   ~0004005

re note 4003 from Julien: because the label map volume node in vtkMRMLDisplayableNode::UpdateScene (backtrace frame 19) calls set and observe display node to NULL while trying to update the node pointers from the node id list.

kikinis

kikinis

2012-04-11 18:56

developer   ~0004010

How is a poor end user to know? This has to be streamlined and clarified, with the end user in mind.

nicole

nicole

2012-08-20 07:47

administrator   ~0005571

Need to check if changes since April fix the LUT issue.

kikinis

kikinis

2012-09-15 09:49

developer   ~0006087

Any progress here?

finetjul

finetjul

2012-09-26 09:20

administrator   ~0006227

Fixed in r21027 and r21033:
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=21027
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=21033

As of r21056, creating a new scene is no longer needed, VR backward compatibility has been added for scenes older than r20474.

Issue History

Date Modified Username Field Change
2012-04-10 04:52 kikinis New Issue
2012-04-10 10:59 finetjul Relationship added related to 0001629
2012-04-11 08:39 nicole Note Added: 0004001
2012-04-11 08:42 nicole Note Edited: 0004001
2012-04-11 08:57 nicole Note Added: 0004002
2012-04-11 09:04 nicole Note Edited: 0004002
2012-04-11 09:43 nicole Note Edited: 0004002
2012-04-11 09:50 finetjul Note Added: 0004003
2012-04-11 09:51 finetjul Note Added: 0004004
2012-04-11 09:57 nicole Note Added: 0004005
2012-04-11 18:56 kikinis Note Added: 0004010
2012-08-20 07:47 nicole Note Added: 0005571
2012-08-20 07:47 nicole Assigned To => finetjul
2012-08-20 07:47 nicole Status new => assigned
2012-08-20 07:47 nicole Target Version => Slicer 4.2.0 - Feature freeze Sept 1st 2012
2012-08-20 11:54 jcfr Relationship added related to 0001856
2012-08-20 11:56 jcfr Relationship added related to 0001744
2012-09-15 09:49 kikinis Note Added: 0006087
2012-09-21 13:58 finetjul Relationship replaced child of 0001744
2012-09-26 09:20 finetjul Note Added: 0006227
2012-09-26 09:20 finetjul Status assigned => resolved
2012-09-26 09:20 finetjul Fixed in Version => Slicer 4.2.0 - coming release
2012-09-26 09:20 finetjul Resolution open => fixed
2012-10-21 12:55 kikinis Status resolved => closed