dMRI-Lab 1.0
dti2signal.m File Reference

Functions

function dti2signal (in tensorfile, in gifile, in signalfile, in varargin)
 

Function Documentation

◆ dti2signal()

function dti2signal ( in tensorfile,
in gifile,
in signalfile,
in varargin )

Computes a symmetric signal defined over the unit sphere

             (signal(gi) = signal(-gi)) 

from its SH coefficients at given directions gi.

Parameters
tensorfileA string specifying the unique coefficients of the tensor at each voxel.
gifileA string specifying the file containing the gradient directions.
signalfileA string specifying the file to save the signal at each voxel and for each direction.
vararginOptional arguments passed as -name value pairs (e.g. -chunksz 100).
Returns
- signalfile: The signal at each voxel and for each direction.

Mandatory Inputs:

  • tensorfile A string specifying the unique coefficients of the tensor at each voxel.
  • gifile A string specifying the file containing the gradient directions.
  • signalfile A string specifying the file to save the signal at each voxel and for each direction.
  • varargin: Optional arguments passed as -name value pairs.

Optional Arguments

  • chunksz: the computation reduces to the product of the SH coeffs by a matrix that may be pre-computed for the whole data set. To improve the performance, cunksz voxels are gathered together in a single matrix that is pre-multiplied by the corresponding matrix, hence taking advantage of matlab's capabilities (default: 100).
  • mask: a MxNxP array of logicals. Only those voxels where mask is true are processed, the others are filled with zeros.

Example:

dti2signal tensorfile.nii gifile.bvec signal.nii -mask mask_file.nii
function dti2signal(in tensorfile, in gifile, in signalfile, in varargin)
Note
This is the simplest use case
See also
dwi2atti, dti2signal, parsevarargin, write_nifti_from_struct.