0
$\begingroup$

I have a CT scan of a portion of a human body, with each point describing density. The data file provides X, Y, Z, and density values. I want to know how to visualize this data, using OpenGL or a library based on OpenGL.

$\endgroup$
1
  • $\begingroup$ This is typically referred to as Isosurface extraction and is classically solved with the marching cubes algorithm which was famously invented and patented for this very task. The patent has ended and you can implement the algorithm or download libraries. Search for "Marching cubes: A high resolution 3D surface construction algorithm". There have been many "improvements" to this and the internet is rich with examples. $\endgroup$
    – pmw1234
    Dec 12 '20 at 12:46
0
$\begingroup$

What you're looking for is "volumetric rendering", here is one resource with code that takes data in the form of images of the layers:

Getting started with Volume Rendering using OpenGL

A quick hack would be to use a grid of particles/"billboards", and make them transparent based on the density.

$\endgroup$
0
$\begingroup$

There are many methods to go about visualizing volume data. Two famous ones are texture slices and ray marching. Texture slices intends to render 3D textures with volume data. Refer to the wiki page for Volume Rendering for more approaches. Ray marching shoots rays through the volume and composites values as the ray progresses through. This is a very simple explanation.

Now you can code raymarching in a fragment shader or a compute shader or even on the cpu. If you are interested in Raymarching, you can use my project as a reference (I used a compute shader approach) https://github.com/gallickgunner/Volume-Renderer

Also these tutorials might come in handy.

http://graphicsrunner.blogspot.com/2009/01/volume-rendering-101.html

For an in-depth explanation to these topics, refer to the book "Real time Volume Graphics"

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.