# The example file was written by VTK and contains 3 streamlines.
# It also has a point that is not part of any streamline, which is dropped with a warning.
tracts_file <- system.file("extdata", "tracts_v51_binary.vtk",
package = "freesurferformats", mustWork = TRUE
)
tracts <- suppressWarnings(read.fs.tracts.vtk(tracts_file))
cat(sprintf(
"Read %d streamlines with %d points.\n",
length(tracts), nrow(fs.tracts.coords(tracts))
))
Run the code above in your browser using DataLab