R/data_type.R

#' @docType methods
#' @rdname data_type-methods
#' @title Extract Image data_type attribute 
#' @name data_type-methods
#' @aliases data_type,character-method
#' @import oro.nifti
#' @export
#' @description data_type method for character types
#' @param object is a filename to pass to \link{fslval}
#' 
setMethod("data_type", "character", function(object) { 
  object = path.expand(object)
  stopifnot(file.exists(object))
  res = fslval(object, keyword = "data_type", 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.