get_quickshear_mask: Face Removal Mask using "Quickshear Defacing for Neuroimages"...

Description Usage Arguments Value Note Examples

View source: R/face_removal_mask.R

Description

Face Removal Mask using "Quickshear Defacing for Neuroimages" (Schimke et al. 2011)

Usage

1
2
3
4
5
6
7
8
9
get_quickshear_mask(brain_mask, buffer = 10, verbose = TRUE)

quickshear_deface_image(
  file,
  brain_mask = NULL,
  buffer = 10,
  verbose = TRUE,
  ...
)

Arguments

brain_mask

Brain mask image. If NULL, then fslbet will be run

buffer

buffer to add to intercept for face mask equation

verbose

print diagnostic messages

file

input image - same orientation as brain mask

...

additional arguments passed to fslmask

Value

A binary image of the non-face areas

Note

adapted from https://github.com/nipy/quickshear/blob/master/quickshear.py

Examples

1
2
3
4
5
6
7
8
9
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)
   }
}

neuroconductor-devel-releases/fslr documentation built on May 6, 2020, 4:22 p.m.