Writes the diffusion gradient directions of a diffusion MRI dataset to a plain text file, which is the bvecs part of the FSL bvecs/bvals format. Note that these vectors are interpreted relative to the image axes, so the file is only meaningful together with the image it was derived from.
write.dti.bvec(filepath, bvec, layout = "components")NULL, invisibly. Called for the side effect of writing the file.
character string, path to the output file. The conventional
extension is .bvec or .bvecs, but that is not enforced. Files ending in
.gz are gzip-compressed.
numeric matrix with 3 columns (one row per volume) or 3 rows (one column per volume), the gradient direction of each volume.
character string, one of 'components' or 'volumes'.
components (the default) writes the file with 3 lines, one per vector
component, which is the FSL layout, while volumes writes one volume per
line, which is what the Human Connectome Project distributes.
Other dti functions:
read.dti.bval(),
read.dti.bvec(),
read.dti.grad(),
read.dti.gradients(),
write.dti.bval(),
write.dti.grad()