Skip to contents

Returns one integer per tract, the number of points it consists of. The coordinates of tract i are the rows (cumsum(c(1, lengths))[i]):(cumsum(lengths)[i]) of fs.tracts.coords().

Usage

fs.tracts.lengths(tracts)

Arguments

tracts

an fs.tracts instance, as returned in the tracks entry of read.dti.tck or read.dti.trk.

Value

integer vector with one entry per tract.

Examples

if (FALSE) { # \dontrun{
tck <- read.dti.tck("brain.tck");
lengths <- fs.tracts.lengths(tck$tracks);
mean(lengths);
} # }