# Threshold Error on segmentation and does not show 3D reconstruction

**URL:** <https://discourse.slicer.org/t/threshold-error-on-segmentation-and-does-not-show-3d-reconstruction/21999>\
**Category:** Support\
**Created:** [February 16, 2022, 5:30pm UTC](https://discourse.slicer.org/t/threshold-error-on-segmentation-and-does-not-show-3d-reconstruction/21999 "2022-02-16T17:30:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreza](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/andreza/32/13398_2.png) [@Andreza](https://discourse.slicer.org/u/Andreza)\
**Post date:** [February 16, 2022, 5:30pm UTC](https://discourse.slicer.org/t/threshold-error-on-segmentation-and-does-not-show-3d-reconstruction/21999/1 "2022-02-16T17:30:53Z")

</div>

Operating system: Windows 10 Pro  
Slicer version: 4.11.20210226

Hi, I did some segmentations on a TIFF file and obtained the 3D reconstruction of the structures.  
After some problems with the ruler bar (that I set after the segmentation), I tried to do a new segmentation with the same TIFF file, starting from the beggining.

I tried the segmenattion by threshold for 4 times, and the software returned with a failed segmentation (see picture), with some squares in the 2D images. Consequently, I couldn’t also get the 3D reconstruction when I press “Show 3D”

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/6/3682010fc9fe607d4d395645a9e7eb0d3391f191.jpeg)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [February 16, 2022, 5:50pm UTC](https://discourse.slicer.org/t/threshold-error-on-segmentation-and-does-not-show-3d-reconstruction/21999/2 "2022-02-16T17:50:18Z")

</div>

@Andreza can you provide screenshots of what the Volume Information is for your master volume that you used for segmentation and your segment geometry. For volume information go to volumes module and expand Volume Information tab get a screenshot and paste.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/2/a2875a970e3f272d10f07668ac115b6939c4be07.png)  
For segment geometry, click this button

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/e/0e379aab9360daee503dfe3b660afc973a4100c3.png)

---

<div class="post-metadata">

**Author:** ![Andreza](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/andreza/32/13398_2.png) [@Andreza](https://discourse.slicer.org/u/Andreza)\
**Post date:** [February 23, 2022, 11:52am UTC](https://discourse.slicer.org/t/threshold-error-on-segmentation-and-does-not-show-3d-reconstruction/21999/3 "2022-02-23T11:52:42Z")

</div>

Hi, it goes

Volume information  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/9/09cff0f7e1fd9d42a5e68845673d3ba54fe16afe.png)

And segment geometry  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/3/53283057c0e84855969e2d6cd104ec1e23695c6d.png)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [February 23, 2022, 3:51pm UTC](https://discourse.slicer.org/t/threshold-error-on-segmentation-and-does-not-show-3d-reconstruction/21999/4 "2022-02-23T15:51:05Z")

</div>

As you can see, they do not match, which suggest to me that you modified the image spacing value in your master volume after you created your segmentation object, as opposed to before.

So delete all the segmentation objects in your scene, right click on your volume and choose segment this, then proceed your segmentation.

Let us know if you encounter anymore issues.

---

<div class="post-metadata">

**Author:** ![Andreza](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/andreza/32/13398_2.png) [@Andreza](https://discourse.slicer.org/u/Andreza)\
**Post date:** [February 24, 2022, 8:10pm UTC](https://discourse.slicer.org/t/threshold-error-on-segmentation-and-does-not-show-3d-reconstruction/21999/5 "2022-02-24T20:10:36Z")

</div>

Yes, as I said, I modified the pixel size information after the segmentation was done, which I think, it explains the pixeled ROI or green quadrates.

I did more than 100 segmentations already.  
Because of this, I would use only the segmentations and their 3D reconstructions (without the ruler bar), but after some attempts to correct the ruler, the 3D reconstruction was gone (I only can observe the 2D images instead of 3D.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/0/a0d27ab4249474eb2c415e75feddff928aa9e9b1.jpeg)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [February 24, 2022, 10:52pm UTC](https://discourse.slicer.org/t/threshold-error-on-segmentation-and-does-not-show-3d-reconstruction/21999/6 "2022-02-24T22:52:04Z")

</div>

You can use the method I described here to correctly scale your existing segmentations and your volumes.

> [@Ruler in (orthographic) 3D view](https://discourse.slicer.org/t/ruler-in-orthographic-3d-view/4656/23):
>
> As you are observing, it is important to check that the imported image stack has the correct image spacing as the first step of your workflow. Since everything else (segmentations → models → measurements) are all dependent on this piece of information. This is especially true if you importing these images from 2D formats like PNG/TIFF etc which doesn’t preserve this information. You don’t have to redo the segmentation but it will take you a few steps to get them in correct alignment. This is wh…
