face_removal_mask_ants: Face Removal Mask using ANTs Registration

Description Usage Arguments Value Examples

View source: R/face_removal_mask_ants.R

Description

Face Removal Mask using ANTs Registration

Usage

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

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

neuroconductor/extrantsr documentation built on Sept. 28, 2020, 11:31 a.m.