# Best Practices for Segment Mesher, Cleaver

**URL:** <https://discourse.slicer.org/t/best-practices-for-segment-mesher-cleaver/10796>\
**Category:** Support\
**Tags:** segmentation, segmentmesher, cleaver\
**Created:** [March 23, 2020, 5:10pm UTC](https://discourse.slicer.org/t/best-practices-for-segment-mesher-cleaver/10796 "2020-03-23T17:10:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fluvio\_Lobo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fluvio_lobo/32/81262_2.png) [@Fluvio\_Lobo](https://discourse.slicer.org/u/Fluvio_Lobo)\
**Post date:** [March 23, 2020, 5:10pm UTC](https://discourse.slicer.org/t/best-practices-for-segment-mesher-cleaver/10796/1 "2020-03-23T17:10:46Z")

</div>

Hello,

Our team is trying to use the **segment mesher** extension on a multi-material model of breast tissue, segmented from an MRI dataset. We are having great success, but still have some questions related to best practices for implementing this plug-in.

**Our process/pipeline:**

1. In general, we segment three (3) materials: skin, breast tissue (adipose + glandular), and tumor/mass
2. We use **segment mesher** to create a tetrahedral mesh
3. We perform mechanical simulation on the mesh using FEBio

**Our issue:**

1. **We currently get a very fine mesh on the outside surface of our model** (Figure 1, below). _The screenshot is from FEBio._ This mesh follows the “stepping” of the model due to the scan. We have tried median and Gaussian filters on the segmentation and the result above is one of the best results we have achieved. I have played with the cleaver parameters, but varying these ends-up affecting the mesh internal features.

**Does anyone have any advice on how to segment and smooth data prior to meshing?**

 ![Figure 1: Fine Mesh](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/b/8bf8591e003824c46279455765ffeb55d5a30b61.png)

Also, separate issue I have found with the **segment mesher** plug-in:

1. **The .VTK file in the temp folder that results from cleaver’s meshing is ASCII while the file saved from the Slicer interface is Binary.** Is there a way for the plug-in to use/save the ASCII file? Programs like FEBioStudio do not have .VTK Binary readers

---

<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:** [March 23, 2020, 6:11pm UTC](https://discourse.slicer.org/t/best-practices-for-segment-mesher-cleaver/10796/2 "2020-03-23T18:11:49Z")

</div>

> [@Fluvio\_Lobo](#):
>
> This mesh follows the “stepping” of the model due to the scan

To fix this, resample the input volume to have isotropic spacing (cube shaped voxels) _before_ you start segmentation, using Crop volume module.

Other than that, I would recommend to experiment with meshing parameters described [here](https://github.com/lassoan/SlicerSegmentMesher#mesh-generation-parameters) on a small volume.

> [@Fluvio\_Lobo](#):
>
> The .VTK file in the temp folder that results from cleaver’s meshing is ASCII while the file saved from the Slicer interface is Binary.

When you save the mesh in Slicer, uncheck “Compress” option in Save data window to save as ASCII.

---

<div class="post-metadata">

**Author:** ![Vasko](https://avatars.discourse-cdn.com/v4/letter/v/48db29/32.png) [@Vasko](https://discourse.slicer.org/u/Vasko)\
**Post date:** [February 20, 2024, 11:32pm UTC](https://discourse.slicer.org/t/best-practices-for-segment-mesher-cleaver/10796/3 "2024-02-20T23:32:08Z")

</div>

Can You please help me find the “Compress” option in save data window. I need to save volumetric mesh as ascii.

![save data](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/0/20f27782851f17943a1b8aff17b1dfe5aa6ee339.jpeg)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [April 20, 2024, 3:47pm UTC](https://discourse.slicer.org/t/best-practices-for-segment-mesher-cleaver/10796/4 "2024-04-20T15:47:12Z")

</div>

Click the “Show options” box.
