VTK 5.8 环境配置
2011-12-14 17:06
260 查看
一、 VTK简介
Wikipedia: The Visualization Toolkit (VTK) is an open-source, freely available software system for 3D computer graphics, image processing and visualization. VTK consists of a C++ class library and several interpreted interface layers including Tcl/Tk, Java, and Python. Kitware, whose team created and continues to extend the toolkit, offers professional support and consulting services for VTK. VTK supports a wide variety of visualization algorithms including: scalar, vector, tensor, texture, and volumetric methods; and advanced modeling techniques such as: implicit modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay triangulation. VTK has an extensive information visualization framework, has a suite of 3D interaction widgets, supports parallel processing, and integrates with various databases on GUI toolkits such as Qt and Tk. VTK is cross-platform and runs on Linux, Windows, Mac and Unix platforms. VTK also includes ancillary support for 3D interaction widgets, two and three-dimensional annotation, and parallel computing. At its core VTK is implemented as a C++ toolkit, requiring users to build applications by combining various objects into an application. The system also supports automated wrapping of the C++ core into Python, Java and Tcl, so that VTK applications may also be written using these interpreted programming languages. (http://en.wikipedia.org/wiki/VTK)VTK features (http://vtk.org/VTK/project/technical.html)
The Design and Implementation Of An Object-Oriented Toolkit For 3D Graphics and Visualization (http://vtk.org/VTK/img/dioot.pdf)
二、 VTK环境配置
VTK采用了CMake进行环境配置(或者说CMake是由VTK而生),可以根据不同的开发环境生成匹配的项目工程,具体的方法如下:第一步-下载 CMake (http://www.cmake.org/cmake/resources/software.html)
VTK Source + VTK data (http://www.vtk.org/VTK/resources/software.html)
这里的VTK的windows installer可不下载,除非打算直接基于Tcl/Tk编程。然后,将VTK Source 和VTK Data解压到某个目录中(默认目录即可。有人说该目录名称中不能包含空格,至少对于我的情况是不成立的(Win7 + VTK5.8))。
第二步-生成项目文件 对于Windows用户,采用CMake的gui界面首先对VTK的Source,和Output路径进行设置,然后Configure,CMake会询问本机采用的编译器(我用的是VS2010)。经过相当长的一段时间后,CMake会用红色区域来提示需要用户自定义的编译选项。
在这个过程中,会有很多的标记需要勾选,其大都可以“望文知义”,将鼠标放置在每一个项目上会有简短的介绍(个人建议初学者勾选其中的Example选项,有很多例子值得学习),如果选择了第三方库的支持,比如BOOST或者MEX等,那么就需要制定这些库的路径。
需要注意的是,对于要基于MFC编程的用户来说,要勾选CMake中的Adcance选项。其中必须首先勾选VTK_USEGUISUPPORT,然后才会出现VTK_USE_MFC。另外,两者必须同时选中,否则CMake不会对其生成工程。如果在编译的过程中发现没有生成某一个模块的工程,也大可不必担心,可以再次运行CMake,将该功能勾选后重新Generate。
最后,CMake提示生成成功之后就可以进入下一步了。
第三步-编译项目 CMake会将上一步定制的VTK版本的项目文件生成在Output的目录中,直接对其进行编译(启动工程为ALL_BUILD),成功之后就可以尝试示例的应用程序了。
第四步-用户开发环境设置 参照VTK中的示例工程设置。
可以参考的网帖有:
http://www.divms.uiowa.edu/~cwyman/classes/common/howto/winVTK.html
http://wenku.baidu.com/view/f5b506e79b89680203d82529.html
http://www.cnblogs.com/opengl/archive/2011/11/20/2256528.html
相关文章推荐
- VTK5.8在64位Win7和VS2010环境下的安装与配置
- Qt5.8_VTK7.0_VS2015编译配置及测试中问题
- VTK环境配置中的一些问题
- QT5.8+Opencv3.2+Opencv_contrib-3.2.0环境配置
- VTK配置(Win7_64 + VS_2010 + CMake2.8 + VTK5.8)
- oracle linux 5.8安装oracle 11g rac 第一章:配置实验环境
- Mac 配置VTK环境 VTK8.1.0+cmake3.1+xcode+Qt5.5
- Redhat 5.8 ORACLE 11gR2 RAC安装文档1-环境配置及准备
- oracle linux 5.8安装oracle 11g rac 第二章:配置虚拟主机,环境准备
- VTK-1-编译VTK-环境配置
- QT5.8+VS2015环境配置(全)
- VS 2015 + Qt 5.8 环境配置
- QT5.8配置halcon环境
- 里程碑,全静态开发环境配置完成:Qt+Qwt+VTK+Boost
- VS2015 + Qt5.8 环境配置
- OEL5.8 x64 安装oracle数据库环境配置脚本
- java jdk1.7及JDBC驱动桥环境变量的配置(水一贴)
- springboot + profile(不同环境读取不同配置)
- Mac 环境配置Uiautomator 开发环境环境
- Android使用之环境配置