[vtk-developers] Discrete contouring classes

Bill Lorensen bill.lorensen at gmail.com
Sat Dec 23 11:53:47 EST 2017


There are no normals in the cube files I generate. I do color the
edges, so on large poly models, the dark edges may be causing the
problem.

For example, see this lower poly count model:
https://raw.githubusercontent.com/lorensen/SPLBrainAtlas/master/Models/Screenshot/right_putamen.png

On Sat, Dec 23, 2017 at 10:45 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> I'll take a look to fix normals on cube models.
>
> On Sat, Dec 23, 2017 at 10:28 AM, Andras Lasso <lasso at queensu.ca> wrote:
>> 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
>>
>> 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>
>> 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
>> http://www.kitware.com
>> (518) 881-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
>> http://www.kitware.com
>> (518) 881-4902
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>>
>> Follow this link to subscribe/unsubscribe:
>> https://vtk.org/mailman/listinfo/vtk-developers
>>
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the vtk-developers mailing list