R/readmnc.R

Defines functions readmnc

Documented in readmnc

#' @title Read MNC File
#' @description This function calls \code{mnc2nii} 
#' to convert MNC files to NIfTI, then reads it in using 
#' \code{\link{readnii}}
#' @param file (character) input filename
#' @return Object of class \code{nifti}
#' @export
readmnc = function(file){
  outfile = tempfile(fileext = ".nii.gz")
  mnc2nii(file, outfile = outfile)
  ret = readnii(outfile)

  return(ret)
}

Try the freesurfer package in your browser

Any scripts or data that you put into this service are public.

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