brain_extract: Wrapper for ANTs brain extraction

Description Usage Arguments Value

View source: R/brain_extract.R

Description

This function wraps abpN4 and abpBrainExtraction for nifti images with additional checks

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
brain_extract(
  img,
  template,
  template.mask,
  typeofTransform = c("SyNabp", "SyN"),
  correct = TRUE,
  reproducible = TRUE,
  seed = 1,
  ...
)

Arguments

img

Image for brain extraction, nifti, character or antsImage

template

Template image with mask, nifti, character or antsImage

template.mask

Template brain mask

typeofTransform

registration type: 'SyNabp' (better, slower), 'SyN' (fast)

correct

Should abpN4 be performed first?

reproducible

Sets the seed and Sys.setenv(ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS = 1). See https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues for discussion.

seed

will execute Sys.setenv(ANTS_RANDOM_SEED = seed) before running to attempt a more reproducible result. If NULL, will not set anything, but reproducible must be FALSE.

...

additional arguments passed to abpBrainExtraction

Value

A list of the brain image, brain mask, k-means segmentation, and transformations.


muschellij2/extrantsr documentation built on July 27, 2021, 7:41 a.m.