vtkGUI
Development of an open source graphical user interface for the Visualization
Toolkit
Stefan Svensson
Katerina Vrotsou
Toolkit
Stefan Svensson
Katerina Vrotsou
Abstract
The work reported upon in this thesis concerns the development of an open source
Graphical User Interface for the Visualization Toolkit (VTK). The GUI enables
visual programming of pipelines building upon VTK components. The work is a
continuation of a previous project conducted at CINECA. This thesis presents the
development process of this interface as well as the features added and methods
used for the enhancement of the existing interface. These features include an
enhanced visualization pipeline representation, a more complete wrapping
procedure of VTK into Tcl as well as completely revised software architecture.
Furthermore, features for opening and saving Tcl scripts creating VTK
visualization pipelines were implemented.
- 3 -
Table of contents
1 INTRODUCTION...................................................................................................................................... 7
1.1 WHAT IS VISUALIZATION? .................................................................................................................... 7
1.2 WHY VISUALIZE?................................................................................................................................. 7
1.3 VTK (VISUALIZATION TOOLKIT).......................................................................................................... 8
1.3.1 What is VTK? ................................................................................................................................. 8
1.3.2 The Visualization Pipeline .............................................................................................................. 8
1.3.3 Sources, Filters and Mappers ......................................................................................................... 8
1.4 ABOUT CINECA ................................................................................................................................. 8
1.5 PROBLEM STATEMENT AND GOALS ...................................................................................................... 9
1.6 LITERATURE STUDY AND PREPARATION................................................................................................ 9
2 THE VTKGUI V 0.4 – THE PROJECT BEFORE WE JOINED......................................................... 10
2.1 THE FEATURES OF VTKGUI V 0.4........................................................................................................ 10
2.1.1 Pipeline Editor .............................................................................................................................. 10
2.1.2 Property Window .......................................................................................................................... 11
2.1.3 Open, Save and Export.................................................................................................................. 11
2.2 CHANGES TO BE MADE........................................................................................................................ 11
3 EVALUATION......................................................................................................................................... 12
3.1 VTKPIPELINE...................................................................................................................................... 13
3.1.1 Evaluation of vtkPipeline .............................................................................................................. 13
3.2 RPD, RAPID PIPELINE DESIGN............................................................................................................ 14
3.2.1 Evaluation of RPD ........................................................................................................................ 14
3.3 MAYAVI ............................................................................................................................................ 15
3.3.1 Evaluation of MayaVi.................................................................................................................... 15
3.4 VTKEDITOR........................................................................................................................................ 16
3.4.1 Evaluation of vtkEditor ................................................................................................................. 16
3.5 PARAVIEW......................................................................................................................................... 17
3.5.1 Evaluation of ParaView ................................................................................................................ 17
3.6 AMIRA ............................................................................................................................................... 18
3.6.1 Evaluation of Amira ...................................................................................................................... 18
3.7 CONCLUSIONS OF EVALUATION .......................................................................................................... 19
3.8 INTRODUCING VTKGUI....................................................................................................................... 19
4 DEVELOPMENT..................................................................................................................................... 20
4.1 DEVELOPMENT TOOLS........................................................................................................................ 20
4.1.1 Advantages and Disadvantages of Programming with Tcl ........................................................... 20
4.2 DEVELOPMENT METHOD .................................................................................................................... 20
4.2.1 Goals and motivation of applying XP to the development process of vtkGUI............................... 21
4.2.2 Desired features for vtkGUI v 1.0 ................................................................................................. 21
4.2.3 User Stories from the development of vtkGUI v1.0 ....................................................................... 21
4.2.4 Results of using XP........................................................................................................................ 22
4.3 DEVELOPMENT STRATEGY ................................................................................................................. 22
4.3.1 How will the goals be achieved?................................................................................................... 22
4.3.2 User Friendliness .......................................................................................................................... 23
4.3.3 Functionality ................................................................................................................................ 24
4.3.4 Problems of wrapping VTK into Tcl.............................................................................................. 24
5 THE NEW VERSION OF VTKGUI ....................................................................................................... 24
5.1 THE DESIGN OF VTKGUI .................................................................................................................... 24
5.1.1 Main Menu ................................................................................................................................... 25
5.1.2 Icon Toolbar................................................................................................................................. 25
5.1.3 Main Window ............................................................................................................................... 26
5.1.3.1 Render Window.................................................................................................................................. 26
5.1.3.2 Console Window................................................................................................................................ 26
5.1.3.3 Pipeline Window................................................................................................................................ 27
5.1.3.4 Property Window ............................................................................................................................... 29
5.1.4 Status Bar..................................................................................................................................... 31
5.2 THE FUNCTIONALITY OF VTKGUI....................................................................................................... 32
5.2.1 Software Architecture................................................................................................................... 32
- 4 -
5.2.2 HTML Parser ............................................................................................................................... 32
5.2.3 Class Instantiation ........................................................................................................................ 35
5.2.4 Wrapper Class Creation................................................................................................................ 35
5.2.5 Wrapper Object Creation.............................................................................................................. 36
5.2.6 Property GUI creation .................................................................................................................. 36
5.2.6.1 Properties frame ................................................................................................................................. 36
5.2.6.2 Parsing of Methods............................................................................................................................. 36
5.2.6.3 Property-widgets creation.................................................................................................................... 37
5.2.7 GUI customizer ............................................................................................................................. 38
5.2.8 Connection Methods...................................................................................................................... 38
5.2.8.1 SetConnection Method ........................................................................................................................ 38
5.2.8.2 GetConnection Method ....................................................................................................................... 39
5.2.8.3 Distinguishing the connections............................................................................................................ 39
5.2.9 Implicit VTK Objects..................................................................................................................... 39
5.2.9.1 Handling Implicit Objects ................................................................................................................... 39
5.2.9.2 Implicit Wrapper Creation................................................................................................................... 40
5.2.9.3 Object Output ..................................................................................................................................... 41
5.2.10 Deletion of wrappers ................................................................................................................ 41
5.2.11 Open File Feature .................................................................................................................... 42
5.2.11.1 Goals of Open File Feature.................................................................................................................. 42
5.2.11.2 Problems & Solutions......................................................................................................................... 42
5.2.11.3 The First Attempt ............................................................................................................................... 43
5.2.11.4 The Second Attempt........................................................................................................................... 43
5.2.11.5 The Final Open File Feature................................................................................................................ 44
5.2.11.6 Results of the Open File Feature ......................................................................................................... 46
5.2.12 Save File Feature ..................................................................................................................... 46
5.2.12.1 How the Save feature work previously................................................................................................ 46
5.2.12.2 Goals of Save Feature......................................................................................................................... 46
5.2.12.3 Problems............................................................................................................................................. 46
5.2.12.4 Saving the visualization pipeline......................................................................................................... 47
5.2.12.5 Minimizing redundancy...................................................................................................................... 47
5.2.12.6 A Walkthrough of the Save Feature .................................................................................................... 48
5.2.12.7 C++ Export......................................................................................................................................... 49
5.2.12.8 Results of the Save Feature ................................................................................................................. 49
5.2.13 Keeping vtkGUI up-to-date ...................................................................................................... 49
6 HOW TO INSTALL VTKGUI ................................................................................................................ 50
6.1 GOALS OF THE SETUP PROCEDURE ..................................................................................................... 50
6.2 PROBLEMS ......................................................................................................................................... 50
6.3 THE SOLUTION................................................................................................................................... 50
6.3.1 NSIS, Nullsoft Scriptable Install System........................................................................................ 50
6.3.2 The features of NSIS...................................................................................................................... 50
6.3.3 Scripting with NSIS ....................................................................................................................... 51
6.3.4 Creating Setup-files....................................................................................................................... 52
6.3.5 Results of the Setup Procedure...................................................................................................... 52
7 RESULT.................................................................................................................................................... 52
7.1 PREREQUISITES.................................................................................................................................. 52
7.2 GETTING STARTED WITH VTKGUI ...................................................................................................... 53
7.3 DID WE ACHIEVE OUR GOAL?.............................................................................................................. 53
7.4 DOES THE PROGRAM WORK AS EXPECTED?......................................................................................... 54
7.5 ADVANTAGES AND DISADVANTAGES OF VTKGUI .............................................................................. 54
7.6 VTKGUI VS. OTHER VISUALIZATION TOOLS....................................................................................... 55
7.7 VTKGUI V 1.0 VS VTKGUI V 0.4......................................................................................................... 55
8 DISCUSSION............................................................................................................................................ 56
8.1 WHAT COULD HAVE BEEN DONE DIFFERENT? ..................................................................................... 56
8.1.1 The ml-files................................................................................................................................... 56
8.1.2 The Save Feature.......................................................................................................................... 56
8.2 FUTURE IMPROVEMENTS/ PLANS ........................................................................................................ 57
9 ACKNOWLEDGMENTS........................................................................................................................ 57
10 REFERENCES ......................................................................................................................................... 58
- 5 -
APPENDIX A ..................................................................................................................................................... 60
APPENDIX C ..................................................................................................................................................... 65
APPENDIX D ..................................................................................................................................................... 69
APPENDIX E ..................................................................................................................................................... 73
vtkGUI设计的电子书籍,另附vtkGUI程序,可以通过该程序做vtk pipeline相关实验。
程序有大概40多MB,不容易上传,所以只能将电子书籍提供下载了。
