Difference between revisions of "Slicer4:VTKWidgets"

From Slicer Wiki
Jump to: navigation, search
 
(10 intermediate revisions by 3 users not shown)
Line 2: Line 2:
  
 
*See discussions during 2010 June project week [http://www.na-mic.org/Wiki/index.php/2010_Summer_Project_Week_Breakout_Session:VTK_Widget here]
 
*See discussions during 2010 June project week [http://www.na-mic.org/Wiki/index.php/2010_Summer_Project_Week_Breakout_Session:VTK_Widget here]
*See more detailed wishlist [http://wiki.na-mic.org/Wiki/index.php/Projects:ARRA:SlicerAM:KWWidgets here]
+
 
 +
=All widgets: events and states we need to have exposed=
 +
 
 +
(to manage mouse-modes, cursor appearance, and interaction with widgets consistently in 2D & 3D)
 +
* consistent API across all widgets
 +
* fire appropriate events during interaction to enable appropriate changes of the mouse cursor (no VTK cursors, we want QT cursors), see below. For instance: Hover event, move, resize, select etc..
 +
*See more detailed wishlist [http://wiki.na-mic.org/Wiki/index.php/Projects:ARRA:SlicerAM:KWWidgets#APPEARANCE_wish_list here]
 +
 
 +
==events==
 +
* Handle hover event
 +
* Widget hover event
 +
* Widget created event
 +
* Editing event (we need for widgets with text that can be interactively changed)
 +
* Left-mouse-down
 +
* Left-mouse-release
 +
* Right-mouse-down
 +
* Middle-mouse-down
 +
* Middle-mouse-release
 +
* Key-press
 +
* Mouse-Wheel
 +
 
 +
This includes events that widgets observe and emit...
 +
 
 +
==interaction states==
 +
* Nearhandle (mouse near a handle)
 +
**left click allows pick/manipulate of handle
 +
** right click displays options for configuring handle.
 +
* Nearwidget (mouse is near widget, but not near any particular handle)
 +
**left click allows pick/manipulate of entire widget
 +
**right click displays options for configuring handle.
 +
* locked=true/false
 +
* selected=true/false
 +
** right-click could select and configure, e.g. turn lock on/off
 +
* mousehover=true/false
 +
* updating=true/false
 +
** left-click could select and drag, causing updates in position
  
 
=List of VTK widgets used in Slicer 4=
 
=List of VTK widgets used in Slicer 4=
Line 32: Line 67:
 
* cutting planes (any kind of cuts, maybe reformat widget is the right one, with clip outside option)
 
* cutting planes (any kind of cuts, maybe reformat widget is the right one, with clip outside option)
  
=Wishlist as of September 2010=
+
=Widget feature wishlist as of September 2010=
 
* Annotation module for the December release of Slicer4: (Daniel)
 
* Annotation module for the December release of Slicer4: (Daniel)
** fire appropriate events during interaction to enable appropriate changes of the mouse cursor (no VTK cursors, we want QT cursors)
 
*** f.e. Hover event, move, resize, select etc..
 
 
** '''vtkDistanceWidget'''
 
** '''vtkDistanceWidget'''
 
*** enable programmatically placement!!
 
*** enable programmatically placement!!
Line 48: Line 81:
 
*** enable individual display properties (color, shape etc.) for each seed of a vtkSeedWidget (individual representations for each seed)
 
*** enable individual display properties (color, shape etc.) for each seed of a vtkSeedWidget (individual representations for each seed)
 
*** associated text should also be connected via a line connection similar to the text widget (see above)
 
*** associated text should also be connected via a line connection similar to the text widget (see above)
 
 
 
=All widgets: events and states we need to have exposed=
 
 
(to manage cursor and mouse-modes)
 
 
==events==
 
* Handle hover event
 
* Widget hover event
 
* Widget created event
 
* Editing event (we need for widgets with text that can be interactively changed)
 
* Left-mouse-down
 
* Left-mouse-release
 
* Right-mouse-down
 
* Middle-mouse-down
 
* Middle-mouse-release
 
* Key-press
 
* Mouse-Wheel
 
 
This includes events that widgets observe and emit...
 
 
==states==
 
* Nearhandle (mouse near a handle)
 
**left click allows pick/manipulate of handle
 
** right click displays options for configuring handle.
 
* Nearwidget (mouse is near widget, but not near any particular handle)
 
**left click allows pick/manipulate of entire widget
 
**right click displays options for configuring handle.
 
* Interaction states:
 
** locked=true/false
 
** selected=true/false (right-click could select and configure, e.g. turn lock on/off)
 
** mousehover=true/false
 
** updating=true/false (left-click could select and drag, causing updates in position
 

Latest revision as of 03:37, 11 September 2010

Home < Slicer4:VTKWidgets
Back to Slicer 4 Developer Projects
  • See discussions during 2010 June project week here

All widgets: events and states we need to have exposed

(to manage mouse-modes, cursor appearance, and interaction with widgets consistently in 2D & 3D)

  • consistent API across all widgets
  • fire appropriate events during interaction to enable appropriate changes of the mouse cursor (no VTK cursors, we want QT cursors), see below. For instance: Hover event, move, resize, select etc..
  • See more detailed wishlist here

events

  • Handle hover event
  • Widget hover event
  • Widget created event
  • Editing event (we need for widgets with text that can be interactively changed)
  • Left-mouse-down
  • Left-mouse-release
  • Right-mouse-down
  • Middle-mouse-down
  • Middle-mouse-release
  • Key-press
  • Mouse-Wheel

This includes events that widgets observe and emit...

interaction states

  • Nearhandle (mouse near a handle)
    • left click allows pick/manipulate of handle
    • right click displays options for configuring handle.
  • Nearwidget (mouse is near widget, but not near any particular handle)
    • left click allows pick/manipulate of entire widget
    • right click displays options for configuring handle.
  • locked=true/false
  • selected=true/false
    • right-click could select and configure, e.g. turn lock on/off
  • mousehover=true/false
  • updating=true/false
    • left-click could select and drag, causing updates in position

List of VTK widgets used in Slicer 4

Bold widgets below are being used by Slicer3.6. Other widgets included are widgets that we know we'd like to use in Slicer4.

[A] = High priority widget for the Annotation module in the December Release

  • vtkDistanceWidget (need to have 3D version of this!) [A]
  • vtkBidimensionalWidget [A]
  • vtkTextWidget [A]
  • vtkSeedWidget [A]
  • vtkAngleWidget
  • vtkBalloonWidget (and other special classes of vtkHoverWidget)
  • vtkCaptionWidget
  • vtkImplicitPlaneWidget2
  • vtkLineWidget2
  • vtkSplineWidget2
  • vtkAffineWidget (need 3D version: a backport from vtkSlicerBoxWidget2 has required logic)
  • vtkBoxWidget (lower priority)
  • vtkSplineWidget
  • vtkContourWidget
  • vtkHandleWidget
  • vtkLineWidget
  • vtkTensorProbeWidget
  • Expand ROI widget (RON):
    • The most general case is a boolean of multiple prisms (like in the AZE demo on Thursday late afternoon).
    • brick, skewed brick, cone, ellipsoid as special cases.
    • applicable to volumes (with resampling), surface models (properly closing cut surfaces), tensor fields (with resampling).
  • cutting planes (any kind of cuts, maybe reformat widget is the right one, with clip outside option)

Widget feature wishlist as of September 2010

  • Annotation module for the December release of Slicer4: (Daniel)
    • vtkDistanceWidget
      • enable programmatically placement!!
      • add a 3D representation (vtkDistanceRepresentation3D)
    • vtkBidimensionalWidget
      • enable programmatically placement!!
      • remove the interaction bugs
    • vtkTextWidget
      • enable programmatically placement with display coordinates (not normalized viewport via vtkTextRepresentation)
      • add a second point which is the anchor for a line connection to the text representation. the text representation can be moved around (also programmatically!!) and the line connects it always to the anchor. The type of line can vary (f.e. point, thickness, color.. etc.).
    • vtkSeedWidget
      • enable individual display properties (color, shape etc.) for each seed of a vtkSeedWidget (individual representations for each seed)
      • associated text should also be connected via a line connection similar to the text widget (see above)