# Question on marching cube algorithm

**URL:** https://discourse.slicer.org/t/question-on-marching-cube-algorithm/39446
**Category:** Support
**Created:** [September 30, 2024, 6:45am UTC](https://discourse.slicer.org/t/question-on-marching-cube-algorithm/39446 "2024-09-30T06:45:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![alientex](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@alientex](https://discourse.slicer.org/u/alientex)
#### Post date: [September 30, 2024, 6:45am UTC](https://discourse.slicer.org/t/question-on-marching-cube-algorithm/39446/1 "2024-09-30T06:45:14Z")

</div>

Hello,

I have changed to the Marching Cube algorithm in the file `vtkBinaryLabelmapToClosedSurfaceConversionRule` at line 320 in Slicer source. Here’s the output of both algorithms: Marching Cube (green) and Flying Edges (yellow), respectively:

 | Marching Cube | Flying Edges |
| --- | --- |
 | ![](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/3/734e11b1242e8bf4e6c8fbaf5a13bfee4c53939c.jpeg) | ![](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/0/006bfd22b218b3ad53b7652b7e9fdae6f9feab90.jpeg) |
 | ![](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/f/ffd08837010add700634fbd8c0f010bd627bc0bf.jpeg) | ![](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/7/87ec2fb3752fe10e39e44a9a122b580aaa5d775e.jpeg) |
 

Why do I see cracks on the surface of the Marching Cube output?

Slicer version: 5.6.2 r32448 / f10cd8c

---

<div class="post-metadata">

### Author: ![alientex](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@alientex](https://discourse.slicer.org/u/alientex)
#### Post date: [October 1, 2024, 3:47am UTC](https://discourse.slicer.org/t/question-on-marching-cube-algorithm/39446/2 "2024-10-01T03:47:20Z")

</div>

@lassoan @pieper @cpinter @muratmaga Any thoughts?

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [October 1, 2024, 4:34am UTC](https://discourse.slicer.org/t/question-on-marching-cube-algorithm/39446/3 "2024-10-01T04:34:39Z")

</div>

Marching cubes seem to have trouble computing surface normals consistently.

Flying edges algorithm is a modernized, parallelized version of marching cubes. Why would you consider going back to the old algorithm?

---

<div class="post-metadata">

### Author: ![alientex](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@alientex](https://discourse.slicer.org/u/alientex)
#### Post date: [October 3, 2024, 3:58am UTC](https://discourse.slicer.org/t/question-on-marching-cube-algorithm/39446/4 "2024-10-03T03:58:21Z")

</div>

> [@lassoan](#):
>
> Why would you consider going back to the old algorithm?

I just wanted to see the results of both algorithms.
