# Convert closed curve to segment in Segment Editor

**URL:** https://discourse.slicer.org/t/convert-closed-curve-to-segment-in-segment-editor/29805
**Category:** Support
**Tags:** segmentation, markups
**Created:** [June 2, 2023, 3:44pm UTC](https://discourse.slicer.org/t/convert-closed-curve-to-segment-in-segment-editor/29805 "2023-06-02T15:44:55Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![mangotee](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mangotee](https://discourse.slicer.org/u/mangotee)
#### Post date: [June 2, 2023, 3:44pm UTC](https://discourse.slicer.org/t/convert-closed-curve-to-segment-in-segment-editor/29805/1 "2023-06-02T15:44:55Z")

</div>

Hi,  
I am trying to annotate (manually segment) 2D images, the closed-curve markup is of particular use. How can I convert the curve into a segment in Segment Editor? Apart from closed curve, is there a way to simply place/edit ellipse markups? It’s rare, but sometimes I am missing these simpler tools like closed curve/polygon/ellipse in the Segment Editor toolbar (even the SegmentEditorExtraEffects extension does not have those). Usually, these tools are too simplistic. But in my case, I am trying to segment iris/pupil in eye closeup images, and ellipses would be particularly useful.  
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: [June 2, 2023, 11:24pm UTC](https://discourse.slicer.org/t/convert-closed-curve-to-segment-in-segment-editor/29805/2 "2023-06-02T23:24:15Z")

</div>

Polygon drawing is called “Draw” effect. For multiple slices you can use “Scissors” effect.

Circle and sphere drawing is available in “Paint” effect. Circle, sphere, and cylinder drawing is in “Scissors” effect (we could add ellipse here, too, but there hasn’t been significant demand).

You can draw/edit closed curves on multiple slices and convert to segment using “Surface Cut” effect (provided by SegmentEditorExtraEffects extension). You can draw open curves and convert them to segment using “Draw curve” effect (in SegmentEditorExtraEffects extension, too).

---

<div class="post-metadata">

### Author: ![rxl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rxl/32/76926_2.png) [@rxl](https://discourse.slicer.org/u/rxl)
#### Post date: [June 18, 2024, 5:23pm UTC](https://discourse.slicer.org/t/convert-closed-curve-to-segment-in-segment-editor/29805/3 "2024-06-18T17:23:09Z")

</div>

Sorry if the topic is too old; I wasn’t able to figure out from the UI or documentation how to use an existing closed curve to a segmentation using Surface cut (within segment editor, if there’s another way). All options seemed to be based on creating new fiducials to define the segmentation, rather than using an existing curve.

---

<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: [June 18, 2024, 5:42pm UTC](https://discourse.slicer.org/t/convert-closed-curve-to-segment-in-segment-editor/29805/4 "2024-06-18T17:42:15Z")

</div>

If you don’t want to draw/modify the curve interactively in the Segment Editor then you can:

- use `Markups to model` module to create a tube model from a curve
- drag-and-drop the tube model into a segmentation node to add it as a segment (or right-click on the model to convert to a segmentation)

---

<div class="post-metadata">

### Author: ![rxl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rxl/32/76926_2.png) [@rxl](https://discourse.slicer.org/u/rxl)
#### Post date: [June 18, 2024, 5:59pm UTC](https://discourse.slicer.org/t/convert-closed-curve-to-segment-in-segment-editor/29805/5 "2024-06-18T17:59:00Z")

</div>

I’m not sure why the segmentation is being produced as such from the model (both yellow, original CC red)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/e/ae3541c842c85d5665a5d3606c16b101b9cd67b9.png)

The model was created per MarkupsToModel closed surface (I didn’t see tube model)

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/8/d88df1d45b70fbb2e4759623a2783341e44c53b2.png)

I wasn’t able to right click the model; I imported the model in the segmentations module

---

<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: [June 18, 2024, 5:59pm UTC](https://discourse.slicer.org/t/convert-closed-curve-to-segment-in-segment-editor/29805/6 "2024-06-18T17:59:49Z")

</div>

If you want a tube model, choose `Curve` model type.

---

<div class="post-metadata">

### Author: ![rxl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rxl/32/76926_2.png) [@rxl](https://discourse.slicer.org/u/rxl)
#### Post date: [June 18, 2024, 6:02pm UTC](https://discourse.slicer.org/t/convert-closed-curve-to-segment-in-segment-editor/29805/7 "2024-06-18T18:02:51Z")

</div>

I see, thank you. I may have misunderstood the intent of the original post: they had mentioned ellipse markups so I had thought the area enclosed by the curve would be segmented. Is this only for the path of the curve itself?

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

---

<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: [June 18, 2024, 7:14pm UTC](https://discourse.slicer.org/t/convert-closed-curve-to-segment-in-segment-editor/29805/8 "2024-06-18T19:14:10Z")

</div>

What is your overall goal?
