# Automated PyRadiomics Feature work with DICOM(input image volume) and DICOM RT structure (input regions)

**URL:** https://discourse.slicer.org/t/automated-pyradiomics-feature-work-with-dicom-input-image-volume-and-dicom-rt-structure-input-regions/36806
**Category:** Support
**Tags:** pyradiomics
**Created:** [June 15, 2024, 2:13pm UTC](https://discourse.slicer.org/t/automated-pyradiomics-feature-work-with-dicom-input-image-volume-and-dicom-rt-structure-input-regions/36806 "2024-06-15T14:13:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![youngchanseo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/youngchanseo/32/76597_2.png) [@youngchanseo](https://discourse.slicer.org/u/youngchanseo)
#### Post date: [June 15, 2024, 2:13pm UTC](https://discourse.slicer.org/t/automated-pyradiomics-feature-work-with-dicom-input-image-volume-and-dicom-rt-structure-input-regions/36806/1 "2024-06-15T14:13:28Z")

</div>

Hello.

I have already installed pyradiomics and Slicer RT via extension manager.

In the DICOM RT structure file, there are contour data for regions of interest (ROIs) [1]) of the tumor shape.  
In the DICOM file, I have an MRI of the patient.  
I searched for Radiomics in the 3d slicer’s module and ran it. I put the DICOM RT file in the “input regions” and the MR image in the “Input Image Volume”.  
As shown in the image below, I was able to successfully extract the Radiomics Features from the MR image of the ROI (Tumor).

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/8/e8d505b29f3e7f83e19ddacd274c81a6b0d3a287.jpeg)

Here I have two questions

1. the features and calculated values are displayed in a table, but is it possible to export them to an excel file?  

2. i need to do these operations multiple times. So I want to do these labor intensive things automatically.  
Is it possible to automate this with python code?  
For example, I have 100 RT structure (outlined tumor regions) DICOM files and 100 DICOM (MR brain) images, can I use code to automatically extract features in pyRadiomics & 3d slicer to do the work at once?  

[1] [Create and Display 3-D Mask of DICOM-RT Contour Data - MATLAB & Simulink - MathWorks 한국](https://kr.mathworks.com/help/images/create-and-display-3-d-mask-of-dicom-rt-contour-data.html)

---

<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: [June 17, 2024, 8:42am UTC](https://discourse.slicer.org/t/automated-pyradiomics-feature-work-with-dicom-input-image-volume-and-dicom-rt-structure-input-regions/36806/2 "2024-06-17T08:42:34Z")

</div>

1. Click on the save button, only select the table node, then choose either csv or tsv, and save. You can open it in Excel
2. Yes. I suggest starting from the [script repository](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html) and look at the code of Slicer and the extension itself when in doubt. The forum contains a lot of topics about python automation of certain workflows as well.
