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)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).
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.
character string (path to a b-values file), or a numeric vector
with one value per volume. Can be NULL if bvec identifies both files.
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 dim(volume$data)[4]. Set to NULL (the default) to
skip this check.