| fs.tracts | R Documentation |
Creates the compact container used by the DTI tract readers and
writers. Reading a track file with read.dti.tck,
read.dti.trk or read.dti.tsf returns instances of
this class, and this function is the way to build one from your own data,
e.g., to write a tractogram that was assembled or edited in R with
write.dti.tck or write.dti.trk.
fs.tracts(coords, lengths, scalars = NULL, properties = NULL, kind = "tck")
coords |
numeric matrix with 3 columns, the concatenated coordinates of all tracts. |
lengths |
integer vector, the number of points of each tract. Must sum
up to |
scalars |
numeric matrix or NULL. Per-point data, with one row per
point (i.e., |
properties |
numeric matrix or NULL. Per-tract data, with one row per tract. |
kind |
character string, either 'tck' or 'trk'. Determines what
|
an fs.tracts instance.
# Two tracts, the first with two points and the second with one.
coords <- matrix(c(0, 0, 0, 1, 1, 1, 5, 5, 5), ncol = 3, byrow = TRUE);
tracts <- fs.tracts(coords, lengths = c(2L, 1L));
length(tracts);
tracts[[1]];
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.