This function calls fslval
to obtain a nifti header
fslval(file, keyword = "", verbose = TRUE, ...)
Character of information from fslhd field specified in keyword
(character) image filename or character of class nifti
(character) keyword to be taken from fslhd
(logical) print out command before running
options passed to checkimg
if (have.fsl()){
mnifile = file.path(fsldir(), "data", "standard",
"MNI152_T1_2mm.nii.gz")
fslval(mnifile, keyword = "dim1")
}
Run the code above in your browser using DataLab