# Voxel-based feature extraction

**URL:** <https://discourse.slicer.org/t/voxel-based-feature-extraction/19060>\
**Category:** Radiomics\
**Created:** [August 4, 2021, 6:29pm UTC](https://discourse.slicer.org/t/voxel-based-feature-extraction/19060 "2021-08-04T18:29:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sovan\_Mukherjee](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sovan_mukherjee/32/11886_2.png) [@Sovan\_Mukherjee](https://discourse.slicer.org/u/Sovan_Mukherjee)\
**Post date:** [August 4, 2021, 6:29pm UTC](https://discourse.slicer.org/t/voxel-based-feature-extraction/19060/1 "2021-08-04T18:29:11Z")

</div>

Hi,

I am trying to do a voxel-based feature extraction based on a CT pancreas mask. After setting Voxelbased = True, I extracted 88 features. It created 88 nifti images for individual features. While looking at the images, i realized that it has the extracted feature maps from the mask as well from the background (voxels outside the mask). I would like to feed the feature maps into a classifier to get a probability map. But I don’t feed the features that are calculated outside the mask.

Is there any way I can generate feature map only for the mask voxel?

Will appreciate any help.

---

<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:** [August 4, 2021, 10:54pm UTC](https://discourse.slicer.org/t/voxel-based-feature-extraction/19060/2 "2021-08-04T22:54:41Z")

</div>

You can write a short numpy script mask out only the voxels you want to keep.
