R/toffset.R

#' @docType methods
#' @rdname toffset-methods
#' @title Extract Image toffset attribute 
#' @name toffset-methods
#' @description Gets toffset from a character
#' @aliases toffset,character-method
#' @param object is a filename to pass to \link{fslval}
#' @import oro.nifti
#' @export
setMethod("toffset", "character", function(object) { 
  object = path.expand(object)
  stopifnot(file.exists(object))
  res = fslval(object, keyword = "time_offset", verbose = FALSE)
  res = (res)
  return(res)
})

Try the fslr package in your browser

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

fslr documentation built on May 29, 2024, 2:31 a.m.