Voxel-based feature extraction

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.

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