Marching cubes technique for volumetric visualization accelerated with graphics processing units

Marcos Vinicius Mussel Cirne, Hélio PedriniJ. Braz. Comput. Soc 2013

Abstract

Isosurface extraction is a critical task in volumetric data visualization, traditionally handled by the Marching Cubes (MC) algorithm. However, the computational cost of processing large datasets often precludes real-time interaction. This paper proposes a hybrid CPU-GPU framework that optimizes the search for active voxels using span-space mapping and efficient spatial data structures like interval trees. Experimental results demonstrate speedups of up to 18.2x, enabling real-time rendering of complex medical and scientific datasets.

Introduction

Volumetric datasets, such as those generated by MRI scans or fluid dynamics simulations, are composed of a 3D grid of voxels. Visualizing these datasets often requires extracting isosurfaces—surfaces where all points share a specific value (isovalue). The Marching Cubes algorithm is the industry standard for this task, but its "brute-force" nature—checking every voxel in a volume—is highly inefficient, as the surface typically occupies only a small fraction of the total volume. The challenge lies in identifying "active" voxels (those containing the surface) without scanning the entire volume every frame.

Methodology

The researchers developed a six-stage pipeline designed to balance the strengths of the CPU and the GPU. The process begins with preprocessing on the CPU, where the volume data is loaded and auxiliary search structures are constructed. The CPU is utilized for complex data structure traversal, while the GPU handles the massive parallel computations required for triangle generation and rendering.

The six-stage hybrid CPU-GPU pipeline for accelerated Marching Cubes.

A key innovation in this approach is the use of span-space mapping. Instead of searching through 3D spatial coordinates, each cell is mapped to a 2D coordinate system where the axes represent the minimum and maximum values within that cell. A cell is considered "active" only if the target isovalue $h$ falls within its $[min, max]$ range. This reduces the 3D spatial search to a more efficient 1D interval overlap problem.

Span-space mapping used to identify active cells based on min-max values.

To search this span-space efficiently, the authors evaluated several data structures: k-d trees, quadtrees, octrees, and interval trees. The interval tree emerged as the most effective, providing asymptotically optimal query times for finding overlapping intervals. While quadtrees were faster to build initially, the interval tree's superior query performance makes it ideal for interactive visualization where the user frequently adjusts the isovalue.

Key Insights

  • Hybrid Efficiency: The study highlights that while GPUs excel at parallel arithmetic, CPUs remain superior for traversing hierarchical data structures. The bottleneck in such hybrid systems is often the CPU-GPU bus, where the list of active voxels must be transferred.
  • Data Structure Selection: Among the structures tested, the interval tree provided the best rendering rates. In a visualization tool where the user changes the isovalue frequently but the dataset stays the same, the interval tree's higher build time is a worthy investment for smoother interaction.

Results and Performance

The proposed method was tested on ten standard volumetric datasets, ranging from small simulations like the "Fuel" dataset ($64^3$) to large-scale medical scans like the "Aneurism" dataset ($512^3$). The most significant performance gain was observed in the Aneurism dataset, which achieved an 18.2x speedup compared to a standard CPU implementation.

In the "Head" dataset, a common benchmark for medical imaging, frame rates jumped from a sluggish 1.8 FPS on the CPU to a fluid 35.8 FPS on the GPU. This improvement is critical as it crosses the 30 FPS threshold required for true real-time interactivity, allowing clinicians to explore volumetric data without lag. The use of advanced data structures allowed the algorithm to skip over 90% of the volume in many cases, focusing computational power only on the thin "shell" of the isosurface.

Conclusion

By combining the search efficiency of interval trees with the parallel processing power of CUDA-enabled GPUs, the authors successfully accelerated the Marching Cubes algorithm for large-scale volumetric data. While the CPU-GPU bus remains a bottleneck, this hybrid approach significantly enhances the feasibility of real-time volumetric exploration. Future work aims to move more of the search logic to the GPU and address topological ambiguities inherent in the standard MC algorithm.

Summary updated

BibTeX
@article{cirne2013marching,
  author = {Marcos Vinicius Mussel Cirne and Hélio Pedrini},
  title = {{Marching cubes technique for volumetric visualization accelerated with graphics processing units}},
  journal = {J. Braz. Comput. Soc.},
  year = {2013},
  doi = {10.1007/s13173-012-0097-z},
}
Figure