# How to run Scripted or loadable Modules from Shell Scrpt (batch mode?)

**URL:** <https://discourse.slicer.org/t/how-to-run-scripted-or-loadable-modules-from-shell-scrpt-batch-mode/4940>\
**Category:** Support\
**Created:** [December 3, 2018, 4:42pm UTC](https://discourse.slicer.org/t/how-to-run-scripted-or-loadable-modules-from-shell-scrpt-batch-mode/4940 "2018-12-03T16:42:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MachadoL](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/machadol/32/3372_2.png) [@MachadoL](https://discourse.slicer.org/u/MachadoL)\
**Post date:** [December 3, 2018, 4:42pm UTC](https://discourse.slicer.org/t/how-to-run-scripted-or-loadable-modules-from-shell-scrpt-batch-mode/4940/1 "2018-12-03T16:42:24Z")

</div>

Operating system: Linux Mint 17  
Slicer version: 4.9  
Expected behavior:  
Actual behavior:

Hi everyone!

I would like to know if it is possible to call a scripted or loadable Slicer module in a shell script giving its specific parameter and so on (is it batch mode?) (E.g. Slicer Radiomics).

I would like to set a “for loop” to execute that module with a list of image, lable and parameters. I gues it is possible, though, I don’t know how to do it!

I appreciate all your comments on that!  
Thank you.

---

<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:** [December 4, 2018, 1:43pm UTC](https://discourse.slicer.org/t/how-to-run-scripted-or-loadable-modules-from-shell-scrpt-batch-mode/4940/2 "2018-12-04T13:43:01Z")

</div>

Hi @MachadoL -

For scripting radiomics over a large group of subjects, it’s probably better to run PyRadiomics directly. You can use the same config file for either SlicerRadiomics or PyRadiomics. Have you looked into that?

-Steve

---

<div class="post-metadata">

**Author:** ![MachadoL](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/machadol/32/3372_2.png) [@MachadoL](https://discourse.slicer.org/u/MachadoL)\
**Post date:** [December 4, 2018, 6:32pm UTC](https://discourse.slicer.org/t/how-to-run-scripted-or-loadable-modules-from-shell-scrpt-batch-mode/4940/4 "2018-12-04T18:32:09Z")

</div>

Hey @pieper,

thanks for your feed back. Yeah, I found out that yesterday…  
Surely I will use it directly through PyRadiomics.

Than you!
