# Extract isosurface(or contour surface) from skin segment by MarchingCube

**URL:** <https://discourse.slicer.org/t/extract-isosurface-or-contour-surface-from-skin-segment-by-marchingcube/27763>\
**Category:** Support\
**Tags:** registration, segmentation, 3d-model\
**Created:** [February 11, 2023, 10:16am UTC](https://discourse.slicer.org/t/extract-isosurface-or-contour-surface-from-skin-segment-by-marchingcube/27763 "2023-02-11T10:16:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slicer360](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/slicer360/32/18368_2.png) [@Slicer360](https://discourse.slicer.org/u/Slicer360)\
**Post date:** [February 11, 2023, 10:16am UTC](https://discourse.slicer.org/t/extract-isosurface-or-contour-surface-from-skin-segment-by-marchingcube/27763/1 "2023-02-11T10:16:46Z")

</div>

Tasks:  
The facial skin was segmented from the craniofacial CT image, and the.ply/.stl file was obtained for registration with the actual face point cloud collected by the depth camera.  
Question:  
In the Segmentation module Representations of Slicer 4.11, there are only three options: Binary labelmap,Closed surface and Fractional labelmap. Figure 1(but I see in the Slicer document Image Segmentation section that there are also Planar contour and Ribbon model options, Figure 2). When I exported the skin Segment, since Slicer automatically selected Closed surface, the generated model was layered, as shown in Figure 3. This stratification creates two similar-shaped face point clouds in the point cloud, which can affect registration.  
Figure 1  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/0/80a4351c884851ec4dffef520d6ff237780b3c56.png)  
Figure 2

 ![20230211_175645](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/9/590d05b343f626cceb6cecbcfdc42358f23a75e3.png)  
Figure3  
 ![20230211_175917](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/7/d764ec9a5050f555923fe5e41cd221ff02f1d660.jpeg)  
 ![20230211_180307](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/8/5832723ce509fbd09e24fdfd312a6cd3d5024bc7.png)  
When the MarchingCube algorithm of VS+VTK was used for skin contour surface extraction of CT images, it was found that the obtained point cloud only had one layer, as shown in FIG. 4(what I hope to obtain is similar to the point cloud obtained by depth camera). Therefore, I hope that in Slicer, MarchingCube is also used to export the single-layer isosurface model file for the segmtioned skin Segment. However, I have never found the implementation method of MarchingCube in Slicer.  
Figure 4  
 ![20230211_180938](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/a/6a1ca18dc65006e6ba63b180f95cd74b84082ff3.png)  
I hope some friends can give me some suggestions. Is there something wrong with my Slicer version, which lacks Planar contour and Ribbon model? And is there a way to call MarchingCube in Slicer to extract isosurfaces for the skin Segment?

---

<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:** [February 11, 2023, 7:56pm UTC](https://discourse.slicer.org/t/extract-isosurface-or-contour-surface-from-skin-segment-by-marchingcube/27763/2 "2023-02-11T19:56:13Z")

</div>

To extract the skin surface, you need to fill all the internal holes. You can do that using the “Wrap Solidify” effect, provided by SurfaceWrapSolidify extension. See detailed step-by-step instructions [here](https://lassoan.github.io/SlicerSegmentationRecipes/SkinSurface2/).

---

<div class="post-metadata">

**Author:** ![Slicer360](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/slicer360/32/18368_2.png) [@Slicer360](https://discourse.slicer.org/u/Slicer360)\
**Post date:** [February 12, 2023, 9:03am UTC](https://discourse.slicer.org/t/extract-isosurface-or-contour-surface-from-skin-segment-by-marchingcube/27763/3 "2023-02-12T09:03:55Z")

</div>

Thank you very much. Your advice is very effective. As a beginner, I am not familiar with 3D Slicer, and I did not expect this simple and efficient method of completely filling the whole head. Thank you again for your help.

---

<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:** [April 26, 2024, 5:30am UTC](https://discourse.slicer.org/t/extract-isosurface-or-contour-surface-from-skin-segment-by-marchingcube/27763/4 "2024-04-26T05:30:01Z")

</div>

A post was split to a new topic: [Extract face from CBCT](https://discourse.slicer.org/t/extract-face-from-cbct/35743)
