# Gap between segments in 3D view

**URL:** <https://discourse.slicer.org/t/gap-between-segments-in-3d-view/21056>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [December 14, 2021, 4:07pm UTC](https://discourse.slicer.org/t/gap-between-segments-in-3d-view/21056 "2021-12-14T16:07:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [December 14, 2021, 4:07pm UTC](https://discourse.slicer.org/t/gap-between-segments-in-3d-view/21056/1 "2021-12-14T16:07:29Z")

</div>

I noticed this gap between 2 segments in 3D view, while it does not exist in slice views.

Load any volume  
Create a new segmentation  
Paint a segment on a single slice  
Paint a second smaller segment inside the first one, with default masking options.

The result is as below.

 ![gap](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/4/8495b04699867fd98e4b5a326e53e53ae1515140.png)

It’s doubtful to be an expected result. Either the inner segment is too small, or the outer one has been trimmed.

A real concern is its impact on the reliability of segment statisics. Would one segment be under-estimated ?

Can someone comment on this ?

Thanks.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [December 14, 2021, 5:30pm UTC](https://discourse.slicer.org/t/gap-between-segments-in-3d-view/21056/2 "2021-12-14T17:30:18Z")

</div>

Statistics is based on the segmentation labelmap as you are seeing in the 2D slice view. What you’re showing in the 3D view is the segmentation with a smoothing factor applied for display purposes only. It is not removing actual features in the segmentation.

See the below post from another thread

> [@What's the different between show3D smooth and the segment's smooth?](https://discourse.slicer.org/t/whats-the-different-between-show3d-smooth-and-the-segments-smooth/19750/3):
>
> Surface smoothing is required for reconstructing a continuous surface mesh from discrete samples stored in a labelmap volume. This smoothing does not remove any details from the segmentation. If you set surface smoothing to 0 then you will see the discrete samples instead of the reconstructed surface (each voxel of the labelmap will appear as a cube). Smoothing effect is for removing irrelevant details (i.e., surface noise, speckled, small holes) from the segmentation.

---

<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:** [December 14, 2021, 5:39pm UTC](https://discourse.slicer.org/t/gap-between-segments-in-3d-view/21056/3 "2021-12-14T17:39:48Z")

</div>

Segment Statistics module can compute metrics from both the binary labelmap and closed surface representations. Some metrics, such as surface area are better computer from the smoothed surface. Volume can be computed from both.

If you just want to compute surface area of a 2D area (and not a 3D structure) then it may be simpler to use Markups module: create a closed curve and enable “area” measurement in the Measurements section.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/a/ba17c47699112619647ac650c3bd3ef8e588b2eb.png)

If you want to measure cross-sectional areas of 3D structures then you can find dedicated modules for that.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [December 14, 2021, 6:34pm UTC](https://discourse.slicer.org/t/gap-between-segments-in-3d-view/21056/4 "2021-12-14T18:34:23Z")

</div>

Thanks, it displays without any gap after cancelling smoothing.

> [@jamesobutler](#):
>
> Statistics is based on the segmentation labelmap as you are seeing in the 2D slice view

That’s important information.

> [@lassoan](#):
>
> it may be simpler to use Markups module: create a closed curve

Yes, it’s an easy solution for surface area, thanks. I’m just tinkering again with other vague ideas.

---

<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:** [December 16, 2021, 6:16pm UTC](https://discourse.slicer.org/t/gap-between-segments-in-3d-view/21056/5 "2021-12-16T18:16:22Z")

</div>

> [@chir.set](#):
>
> > [@jamesobutler](#):
> >
> > Statistics is based on the segmentation labelmap as you are seeing in the 2D slice view
> 
> That’s important information.

There are segment statistics computation plugins that use the binary labelmap representation and there are plugins that use the closed surface representation.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [December 16, 2021, 7:20pm UTC](https://discourse.slicer.org/t/gap-between-segments-in-3d-view/21056/6 "2021-12-16T19:20:25Z")

</div>

> [@jamesobutler](#):
>
> Statistics is based on the segmentation labelmap as you are seeing in the 2D slice view.

Yes this is because I almost always use binary labelmap statistics plugins. If you the plugins those based on the closed surface then yes what you see in the 3D view is going to be used for statistics.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [December 16, 2021, 8:13pm UTC](https://discourse.slicer.org/t/gap-between-segments-in-3d-view/21056/7 "2021-12-16T20:13:52Z")

</div>

Thank you all, that distinction between binary label map and closed surface sources, and its implications, were not immediately evident to me. I have better insight now.
