Difference between revisions of "Slicer3 FlexibleLayouts"

From NAMIC Wiki
Jump to: navigation, search
m (Text replacement - "http://www.slicer.org/slicerWiki/index.php/" to "https://www.slicer.org/wiki/")
 
(10 intermediate revisions by one other user not shown)
Line 38: Line 38:
  
 
<h3>Progress</h3>
 
<h3>Progress</h3>
 +
* We had a nice design meeting, some notes from it are captured below
 +
* Sebastien has mature implementation in vtkMRMLViewNode and vtkMRMLCameraNode to provide multiple views of the MRMLScene.
 +
* Alex and Andreas will be looking at the current implementation of vtkSlicerViewerWidget and designing an appropriate superclass for this widget
 +
* New class hierarchy will be developed (diagram) to generalize layout representation
 +
* Custom Layout MRML/Logic maturing and will be checked in to trunk soon
 +
* Custom Layout GUI will follow
  
 +
 +
[[image:SlicerCustomLayoutFramework.png]]
 +
 +
[[image:SlicerCustomLayoutContent.png]]
  
 
</div>
 
</div>
Line 44: Line 54:
  
 
==References==
 
==References==
* [http://www.slicer.org/slicerWiki/index.php/Slicer3:UIDesign:WorkingProblems:SlicerFlexibleLayout:UXP#User_experience_design_for_Slicer_flexible_layouts  User Experience Design]
+
* [https://www.slicer.org/wiki/Slicer3:UIDesign:WorkingProblems:SlicerFlexibleLayout:UXP#User_experience_design_for_Slicer_flexible_layouts  User Experience Design]
* [http://www.slicer.org/slicerWiki/index.php/Slicer3:UIDesign:WorkingProblems:SlicerFlexibleLayout:Architecture  Representation]
+
* [https://www.slicer.org/wiki/Slicer3:UIDesign:WorkingProblems:SlicerFlexibleLayout:Architecture  Representation]
  
 
==NOTES:==
 
==NOTES:==
Line 60: Line 70:
 
* In current implementation, new 3D views will populate tabbed 3D views...
 
* 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
 
* When populating custom layout, will have to count number of vtkMRMLViewNodes and assign to panes
* Representation: vtkMRMLViewNode: state for a 3D view vtkSlicerViewerWidget, knows
+
* '''Representation for view: vtkMRMLViewNode:''' state for a 3D view vtkSlicerViewerWidget
* Rep for cameras: vtkMRMLCameraNode: vtkMRMLViewNodes have vtkMRMLCameraNodes; ViewNodes can swap CameraNodes.
+
* '''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.
 
** 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?
+
** 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.
+
** 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.
 
* 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?
 
* How will this work in use: how to configure a node's display parameters for each defined view on the scene?
Line 73: Line 85:
 
* How to encapsulate the presentation mechanism for content in any "pane" in a layout.
 
* 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.
 
* 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  
+
* Goal: '''vtkKWWidget <- vtkSlicerLayoutableWidget <- vtkSlicerWidget <- vtkSlicerSliceViewerWidget '''
 
* TableViewers, plot viewers would all be subclassed from vtkSlicerLayoutableWidget.
 
* 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.
 
* 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
 
* Each vertex in layout tree should point to a vtkSlicerLayoutableWidgetNode

Latest revision as of 18:07, 10 July 2017

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

  • We had a nice design meeting, some notes from it are captured below
  • Sebastien has mature implementation in vtkMRMLViewNode and vtkMRMLCameraNode to provide multiple views of the MRMLScene.
  • Alex and Andreas will be looking at the current implementation of vtkSlicerViewerWidget and designing an appropriate superclass for this widget
  • New class hierarchy will be developed (diagram) to generalize layout representation
  • Custom Layout MRML/Logic maturing and will be checked in to trunk soon
  • Custom Layout GUI will follow


SlicerCustomLayoutFramework.png

SlicerCustomLayoutContent.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