Reads a diffusion gradient table in MRtrix format: a plain text
file with one line per DWI volume, each line holding the four
space-separated values [ x y z b ], with the direction in scanner
space and the b-value in s/mm^2. This is the format expected by the
-grad option of the MRtrix3 commands (and produced by
-export_grad_mrtrix), and it is also the format in which MRtrix3 stores
the table in the dw_scheme entry of a .mif header. A first line
consisting of a single integer is accepted as a volume count header.
read.dti.grad(filepath, layout = "auto")a numeric matrix with n rows and 4 columns named 'x', 'y', 'z' and 'b', one row per volume. The directions are in scanner space.
character string, path to the file. There is no fixed file
name convention, grad.b and encoding.b are common. Gzip-compressed
files are supported.
character string, one of 'auto', 'components' or 'volumes'.
volumes means one volume per line (4 values per line, the MRtrix layout),
components the transposed variant (4 lines). With 'auto' (the default),
the layout is derived from the matrix dimensions.
Other dti functions:
read.dti.bval(),
read.dti.bvec(),
read.dti.gradients(),
write.dti.bval(),
write.dti.bvec(),
write.dti.grad()