surface_file <- system.file("extdata", "cube.vtk", package = "freesurferformats", mustWork = TRUE)
mesh <- read.fs.surface.vtk(surface_file)
cat(sprintf("Read a mesh with %d vertices and %d faces.\n", nrow(mesh$vertices), nrow(mesh$faces)))
Run the code above in your browser using DataLab