NA-MIC National Alliance for Medical Image Computing http://na-mic.org VTK Widgets William J. Schroeder Kitware, Inc. June 2006 Thanks • National Library of Medicine / NIH – Dr. Terry Yoo: A2D2 awards (Algorithms, Adaptors, and Data Distribution) • National Science Foundation – Visual Journal project • NIH National Center for Biomedical Computing – NAMIC • Contributors – – – – – – Will Schroeder Lisa Avila Karthik Krishnan Brad King Sebastien Barre Dave Cole National Alliance for Medical Image Computing http://na-mic.org Overview • Goals • Architecture • Widgets • Implementation National Alliance for Medical Image Computing http://na-mic.org Goals • Improve human-data interaction • Provide palette of widgets supporting – – – – – Segmentation Registration Data interaction Text and annotation Light, camera, etc. manipulation • Support client-server (distributed) computing • Rework initial design National Alliance for Medical Image Computing http://na-mic.org Design Goals • Separate representation from event processing – Support distributed processing (client-server) • Introduce translation mechanism between events and widget behavior • Support hierarchical use of widgets • Create general “handle” framework for positioning points National Alliance for Medical Image Computing http://na-mic.org Architecture • Decoupling representation from event processing RenderWindow Events vtkAbstractWidget National Alliance for Medical Image Computing http://na-mic.org Renderer Render() vtkWidgetRepresentation (type of vtkProp) One widget, multiple geometries Geometry Behavior vtkHandleWidget vtkPointHandleRepresentation2D 2D Cross hair vtkPointHandleRepresentation3D 3D Cross hair vtkSphereHandleRepresentation Spherical handle vtkPolygonalHandleRepresentation User defined polygonal shape National Alliance for Medical Image Computing http://na-mic.org 7 Event Translation National Alliance for Medical Image Computing http://na-mic.org Widget Assemblies • Create composite widgets from several individual widgets • Children listen to events from Parent. Hence parent can alter behavior of child Parent Events Events Events Child Child National Alliance for Medical Image Computing http://na-mic.org RenderWindow 9 Widget Hierarchies • Example: vtkDistanceWidget – Uses two instances of vtkHandleWidget – Responds to events from its handles – Notion of “parent” • Reduce number of events • Reduce number of Render() invocations – Can change behavior of widget by using different types of handles HandleWidget HandleWidget National Alliance for Medical Image Computing http://na-mic.org Handle Framework • Types of handles – 2D (display space) – 3D (world space) – Constrained • To plane • To surface • Etc? National Alliance for Medical Image Computing http://na-mic.org Constraints – Point Placers • To map 2D display positions to 3D world coordinates. Does a 2D display position map to: – – – – Focal Plane ? Point on a surface ? Point on a plane / image ? Out of bounds ? • Allows a variety of constraints to be placed the placement of widgets. National Alliance for Medical Image Computing http://na-mic.org 12 vtkPointPlacer National Alliance for Medical Image Computing http://na-mic.org 13 Widgets • VTK currently has widgets to perform – Measurements – Annotation and Labeling – Segmentation – Registration – Data interaction – Scene parameter manipulation: Light, camera, etc. – Probing underlying data • • • • Timer support Multiple geometrical representations for the same widget Reconfigurable key/mouse bindings Grouping widgets National Alliance for Medical Image Computing http://na-mic.org 14 Widgets • Handles National Alliance for Medical Image Computing http://na-mic.org Widgets (cont.) • vtkSliderWidget – 2D – 3D • vtkBorderWidget – Widgets with rectangular borders • vtkTextWidget – Position & size text National Alliance for Medical Image Computing http://na-mic.org Widgets (cont.) • BalloonWidget – Text and/or image in rectangular popup National Alliance for Medical Image Computing http://na-mic.org Widgets (cont.) • vtkCameraWidget – Keyframe & playback camera • vtkCaptionWidget – Text with leader National Alliance for Medical Image Computing http://na-mic.org Widgets (cont.) • vtkCheckerboardWidget – Interleave two images • vtkRectilinearWipeWidget – Window pane (2x2 checkerboard) with movable focus National Alliance for Medical Image Computing http://na-mic.org Widgets (cont.) • vtkContourWidget – 2D (on plane) : vtkBoundedPlanePointPlacer – 3D move through slices in volume : vtkImageActorPointPlacer National Alliance for Medical Image Computing http://na-mic.org Widgets (cont.) – Livewire (shortest path, set arbitrary cost functions, for instance gradient of image) – Dijkstra trace paths on polygonal data National Alliance for Medical Image Computing http://na-mic.org Widgets (cont.) Bezier contours Live wire Polygon tracing Trace on meshes Trace on Digital elevation map data vtkContourWidget : Users can plug in their own interpolators National Alliance for Medical Image Computing http://na-mic.org Widgets (cont.) • vtkDistanceWidget – Measure distance between points National Alliance for Medical Image Computing http://na-mic.org • vtkAngleWidget – Measure angles Widgets (cont.) • vtkSeedWidget – Add one or more seeds / markers • vtkAffineWidget – Translate – Scale – Rotate – Shear images National Alliance for Medical Image Computing http://na-mic.org Widgets (cont.) • vtkBiDimensionalWidget – Tumor response (RECIST vs WHO) National Alliance for Medical Image Computing http://na-mic.org Widgets (cont.) • Box National Alliance for Medical Image Computing http://na-mic.org • Implicit Plane Widgets (cont.) • Finite Plane National Alliance for Medical Image Computing http://na-mic.org • Line Widgets (cont.) • vtkScalarBarWidget National Alliance for Medical Image Computing http://na-mic.org • vtkSphereWidget Widgets (cont.) • vtkImagePlaneWidget National Alliance for Medical Image Computing http://na-mic.org Widgets (cont.) • vtkParallelopipedWidget (3D Affine) National Alliance for Medical Image Computing http://na-mic.org • vtkTensorProbeWidget Probe tensors along a tract Widgets (cont.) • vtkSplineWidget National Alliance for Medical Image Computing http://na-mic.org Widget Sets • Grouping widgets on multiple render windows, relieving the application of the responsibility of doing so. RenderWindow RenderWindow RenderWindow Event Event Event National Alliance for Medical Image Computing http://na-mic.org Widget Widget Widget Event Event WidgetSet Event 32
© Copyright 2026 Paperzz