Difference between revisions of "WidgetDesign2010"

From NAMIC Wiki
Jump to: navigation, search
m (Text replacement - "http://www.slicer.org/slicerWiki/index.php/" to "https://www.slicer.org/wiki/")
 
(48 intermediate revisions by 4 users not shown)
Line 15: Line 15:
 
* [http://www.vtk.org/Wiki/VTKWidgets VTK's vtkWidget page]
 
* [http://www.vtk.org/Wiki/VTKWidgets VTK's vtkWidget page]
 
* [http://wiki.na-mic.org/Wiki/index.php/Projects:ARRA:SlicerAM:vtkWidgets Design Notes]
 
* [http://wiki.na-mic.org/Wiki/index.php/Projects:ARRA:SlicerAM:vtkWidgets Design Notes]
* [http://www.slicer.org/slicerWiki/index.php/Slicer4:VTKWidgets Slicer vtkWidget wish list]
+
* [https://www.slicer.org/wiki/Slicer4:VTKWidgets Slicer vtkWidget wish list]
 
** [http://www.na-mic.org/Wiki/index.php/Projects:ARRA:VTKWidgetsTesting#Widgets Slicer vtkWidget Testing] (related [http://www.na-mic.org/Wiki/index.php/Projects:ARRA:VTKWidgetsTesting#Requested_Changes request list])
 
** [http://www.na-mic.org/Wiki/index.php/Projects:ARRA:VTKWidgetsTesting#Widgets Slicer vtkWidget Testing] (related [http://www.na-mic.org/Wiki/index.php/Projects:ARRA:VTKWidgetsTesting#Requested_Changes request list])
  
Line 64: Line 64:
 
*** New widgets to create
 
*** New widgets to create
 
*** Serialization
 
*** Serialization
*** See also: http://www.slicer.org/slicerWiki/index.php/Slicer4:VTKWidgets
+
*** See also: https://www.slicer.org/wiki/Slicer4:VTKWidgets
 
*** API Changes
 
*** API Changes
 
***# Unified APIs for all widgets
 
***# Unified APIs for all widgets
Line 172: Line 172:
 
** https://www.southernseason.com/class/event.asp?id=19532
 
** https://www.southernseason.com/class/event.asp?id=19532
  
= Draft Timeline & To-Do list =
+
= Wrap Up & To-Do list =
  
== Beta ==
+
=== Can do by Dec 10 ===
* Mid-December (when the release is cut for the AHM)
 
 
* API Changes
 
* API Changes
 
*# Unified APIs for all widgets
 
*# Unified APIs for all widgets
*## Programmatic Placement
+
*## '''Programmatic Placement'''
*## Hover Event and other events
+
*##* Load into a specified state
*## All display properties publicly available (text, lines and points)
+
*## '''All display properties publicly available (text, lines and points)'''
 +
*##* cloned versus non cloned representations
 +
*##* Some properties are shared by some widgets (color, shape)
 +
*##* See seed and line widgets (they work)
 +
*##* Consider linewidget2 versus distance
 +
*##* Consider Caption versus Text
 
*##* vtkTextRepresentation: (general) Set/Get of display properties
 
*##* vtkTextRepresentation: (general) Set/Get of display properties
 +
*## avoid SafeDownCasts, add GetXRepresentation
 
*##* Mimic behavior of ScalarBarWidget
 
*##* Mimic behavior of ScalarBarWidget
*## avoid SafeDownCasts, add GetXRepresentation
+
*# '''vtkDistanceWidget: SetWorldSpaceTickSpacing'''
*# vtkDistanceWidget: SetWorldSpaceTickSpacing
+
*#* measuring tape behavior
* Enhancements
+
* Infrastructure
*# Anchor point and configurable line for any widget which includes a text actor
+
*# Multiple renderers not handled by widgets (some risk)
*# vtkDistanceWidget: 3D representation
+
*#* e.g. lightbox view
*# Cloned versus non cloned representations
+
*#* Components of widget split across renderers
* Infrastructure Changes
 
*# All widgets exist in RAS space
 
*# SetCurrentRenderer (for lightbox view)
 
 
*# Mouse interactions (f.e. near vs. nearby in vtkSeedWidget)
 
*# Mouse interactions (f.e. near vs. nearby in vtkSeedWidget)
 
*## Highlight vs. Pick radius
 
*## Highlight vs. Pick radius
 +
*# Detachable text for four key widgets (Nicole)
 +
* Bugs
 +
*# vtkDistanceWidget, vtkLineWidget, vtkAngleWidget, vtkBiDimensional: GetDistance() and GetAngle() not re-computing (fixes committed to Nicole's git for angle and distance representations, bidimensional representation new test shows that it does not fail [https://github.com/naucoin/VTK/commit/36a0f41534d0abc7cd50c614325a28d0f4377b97 GetDistance] [https://github.com/naucoin/VTK/commit/8f22b2410e13a1f675a9fe155049f485caca5839 GetAngle])
 +
*# vtkHoverWidget text does not update (Will)
 +
*#* Mouse-over twice and then still only shows old text (see [https://github.com/naucoin/VTK/commit/a8941104b13f6ddcde3286870d3a9b0f5de7c7e5 this test])
 +
*# vtkDistanceWidget: 3D representation (Will/Nicole)
 +
*#* DistanceRepresentation3D
 +
 +
=== To be discussed ===
 +
* Infrastructure
 +
*# Hover Event and other events
 +
*#* Widget state changes should be exposed
 +
*# Speed up interaction of widgets that have text (might be a Mac with Slicer only problem..)
 +
*#* Consider qVTK
 +
*#* Consider LOD
 +
*#** Timer based level of detail to turn off text during interaction
 +
=== Future ===
 +
* Infrastructure
 +
*# Pickable when occluded (bug)
 +
*#* Screen rendering or other hint when occluded
 +
*# Quality of 2D Widget Rendering (anti-alias...)
 +
*#* Anti-aliasing and enhance eye-candy (example: http://raphaeljs.com/)
 
*# 3D depth ordering of widgets
 
*# 3D depth ordering of widgets
 
*## Handle case of pickable widgets that are hidden by a opaque geometry
 
*## Handle case of pickable widgets that are hidden by a opaque geometry
*# Speed up interaction of widgets that have text
+
# Anchor point and configurable line for any widget which includes a text actor
*## possibly timer based level of detail to turn off text during interaction
+
#* Decouple measurement widget from text (label and measurement value)
**# Anti-aliasing and enhance eye-candy (example: http://raphaeljs.com/)
+
#* Programmatic widgets:  
*** Bugs
+
#** vtkDistanceWidget via
***# vtkDistanceWidget, vtkLineWidget, vtkAngleWidget: GetDistance() and GetAngle() not re-computing
+
#*** 2 clicks then appears
***# vtkHoverWidget text does not update
+
#*** OR 1 click and appears and drags and then click to stick
 
+
# Level of detail manager
== Gamma ==
+
#* Two representations per MRML node
 
+
* Complex widgets
== Future ==
+
** Challenge is managing hierarchy of events
 +
** Visual Editor for Complex Widgets!!
 
* Default behavior for all widgets
 
* Default behavior for all widgets
 
* API should consist of a modular hierarchy
 
* API should consist of a modular hierarchy
Line 212: Line 237:
 
* Qt Widgets that parallel vtkWidgets
 
* Qt Widgets that parallel vtkWidgets
 
** slider to control line length
 
** slider to control line length
== Notes ==
+
 
 +
=== Work Flow Discussion ===
 +
The following summarizes a discussion relative to workflows and the use of VTK widgets.
 +
# CLI Access:
 +
#* There is significant desire to use/access widgets from CLI, this includes defining workflows and "auto-apply" to link widgets to CLI
 +
#* Camera / MRML Nodes accessible via CLI
 +
# PaintBruch Workflow
 +
#* Jim Miller's example: paint inside, paint outside, repeat
 +
# Fiducial Workflow
 +
#* Seeds / landmarks -> algorithms / level sets
 +
#* Seeds may include meta-data such as scale, orientation
 +
# Annotation Workflow
 +
#* Better text widgets, captions, etc.
 +
#* Building atlases
 +
#* (aside developing light-weight Slicer atlas viewer)
 +
# ROI Workflow
 +
#* Various types of ROIs including
 +
#** Nested contours
 +
#** Cube
 +
#** Extruded contours (to cut out regions)
 +
#** Polyhedron / polygon
 +
# Transformation Workflow
 +
#* Jack / 3-axis transformation widget
 +
#* Modify vtkImplicitPlaneWidget to support slice transformation
 +
#* Camera view / transformation
 +
#* Light view / transformation
 +
# Surface Editing Workflow
 +
#* Drawing on surfaces, models
 +
#* Editing polygonal surfaces
 +
# Selection Workflow
 +
#* Group / Ungroup
 +
#* Selecting object with picks, lasso, etc.
 +
#* Probing data
 +
 
 +
=== Testing (Widgets) ===
 +
Current CTK, VTK and Slicer infrastructure is able to test the widgets. The main concerns are: 1) add new tests, and being able to track tests failures that are inconsistent between systems (e.g., passes as VTK test, but not as Slicer test). One thing we'd like to do is add the ability to record events in the rendering window which drives Slicer (customizing qtVTKRenderWindow to record events).
 +
 
 +
More tests are needed on all levels:
 +
* Host system: CTK, VTK, SLICER- test widgets in each of these contexts
 +
* Appearance
 +
* Speed (scalability)
 +
* Values
 +
* Effect
 +
* API
 +
* Events, callbacks

Latest revision as of 17:33, 10 July 2017

Home < WidgetDesign2010
Back to events
Slicer4 Architecture Diagram.

Overview

  • What: Review of the wish lists for vtkWidget integration and development.
  • When: Nov 4-6, 2010
  • Where: Kitware office in North Carolina, 101 East Weaver St, Suite G4, Carrboro, NC 27510 (see below)
  • Who: Those involved in or hoping to provide direction and priorities for vtkWidget work for NAMIC.
    • Confirmed: Daniel, Jc, J2, Nicole, Steve, Will, Stephen (Thurs/Fri), Ron (Sat aft)
    • Can't go: Kilian, Alex, Wendy

Related Links

Schedule

  • Start: Thursday, Nov 4 at 9am
  • End: Saturday, Nov 6 at 3pm

Thursday November 4, 2010

  • Morning Agenda
    • Declare users and define use cases
      • Users:
        • Measurements in radiological workstations
          • Bi-dim, length, angle
        • Carving bone model for surgical simulation
          • Operations on meshes
        • Segmentation editing
        • Registration manipulation
      • Developers:
        • Extensible
          • Assign a CLI-plugin to a widget (interactive CLIs)
          • Easy to define new widgets by combining existing widgets
      • Not
        • Touch interface for Slicer
      • Modules and elements of Slicer that use widgets:
        • Annotation module (vtkDistanceWidget, vtkBidimensionalWidget, vtkTextWidget, vtkSeedWidget)
        • Volume Rendering/ROI
        • Overall Slicer GUI "place-pick mouse modes"
          • Lasso mode
        • Slice reformat
        • Editor
        • Corner Annotations
        • Possible 3D Editing
        • Scalar bar for color tables
      • Easily tied to CTK widgets
    • Review status in 3.6
    • Relationship between 3D Widgets and 2D GUI
      • example: KWWidgets scalar bar
      • expose all hidden functionality that is currently accessible with modifiers or hotkeys***

BREAK FOR LUNCH

  • Afternoon Agenda
    • Review (don't revise yet) plans for beta 4.0
    • Wish list for the future
      • Architecture changes to VTK Widgets
      • Architecture changes to Slicer
      • Architecture changes to loadable modules
      • New widgets to create
      • Serialization
      • See also: https://www.slicer.org/wiki/Slicer4:VTKWidgets
      • API Changes
        1. Unified APIs for all widgets
          1. Default behavior for all widgets
          2. Programmatic Placement
          3. Hover Event and other events
          4. All display properties publicly available (text, lines and points)
            1. API should consist of a modular hierarchy
          5. avoid SafeDownCasts, add GetXRepresentation
          6. vtkTextRepresentation: (general) Set/Get of display properties
        2. vtkDistanceWidget: SetWorldSpaceTickSpacing
      • Enhancements
        1. Anchor point and configurable line for any widget which includes a text actor
        2. vtkDistanceWidget: 3D representation
        3. Cloned versus non cloned representations
      • Infrastructure Changes
        1. All widgets exist in RAS space
        2. SetCurrentRenderer (for lightbox view)
        3. Mouse interactions (f.e. near vs. nearby in vtkSeedWidget)
          1. Highlight vs. Pick radius
        4. 3D depth ordering of widgets
          1. Handle case of pickable widgets that are hidden by a opaque geometry
        5. Speed up interaction of widgets that have text
          1. possibly timer based level of detail to turn off text during interaction
        6. Anti-aliasing and enhance eye-candy (example: http://raphaeljs.com/)
      • Bugs
        1. vtkDistanceWidget, vtkLineWidget, vtkAngleWidget: GetDistance() and GetAngle() not re-computing
        2. vtkHoverWidget text does not update
      • User-friendly documentation for all widgets
      • Complete testing for all widgets


  • Drink beer
    • What alternatives are there? vtk charts? qt overlays? svg overlays? direct calls to vtk actors?
    • Are 2D and 3D use cases inherently different and do they need different solutions? (e.g. have Qt or web technologies provided high-level functionality while 3D requires a custom solution?)

Friday November 5, 2010

  • Morning Agenda
    • Implementation
      • Current approach in VTK
      • Current approach in Slicer3, Slicer4
      • Testing (how best to write tests)
      • Revisions needed
    • Prioritize list of widgets and features

BREAK FOR LUNCH

  • Afternoon Agenda
    • Set alpha, beta, and release 1.0 thresholds, dates, and responsibilities
      • Discussion of milestones between now and the All Hands Meeting (which fixes can be available ahead of time for incorporation into the Annotation module)
      • Agreement on timeline for changes in VTK to satisfy the widget wishlist for slicer4 (what's feasible in the next couple months, vs what's going to take longer).
    • Drink beer

Saturday November 6, 2010

  • Day 3
    • Summary report for Ron
    • Drink beer

Visiting Kitware in North Carolina

Airports

  • Local Airport: RDU (Raleigh-Durham International Airport)
  • Chapel Hill is about 35 minutes from the airport (50 minutes with "traffic")

Trains, Buses, and Automobiles

  • There are trains and buses from DC and other cities, but they are extremely slow and unreliable.
  • It is a 4.5 hour drive from DC to Chapel hill / Carrboro, NC (Map)

Transportation from Airport

Hotels

  1. The Franklin Hotel
    1. Long walking distance to KRS and UNC (0.7miles / 1km to each)
    2. $180-ish
  2. Carolina Inn
    1. Adjacent to UNC and about 2 miles from Kitware
    2. $170-ish
  3. Days Inn
  4. Sheraton
  5. Holiday Inn

Local Transportation

Directions to KRS ("Kitware Really South")

  • Weaver St Market Building, 101 East Weaver St, Suite G4, Carrboro, NC 27510
  • Google Map
  • Directions for "locals": Park in the lot next to Weaver St Market. Access to the lot is from Main St., and the lot is located across the street from Armadillo Grill. Enter the east end of the Weaver St Market building (glass door nearest the parking lot). Kitware offices (Suite G4) are on the third floor, at the far end of the building (follow the hall).

Misc.

Social Event

Wrap Up & To-Do list

Can do by Dec 10

  • API Changes
    1. Unified APIs for all widgets
      1. Programmatic Placement
        • Load into a specified state
      2. All display properties publicly available (text, lines and points)
        • cloned versus non cloned representations
        • Some properties are shared by some widgets (color, shape)
        • See seed and line widgets (they work)
        • Consider linewidget2 versus distance
        • Consider Caption versus Text
        • vtkTextRepresentation: (general) Set/Get of display properties
      3. avoid SafeDownCasts, add GetXRepresentation
        • Mimic behavior of ScalarBarWidget
    2. vtkDistanceWidget: SetWorldSpaceTickSpacing
      • measuring tape behavior
  • Infrastructure
    1. Multiple renderers not handled by widgets (some risk)
      • e.g. lightbox view
      • Components of widget split across renderers
    2. Mouse interactions (f.e. near vs. nearby in vtkSeedWidget)
      1. Highlight vs. Pick radius
    3. Detachable text for four key widgets (Nicole)
  • Bugs
    1. vtkDistanceWidget, vtkLineWidget, vtkAngleWidget, vtkBiDimensional: GetDistance() and GetAngle() not re-computing (fixes committed to Nicole's git for angle and distance representations, bidimensional representation new test shows that it does not fail GetDistance GetAngle)
    2. vtkHoverWidget text does not update (Will)
      • Mouse-over twice and then still only shows old text (see this test)
    3. vtkDistanceWidget: 3D representation (Will/Nicole)
      • DistanceRepresentation3D

To be discussed

  • Infrastructure
    1. Hover Event and other events
      • Widget state changes should be exposed
    2. Speed up interaction of widgets that have text (might be a Mac with Slicer only problem..)
      • Consider qVTK
      • Consider LOD
        • Timer based level of detail to turn off text during interaction

Future

  • Infrastructure
    1. Pickable when occluded (bug)
      • Screen rendering or other hint when occluded
    2. Quality of 2D Widget Rendering (anti-alias...)
    3. 3D depth ordering of widgets
      1. Handle case of pickable widgets that are hidden by a opaque geometry
  1. Anchor point and configurable line for any widget which includes a text actor
    • Decouple measurement widget from text (label and measurement value)
    • Programmatic widgets:
      • vtkDistanceWidget via
        • 2 clicks then appears
        • OR 1 click and appears and drags and then click to stick
  2. Level of detail manager
    • Two representations per MRML node
  • Complex widgets
    • Challenge is managing hierarchy of events
    • Visual Editor for Complex Widgets!!
  • Default behavior for all widgets
  • API should consist of a modular hierarchy
  • Qt Preferences drive vtkWidget appearance
    • To handle different user interaction interfaces (touch vs mouse)
  • Qt Widgets that parallel vtkWidgets
    • slider to control line length

Work Flow Discussion

The following summarizes a discussion relative to workflows and the use of VTK widgets.

  1. CLI Access:
    • There is significant desire to use/access widgets from CLI, this includes defining workflows and "auto-apply" to link widgets to CLI
    • Camera / MRML Nodes accessible via CLI
  2. PaintBruch Workflow
    • Jim Miller's example: paint inside, paint outside, repeat
  3. Fiducial Workflow
    • Seeds / landmarks -> algorithms / level sets
    • Seeds may include meta-data such as scale, orientation
  4. Annotation Workflow
    • Better text widgets, captions, etc.
    • Building atlases
    • (aside developing light-weight Slicer atlas viewer)
  5. ROI Workflow
    • Various types of ROIs including
      • Nested contours
      • Cube
      • Extruded contours (to cut out regions)
      • Polyhedron / polygon
  6. Transformation Workflow
    • Jack / 3-axis transformation widget
    • Modify vtkImplicitPlaneWidget to support slice transformation
    • Camera view / transformation
    • Light view / transformation
  7. Surface Editing Workflow
    • Drawing on surfaces, models
    • Editing polygonal surfaces
  8. Selection Workflow
    • Group / Ungroup
    • Selecting object with picks, lasso, etc.
    • Probing data

Testing (Widgets)

Current CTK, VTK and Slicer infrastructure is able to test the widgets. The main concerns are: 1) add new tests, and being able to track tests failures that are inconsistent between systems (e.g., passes as VTK test, but not as Slicer test). One thing we'd like to do is add the ability to record events in the rendering window which drives Slicer (customizing qtVTKRenderWindow to record events).

More tests are needed on all levels:

  • Host system: CTK, VTK, SLICER- test widgets in each of these contexts
  • Appearance
  • Speed (scalability)
  • Values
  • Effect
  • API
  • Events, callbacks