Exporting segments without the total volume of the CT scan

Is there any way to export a segment without the empty space outside of that segment? When I export a segment as nrrd and convert it to a DICOM, the unsegmented/empty space of the CT scan turns into a grey background (as seen in the screenshot attached). Is there any way to remove this feature during the segmentation export?

Probably the easiest is to crop the input volume before segmentation. This is also useful because you can then reduce the spacing (increase the resolution) of the volume, which is often desirable when you want to segment small details from a small part of the image.

If you have already completed the segmentation then you can modify its extent by drawing a region of interest (ROI) markup and then clicking the Specify geometry button and selecting this ROI. You might need to edit the segment (with any effect) to apply the new extents to the segment.

Thanks for your help! Is there any way to draw an irregular ROI in 3D slicer? I do not want any background in the image.

Images have to be rectuangular in shape. So even if you but a spherical ROI, there will be background int the corners. By the way I suspect gray is coming from the background value of 0 you put in the maskVolume, but perhaps that’s not the lowest value, particularly if it is a signed dataset. So, perhaps try setting the background to -1024 and retry.

Additionally if you do want to reduce the volume to the minimum size of the segmentation (so that you want have a huge black background), you can use the SplitVolume in SegmentEditorExtraEffects instead of maskVolume