robex: Executes Robust Brain Extraction

Description Usage Arguments Value Examples

View source: R/robex.R

Description

Executes Robust Brain Extraction

Usage

1
robex(infile, outfile = tempfile(fileext = ".nii.gz"), verbose = TRUE, ...)

Arguments

infile

Input filename

outfile

Output skull-stripped file

verbose

print diagnostic messages

...

arguments to be passed to system

Value

List of result of system command, names of input and output file

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
result = robex(infile = "", outfile = "")

if (requireNamespace("kirby21.t1", quietly = TRUE)) {
   infile = kirby21.t1::get_t1_filenames(id = "113", visit = 1)
   if (is.null(infile)) {
      infile = ""
   }
   if (!file.exists(infile)) {
      outdir = tempdir()
      try({kirby21.t1::download_t1_data(outdir = outdir)})
     infile = kirby21.t1::get_t1_filenames(
     id = "113", visit = 1,
     outdir = outdir)
   }
   if (!is.null(infile)) {
     if (file.exists(infile)) {
       result = robex(infile = infile)
       stopifnot(file.exists(result$outfile))
     }
   }
}

neuroconductor-devel/robex documentation built on May 17, 2021, 2:22 a.m.