Learn R Programming

ANTsR (version 0.3.3)

n4BiasFieldCorrection: Bias Field Correction

Description

Perform Bias Field Correction on the given image

Usage

n4BiasFieldCorrection(img, mask = NA, shrinkFactor = 4, convergence = list(iters = c(50, 50, 50, 50), tol = 1e-07), splineParam = 200, verbose = FALSE)

Arguments

img
input antsImage
mask
input mask, if one is not passed one will be made
shrinkFactor
Shrink factor for multi-resolution correction, typically integer less than 4
convergence
List of: iters, vector of maximum number of iterations for each shrinkage factor, and tol, the convergence tolerance.
splineParam
Parameter controlling number of control points in spline. Either single value, indicating how many control points, or vector with one entry per dimension of image, indicating the spacing in each direction.
verbose
enables verbose output.

Value

outimg Bias-corrected image

Examples

Run this code

 img<-makeImage( c(50,50), rnorm(2500) )
 n4img<-n4BiasFieldCorrection(img)

Run the code above in your browser using DataLab