Reads the diffusion gradient directions of a diffusion MRI dataset, i.e. the b-vectors part of the FSL bvecs/bvals format. The file contains unit vectors (or zero vectors for the b=0 volumes), stored as three rows of n values, one row per component, one column per volume.
read.dti.bvec(filepath, layout = "auto")a numeric matrix with n rows and 3 columns, one row per volume, the
columns being the x, y and z component of the gradient direction. Note that
these vectors are given with respect to the image axes, not to the
scanner axes, so they are only meaningful together with the image they
belong to: converting them to scanner space requires the transform of that
image. Use read.dti.gradients to read
b-vectors and b-values together, with consistency checks.
character string, path to the b-vectors file, typically
ending in .bvec or .bvecs, but without an extension in the HCP layout.
character string, one of 'auto', 'components' or 'volumes'.
components means that there are 3 lines, one per vector component (the
FSL layout, and what the file name bvecs implies), volumes means one
volume per line, i.e. n lines with 3 values each (the HCP layout). With
'auto' (the default), the layout is derived from the matrix dimensions and
a warning is raised for a square table, which is ambiguous.
Other dti functions:
read.dti.bval(),
read.dti.grad(),
read.dti.gradients(),
write.dti.bval(),
write.dti.bvec(),
write.dti.grad()