# How extract the radiomics features of many patients for specific region of interests by using python interactor instead of manually one by one patient?

**URL:** <https://discourse.slicer.org/t/how-extract-the-radiomics-features-of-many-patients-for-specific-region-of-interests-by-using-python-interactor-instead-of-manually-one-by-one-patient/26361>\
**Category:** Development\
**Tags:** python\
**Created:** [November 21, 2022, 8:31pm UTC](https://discourse.slicer.org/t/how-extract-the-radiomics-features-of-many-patients-for-specific-region-of-interests-by-using-python-interactor-instead-of-manually-one-by-one-patient/26361 "2022-11-21T20:31:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![NAVEED\_ASHRAF](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/naveed_ashraf/32/15763_2.png) [@NAVEED\_ASHRAF](https://discourse.slicer.org/u/NAVEED_ASHRAF)\
**Post date:** [November 21, 2022, 8:31pm UTC](https://discourse.slicer.org/t/how-extract-the-radiomics-features-of-many-patients-for-specific-region-of-interests-by-using-python-interactor-instead-of-manually-one-by-one-patient/26361/1 "2022-11-21T20:31:23Z")

</div>

How extract the radiomics features of many patients for specific region of interests by using python interactor instead of manually one by one patient?

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [November 22, 2022, 3:51pm UTC](https://discourse.slicer.org/t/how-extract-the-radiomics-features-of-many-patients-for-specific-region-of-interests-by-using-python-interactor-instead-of-manually-one-by-one-patient/26361/2 "2022-11-22T15:51:32Z")

</div>

Once you have installed SlicerRadiomics → pyradiomics should be available in Python Interactor.  
You could then write a Python script and call the radiomics featureextractor on different data sets like it is [shown here](https://pyradiomics.readthedocs.io/en/latest/usage.html#interactive-use). You would probably do that from a loop.

In case you have a working example, please post it here.

---

<div class="post-metadata">

**Author:** ![NAVEED\_ASHRAF](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/naveed_ashraf/32/15763_2.png) [@NAVEED\_ASHRAF](https://discourse.slicer.org/u/NAVEED_ASHRAF)\
**Post date:** [November 23, 2022, 10:56am UTC](https://discourse.slicer.org/t/how-extract-the-radiomics-features-of-many-patients-for-specific-region-of-interests-by-using-python-interactor-instead-of-manually-one-by-one-patient/26361/3 "2022-11-23T10:56:26Z")

</div>

Dear  
Sir, I am facing the problem in the section of ‘setting up data’.Can you help me ?

regards  
Naveed ashraf

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [November 23, 2022, 8:19pm UTC](https://discourse.slicer.org/t/how-extract-the-radiomics-features-of-many-patients-for-specific-region-of-interests-by-using-python-interactor-instead-of-manually-one-by-one-patient/26361/4 "2022-11-23T20:19:56Z")

</div>

@NAVEED_ASHRAF that is too vague.  
Please specify what the problem is and what does not work.

Could you not just load your patients one by one and run SlicerRadiomics manually on each of the datasets?

---

<div class="post-metadata">

**Author:** ![NAVEED\_ASHRAF](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/naveed_ashraf/32/15763_2.png) [@NAVEED\_ASHRAF](https://discourse.slicer.org/u/NAVEED_ASHRAF)\
**Post date:** [January 16, 2023, 8:09am UTC](https://discourse.slicer.org/t/how-extract-the-radiomics-features-of-many-patients-for-specific-region-of-interests-by-using-python-interactor-instead-of-manually-one-by-one-patient/26361/5 "2023-01-16T08:09:50Z")

</div>

Hi Dear Sir,  
I want to export radiomics features of many patients at once time.For example if we have a dicom file (data) of 10 patients in 3D slicer then we want to use python code to automatically export 107 features of each patient at once a time . Instead of manually exporting the 107 radiomics features of each patient separately we want to export all radiomics features of all patients at once a time.please recommend or give us a script which will perform this operation.

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [January 16, 2023, 10:42am UTC](https://discourse.slicer.org/t/how-extract-the-radiomics-features-of-many-patients-for-specific-region-of-interests-by-using-python-interactor-instead-of-manually-one-by-one-patient/26361/6 "2023-01-16T10:42:08Z")

</div>

You can load DICOM data into 3D Slicer from a folder [like shown here](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#load-dicom-files-into-the-scene-from-a-folder).

Probably need to find a programmer or learn to

- call this code
- segment your region of interest
- export the radiomics features of that region

from a loop.

Please understand that we can not provide fully scripted solutions in this forum.

---

<div class="post-metadata">

**Author:** ![Vin\_S](https://avatars.discourse-cdn.com/v4/letter/v/c89c15/32.png) [@Vin\_S](https://discourse.slicer.org/u/Vin_S)\
**Post date:** [June 4, 2024, 8:41pm UTC](https://discourse.slicer.org/t/how-extract-the-radiomics-features-of-many-patients-for-specific-region-of-interests-by-using-python-interactor-instead-of-manually-one-by-one-patient/26361/7 "2024-06-04T20:41:18Z")

</div>

Hi, I was wondering if you knew how to overcome [this error](https://discourse.slicer.org/t/module-slicerradiomics-reported-an-error/31122) that I had run into with accessing the SlicerRadiomics Logic class
