Dual view with the segment editor

Hi,

I am using scissors tool a lot to trim unwanted data. I do this in the side view of the specimen, but I also need to see how the specimen looks front on, so that I do not cut into it at an angle. I can turn on the dual 3D, but I can’t find a way to link them so view1 e.g., shows A view, while view2 show the Left view, and rotating in the volume in either of the views updates the other.

Is it possible to do this?

I think the closest you can get to this without writing any script is the following:

  • Switch to dual 3D view (this makes sure you have 2 camera nodes), rotate the camera views to be orthogonal
  • In Transforms module, create a transform and apply it to all nodes named “Default Scene Camera” (there should be at least two)
  • Move the Rotation / IS slider to rotate the camera views in sync.

To make rotation available while you are in another module, type these into the python console to show a widget where you can adjust IS rotation:

sliders=slicer.qMRMLTransformSliders()
sliders.setMRMLScene(slicer.mrmlScene)
sliders.TypeOfTransform = slicer.qMRMLTransformSliders.ROTATION
sliders.TypeOfTransform = slicer.qMRMLTransformSliders.TRANSLATION
sliders.TypeOfTransform = slicer.qMRMLTransformSliders.ROTATION
sliders.setMRMLTransformNode(getNode('LinearTransform_3'))
sliders.show()
1 Like

Hi,

how i can make this script generic for any transform from python console. instead of getNode(‘LinearTransform_3’)

Typically you create the transform node, so you don’t need to call getNode. If you want the user to select it then you typically add a slicer.qMRMLNodeComboBox() to your GUI (or you get the transform node associated with another node using someNode.GetParentTransformNode().