Skip to contents

Tries to read all files which can be constructed from the base path and the given extensions.

Usage

read_nisurface(filepath_noext, extensions = c("", ".asc", ".gii"), ...)

Arguments

filepath_noext

character string, the full path to the input surface file without file extension.

extensions

vector of character strings, the file extensions to try.

...

parameters passed on to read_nisurfacefile. Allows you to set the methods.

Value

an instance of fs.surface, read from the file. See read.fs.surface for details. If none of the reader methods succeed, an error is raised.

Examples

if (FALSE) { # \dontrun{
surface_filepath_noext <-
  paste(get_optional_data_filepath("subjects_dir/subject1/surf/"),
    "lh.white",
    sep = ""
  )
mesh <- read_nisurface(surface_filepath_noext)
mesh
} # }