face_removal_mask_ants: Face Removal Mask using ANTs Registration

View source: R/face_removal_mask_ants.R

face_removal_mask_antsR Documentation

Face Removal Mask using ANTs Registration

Description

Face Removal Mask using ANTs Registration

Usage

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


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)
   }
}


muschellij2/extrantsr documentation built on June 3, 2024, 7:04 p.m.