preprocessBrainImage: Basic preprocessing pipeline for T1-weighted brain MRI

View source: R/preprocessImage.R

preprocessBrainImageR Documentation

Basic preprocessing pipeline for T1-weighted brain MRI

Description

Various preprocessing steps that have been previously described in various papers including the cortical thickness pipeline:

Usage

preprocessBrainImage(
  image,
  truncateIntensity = c(0.01, 0.99),
  brainExtractionModality = NULL,
  templateTransformType = NULL,
  template = "biobank",
  doBiasCorrection = TRUE,
  returnBiasField = FALSE,
  doDenoising = TRUE,
  intensityMatchingType = NULL,
  referenceImage = NULL,
  intensityNormalizationType = NULL,
  antsxnetCacheDirectory = NULL,
  verbose = TRUE
)

Arguments

image

input t1-weighted brain MRI

truncateIntensity

2-element vector giving the low and high quantiles for intensity truncation.

brainExtractionModality

string or NULL. Perform brain extraction using antsxnet tools. One of "t1", "t1v0", "t1nobrainer", "t1combined", "flair", "t2", "bold", "fa", "t1infant", "t2infant", or NULL.

templateTransformType

see Details in help for antsRegistration. Typically "Rigid" or "Affine".

template

an ANTs image (not skull-stripped). Other premade templates are "biobank" and "croppedMni152".

doBiasCorrection

boolean for performing N4 bias field correction.

returnBiasField

if TRUE, return bias field as an additional output without bias correcting the preprocessed image.

doDenoising

boolean for performing non-local means denoising.

intensityMatchingType

Either "regression" or "histogram". Only is performed if !is.null(referenceImage).

referenceImage

reference image for intensity matching.

intensityNormalizationType

Either rescale the intensities to 0,1 (i.e., "01") or zero-mean, unit variance (i.e., "0mean"). If NULL normalization is not performed.

antsxnetCacheDirectory

destination directory for storing the downloaded template and model weights. Since these can be resused, if is.null(antsxnetCacheDirectory), these data will be downloaded to the subdirectory ~/.keras/ANTsXNet/.

verbose

print progress to the screen.

Details

\url{https://www.ncbi.nlm.nih.gov/pubmed/24879923}

Value

preprocessed image and, optionally, the brain mask, bias field, and template transforms.

Author(s)

Tustison NJ, Avants BB

Examples


library( ANTsR )
library( ANTsRNet )

image <- antsImageRead( getANTsRData( "r16" ) )
preprocessedImage <- preprocessBrainImage( image,
  truncateIntensity = c( 0.01, 0.99 ),
  doBiasCorrection = TRUE, doDenoising = TRUE,
  intensityNormalizationType = "01", verbose = FALSE )


ANTsX/ANTsRNet documentation built on April 28, 2024, 12:16 p.m.