R/intent_name.R

#' @docType methods
#' @rdname intent_name-methods
#' @title Extract Image intent_name attribute 
#' @name intent_name-methods
#' @aliases intent_name,character-method
#' @import oro.nifti
#' @export
#' @description intent_name method for character types
#' @param object is a filename to pass to \link{fslval}
#' 
setMethod("intent_name", "character", function(object) { 
  object = path.expand(object)
  stopifnot(file.exists(object))
  res = fslval(object, keyword = "intent_name", verbose = FALSE)
  res = (res)
  return(res)
})
neuroconductor/fslr documentation built on May 19, 2021, 5:20 a.m.