Face Removal Mask using ANTs Registration

face_removal_mask_ants(
  file,
  template = NULL,
  face_mask = NULL,
  outfile = NULL,
  ...,
  retimg = FALSE
)

deface_image_ants(file, ...)

Arguments

file

input image

template

Template image to register input image to. Set to NULL (recommended) if want to use from https://github.com/poldracklab/pydeface. Alternatively, use mni_fname.

face_mask

Mask of image, in same space as template. Set to NULL (recommended) if want to use from https://github.com/poldracklab/pydeface. Alternatively, use mni_face_fname from fsl.

outfile

Output file name

...

additional arguments to pass to registration

retimg

(logical) return image of class nifti

Value

An image or filename depending on retimg

Examples

# \donttest{ if (fslr::have_fsl()) { file = "~/Downloads/sample_T1_input.nii.gz" if (file.exists(file)) { mask = face_removal_mask_ants(file = file, template = NULL, face_mask = NULL) image = mask_img(file, mask) } } # }