# Model to segment irregularities

**URL:** <https://discourse.slicer.org/t/model-to-segment-irregularities/44560>\
**Category:** Support\
**Created:** [September 23, 2025, 10:56am UTC](https://discourse.slicer.org/t/model-to-segment-irregularities/44560 "2025-09-23T10:56:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bserrano](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bserrano/32/17034_2.png) [@bserrano](https://discourse.slicer.org/u/bserrano)\
**Post date:** [September 23, 2025, 10:56am UTC](https://discourse.slicer.org/t/model-to-segment-irregularities/44560/1 "2025-09-23T10:56:07Z")

</div>

Hi everyone,

We’re trying to use the **Segment Editor (Subtract)** with **shapeNodes (cylinders)**.  
Our current workflow is:

1. Convert the shapeNode (model) into a segment.
2. Apply the segment editor operations.

The issue appears after converting the model into a segment: the geometry no longer matches the volume (see yellow cylinder below).

 ![imagen](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/f/1fc10de8b25aa3b7018f0281b298c93323b9a87e.jpeg)

If we try forcing the volume with the _“source geometry”_ option in the Segment Editor, the result is a very irregular cylinder segment.

 ![imagen](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/6/a645e3b7fdfb3dd1ccc1461020c29628cf246f18.png)

- Why does this happen?
- Is there a way to fix it so we get a smoother cylinder segment?

Related topic: [Crop segment using shapeNode - #3 by bserrano](https://discourse.slicer.org/t/crop-segment-using-shapenode/43822/3)

---

<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:** [September 23, 2025, 1:05pm UTC](https://discourse.slicer.org/t/model-to-segment-irregularities/44560/2 "2025-09-23T13:05:22Z")

</div>

You are converting a polydata (closed surface) to a representation based on an image data (binary label map, segment, vtkOrientedImageData); it is not directly related to Shape nodes.

The result is highly dependent on the resolution of the segmentation, which is initially set according to the spacing or resolution of the input scalar volume. It can be resampled later; in general, I found that the staircase effect gets worse when a segmentation is oversampled.

It might be better to first resample your input volume before creating a segmentation based on it.

In the image below, a segment has been created from the cylinder. In green, the image data has a spacing of `0.3125 x 0.3125 x 0.6250`, i.e, the cylinder diameter is just above the minimum spacing. In red, the same volume has been resampled to `0.1 x 0.1 x 0.1` (don’t do that routinely). The result speaks for itself.

In all cases, the segment will shrink after removing and recreating the representation (Show 3D button).

 ![Resolution_ImageData_Conversion](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/4/f41aa173a174d885c811bec0d82d4919d2e77b16.png)

---

<div class="post-metadata">

**Author:** ![bserrano](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bserrano/32/17034_2.png) [@bserrano](https://discourse.slicer.org/u/bserrano)\
**Post date:** [September 25, 2025, 12:29pm UTC](https://discourse.slicer.org/t/model-to-segment-irregularities/44560/3 "2025-09-25T12:29:48Z")

</div>

Thank you for the explanation.

In my case, I’m not resampling the volume at any point – the spacing remains the same. However, as you mention, the shrink that happens after converting and recreating the representation seems too aggressive, as can be seen in the image I attached.

I’m working with a spacing of **0.25 x 0.25 x 0.25** , so I would expect the geometry to be preserved more closely. Is this amount of shrink considered normal behavior?

---

<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:** [September 25, 2025, 12:56pm UTC](https://discourse.slicer.org/t/model-to-segment-irregularities/44560/4 "2025-09-25T12:56:28Z")

</div>

@bserrano - thanks for posting - it’s possible there’s a systemic shift when converting back and forth between representations. Or it’s possible that the image you posted is related to the resolution and other particularities, such as orientation, since your vessels are small compared to the spacing as @chir.set points out..

This would be good to investigate systematically, probably with some kind of test scripts that try various configurations and make it easy to visualize and quantify what’s going on.

---

<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:** [September 25, 2025, 1:01pm UTC](https://discourse.slicer.org/t/model-to-segment-irregularities/44560/5 "2025-09-25T13:01:28Z")

</div>

> [@bserrano](#):
>
> Is this amount of shrink considered normal behavior?

In your images, I would say `yes`.

> [@bserrano](#):
>
> If we try forcing the volume with the _“source geometry”_ option in the Segment Editor

The representation gets worse, that’s what I mentioned above. You may repeat on a new segmentation with a source volume that is first resampled at `0.1 x 0.1 x 0.1`. If you crop the volume to the region of study before resampling the volume, you may avoid memory warnings. `0.25 x 0.25 x 0.25` is already a tight spacing though.
