Slicer3 FlexibleLayouts

From NAMIC Wiki
Jump to: navigation, search
Home < Slicer3 FlexibleLayouts


Key Investigators

  • GE: Jim Miller
  • BWH/Isomics: Steve Pieper
  • BWH: Wendy Plesniak
  • Kitware: Sebastien Barre (the multi-camera / multi-3D view code in the "cameraviewhell" branch has been ported to 3.4 and is being tested).

Objective

  • Continue implementing infrastructure and interface for generating custom layouts in Slicer3

Approach, Plan

  • Representation and Logic are currently being implemented; finish this implementation and begin testing.
  • Add functionality to read/write XML specification
  • Integrate with exiting vtkMRMLLayoutNode
  • Begin work on building GUI to support UXP design

Progress

SlicerCustomLayoutPlan.png

References

NOTES:

  • Sebastien has been allowing creating multiple vtkMRMLViewerWidget or vtkMRMLCameraNode in the scenes
    • previously they were singletons
    • hard to patch underlying logic to take singleton status out.
    • sebastien made new branch off of 3.4 with his changes
    • found some bugs in trunk also (e.g. if close scene 3 or 4 times, can't exit slicer)
  • He is testing now with multiple cameras and views
  • Able to save, load, fiducials work ok
  • will give Ron his code to test soon
  • will patch 3.4 or put in 3.5 trunk after testing/fixing.
  • In current implementation, new 3D views will populate tabbed 3D views...
  • When populating custom layout, will have to count number of vtkMRMLViewNodes and assign to panes
  • Representation for view: vtkMRMLViewNode: state for a 3D view vtkSlicerViewerWidget
  • Rep for camera: vtkMRMLCameraNode:
    • vtkMRMLViewNodes have vtkMRMLCameraNodes;
    • ViewNodes can swap CameraNodes.
    • Seb mentions problem with a render being called in a viewer that has (temporarily) no camera, due to a swap -- vtk will create a new camera that has no MRML counterpart. This is addressed as described below.
    • A viewNode can use the camera from another viewNode (but in this case, a camera swap is implemented under the hood so that no viewer is without a camera.) --Can we generate an event when this swap happens in case we want to notify a user?
    • Many cameras can be created and a single ViewNode can switch to use any of them.
  • Single scene contains all datasets; different datasets can be exposed/hidden in each view.
  • How will this work in use: how to configure a node's display parameters for each defined view on the scene?
  • Node's display params can consist of kwd/val pairs where kwd is the viewerID, value is the param for that viewer.
  • How to present this through the GUI in an intuitive way? Will think about this.
  • How about transforming camera with xform vtkCamera API's ApplyTransform() method. Apply this in the Render Method for the viewer widget?
  • Discussing difficulty of transforming camera programmatically and combining interactively applied user transforms simultaneously.
  • How to encapsulate the presentation mechanism for content in any "pane" in a layout.
  • IGT toplevel has had to overload too many methods -- so would be good to have a better constructed superclass for vtkSlicerViewerWidget. (Alex & Andreas) will restructure this architecture a little bit to clean it up.
  • Goal: vtkKWWidget <- vtkSlicerLayoutableWidget <- vtkSlicerWidget <- vtkSlicerSliceViewerWidget
  • TableViewers, plot viewers would all be subclassed from vtkSlicerLayoutableWidget.
  • Layout logic/mrml underway and will be checked in soon.; Layout GUI will take a bit more time.
  • Each vertex in layout tree should point to a vtkSlicerLayoutableWidgetNode