as.tsf.scalars: Convert scalar values for streamlines to a list of vectors.

View source: R/write_dti_tracks.R

as.tsf.scalarsR Documentation

Convert scalar values for streamlines to a list of vectors.

Description

Normalizes the several input forms accepted by write.dti.tsf to a list of numeric vectors, one per streamline, and checks the lengths for consistency.

Usage

as.tsf.scalars(tracts, lengths = NULL)

Arguments

tracts

the input, see write.dti.tsf.

lengths

integer vector or NULL, the number of values per streamline. Only used when tracts is a plain vector of values.

Value

named list with entries values (list of numeric vectors) and lengths (integer vector).


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