Learn R Programming

freesurfer (version 1.6.10)

nii2mnc: Convert NIfTI to MNC

Description

This function calls nii2mnc to convert NIfTI to MNC files

Usage

nii2mnc(file, outfile = NULL)

Value

Character filename of output

Arguments

file

(character) input filename

outfile

(character) output filename

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)))  
   mnc = nii2mnc(img)
   img_file = mnc2nii(mnc)
}

Run the code above in your browser using DataLab