Learn R Programming

freesurferformats (version 1.1.0)

fs.tracts.coords: 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)

Value

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

Arguments

tracts

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

Examples

Run this code
if (FALSE) {
tck <- read.dti.tck("brain.tck");
coords <- fs.tracts.coords(tck$tracks);
bbox <- apply(coords, 2, range);
}

Run the code above in your browser using DataLab