View source: R/read_dwi_gradients.R
| validate.dti.gradients | R Documentation |
Checks that a set of b-vectors and b-values is consistent,
replaces missing values by b=0 volumes, and reports suspicious entries.
This is the validation used by
read.dti.gradients, but it can also be
called directly on gradients from any other source.
validate.dti.gradients(bvec, bval, n_volumes = NULL)
bvec |
character string (path to a b-vectors file), or a numeric matrix with one row per volume (or one column per volume) and 3 columns. |
bval |
character string (path to a b-values file), or a numeric vector
with one value per volume. Can be |
n_volumes |
scalar numeric or integer, the number of volumes in the DWI
image that the gradients belong to, used to check that the table matches
the image. Typically |
a named list with the entries bvec (numeric matrix with n rows
and 3 columns, one row per volume) and bval (numeric vector of length
n).
The rules for missing values match those of MRtrix3: a missing b-value
in a volume with a valid direction, or a missing direction in a volume with
a non-zero b-value, is an error, because such a volume cannot be
interpreted. Everything else is treated as a b=0 volume. The norm of the
gradient vectors is never changed, and a b-value is never rescaled, because
that would silently alter the data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.