Presentation is loading. Please wait.

Presentation is loading. Please wait.

NA-MIC, 2008 June Workshop, IHK Akademie Westerham KWWidgets Sebastien BARRE - Kitware, Inc.

Similar presentations


Presentation on theme: "NA-MIC, 2008 June Workshop, IHK Akademie Westerham KWWidgets Sebastien BARRE - Kitware, Inc."— Presentation transcript:

1 NA-MIC, 2008 June Workshop, IHK Akademie Westerham KWWidgets Sebastien BARRE - Kitware, Inc.

2 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham2 2 What is KWWidgets? A GUI toolkit Cross-platform Open-license Free

3 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham3 3 What is KWWidgets? (cont.) A GUI toolkit that provides low-level and high-level visualization- oriented widgets compatible with the VTK framework. vs.

4 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham4 4 What is KWWidgets? (cont.) Over 150 C++ classes, Around 190,000 lines of code, 49 person years, roughly $5M at 100k per person (source: ohloh.org) Used extensively by Kitware to develop open-source and commercial end-user applications for more than 9 years Used extensively in Slicer3

5 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham5 5 What is KWWidgets? (cont.) Cardiac segmentation and CT Volume Rendering in Slicer3, using data and segmentations from the collaboration with Boston Children's Hospital Pediatric Cardiology.

6 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham6 6 What is KWWidgets? (cont.) VolView 3.0 (Work in Progress)

7 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham7 7 Features Object-oriented C++ layer on top of Tcl/Tk Inherit from the VTK coding framework checkbutton.cb1.cb1 config -text "A checkbutton".cb1 deselect pack.cb1 vtkKWCheckButton *cb1 = vtkKWCheckButton::New(); cb1->SetParent(parent); cb1->Create(); cb1->SetText("A checkbutton"); cb1->DeSelect(); app->Script("pack %s", cb1->GetWidgetName());

8 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham8 8 Features (cont.) Can interact and co-exist with Tcl/Tk directly from Tcl/Tk or Slicer3 Wrapped into a Tcl package just like VTK Fast-prototyping

9 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham9 9 Features (cont.) vtkKWCheckButton *cb1 = vtkKWCheckButton::New(); cb1->SetParent(parent); cb1->Create(); cb1->SetText("A checkbutton"); cb1->DeSelect(); app->Script("pack %s", cb1->GetWidgetName()); package require kwwidgets vtkKWCheckButton cb1 cb1 SetParent $parent cb1 Create cb1 SetText "A checkbutton" cb1 DeSelect pack [cb1 GetWidgetName] … button.b -text "My Button" pack.b C++ vs. Tcl

10 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham10NA-MIC, 2008 June Workshop, IHK Akademie Westerham10 Widgets overview Core widgets Composite widgets VTK widgets Helper classes

11 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham11NA-MIC, 2008 June Workshop, IHK Akademie Westerham11 Widgets overview (cont.) Core widgets vtkKWCanvas vtkKWCheckButton vtkKWEntry vtkKWFrame vtkKWLabel vtkKWListBox vtkKWMenu vtkKWOptionMenu vtkKWPushButton vtkKWRadioButton vtkKWScale vtkKWScrollbar vtkKWText vtkKWThumbWheel vtkKWTopLevel vtkKWTree …

12 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham12NA-MIC, 2008 June Workshop, IHK Akademie Westerham12 Widgets overview (cont.) Composite widgets vtkKWChangeColorButton vtkKWDialog vtkKWExtent vtkKWListBoxToListBoxSelectionEditor vtkKWHSVColorSelector vtkKWNotebook vtkKWProgressGauge vtkKWRange vtkKWSelectionFrame vtkKWSelectionFrameLayoutManager vtkKWSplashScreen vtkKWSplitFrame vtkKWTclInteractor vtkKWToolbar vtkKWToolbarSet vtkKWUserInterfaceManager vtkKWUserInterfacePanel vtkKWWidgetSet vtkKWWidgetWithScrollbars vtkKWWindow …

13 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham13NA-MIC, 2008 June Workshop, IHK Akademie Westerham13 Widgets overview (cont.) … more composite widgets: divide and conquer

14 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham14NA-MIC, 2008 June Workshop, IHK Akademie Westerham14 Widgets overview (cont.) VTK widgets vtkKWColorPresetSelector vtkKWColorTransferFunctionEditor vtkKWCornerAnnotationEditor vtkKWHeaderAnnotationEditor vtkKWPiecewiseFunctionEditor vtkKWRenderWidget vtkKWScalarBarAnnotation vtkKWScalarComponentSelectionWidget vtkKWTextPropertyEditor vtkKWVolumeMaterialPropertyWidget vtkKWVolumePropertyWidget …

15 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham15NA-MIC, 2008 June Workshop, IHK Akademie Westerham15 Examples A simple image viewer using KWWidgets and VTK

16 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham16NA-MIC, 2008 June Workshop, IHK Akademie Westerham16 Examples (cont.) package require kwwidgets vtkKWApplication app vtkKWWindowBase win app AddWindow win win Create vtkKWRenderWidget rw rw SetParent [win GetViewFrame] rw Create rw CornerAnnotationVisibilityOn pack [rw GetWidgetName] -side top -expand y -fill both \ -padx 0 -pady 0 vtkXMLImageDataReader reader reader SetFileName "head100x100x47.vti" vtkImageViewer2 viewer viewer SetRenderWindow [rw GetRenderWindow] viewer SetRenderer [rw GetRenderer] viewer SetInput [reader GetOutput] vtkRenderWindowInteractor iren viewer SetupInteractor iren rw ResetCamera set ca [rw GetCornerAnnotation] $ca SetImageActor [viewer GetImageActor] $ca SetWindowLevel [viewer GetWindowLevel] $ca SetText 2 " " $ca SetText 3 " \n " vtkKWScale slice_scale slice_scale SetParent [win GetViewFrame] slice_scale Create slice_scale SetRange \ [viewer GetWholeZMin] [viewer GetWholeZMax] slice_scale SetValue [viewer GetZSlice] slice_scale SetCommand "" \ {viewer SetZSlice [slice_scale GetValue] ; rw Render} pack [slice_scale GetWidgetName] -side top -expand n \ -fill x -padx 2 -pady 2 app Start rw Delete reader Delete viewer Delete iren Delete slice_scale Delete win Delete app Delete

17 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham17NA-MIC, 2008 June Workshop, IHK Akademie Westerham17 Examples (cont.) KWWidgetsTour Show all widgets Provide Tcl vs. C++ vs. Python code comparison

18 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham18NA-MIC, 2008 June Workshop, IHK Akademie Westerham18 KWWidgets in Slicer3 in Base/GUI (Load/Save, App Settings, Color, Data, Fiducials, Models, ROI, Slices, Transforms)

19 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham19NA-MIC, 2008 June Workshop, IHK Akademie Westerham19 KWWidgets in Slicer3 (cont.) in C++ or Tcl modules slicerWiki: How to implement an Interactive Module GUIHow to implement an Interactive Module GUI

20 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham20NA-MIC, 2008 June Workshop, IHK Akademie Westerham20 KWWidgets in Slicer3 (cont.) in Command Line Plugins slicerWiki: Execution Model Documentation UI and command-line generated from self-describing XMLExecution Model Documentation Filtering.Denoising Median Filter The MedianImageFilter is commonly used as a robust approach for noise reduction. This filter is particularly efficient against "salt-and-pepper" noise. In other words, it is robust to the presence of gray-level outliers. MedianImageFilter computes the value of each output pixel as the statistical median of the neighborhood of values around the corresponding input pixel. 0.1.0.$Revision: 2085 $(alpha) Bill Lorensen Median Filter Parameters Parameters for the median filter neighborhood --neighborhood The size of the neighborhood in each dimension Neighborhood Size 1,1,1 IO Input/output parameters inputVolume Input Volume input 0 Input volume to be filtered outputVolume Output Volume output 1 Output filtered

21 June 16-17, 2008NA-MIC, 2008 June Workshop, IHK Akademie Westerham21NA-MIC, 2008 June Workshop, IHK Akademie Westerham21 Resources Web & Wiki: http://kwwidgets.org http://kwwidgets.org API: http://public.kitware.com/KWWidgets/doc/nightly/html http://public.kitware.com/KWWidgets/doc/nightly/html Tutorial and examples available in the source: cvs –d :pserver:anonymous@public.kitware.com:/cvsroot/KWWidgets co KWWidgets Dashboard: http://www.cdash.org/CDash/index.php?project=KWWidgets http://www.cdash.org/CDash/index.php?project=KWWidgets


Download ppt "NA-MIC, 2008 June Workshop, IHK Akademie Westerham KWWidgets Sebastien BARRE - Kitware, Inc."

Similar presentations


Ads by Google