# A  Cube  into segment

**URL:** https://discourse.slicer.org/t/a-cube-into-segment/43218
**Category:** Support
**Tags:** segmentation
**Created:** [June 4, 2025, 2:50pm UTC](https://discourse.slicer.org/t/a-cube-into-segment/43218 "2025-06-04T14:50:06Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Farah\_BH](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/farah_bh/32/78099_2.png) [@Farah\_BH](https://discourse.slicer.org/u/Farah_BH)
#### Post date: [June 4, 2025, 2:50pm UTC](https://discourse.slicer.org/t/a-cube-into-segment/43218/1 "2025-06-04T14:50:06Z")

</div>

Hello,I created a markup ROI node ( a cube) on a ct volume, and now I want to convert it into a visible segment on that CT volume because I want to modify it. How to do so with the simplest approach?

---

<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: [June 4, 2025, 3:00pm UTC](https://discourse.slicer.org/t/a-cube-into-segment/43218/2 "2025-06-04T15:00:05Z")

</div>

> [@Farah\_BH](#):
>
> the simplest approach

The simplest approach might be to use the `Scissors` tool of the `Segment editor`: `Fill inside/Rectangle/Symmetric`. The depth might be the limiting factor.

Alternatively, you may consider [this module](https://gitlab.com/chir-set/Tools7/-/tree/master/MarkupsToSurface?ref_type=heads).

---

<div class="post-metadata">

### Author: ![mikebind](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@mikebind](https://discourse.slicer.org/u/mikebind)
#### Post date: [June 4, 2025, 11:35pm UTC](https://discourse.slicer.org/t/a-cube-into-segment/43218/3 "2025-06-04T23:35:53Z")

</div>

The SurfaceCut effect in Segment Editor Extra Effects extension also can help provide this functionality with a bit of coding (this is what I did when I needed to something similar). If you want to pursue this approach I can dig up and share some code.

---

<div class="post-metadata">

### Author: ![Farah\_BH](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/farah_bh/32/78099_2.png) [@Farah\_BH](https://discourse.slicer.org/u/Farah_BH)
#### Post date: [June 6, 2025, 2:10pm UTC](https://discourse.slicer.org/t/a-cube-into-segment/43218/4 "2025-06-06T14:10:52Z")

</div>

I was able using coding to create the cube but now I want to export it as DICOM, with the ct and RT structure,

---

<div class="post-metadata">

### Author: ![mikebind](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@mikebind](https://discourse.slicer.org/u/mikebind)
#### Post date: [June 6, 2025, 5:14pm UTC](https://discourse.slicer.org/t/a-cube-into-segment/43218/5 "2025-06-06T17:14:58Z")

</div>

I’m unfortunately not very familiar with radiotherapy and haven’t used the RTStruct module at all. However, I assume exporting your cube to a usable DICOM format probably requires it to be one of the following:

- A scalar image volume
- A labelmap image volume
- A surface model
- A segment in a segmentation

I’m not sure which form your cube is in now, but it’s pretty easy to convert between any of these in Slicer.

- Segment → Model: Segmentations module \> export to model
- Model → segment: Segmentations module \> import from model
- Model → LabelMap: Model To Labelmap module
- LabelMap → scalar image: `slicer.modules.volumes.logic().CreateScalarVolumeFromVolume(slicer.mrmlScene, outputvolumenode, labelmapVolumeNode)`
