View source: R/fslsmooth_in_mask.R
fslsmooth_in_mask | R Documentation |
This function smooth an image within a mask and replaces the values of the original image with the smoothed values.
fslsmooth_in_mask(file, sigma = 10, mask = NULL, ...)
fsl_smooth_in_mask(...)
file |
(character) image to be smoothed |
sigma |
(numeric) sigma (in mm) of Gaussian kernel for smoothing |
mask |
(character) optional mask given for image |
... |
additional arguments passed to |
Object of class nifti
if (have.fsl()){
system.time({
dims = c(50, 50, 20)
x = array(rnorm(prod(dims)), dim = dims)
img = nifti(x, dim= dims,
datatype = convert.datatype()$FLOAT32, cal.min = min(x),
cal.max = max(x), pixdim = rep(1, 4))
mask = abs(img ) > 1
s.img = fslsmooth_in_mask(img, mask = mask)
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.