# Input mask for .jpg files

**URL:** https://discourse.slicer.org/t/input-mask-for-jpg-files/11984
**Category:** Radiomics
**Created:** [June 10, 2020, 6:46pm UTC](https://discourse.slicer.org/t/input-mask-for-jpg-files/11984 "2020-06-10T18:46:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Khalifa1997](https://avatars.discourse-cdn.com/v4/letter/k/41988e/32.png) [@Khalifa1997](https://discourse.slicer.org/u/Khalifa1997)
#### Post date: [June 10, 2020, 6:46pm UTC](https://discourse.slicer.org/t/input-mask-for-jpg-files/11984/1 "2020-06-10T18:46:11Z")

</div>

Hey there,  
I hope you guys are good, currently I am working on .jpg images, however I’d like to use `radiomics.featureextractor.RadiomicsFeatureExtractor()` the problem I am having however, is with the `.execute` is that while I do have the image file path, I don’t have the input mask file, I checked out the jupyter notebooks on github and it seems you only use the `.getTestCase` method to get both the path and the mask file, so if anyone could help me with that I would be very much grateful 🙂

---

<div class="post-metadata">

### Author: ![JoostJM](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/joostjm/32/1091_2.png) [@JoostJM](https://discourse.slicer.org/u/JoostJM)
#### Post date: [June 23, 2020, 9:57am UTC](https://discourse.slicer.org/t/input-mask-for-jpg-files/11984/2 "2020-06-23T09:57:04Z")

</div>

The `getTestCase` function only obtains the example cases included in the PyRadiomics repository (downloading them if necessary).

As to your problem, where do you have your mask if you don’t have a filepath? Is it loaded in Slicer? Or do you create the mask dynamically in a Python script? PyRadiomics also supports you to pass the mask a loaded SimpleITK.Image object instead of a file descriptor pointing to the file that can be loaded a SimpleITK.Image object.

Finally, you mention that you work with .jpg input, this is often a color image (i.e. a vector image with 3 values per pixel). PyRadiomics does not support this, input image is required to be grayscale (scalar pixel datatype). The mask is allowed to be a vector image, where you need to select the index to use for your mask.

HTH,

Joost
