VTK(Visualization ToolKit)是一种可视化工具箱,功能强大,能帮我们进行各种图像处理和可视化。本实验利用VTK对尸体头颅体数据进行科学可视化。
实验环境:
VS2015+VTK7.0
VTK的安装有点麻烦,但这是个学习的过程,网上有许多相关教程,多花点时间肯定能成功。
实验数据:
本实验数据来源于:The stanford Volume Data Archive
网站里有头颅数据的详细信息,原始数据信息如下:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
有多种格式的数据,都是从原始数据转化而来的。本实验使用 16-bit TIF格式数据
算法:
主要算法:Marching Cubes
Marching cubes algorithm use for extracting a polygonal mesh of an isosurface from a three-dimensional discrete scalar field (sometimes called voxels). The algorithm proceeds through the scalar field, taking eight neighbor locations at a time (thus forming an imaginary cube), then determining the polygon(s) needed to represent the part of the isosurface that passes through this cube. The individual polygons are then fused into the desired surface.The applications of this algorithm are mainly concerned with medical visualizations such as CT and MRI scan data images, and special effects or 3-D modelling with what is usually called metaballs or other metasurfaces(wiki).
结果显示:
渲染了两个表面,一个皮肤,一个骨骼,皮肤的不透明度可以调节。
(1)皮肤不透明度为1
(2)不透明度为0.5
(3)不透明度为0
图片大小问题无法显示,代码以及详情请看:我的Github