poldracklab / pydeface

defacing utility for MRI images
MIT License
110 stars 42 forks source link

Adds an additional headmask to data #21

Closed miykael closed 6 years ago

miykael commented 6 years ago

At the moment, this is still a WIP, but I would like to have some feedback on this. Connected to my topic on neurostars, I need a defacing algorithm, that also takes away the ear.

I think I've established this with this PR: (1) I've taken the already existing mean_reg2mean.nii.gz file, segmented it with SPM12's NewSegment and created a binary mask from the GM, WM and CSF segmentation. (2) I've dilated this new mask with scipy's binary_dilation function, 25 times and got this new mask, which for the moment I call headmask.

Does it make sense to include such a mask in pydeface? Should it replace the current facemask? Should I create an alternative option?

Thanks for the feedback.

miykael commented 6 years ago

This approach is not true anymore. The mask was too small and sometimes cut out parts of the frontal and temporal lobe.