Learn R Programming

freesurferformats (version 1.1.0)

read.dti.bval: Read b-values from a FSL-style bvals file.

Description

Reads the b-values of a diffusion MRI dataset, i.e. the diffusion weighting of each volume in units of s/mm^2. This implements the bvals part of the FSL format: a plain text file with one value per volume, usually in a single row. The HCP variant, which stores one value per line, is read as well.

Usage

read.dti.bval(filepath, layout = "auto")

Value

numeric vector of length n, the b-value of each of the n volumes.

Arguments

filepath

character string, path to the b-values file, typically ending in .bval or .bvals, but without an extension in the HCP layout.

layout

character string, one of 'auto', 'components' or 'volumes'. components means that the file stores the values in a single line (the FSL layout), volumes means one value per line (the HCP layout). With 'auto' (the default), the layout is derived from the file content.

See Also

Other dti functions: read.dti.bvec(), read.dti.grad(), read.dti.gradients(), write.dti.bval(), write.dti.bvec(), write.dti.grad()