Slicer4:VTKWidgets

From SlicerWiki
Jump to: navigation, search
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)