Learn R Programming

freesurfer (version 1.6.10)

mri_convert: Use Freesurfers MRI Converter

Description

This function calls mri_convert to convert an image

Usage

mri_convert(file, outfile, opts = "")

Value

Result of system command

Arguments

file

(character) input filename

outfile

(character) output filename

opts

(character) additional options to mri_convert

Examples

Run this code
if (have_fs() && requireNamespace("oro.nifti", quietly = TRUE)) {
   img = oro.nifti::nifti(array(rnorm(5*5*5), dim = c(5,5,5))) 
   res = mri_convert(img, outfile = tempfile(fileext = ".mgz"))
} 

Run the code above in your browser using DataLab