Import 2017-06-07 23:51:09: master 786d2ea1

Author Committer Branch Timestamp Parent
lassoan lassoan master 2016-03-08 17:45:21 master e8fb6dc8
Changeset

ENH: Made view axis labels configurable

For some applications standard left/right, posterior/anterior, inferior/superior axis labels are not optimal. For example for eye image analysis temporal/nasal labels are more appropriate than left/right.
Labels may have to be view-specific, e.g., show standard labels on a large overview image and show custom labels in a view that shows a small segmented structure.

Implemented solution:

  • vtkMRMLAbstractViewNode stores axis labels (SetAxisLabel/GetAxisLabel methods can be used to set/get the labels)
  • vtkMRMLViewDisplayableManager and vtkMRMLOrientationMarkerDisplayableManager read labels from vtkMRMLAbstractViewNode instead of using hard-coded strings to show in Cube and Axes orientation markers and 3D cube labels
  • DataProbe read labels from vtkMRMLAbstractViewNode instead of using hard-coded string

No user interface is implemented, as this is an advanced feature for module developers. Example use:

sliceNode = slicer.mrmlScene.GetNodeByID('vtkMRMLSliceNodeRed')
sliceNode.SetOrientationMarkerType(slicer.vtkMRMLAbstractViewNode.OrientationMarkerTypeAxes)
sliceNode.SetOrientationMarkerSize(slicer.vtkMRMLAbstractViewNode.OrientationMarkerSizeLarge)
sliceNode.SetAxisLabel(0,'Proximal')
sliceNode.SetAxisLabel(1,'Distal')

viewNode = slicer.mrmlScene.GetNodeByID('vtkMRMLViewNode1')
viewNode.SetOrientationMarkerType(slicer.vtkMRMLAbstractViewNode.OrientationMarkerTypeAxes)
viewNode.SetOrientationMarkerSize(slicer.vtkMRMLAbstractViewNode.OrientationMarkerSizeLarge)
viewNode.SetAxisLabel(0,'Proximal')
viewNode.SetAxisLabel(1,'Distal')

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24961 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Libs/MRML/Core/vtkMRMLAbstractViewNode.cxx Diff File
mod - Libs/MRML/Core/vtkMRMLAbstractViewNode.h Diff File
mod - Libs/MRML/DisplayableManager/Testing/Data/vtkMRMLCameraDisplayableManagerTest1.mrml Diff File
mod - Libs/MRML/DisplayableManager/vtkMRMLOrientationMarkerDisplayableManager.cxx Diff File
mod - Libs/MRML/DisplayableManager/vtkMRMLViewDisplayableManager.cxx Diff File
mod - Modules/Scripted/DataProbe/DataProbe.py Diff File