# Python command line execution of Slicer functions

**URL:** <https://discourse.slicer.org/t/python-command-line-execution-of-slicer-functions/2213>\
**Category:** Support\
**Tags:** python\
**Created:** [February 28, 2018, 11:11pm UTC](https://discourse.slicer.org/t/python-command-line-execution-of-slicer-functions/2213 "2018-02-28T23:11:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevenagl12](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stevenagl12/32/3391_2.png) [@stevenagl12](https://discourse.slicer.org/u/stevenagl12)\
**Post date:** [February 28, 2018, 11:11pm UTC](https://discourse.slicer.org/t/python-command-line-execution-of-slicer-functions/2213/1 "2018-02-28T23:11:23Z")

</div>

I am trying to use slicer to take in a batch of meshes and discretize those meshes into labelmaps for pyradiomics analysis. To do this I am working with using an anaconda command line and python to access each file, then somehow access slicers source code, and run the function to convert the mesh to a labelmap volume. I was wondering if anyone can tell me how to do this? Preferably in a step-by-step way?

---

<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:** [February 28, 2018, 11:29pm UTC](https://discourse.slicer.org/t/python-command-line-execution-of-slicer-functions/2213/2 "2018-02-28T23:29:41Z")

</div>

For reference:

> <https://github.com/AIM-Harvard/pyradiomics/issues/349>
>
> I have a bunch of meshes that I would like to extract all of the shape features …through pyradiomics from. I do not have image data however. I am wonder how to use the shape.py to extract features from these meshes.
