There is a new isocontouring algorithm available in VTK master: vtkSurfaceNets3D. Unlike classic algorithms such as marching cubes or flying edges that operate on continuous scalar fields, vtkSurfaceNets3D operates on discrete, labeled volumetric data (e.g., segmentation maps, label maps). It simultaneously extracts labeled objects with fully shared boundaries. It is fast because it has been threaded, using concepts from flying edges such as edge-by-edge processing.
Note that besides being much faster, this algorithm produces better results than vtkDiscreteMarchingCubes and vtkDiscreteFlyingEdges which produce output which is not fully shared across object boundaries. For example, while vtkDiscreteMarchingCubes shares output points, it may produce coincident triangles. Also, surface nets has a built-in (optional) constrained smoothing step that is quite powerful and produces great results.
The sequential Surface Nets algorithm was originally proposed by Sarah Frisken now at Brigham/Harvard Medical School. (Her recent paper “SurfaceNets for Multi-Label Segmentations with Preservation of Sharp Boundaries”, J. Computer Graphics Techniques, 2022 provides details.) Originally patented, the algorithm is now unencumbered and extremely useful for creating complex geometry such as that found in anatomical atlases (see https://www.openanatomy.org/ for example). While just introduced in VTK, the plan is to make this fast surface nets implementation available in 3D Slicer and other applications.
Here is an example: segmented volume of 317^2 x 835 unsigned char voxel values with 105 labeled objects. On my 20-thread laptop, execution times are around 0.1 second to extract the objects and smooth them (~2.8 million triangles produced). The three images are: left) extracted voxelized surface net; center) after smoothing; and 3) using alternative windowed sinc smoothing.
I would encourage anyone with interest to try it out and provide feedback. Make sure you build with a non-sequential SMP backend for best performance. I prefer TBB because it does a better job of load balancing.