View source: R/write_dwi_gradients.R
| write.dti.bvec | R Documentation |
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")
filepath |
character string, path to the output file. The conventional
extension is |
bvec |
numeric matrix with 3 columns (one row per volume) or 3 rows (one column per volume), the gradient direction of each volume. |
layout |
character string, one of 'components' or 'volumes'.
|
NULL, invisibly. Called for the side effect of writing the file.
A square 3x3 input is ambiguous. Since a matrix passed in memory
follows the R convention of one row per volume, the rows are written as the
volumes here; read.dti.bvec assumes the
components for a square file, so reading such a file back yields the
transposed matrix and warns about the ambiguity.
Other dti functions:
read.dti.bval(),
read.dti.bvec(),
read.dti.grad(),
read.dti.gradients(),
write.dti.bval(),
write.dti.grad()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.