R/face_removal_mask.R
get_quickshear_mask.Rd
Face Removal Mask using "Quickshear Defacing for Neuroimages" (Schimke et al. 2011)
get_quickshear_mask(brain_mask, buffer = 10, verbose = TRUE)
quickshear_deface_image(
file,
brain_mask = NULL,
buffer = 10,
verbose = TRUE,
...
)
A binary image of the non-face areas
adapted from https://github.com/nipy/quickshear/blob/master/quickshear.py
# \donttest{
if (have_fsl()) {
file = "~/Downloads/sample_T1_input.nii.gz"
if (file.exists(file)) {
res = quickshear_deface_image(file)
brain_mask = fslbet(file) > 0
mask = get_quickshear_mask(brain_mask)
image = fslmask(file, mask)
}
}
# }