R/onefile.R

Defines functions onefile

Documented in onefile

#' @title Creates the \code{onefile} Specification for NIfTI
#' @return Object of class \code{nifti}.
#' @param img is a \code{nifti}-class object.
#' @description Changes the \code{magic} and \code{vox_offset} slots to be
#' consistent with the onefile option in \code{\link{writeNIfTI}}.  As of 
#' version 0.4.0, \code{oro.nifti} did not support the \code{"ni1"} magic type 
#' for output.
#' @author John Muschelli \email{muschellij2@@gmail.com}
#' @references NIfTI-1\cr \url{http://nifti.nimh.nih.gov/}
#' @export
onefile <- function(img) {
  img@magic <- "n+1"
  img@"vox_offset" <- 352
  return(img)
}

Try the oro.nifti package in your browser

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

oro.nifti documentation built on Aug. 10, 2022, 5:09 p.m.