Content-type: text/html
This program reads gradient directions and b-values in FSL format and creates a Camino scheme file.
The output is a BVECTOR scheme file:
VERSION: BVECTOR
g_x g_y g_z b
...
g_x g_y g_z b
Note that the diffusion time is not stored here, only the b-values. One gradient vector [g_x, g_y, g_z] is stored for each measurement, along with a b-value. These vectors will be normalized to unity automatically for b > 0 measurements. If b = 0, the gradient direction may be [0 0 0].
The b-values are scaled by default, to give units of s / m^2. The program assumes that the b-values in FSL format are in units of s / mm^2, and scales by 10^6 to give s / m^2. The scaling can be set to some other value with -bscale.
The b-values may additionally be scaled by the gradient direction magnitude. Some scanners will factor the gradient magnitude into the b-value. If the gradient directions have magnitude |g| = sqrt(g_x^2 + g_y^2 + g_z^2), and the nominal b-value is beta, then the actual b-value is beta * |g|^2. To follow this convention, use the -usegradmod option. The gradient directions will still be normalized to unity in the output, and the b-value will be scaled appropriately.
These scheme files do not restrict the position of b=0 scans in the scheme, so there is no need to re-order your data.
fsl2scheme -bvecfile bvecs -bvalfile bvals -diffusiontime 0.04 -version 0 > A.scheme
Create a version 2 scheme file, keeping b in native units.
fsl2scheme -bvecfile bvecs -bvalfile bvals -bscale 1 > A.scheme2
Create a scheme file for a scan that is repeated twice
fsl2scheme -bvecfile bvecs -bvalfile bvals -bscale 1 -numscans 2 > A.scheme
x(1) x(2)... x(N+M)
y(1) y(2) ... y(N+M)
z(1) z(2) ... z(N+M)
where the gradient direction for measurement (i) is [x(i), y(i), z(i)], and there are M unweighted and N diffusion-weighted measurements.
where there are M unweighted (b = 0) and N diffusion-weighted measurements.