face_removal_mask: Face Removal Mask

Description Usage Arguments Value Examples

View source: R/face_removal_mask.R

Description

Face Removal Mask

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
face_removal_mask(
  file,
  template = mni_fname(mm = "1"),
  face_mask = mni_face_fname(mm = "1"),
  outfile = NULL,
  dof = 12,
  cost = "mutualinfo",
  retimg = FALSE
)

deface_image(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.

outfile

Output file name

dof

(numeric) degrees of freedom (default 6 - rigid body)

cost

Cost function passed to flirt

retimg

(logical) return image of class nifti

...

not used

Value

An image or filename depending on retimg

Examples

1
2
3
4
5
6
7
8
if (have_fsl()) {
   file = "~/Downloads/sample_T1_input.nii.gz"
   if (file.exists(file)) {
       mask = face_removal_mask(file = file,
         template = NULL, face_mask = NULL)
       image = fslmask(file, mask)
   }
}

neuroconductor-devel/fslr documentation built on May 6, 2021, 1:44 p.m.