Skip to contents

Export fascicles from R

Usage

write_fascicles(x, file)

Arguments

x

An object of class maf_df storing tractography data.

file

Path to a file into which the tractography data should be saved. Currently supported files are .vtk, .vtp and medInria .fds file formats.

Value

The input tractography data (invisibly) so that the function can be used in pipes.

Examples

uf_left  <- read_fascicles(system.file("extdata", "UF_left.vtp",  package = "riot"))
#> Number of data points: 38697
#> Number of streamlines: 2042
#> v The fascicles stored in /home/runner/work/_temp/Library/riot/extdata/UF_left.vtp have been successfully imported.
if (FALSE) {
out <- fs::file_temp(ext = ".vtp")
write_fascicles(uf_left, file = out)
}