# How to export files that pyradiomics need?

**URL:** <https://discourse.slicer.org/t/how-to-export-files-that-pyradiomics-need/28845>\
**Category:** Radiomics\
**Created:** [April 11, 2023, 6:56pm UTC](https://discourse.slicer.org/t/how-to-export-files-that-pyradiomics-need/28845 "2023-04-11T18:56:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![onkaparinga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/onkaparinga/32/65587_2.png) [@onkaparinga](https://discourse.slicer.org/u/onkaparinga)\
**Post date:** [April 11, 2023, 6:56pm UTC](https://discourse.slicer.org/t/how-to-export-files-that-pyradiomics-need/28845/1 "2023-04-11T18:56:08Z")

</div>

As pyradiomics examples show, it requires two files:  
a image file and a label file.  
Both files are .nrrd format.

What are the steps that 3D slicer export these files after drawing ROI ?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [April 11, 2023, 8:36pm UTC](https://discourse.slicer.org/t/how-to-export-files-that-pyradiomics-need/28845/2 "2023-04-11T20:36:48Z")

</div>

You don’t need to export them if you use the SlicerRadiomics extension.

---

<div class="post-metadata">

**Author:** ![onkaparinga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/onkaparinga/32/65587_2.png) [@onkaparinga](https://discourse.slicer.org/u/onkaparinga)\
**Post date:** [April 12, 2023, 12:29am UTC](https://discourse.slicer.org/t/how-to-export-files-that-pyradiomics-need/28845/3 "2023-04-12T00:29:52Z")

</div>

SlicerRadiomics crashes on my 3d slicer.  
I use python to export features.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [April 12, 2023, 12:56pm UTC](https://discourse.slicer.org/t/how-to-export-files-that-pyradiomics-need/28845/4 "2023-04-12T12:56:59Z")

</div>

Be sure to file an issue describing how to replicate any crashes you see:

> **[Issues · AIM-Harvard/SlicerRadiomics](https://github.com/AIM-Harvard/SlicerRadiomics/issues)**
>
> A Slicer extension to provide a GUI around pyradiomics - Issues · AIM-Harvard/SlicerRadiomics

For running PyRadiomics, best to start with working example data from the tutorials or documentation and then compare the headers with what you get on your data to narrow down why something may not be working.

---

<div class="post-metadata">

**Author:** ![onkaparinga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/onkaparinga/32/65587_2.png) [@onkaparinga](https://discourse.slicer.org/u/onkaparinga)\
**Post date:** [April 12, 2023, 1:17pm UTC](https://discourse.slicer.org/t/how-to-export-files-that-pyradiomics-need/28845/5 "2023-04-12T13:17:52Z")

</div>

Thank you for your reply.  
I worked with the example data of pyradiomics: a image file (.nrrd) and a mask file (.nrrd).  
Next I used 3d slicer to draw my ROI. Then I need to export these two files: image and mask file (.nrrd). This is what I am confused with.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [April 12, 2023, 1:20pm UTC](https://discourse.slicer.org/t/how-to-export-files-that-pyradiomics-need/28845/6 "2023-04-12T13:20:42Z")

</div>

It should work to just save the data. Can you describe what isn’t working?

[https://slicer.readthedocs.io/en/latest/user\_guide/data\_loading\_and\_saving.html](https://slicer.readthedocs.io/en/latest/user_guide/data_loading_and_saving.html)
