# issue with exporting seg Dicom files 

**URL:** <https://discourse.slicer.org/t/issue-with-exporting-seg-dicom-files/29556>\
**Category:** Support\
**Tags:** segmentation, dicom, python, masking, ai\
**Created:** [May 20, 2023, 5:53pm UTC](https://discourse.slicer.org/t/issue-with-exporting-seg-dicom-files/29556 "2023-05-20T17:53:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mustafa\_magdy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mustafa_magdy/32/66028_2.png) [@mustafa\_magdy](https://discourse.slicer.org/u/mustafa_magdy)\
**Post date:** [May 20, 2023, 5:53pm UTC](https://discourse.slicer.org/t/issue-with-exporting-seg-dicom-files/29556/1 "2023-05-20T17:53:25Z")

</div>

i downloaded Data from TCIA and its already have a seg results.

what i want to do is exporting the segmented lesion out of the whole volume as dicom file to start working on it.  
what i’m getting after exporting the file is the segmented area without any data only empty contour.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/b/5b350e585f6b76cb8c8aefd4d5fed415c7449f62.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:** [May 20, 2023, 11:12pm UTC](https://discourse.slicer.org/t/issue-with-exporting-seg-dicom-files/29556/2 "2023-05-20T23:12:07Z")

</div>

> [@mustafa\_magdy](#):
>
> what i want to do is exporting the segmented lesion out of the whole volume as dicom file to start working on it

What work would you like to do on it?  
I’m what software?  
What DICOM information objects that software can read - CT, Segmentation, RT structure set,…?

---

<div class="post-metadata">

**Author:** ![mustafa\_magdy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mustafa_magdy/32/66028_2.png) [@mustafa\_magdy](https://discourse.slicer.org/u/mustafa_magdy)\
**Post date:** [May 20, 2023, 11:42pm UTC](https://discourse.slicer.org/t/issue-with-exporting-seg-dicom-files/29556/3 "2023-05-20T23:42:21Z")

</div>

i want to use it for ML for extracting the features of each voxel to make it able to differentiate tumors  
i’m runinng python script on juypter.

---

<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:** [May 21, 2023, 12:09am UTC](https://discourse.slicer.org/t/issue-with-exporting-seg-dicom-files/29556/4 "2023-05-21T00:09:34Z")

</div>

DICOM is great as an archival and data exchange file format, but not as a working file format. To train an AI model you would normally convert input images from DICOM to NRRD or other research file formats that are simpler and more efficient than DICOM.

You don’t need to deal with DICOM until the very end of your project, when you deploy your tool to hospitals for clinical use. If you deploy your model using an application framework (such as 3D Slicer) then you don’t need to think about DICOM even then, aS the framework takes care of DICOM import/export.

---

<div class="post-metadata">

**Author:** ![mustafa\_magdy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mustafa_magdy/32/66028_2.png) [@mustafa\_magdy](https://discourse.slicer.org/u/mustafa_magdy)\
**Post date:** [May 21, 2023, 1:25am UTC](https://discourse.slicer.org/t/issue-with-exporting-seg-dicom-files/29556/5 "2023-05-21T01:25:25Z")

</div>

that’s great to know thank you for saving my time.  
but  
the issue remain that when i export nrrd i dont get info about the real lesion its just empty photos  
the pixels are 0 1

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/b/3bf0b73f96a6ee0b5eecc906dcd80203094ab706.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:** [May 21, 2023, 3:33am UTC](https://discourse.slicer.org/t/issue-with-exporting-seg-dicom-files/29556/6 "2023-05-21T03:33:46Z")

</div>

Usually you use the original images and segmentations (that you call “empty photos” that contain discrete label values) as training data for your network.
