Question

I have been brought in on a project where I need to render a 3D volume from a series of images of the volume. The images have been created by a couple of techniques such that they are vertical slices of the object in question.

The data set is similar to this question, but the asker is looking for a Matlab solution.

The goal is to have this drawing be in something near real time (>1Hz update rate), and from my research openGL seems to be the fastest option for drawing. Is there a built in function in openGL render the volume in openGL other than the following psuedocode algorithm.

foreach(Image in Folder)
     foreach(Pixel in Image)
        pointColour(pixelColour)
        pointLocation(Pixel.X,Pixel.Y,Image.Z)
        drawPoint

I am not concerned about interpolating between images, the current spacing is small enough that there no need for it.

Was it helpful?

Solution

I'm afraid if you're thinking about volume rendering, you will need to first understand the volume rendering integral because the resultant color of a pixel on the screen is a function of all the voxels that line up with it for the current viewing angle.

There are two methods to render a volume in real-time using conventional graphics hardware.

  1. Render the volume as a set of 2D view-aligned slices that intersect the 3D texture (proxy geometry). Explanation here.
  2. Use a raycaster that uses programmable graphics hardware, tutorial here.

This is not an easy problem to solve - but depending on what you need to do things might be a little simpler. For example: Do you care about having an interactive transfer function? Do you want perspective views, or will orthographic projection suffice? Are you rendering iso-surfaces? Are you using this only for MPR-type views?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top