# Convert DICOM-RT CT image and segmented object into NIFTI format

**URL:** <https://discourse.slicer.org/t/convert-dicom-rt-ct-image-and-segmented-object-into-nifti-format/5968>\
**Category:** Support\
**Created:** [February 28, 2019, 3:09pm UTC](https://discourse.slicer.org/t/convert-dicom-rt-ct-image-and-segmented-object-into-nifti-format/5968 "2019-02-28T15:09:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moran\_Artzi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/moran_artzi/32/9566_2.png) [@Moran\_Artzi](https://discourse.slicer.org/u/Moran_Artzi)\
**Post date:** [February 28, 2019, 3:09pm UTC](https://discourse.slicer.org/t/convert-dicom-rt-ct-image-and-segmented-object-into-nifti-format/5968/1 "2019-02-28T15:09:25Z")

</div>

For the following RTRSTRUCT data

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/9/b9da2718308c561aeb3e2d387a5127853f5a0119.png)  
The data is loading successfully on slicer bet I

I am trying unsuccessfully to convert to NIFTI file the:

- The segmented objects
- The CT image at the space of the segmented object

I’ve seen some correspondence on this subject, but still didn’t successes to save my data as a nifti files, tring do save my data  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/2/82b24d12ba409f5408d6186973078ea680c5a55a.png)

Using the module to Export/import under Segmentation, does not save the files  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/3/f3838e7d17112846507d4c9d8594986195e3ba20.png)

I’d appreciate your help  
Thanks  
Moran

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 28, 2019, 3:27pm UTC](https://discourse.slicer.org/t/convert-dicom-rt-ct-image-and-segmented-object-into-nifti-format/5968/2 "2019-02-28T15:27:54Z")

</div>

What you’re doing is correct, but it’s only half of the job. When you export the labelmap from a segmentation, it is exported to another MRML node in the Slicer scene, a labelmap volume node. You still need to save that labelmap to disk. You can do it by clicking on the Save button in the upper left corner, deselecting everything except for “2: RTSTRUCT: 1-label”, and choose nii.gz (or the format you want) in the dropdown menu in the row of the node.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 28, 2019, 3:29pm UTC](https://discourse.slicer.org/t/convert-dicom-rt-ct-image-and-segmented-object-into-nifti-format/5968/3 "2019-02-28T15:29:34Z")

</div>

Btw I can see some triangulation error in the body structure, see coronal view in your screenshot. That gap will be there in the nii file as well. You can fix it in Segment Editor if you want, or we can take a look at the dataset and try to fix it, but it can take a long time.

---

<div class="post-metadata">

**Author:** ![Moran\_Artzi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/moran_artzi/32/9566_2.png) [@Moran\_Artzi](https://discourse.slicer.org/u/Moran_Artzi)\
**Post date:** [February 28, 2019, 6:33pm UTC](https://discourse.slicer.org/t/convert-dicom-rt-ct-image-and-segmented-object-into-nifti-format/5968/4 "2019-02-28T18:33:56Z")

</div>

Thanks a lot of your reply

doing the follows i don get 2: RTSTRUCT: 1-label file but the ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/0/40b68ac3a2f04f5907d1d70fc5788634fe75c6ef.png)file

it can be saved as ANELYZE file but its the CT image not not the segmented objects

what am i missing?

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

Thanks

Moran

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 28, 2019, 8:42pm UTC](https://discourse.slicer.org/t/convert-dicom-rt-ct-image-and-segmented-object-into-nifti-format/5968/5 "2019-02-28T20:42:39Z")

</div>

It seems you didn’t do the export to labelmap node.
