This program computes statistics from streamline tracts, either using the tracts themselves or using the values of a scalar image along the streamline.
Tract scalar statistics are computed by evaluating a scalar image along the length of the streamline, and returning some function of the scalar values. The scalar image should be defined in the same space as the streamlines.
Some definitions
l - the length of the streamline.
S(T) - a vector of scalar values computed by evaluating the scalar image at each point
in T.
S(T) - a vector of scalar values computed by evaluating the scalar image at each point in T.
The tract statistic may be either the mean, sum, minimum, maximum, median, or variance of S(T), the values at each point along the streamline. The option "meanvar" returns both the mean and variance.
Interpolation in the context of this program means linearly interpolating the image data. The image intensity is evaluated at each point in T.
The assumption here is that the points on T are approximately evenly sampled. If T was defined using a fixed step size algorithm (-interpolated passed to track) then the distance between points will be equal, which is optimum for estimating the mean image value along T. If the step size is variable, for example in FACT, then the points on T are not evenly sampled, which introduces a bias. Resampling to a smaller step size in procstreamlines will reduce this bias (which may be small to begin with).
Non image-based statistics use information embedded in the streamlines themselves. Currently, this includes "length", the path length along the streamline, and "enspointsep", the euclidean distance between the streamline end points.
The output is the tract statistic for each streamline sent to the image, in the order in which they are read from the input.
Track in an ROI and get the mean FA along each tract.
cat tracts.Bfloat | tractstats -tractstat mean -interpolate -scalarfile fa.hdr > tractMeanFA.Bdouble
Get the minimum mean diffusivity along the tracts
cat tracts.Bfloat | tractstats -tractstat min -interpolate -scalarfile md.hdr > tractMinMD.Bdouble