没有合适的资源?快使用搜索试试~ 我知道了~
VTK\Adding_Components_to_VTK_Designer_2
需积分: 9 7 下载量 70 浏览量
2010-01-25
10:02:53
上传
评论
收藏 1.62MB PDF 举报
温馨提示
试读
48页
VTK\Adding_Components_to_VTK_Designer_2
资源推荐
资源详情
资源评论
Adding Components to VTK Designer 2
By Prashanth N Udupa (prashanth@vcreatelogic.com) – Core developer of VTK Designer and GCF,
VCreate Logic and Adithya Udupa (udupa.adithya@gmail.com) – 6
th
Semester ISE, BMSCE, Bangalore.
Preface
VTK Designer 2 provides an intuitive system for creating visualization pipelines by dragging and dropping
one or more algorithms off the visualization nodes list. The current (developer) version of VTK Designer
contains 198 algorithms that users can drag and drop to make a pipeline.
What if you wanted to add your own algorithms into this list and
enable users to drag and drop them to the pipeline and use them?
What if you wanted to provide additional functionality?
Well, this article explains to you how to do that!
Visualizatio
n Nodes or
Algorithms
Table of Contents
Adding Components to VTK Designer 2 ........................................................................................................ 1
Preface ...................................................................................................................................................... 1
Table of Contents ...................................................................................................................................... 2
2.0 VTK Designer’s “Component” architecture ........................................................................................ 3
2.1 Core Components ........................................................................................................................... 3
2.2 Inherited Components .................................................................................................................... 4
2.3 Supplimentary Components ........................................................................................................... 4
2.4 Unreleased components ................................................................................................................. 4
3.0 VTK Designer 2 Interfaces ................................................................................................................... 5
4.0 Creating a new component ................................................................................................................. 6
4.1 Implementing a “scientific calculator component” for VTK Designer ............................................ 6
4.2 Adding Visualization Algorithms to VTK Designer......................................................................... 19
5.0 Extending Functionality .................................................................................................................... 35
5.1 Exporting a 3D Scene to VRML ...................................................................................................... 35
6.0 Distributing components via “Automatic Software Updater” .......................................................... 41
6.1 What is an update? ....................................................................................................................... 41
6.2 How to despatch updates? ........................................................................................................... 41
6.3 Creating an update ........................................................................................................................ 42
6.4: Hosting the update ...................................................................................................................... 44
7.0 Further Reading ................................................................................................................................ 48
7.1 Software Built using GCF ............................................................................................................... 48
7.2 Further reading ............................................................................................................................. 48
2.0 VTK Designer’s “Component” architecture
VTK Designer 2 is built using “Generic Component Framework”
1
a component technology from VCreate
Logic. GCF helps developers in composing Qt components and then integrates them by making use of
GUIXML.
VTK Designer 2 makes use of GCF to define independent components that communicate with each other
via well defined Interfaces. The components are brought together using GUIXML. The components in
VTK Designer can be categorized into
• Core Components
• Inherited Components
• Supplementary components
• Unreleased components
2.1 Core Components
VTK Designer 2 consists of the following core components. Without these components VTK Designer is
dysfunctional and useless.
1. Visualization System Canvas – This component provides the pipeline canvas on which users
drag and drop algorithms and make connections.
2. Visualization System Node Class Explorer – This component provides an explorer control that
lists all drag-and-droppable algorithms. The component only provides a list control, the
algorithms themselves come from other components.
3. VTK Visualization System Node Factory – This component provides 250+ VTK classes for drag
and drop in VTK Designer
1
For more information on GCF, visit http://www.vcreatelogic.com/oss/gcf
Visualization
System Node
Class Explorer
VTK
Visualization
System Node
Factory
Visualization
System
Canvas
2.2 Inherited Components
Since VTK Designer 2 is built using GCF, a lot of built-in GCF components are used as well. The following
components are used from GCF
1. Property Editor – Provides a control for showing properties of selected objects in the pipeline.
2. Script Editor – Provides an object explorer and a ECMA script editor control for writing and
executing scripts.
3. Utils – Provides math and XML utility methods
4. Message Log – Provides one or more text box controls to show error, warning and critical
messages.
5. Project Manager – Provides functionality and interfaces to synchronize loading and saving of
projects into XML files.
2.3 Supplimentary Components
These are additional components that were added to VTK Designer much later in the
development/release cycle to enhance its capabilities.
1. Data-File-Loader – Provides a way for users to have VTK Designer automatically contruct
pipelines to load and render one or more data files.
2. Template Manager – Provides a way for users to save part of a pipeline as template and load
them back later on
3. VTK Fullscreen – Provides a way for users to view a selected render window in full screen mode
2.4 Unreleased components
VCreate Logic and its partners are constantly working on new things that can be accommodated into
VTK Designer to enhance productivity and user experience. There are some components that are being
worked on at the moment, but are not released for public use yet. Listed below are few of them.
1. Open Haptics VTK – This is a commercial component that provides a way for users to haptic
enable their visualization scenarios by making use of SensAble’s haptic devices and OpenHaptics
technology.
2. Code Generator – This component provides a way for users to generate VTK/C++, Python, Tcl
and simple OpenGL code from constructed VTK pipelines.
3. VTK Volume Rendering System – This component provides support for volume rendering
classes in VTK
As you can notice, VTK Designer 2 employs component architecture. This enables us and other 3
rd
party
vendors to extend and add new features to the product very easily.
3.0 VTK Designer 2 Interfaces
Components, in VTK Designer 2, communicate with each other by making use of standard interfaces.
Interfaces are C++ classes or structs whose members are pure virtual functions. When components are
loaded, they try to look for implementations of one or more standard interfaces and communicate to
other components via the same.
Listed below are few of the very important interfaces in VTK Designer 2
1. IVisSystemNode – Algorithms that can be dragged and dropped on to the network must
implement this interface. It contains standard methods that must be implemented to manage
the node in a network, provide inputs to the node and fetch outputs from the node. Subclasses
of IVisSystemNode can be thought of as wrappers for actual backend algorithms. Wrappers
present the functionality of backend classes in a way VTK Designer 2 environment can deal with.
2. IVisSystemNodeDesc – Algorithms must provide an implementation of this interface to describe
some meta information about the node.
3. IVisNetwork – Through this interface you can access the core functionality offered by the
“Visualization System Canvas” component. Using this interface you can
a. Add nodes (implementations of IVisSystemNode interface) to the visualization network
b. Remove nodes from the network
c. Clear the network
d. Query existing nodes in the network
e. Make connections between nodes
f. Break existing connections
4. IVisNetworkConnection – Represents a connection between two nodes in the network
5. IVisSystemNodeFactory – Components that wish to serve nodes for use in a network must
implement this interface. Implementations of this interface provide names of the nodes that
they serve and provide methods to create / destroy named nodes.
6. IVisSystemNodeFactoryRegistry – Through this interface you can access the core functionality
offered by the “Visualization System Node Class Explorer” component. Using this interface you
can
a. Register a node factory
b. Unregister a node factory
c. Query node factories
There are several other interfaces, but these will suffice for the purpose of this article. We will not dive
into the details of each of the above interfaces right away, but we will learn them as and when they are
required.
剩余47页未读,继续阅读
资源评论
mrparky
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功