Learn R Programming

ANTsR (version 0.3.3)

smoothImage: Smooth image

Description

Smooth image or multi-channel image

Usage

smoothImage(inimg, sigma, sigmaInPhysicalCoordinates = TRUE, FWHM = FALSE, max_kernel_width = 70)

Arguments

inimg
Image to smooth
sigma
Smoothing factor. Can be scalar, in which case the same sigma is applied to each dimension, or a vector of length dim(inimg) to specify a unique smoothness for each dimension.
sigmaInPhysicalCoordinates
If true, the smoothing factor is in millimeters; if false, it is in pixels.
FWHM
If true, sigma is interpreted as the full-width-half-max (FWHM) of the filter, not the sigma of a Gaussian kernel.
max_kernel_width
Maximum kernel width

Value

antsImage smoothed image

Examples

Run this code
img <- makeImage(c(5,5), rnorm(25))
simg <- smoothImage(img, c(1.2,1.5))

Run the code above in your browser using DataLab