Learn R Programming

freesurferformats (version 1.1.0)

as.fs.tracts: Convert a collection of tracts to an fs.tracts instance.

Description

Accepts an fs.tracts instance, a list of numeric matrices with 3 columns, or a single such matrix (which is then treated as one tract), and returns an fs.tracts instance. This is what the writers use to accept several input types.

Usage

as.fs.tracts(tracts, kind = "tck")

Value

an fs.tracts instance.

Arguments

tracts

the input, see the description.

kind

character string, 'tck' or 'trk', used for the returned instance.

Examples

Run this code
tracts <- as.fs.tracts(list(matrix(c(0, 0, 0, 1, 1, 1), ncol = 3, byrow = TRUE)));
length(tracts);

Run the code above in your browser using DataLab