简体   繁体   English

将2D图像堆栈转换为3d图像,体积渲染

[英]Convert stack of 2d images into 3d image, volume rendering

I want to do a texture based volume render of CT data. 我想做一个基于纹理的CT数据体绘制。 I have a stack of 2d CT images that I'd like to use as a 3d texture in opengl (jogl really). 我有一堆2d CT图像,我想在opengl中使用它作为3d纹理(实际上是jogl)。 I have to do it the way with polygon proxy geometry that shifts when viewing parameters change. 我必须采用多边形代理几何体的方式,当观察参数发生变化时,它会发生变化。 How can I convert the 2d images to one 3d texture? 如何将2D图像转换为一个3d纹理? I have not been able to find anything about how opengl expects 3d images to be formatted. 我一直无法找到有关opengl如何格式化3D图像的信息。 I saw this: https://stackoverflow.com/questions/13509191/how-to-convert-2d-image-into-3d-image , but I don't it's the same. 我看到了这个: https//stackoverflow.com/questions/13509191/how-to-convert-2d-image-into-3d-image ,但我不是一样的。

Also, I am still in confusion about this volume rendering technique. 此外,我仍然对这种体积渲染技术感到困惑。 Is it possible to take a 3d location in the 3d texture and map it to a 2d corner of a quad? 是否可以在3d纹理中获取3d位置并将其映射到四边形的二维角? I found this example: http://www.felixgers.de/teaching/jogl/texture3D.html but I don't know if it means you have to use 3d vertices. 我找到了这个例子: http//www.felixgers.de/teaching/jogl/texture3D.html但我不知道这是否意味着你必须使用3d顶点。 Does anyone know more sources with explicit examples? 有没有人通过明确的例子了解更多来源?

See 看到

http://www.opengl.org/registry/doc/glspec40.core.20100311.pdf http://www.opengl.org/registry/doc/glspec40.core.20100311.pdf

section 3.8.3, on defining 3D texture images. 第3.8.3节,关于定义3D纹理图像。

This results in a 3d cube of texels, and yes, you can map a 3d location in this cube to a corner of a quad. 这会生成三维立方体纹素,是的,您可以将此立方体中的三维位置映射到四边形的一角。

OpenGL does know a 3D texture format where each texel is a small subvolume in a [0;1]^3 cube. OpenGL确实知道3D纹理格式,其中每个纹素是[0; 1] ^ 3立方体中的小子体积。 When you texture a triangle or a quad with this texture, it is like if you cut out a thin slice of this volume. 使用此纹理对三角形或四边形进行纹理处理时,就像切出该卷的一个薄切片一样。 If you want a volumetric you must write a volume raycaster. 如果你想要一个体积,你必须写一个卷raycaster。 If you Google "GPU direct volume rendering" you should find plenty of tutorials. 如果你谷歌“GPU直接体积渲染”,你应该找到很多教程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM