A Cube into segment

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?

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.

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.

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

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)