fs.tracts.coords: Get the concatenated coordinates of fs.tracts instances.

View source: R/fs_tracts.R

fs.tracts.coordsR Documentation

Get the concatenated coordinates of fs.tracts instances.

Description

Returns all tract coordinates as a single N x 3 matrix, with the tracts concatenated along the rows. This is the compact representation used internally, and the fastest way to access all coordinates, e.g., for plotting or for computing a bounding box.

Usage

fs.tracts.coords(tracts)

Arguments

tracts

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

Value

numeric matrix with 3 columns and one row per point of all tracts.

Examples

## Not run: 
tck <- read.dti.tck("brain.tck");
coords <- fs.tracts.coords(tck$tracks);
bbox <- apply(coords, 2, range);

## End(Not run)


freesurferformats documentation built on Sept. 25, 2026, 1:07 a.m.