# Error of cleaver while using segmentmesher

**URL:** https://discourse.slicer.org/t/error-of-cleaver-while-using-segmentmesher/16128
**Category:** Support
**Tags:** segmentmesher
**Created:** [February 22, 2021, 6:41am UTC](https://discourse.slicer.org/t/error-of-cleaver-while-using-segmentmesher/16128 "2021-02-22T06:41:45Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Aep93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aep93/32/5990_2.png) [@Aep93](https://discourse.slicer.org/u/Aep93)
#### Post date: [February 22, 2021, 6:41am UTC](https://discourse.slicer.org/t/error-of-cleaver-while-using-segmentmesher/16128/1 "2021-02-22T06:41:45Z")

</div>

Hello all,  
I am trying to mesh my model using segmentmesher (cleaver). When the resolution of model is high, I can do meshing without any problems; however, when I decrease the resolution of my segmentations, I get an error while my segmentation quality is still very good. This is the error I get:

"Nrrd file read error: No zero crossing in indicator function. Not a valid file or need a lower sigma value.

Command ‘cleaver-cli’ returned non-zero exit status 11."

I do not understand what problem in my segmentation can cause this error. Can you give me some cases that can lead to this error or help me to solve this problem?  
Thanks in advance

---

<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 22, 2021, 1:31pm UTC](https://discourse.slicer.org/t/error-of-cleaver-while-using-segmentmesher/16128/2 "2021-02-22T13:31:21Z")

</div>

[quote=“Aep93, post:1, topic:16128”]  
"Nrrd file read error: No zero crossing in indicator function. Not a valid file or need a lower sigma value.  
[/quote]s

This means that the method gets an empty segment, most likely because there is a small structure that gets completely removed during preprocessing steps (sampling and Gaussian smoothing). You can either hide the segment to exclude from meshing, increase sampling rate, or lower blending function sigma (by specifying `--blend_sigma 0.5` as additional command line option).

---

<div class="post-metadata">

### Author: ![Aep93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aep93/32/5990_2.png) [@Aep93](https://discourse.slicer.org/u/Aep93)
#### Post date: [February 22, 2021, 8:07pm UTC](https://discourse.slicer.org/t/error-of-cleaver-while-using-segmentmesher/16128/3 "2021-02-22T20:07:07Z")

</div>

Thanks for your response @lassoan. I understood that this problem happens when I scale down my segmentation. So, I have a segmentation for which I can produce mesh without any problems. Then I use the transform module to make my segmentation smaller. Then I get this error when I want to mesh my scaled segmentation even though the resolution of the scaled segmentation is the same as the original one and only the dimensions have changed.  
Am I missing anything during scaling? should I do additional steps to complete my scaling?

---

<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 22, 2021, 10:11pm UTC](https://discourse.slicer.org/t/error-of-cleaver-while-using-segmentmesher/16128/4 "2021-02-22T22:11:23Z")

</div>

What do you mean by scaling down? Changing unit from mm to cm or inches? Or decrease the number of elements?

---

<div class="post-metadata">

### Author: ![Aep93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aep93/32/5990_2.png) [@Aep93](https://discourse.slicer.org/u/Aep93)
#### Post date: [February 22, 2021, 10:13pm UTC](https://discourse.slicer.org/t/error-of-cleaver-while-using-segmentmesher/16128/5 "2021-02-22T22:13:02Z")

</div>

I enter a value smaller than 1 in the diagonal elements of first three columns in the transfer module and use this transformation to make my segmentation smaller. (I do it for changing units)

---

<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 22, 2021, 10:39pm UTC](https://discourse.slicer.org/t/error-of-cleaver-while-using-segmentmesher/16128/6 "2021-02-22T22:39:45Z")

</div>

I would recommend to not change units. If you must change units then do it as the very last step (transform the output of Segment mesher), just before saving the mesh.

---

<div class="post-metadata">

### Author: ![Aep93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aep93/32/5990_2.png) [@Aep93](https://discourse.slicer.org/u/Aep93)
#### Post date: [February 22, 2021, 10:42pm UTC](https://discourse.slicer.org/t/error-of-cleaver-while-using-segmentmesher/16128/7 "2021-02-22T22:42:38Z")

</div>

OK @lassoan, I will convert the units in my last step then. Thanks for your response.

---

<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: [August 19, 2023, 9:13am UTC](https://discourse.slicer.org/t/error-of-cleaver-while-using-segmentmesher/16128/8 "2023-08-19T09:13:49Z")

</div>

A post was merged into an existing topic: [SegmentMesher, Error: Command ‘cleaver-cli.exe’ returned non-zero exit status 3221226505](https://discourse.slicer.org/t/segmentmesher-error-command-cleaver-cli-exe-returned-non-zero-exit-status-3221226505/31172)
