Learn R Programming

freesurferformats (version 1.1.0)

write.dti.bval: Write b-values to a FSL-style bvals file.

Description

Writes the diffusion weighting of each volume of a diffusion MRI dataset to a plain text file, which is the bvals part of the FSL bvecs/bvals format.

Usage

write.dti.bval(filepath, bval, layout = "components")

Value

NULL, invisibly. Called for the side effect of writing the file.

Arguments

filepath

character string, path to the output file. The conventional extension is .bval or .bvals, but that is not enforced. Files ending in .gz are gzip-compressed.

bval

numeric vector, the b-value of each volume, in s/mm^2.

layout

character string, one of 'components' or 'volumes'. components (the default) writes all values into a single line, which is what the FSL tools produce, while volumes writes one value per line, which is what the Human Connectome Project distributes.

See Also

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