mnc2nii: Convert MNC to NIfTI

Description Usage Arguments Value Examples

View source: R/mnc2nii.R

Description

This function calls mnc2nii to convert MNC files to NIfTI

Usage

1
mnc2nii(file, outfile = NULL)

Arguments

file

(character) input filename

outfile

(character) output filename

Value

Character filename of output

Examples

1
2
3
4
5
6
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, outfile = tempfile(fileext = ".nii"))
   neurobase::readnii(img_file, verbose = TRUE)
}

Example output



freesurfer documentation built on Dec. 9, 2020, 1:07 a.m.