segment.orientation.colors: Color line segments by their direction.

View source: R/tracts.R

segment.orientation.colorsR Documentation

Color line segments by their direction.

Description

Computes the classic DTI orientation colors, i.e., segments running left-right, anterior-posterior and superior-inferior get different colors (red, green and blue for the 'axis' mode).

Usage

segment.orientation.colors(from, to, mode = c("axis", "rgb"))

Arguments

from

matrix of segment start points, see fs.coloredpaths.

to

matrix of segment end points, same size as from.

mode

character string, either 'axis' (every segment gets one fully saturated color, based on the dominant direction axis) or 'rgb' (the color channels are the absolute direction components, which gives smoother but paler colors).

Value

vector of hex color strings, one per segment.


fsbrain documentation built on Sept. 27, 2026, 1:07 a.m.