Learn R Programming

fslr (version 1.3)

fslstats: FSL Stats

Description

This function calls fslstats

Usage

fslstats(file, opts = "", verbose = TRUE, ...)

Arguments

file
(character) filename of image to be checked
opts
(character) operation passed to fslstats
verbose
(logical) print out command before running
...
options passed to checkimg

Value

  • Result of fslstats command

Examples

Run this code
if (have.fsl()){
system.time({
x = array(rnorm(1e6), dim = c(100, 100, 100))
img = nifti(x, dim= c(100, 100, 100),
datatype = convert.datatype()$FLOAT32, cal.min = min(x),
cal.max = max(x), pixdim = rep(1, 4))
entropy = fslstats(img, opts='-E')
})
}

Run the code above in your browser using DataLab