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

View source: R/write_dwi_gradients.R

write.dti.bvalR Documentation

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")

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.

Value

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

See Also

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


freesurferformats documentation built on Sept. 25, 2026, 1:07 a.m.