Scientific Visualization and Computer Graphics

Scientific Visualization and Computer Graphics > BI > FSE > RUG * Print * Search

Chapter 10: Volume Visualization

Sample programs

Back to the overview

Voxel grids, surfaces, and cutting

This sample demonstrates several basic 3D volume data structures and operations:

  • implementing an uniform 3D volume grid with user-selectable attributes (any plain C/C++ type, e.g. ints, chars, floats, and structs)
  • reading and writing volumes from/to a variety of file formats (AVS field, VTK unstructured points, and VOL)
  • extracting voxel isosurfaces by scalar thresholding
  • cutting with a voxel surface through another volume
  • rendering voxel surfaces with cubes, oriented point splats, and shaded 3D spheres, with and without scalar color-mapping

Given all above functionalities, this sample is relatively complex. In particular, the rendering part introduces several methods: Estimating normals on a voxel surface using PCA; rendering voxel surfaces using oriented point clouds; and rendering voxel surfaces using billboard splats with OpenGL shaders. However, it provides all infrastructure for creating fully-functional 3D volume manipulation and visualization applications.

Voxel surfaces sample

Volume raycasting

This sample demonstrates the visualization of scalar volume using raycasting. The following features are covered:

  • loading volumes in various formats (including binvox) into a data structure
  • accelerated front-to-back raycasting using CUDA
  • linear and nearest-neighbor volume interpolation
  • volumetric lighting
  • various composite transfer functions
  • visualizing transfer functions

The sample can be modified e.g. to implement other transfer functions (maximum intensity projection, average intensity, or isosurface), support other volume file formats, and other color maps for different types of classification.

Volume raycasting (part 1)

Volume raycasting (part 2)

Volume raycasting (part 3)

Volume raycasting (part 4)

Volume raycasting (part 5)

Volume raycasting (part 6)

Volume raycasting (part 7)

Note: Since the sample is quite large, we provide it as a 7-piece multipart ZIP archive. To unzip this, rename the first six parts to filename.z01..filename.z06 and the seventh part to filename.zip. After that, you can use any unzip utilities on filename.zip.

Qvox: Volume visualization and editing tool

This sample introduces QVox, a simple but handy volume visualization tool. QVox offers the following features

  • basic volume rendering with user-editable color and transparency maps
  • several simple thinning algorithms
  • basic interactive volume editing
  • read/write volumes from/to a number of popular volume file formats
  • combined visualization of volumes and 3D surface meshes
  • runs without needing special GPU hardware

QVox is very useful as a basic volume visualization and editing tool, offering a very simple user interface with capabilities beyond other tools such as ParaView.

QVox download link (external site)

Back to the overview