# Multithreading/Multiprocessing in Pyradiomics

**URL:** <https://discourse.slicer.org/t/multithreading-multiprocessing-in-pyradiomics/42242>\
**Category:** Radiomics\
**Created:** [March 21, 2025, 2:35am UTC](https://discourse.slicer.org/t/multithreading-multiprocessing-in-pyradiomics/42242 "2025-03-21T02:35:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![annapurna11](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@annapurna11](https://discourse.slicer.org/u/annapurna11)\
**Post date:** [March 21, 2025, 2:35am UTC](https://discourse.slicer.org/t/multithreading-multiprocessing-in-pyradiomics/42242/1 "2025-03-21T02:35:08Z")

</div>

Hi everyone! I am working on a project focussed on extraction of radiomic features (GLCM features) for prostrate cancer diagnosis. (Voxel-based). The code is too slow and single-threaded. Scanning of a single image takes around 12 hours and not much CPU is being used up in the process either. I have been trying to figure out how to use the jobs parameter to make the code faster and multithreaded. Also I would like to know if there are other methods I can try to make the code run faster.

---

<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:** [March 21, 2025, 1:14pm UTC](https://discourse.slicer.org/t/multithreading-multiprocessing-in-pyradiomics/42242/2 "2025-03-21T13:14:59Z")

</div>

If you have several images to process you could try the parallel processing approach to launch python jobs in multiple processes.

> **[GitHub - pieper/SlicerParallelProcessing: Slicer modules for running subprocesses to operate...](https://github.com/pieper/SlicerParallelProcessing)**
>
> Slicer modules for running subprocesses to operate on data in parallel
