[vtk-developers] Discrete contouring classes

Bill Lorensen bill.lorensen at gmail.com
Sat Dec 23 20:27:31 EST 2017


It is meant to show the voxels. If you zoom the models the current
representation is good.

On Dec 23, 2017 7:31 PM, "Andras Lasso" <lasso at queensu.ca> wrote:

> The image on the right has some texture but looks mostly flat (as if there
> was no shading at all). In contrast, in the left image shapes are nicely
> visible. Can you remove edges completely and estimate surface normals from
> voxel values in a small neighborhood?
>
> Andras
>
> -----Original Message-----
> From: Bill Lorensen [mailto:bill.lorensen at gmail.com]
> Sent: Saturday, December 23, 2017 7:18 PM
> To: Andras Lasso <lasso at queensu.ca>
> Cc: Will Schroeder <will.schroeder at kitware.com>; vtk-developers <
> vtk-developers at vtk.org>
> Subject: Re: [vtk-developers] Discrete contouring classes
>
> I brightened the edges rather than darkening them.
> See
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fraw.
> githubusercontent.com%2Florensen%2FSPLBrainAtlas%2Fmaster%2FModels%
> 2FScreenshot%2Fwhite_matter_of_left_cerebral_hemisphere.
> png&data=02%7C01%7Classo%40queensu.ca%7C6e05c878eb634666e41a08d54a63bfb5%
> 7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636496714637148564&sdata=
> JsXf9yOP6WQu7xa82bU%2FS64iwyJIGcIW9Vs1v0pg76I%3D&reserved=0
>
>
> On Sat, Dec 23, 2017 at 11:53 AM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
> > 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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fraw.g
> > ithubusercontent.com%2Florensen%2FSPLBrainAtlas%2Fmaster%2FModels%2FSc
> > reenshot%2Fright_putamen.png&data=02%7C01%7Classo%40queensu.ca%7C6e05c
> > 878eb634666e41a08d54a63bfb5%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0
> > %7C636496714637148564&sdata=jeeJF3UcOimQ3qesRBVqMVNd%2Bq%2F9OR4Tsr1u1Q
> > xKJ%2FQ%3D&reserved=0
> >
> > 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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fraw.
> githubusercontent.com%2Florensen%2FSPLBrainAtlas%2Fmaster%2FModels%
> 2FScreenshot%2Fwhite_matter_of_left_cerebral_hemisphere.
> png&data=02%7C01%7Classo%40queensu.ca%7C6e05c878eb634666e41a08d54a63bfb5%
> 7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636496714637148564&sdata=
> JsXf9yOP6WQu7xa82bU%2FS64iwyJIGcIW9Vs1v0pg76I%3D&reserved=0.
> >>>
> >>>
> >>>
> >>> 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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
> >>> hub.com%2Florensen%2FSPLBrainAtlas%2Fwiki%2FAtlas-Summary&data=02%7C
> >>> 01%7Classo%40queensu.ca%7C6e05c878eb634666e41a08d54a63bfb5%7Cd61ecb3
> >>> b38b142d582c4efb2838b925c%7C1%7C0%7C636496714637148564&sdata=SflCrfK
> >>> aKUbhYoX2DkqCbM4a8V6UAiUNF08%2F9BYjb5Q%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>
> >>> 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
> >>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> >>> kitware.com&data=02%7C01%7Classo%40queensu.ca%7C6e05c878eb634666e41a
> >>> 08d54a63bfb5%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C6364967146
> >>> 37148564&sdata=oBrbE83YzEguIiDvdkZehoJcszF%2B%2FlFD26LQEPLLJxo%3D&re
> >>> served=0
> >>> (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
> >>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> >>> kitware.com&data=02%7C01%7Classo%40queensu.ca%7C6e05c878eb634666e41a
> >>> 08d54a63bfb5%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C6364967146
> >>> 37148564&sdata=oBrbE83YzEguIiDvdkZehoJcszF%2B%2FlFD26LQEPLLJxo%3D&re
> >>> served=0
> >>> (518) 881-4902
> >>>
> >>>
> >>> _______________________________________________
> >>> Powered by
> >>> https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&d
> >>> ata=02%7C01%7Classo%40queensu.ca%7C6e05c878eb634666e41a08d54a63bfb5%
> >>> 7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636496714637148564&sdat
> >>> a=24cgYdCFRcpCMK6OcYpMW4rFbRmPxLI6MVABGAB6DQ8%3D&reserved=0
> >>>
> >>> Visit other Kitware open-source projects at
> >>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> >>> kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40qu
> >>> eensu.ca%7C6e05c878eb634666e41a08d54a63bfb5%7Cd61ecb3b38b142d582c4ef
> >>> b2838b925c%7C1%7C0%7C636496714637148564&sdata=x5%2FLmD5SSk1lfz1C2lnz
> >>> 7RRGxUBtqHk9B3x0zEhe%2B68%3D&reserved=0
> >>>
> >>> Search the list archives at:
> >>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmark
> >>> mail.org%2Fsearch%2F%3Fq%3Dvtk-developers&data=02%7C01%7Classo%40que
> >>> ensu.ca%7C6e05c878eb634666e41a08d54a63bfb5%7Cd61ecb3b38b142d582c4efb
> >>> 2838b925c%7C1%7C0%7C636496714637148564&sdata=bbfUgoGzThOELIFSbPChQLB
> >>> qZM%2BpeFv7i9OoSR%2BcN9I%3D&reserved=0
> >>>
> >>> Follow this link to subscribe/unsubscribe:
> >>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk
> >>> .org%2Fmailman%2Flistinfo%2Fvtk-developers&data=02%7C01%7Classo%40qu
> >>> eensu.ca%7C6e05c878eb634666e41a08d54a63bfb5%7Cd61ecb3b38b142d582c4ef
> >>> b2838b925c%7C1%7C0%7C636496714637148564&sdata=1DH%2F2a%2B2QMlatxhC1W
> >>> %2Br9ALy654zrar2tBdEzzhimVI%3D&reserved=0
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> Unpaid intern in BillsBasement at noware dot com
> >
> >
> >
> > --
> > Unpaid intern in BillsBasement at noware dot com
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://vtk.org/pipermail/vtk-developers/attachments/20171223/ff4d511a/attachment-0001.html>


More information about the vtk-developers mailing list