为解决传统可视化方法无法有效跳过具有空腔结构数据集的中空体素的问题,提出一种基于GPU的面向中空结构体数据的光线投射法.在进行光线投射之前,首先把体数据对半剖分成两部分,对此两部分分别使用八叉树进行重构,并同时剔除空块,建立起各自新的有效数据块的顶点集合;然后使用GPU对顶点集合进行渲染,生成光线起点和方向等信息;最后利用CUDA对重构后的两部分体数据依次进行光线投射和颜色累积,将其结果合成后得到最终图像.实验结果表明,这种方法生成的图像质量与传统的可视化方法相比没有损失,但对具有较多空腔结构的体数据,则可以快速跳过中空体素,具有非常明显的加速效果.
To alleviate the inefficiency of the current visualization methods in skipping the empty voxels located in the hollow part,this paper presents a GPU-based ray casting method for hollow volume data. First,the volume is divided into two equal parts and reconstructed into two octrees before rendering. In this process,the empty blocks are culled synchronously from the original data,and two vertex arrays are generated consisting of valid voxels only.Then,the vertex arrays are rendered into textures which contain the start and direction information of the ray. The final images are obtained by calculating the color and opacity of the two parts with CUDA,respectively. The experimental results show that our method can speed up the rendering speed considerably on the volume data with large hollow structure without any quality loss compared with the traditional visualization methods.