I’m having trouble displaying an Annotation Ruler in only certain 3D views.
For example, when using the Dual 3D Layout, I quickly create both a Fiducial and Ruler. If I input the following up the python interactor, the Fiducial disappears from the second 3D view (as expected):
getNode('vtkMRMLMarkupsFiducialNode1').GetDisplayNode().AddViewNodeID('vtkMRMLViewNode1')
However, if I input the following for the AnnotationRulerNode, the ruler does not disappear from the second 3D View:
getNode('vtkMRMLAnnotationRulerNode1').GetDisplayNode().AddViewNodeID('vtkMRMLViewNode1')
The ruler node actually has 3 display nodes, so I tried it on all 3, but it still did not work:
getNode('vtkMRMLAnnotationRulerNode1').GetNthDisplayNode(0).AddViewNodeID('vtkMRMLViewNode1')
getNode('vtkMRMLAnnotationRulerNode1').GetNthDisplayNode(1).AddViewNodeID('vtkMRMLViewNode1')
getNode('vtkMRMLAnnotationRulerNode1').GetNthDisplayNode(2).AddViewNodeID('vtkMRMLViewNode1')
And finally, the ruler automatically appears under a hierarchy, so I also tried the following, but again without success:
getNode('vtkMRMLAnnotationHierarchyNode2').GetDisplayNode().AddViewNodeID('vtkMRMLViewNode1')
getNode('vtkMRMLAnnotationHierarchyNode1').GetDisplayNode().AddViewNodeID('vtkMRMLViewNode1')
I also removed the ruler from the hierarchy, and tried all of the above, but it did not work. Is there something I am missing, or is this a bug in Slicer?
Thanks,
Brian