# New surface model generation method: SurfaceNets

**URL:** <https://discourse.slicer.org/t/new-surface-model-generation-method-surfacenets/32430>\
**Category:** Support\
**Tags:** feature\
**Created:** [October 26, 2023, 6:20pm UTC](https://discourse.slicer.org/t/new-surface-model-generation-method-surfacenets/32430 "2023-10-26T18:20:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)\
**Post date:** [October 26, 2023, 6:20pm UTC](https://discourse.slicer.org/t/new-surface-model-generation-method-surfacenets/32430/1 "2023-10-26T18:20:50Z")

</div>

We have now integrated the [SurfaceNets isocontouring method](https://www.kitware.com/really-fast-isocontouring/) into “Show 3D” functionality of the Segment Editor!

The new experimental algorithm provides a ~7x speedup to the generation of surface models from segmentations compared to the default method (Flying Edges). The option can be enabled from the Show 3D menu in the Segment Editor.

 ![Screenshot 2023-10-26 13.52.11](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/a/aa0f30b0f9126fe9fbe67ffe83bad76b39329926.png)

| Default FlyingEdges Method | SurfaceNets with default smoothing (fast) | SurfaceNets with built in Smoothing (faster) |
| --- | --- | --- |
| ![Screenshot 2023-10-26 14.17.35](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/1/d1d5243a8991793aab9222c2b7167cefe94a9fc4.jpeg) | ![Screenshot 2023-10-26 14.07.37](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/5/e50e6029b5c590f36c6e264119c0c093a46c73c2.jpeg) | ![Screenshot 2023-10-26 14.07.55](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/1/816e3979bc17027722d68058710fccdb6e0f6e8c.jpeg) |

This feature is now available in the preview build of 3D Slicer.

[Issue](https://github.com/Slicer/Slicer/issues/7103)  
[Pull Request](https://github.com/Slicer/Slicer/pull/7224)

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [November 25, 2023, 8:28pm UTC](https://discourse.slicer.org/t/new-surface-model-generation-method-surfacenets/32430/2 "2023-11-25T20:28:00Z")

</div>

Hi,

I explored a little the new ‘Surface nets’ surface smoothing and made a side-by-side comparison as below with a tubular segment.

Globally, from the default algorithm to the ‘Fast’ and ‘Faster’ ones, it seems that shading and smoothing both decrease in that direction. With high smoothing factor, the difference tends to decrease, at least visually. The speed gain is of course of interest for huge segments.

The whole project can be downloaded [here](https://disk.yandex.com/d/y7rfv1y2_EE9aA).

The image below is posted for immediate reference. It uses a cropped isovoxel sample at 0.3 mm spacing (from CTA-cardio).

From left to right: default algorithm, ‘Fast’ and ‘Faster’  
From top to bottom: 0% smoothing factor, 10%,…,90%, 100%

Regards.

 ![SurfaceSmoothing_3x11](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/7/e745359c1adfd57adaabd97d75416ee5800b44dc.jpeg)

---

<div class="post-metadata">

**Author:** ![siqueirl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/siqueirl/32/12320_2.png) [@siqueirl](https://discourse.slicer.org/u/siqueirl)\
**Post date:** [December 1, 2023, 7:26pm UTC](https://discourse.slicer.org/t/new-surface-model-generation-method-surfacenets/32430/3 "2023-12-01T19:26:37Z")

</div>

Can this Surface generation be triggered from a loadable module and then accessed by this module?
