Menu

Package that provides tools for brain MRI Deep Learning pre-processing.

Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the gallery for the big picture.

brainprep.tbss.dtifit(data, bvecs, bvals, mask, outname, wls=False)[source]ΒΆ

Fit a diffusion tensor model (DTI) at each voxel of the mask using FSL dtifit.

Parameters:

data : str

diffusion weighted image data file: a 4D serie of volumes.

bvecs : str

b-vectors file containing gradient directions: an ASCII text file containing a list of gradient directions applied during diffusion weighted volumes. The order of entries in this file must match the order of volumes in the input data.

bvals : str

b-values file: an ASCII text file containing a list of b-values applied during each volume acquisition. The order of entries in this file must match the order of volumes in the input data.

mask : str

brain binary mask file: a single binarized volume in diffusion space containing ones inside the brain and zeros outside the brain.

outname : str

user specifies a basename that will be used to name the outputs of dtifit.

wls : bool, default False

optionally fit the tensor using weighted least squares.

Returns:

md_file : str

file with the Mean Diffusivity (MD).

fa_file : str

file with the Fractional Anisotropy (FA).

s0_file : str

file with the Raw T2 signal with no diffusion weighting.

tensor_file : str

file with the tensor field.

m0_file : str

file with the anisotropy mode.

v1_file : str

path/name of file with the 1st eigenvector.

v2_file : str

path/name of file with the 2nd eigenvector.

v3_file : str

path/name of file with the 3rd eigenvector.

l1_file : str

path/name of file with the 1st eigenvalue.

l2_file : str

path/name of file with the 2nd eigenvalue.

l3_file : str

path/name of file with the 3rd eigenvalue.

Follow us

© 2025, brainprep developers