[vtk-developers] Discrete contouring classes

Andras Lasso lasso at queensu.ca
Sat Dec 23 10:28:29 EST 2017


Hi Will and Bill,

Surface generation from binary labelmap is an important task for us in 3D Slicer, to display segmentation results in 3D while it is being edited in 2D, We are very interested in any potential improvements.

Currently, we use discrete marching cubes and sinc smoothing, which gives good results, but sometimes it can be quite slow (especially the smoothing step).

We tried cube models but surface normals always pointed to x/y/z direction instead of actual surface normal direction, so it was very hard to see 3D shapes. This flat look is visible in your examples, too: https://raw.githubusercontent.com/lorensen/SPLBrainAtlas/master/Models/Screenshot/white_matter_of_left_cerebral_hemisphere.png.

We use discrete marching cubes, but as far as I remember, we did not see huge differences between regular and discrete marching cubes. Is there a study or examples that compares them (visual appearance, accuracy, computation time, etc.)? Is there a solution that provides smooth surfaces (that would not require further smoothing step to remove staircase artifacts)?

We also plan to evaluate how well we can visualize binary labelmaps in 3D using the new multi-volume-rendering feature that is being integrated into VTK now.

Andras

From: vtk-developers [mailto:vtk-developers-bounces at vtk.org] On Behalf Of Will Schroeder
Sent: Saturday, December 23, 2017 8:35 AM
To: vtk-developers <vtk-developers at vtk.org>
Subject: Re: [vtk-developers] Discrete contouring classes

FYI here is an example of discrete marching cubes at work. From Bill:

Here is the SPLBrainAtlas;
https://github.com/lorensen/SPLBrainAtlas/wiki/Atlas-Summary<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Florensen%2FSPLBrainAtlas%2Fwiki%2FAtlas-Summary&data=02%7C01%7Classo%40queensu.ca%7C38c9d992cb8b4c60e88108d54a0a1382%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636496329489848607&sdata=016kNZv199FACPlMVNIOMEwHyJAKsTIKpoXF1zjARaA%3D&reserved=0>

The two-paned images show Discrete on left, Cube's Model (also
undersold) on right. STL files created using discrete followed by
non-manifold joint smoothing.

On Sat, Dec 23, 2017 at 8:30 AM, Will Schroeder <will.schroeder at kitware.com<mailto:will.schroeder at kitware.com>> wrote:
FYI- Back in the day (2004) Jim Miller and Bill Lorensen added the vtkDiscreteMarchingCubes class. This is used to generate contours for label masks (as you would find in segmentation). The key here is that the labels are non-continuous (i.e., scalar field is not smooth) so the regular edge interpolation of something like marching cubes doesn't work. Long story short, this class interpolates on the mid-edge point between regions, and it generates different regions (i.e., meshes) for each label.

This class and approach is woefully underappreciated and underused.

I am just adding flying edges versions (2D and 3D) of this functionality (MR 3739). These are of course much faster and scalable across multiple cores. They also produce slightly different results. Principally they do not merge coincident points belonging to different regions (since flying edges does not use a point locator) -- this is both good and bad depending on the application. Also normals are generated by the flying edges algorithm, not by vtkDiscreteMarchingCubes.

See the docs for more info.

Best,
W

--
William J. Schroeder, PhD
Kitware, Inc. - Building the World's Technical Computing Software
28 Corporate Drive
Clifton Park, NY 12065
will.schroeder at kitware.com<mailto:will.schroeder at kitware.com>
http://www.kitware.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C38c9d992cb8b4c60e88108d54a0a1382%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636496329489848607&sdata=yaZrW3ulF9q5KCrwow0PUw%2B1mrHP07%2BGJjsYD9RMP58%3D&reserved=0>
(518) 881-4902<tel:(518)%20881-4902>



--
William J. Schroeder, PhD
Kitware, Inc. - Building the World's Technical Computing Software
28 Corporate Drive
Clifton Park, NY 12065
will.schroeder at kitware.com<mailto:will.schroeder at kitware.com>
http://www.kitware.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C38c9d992cb8b4c60e88108d54a0a1382%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636496329489848607&sdata=yaZrW3ulF9q5KCrwow0PUw%2B1mrHP07%2BGJjsYD9RMP58%3D&reserved=0>
(518) 881-4902
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://vtk.org/pipermail/vtk-developers/attachments/20171223/90509098/attachment-0001.html>


More information about the vtk-developers mailing list