Writes a diffusion gradient table to a plain text file with one
line per DWI volume, each line holding the four space-separated values
[ x y z b ]. This is the format that the -grad option of the MRtrix3
commands expects, and the format of the dw_scheme entry in the header of
a .mif image.
Arguments
- filepath
character string, path to the output file. Files ending in
.gzare gzip-compressed.- bvec
numeric matrix with 3 columns (one row per volume) or 3 rows (one column per volume), the gradient directions. Alternatively a full gradient table, i.e. a numeric matrix with 4 columns named or ordered 'x', 'y', 'z' and 'b', as returned by
read.dti.grad. If a full table is given, thebvalparameter must be left atNULL.- bval
numeric vector, the b-value of each volume, in s/mm^2. Ignored if
bvecis a full gradient table.- layout
character string, one of 'volumes' or 'components'.
volumes(the default) writes one volume per line, which is the MRtrix layout, whilecomponentswrites the transposed variant with 4 lines.
See also
Other dti functions:
read.dti.bval(),
read.dti.bvec(),
read.dti.grad(),
read.dti.gradients(),
write.dti.bval(),
write.dti.bvec()