dMRI-Lab 1.0
spectrum2scalar.m File Reference

Functions

function spectrum2scalar (in l1file, in l2file, in l3file, in volfile, in varargin)
 

Function Documentation

◆ spectrum2scalar()

function spectrum2scalar ( in l1file,
in l2file,
in l3file,
in volfile,
in varargin )

These eigenvalues can be computed from the diffusion tensor using the dti2spectrum function.

Parameters
l1fileThe largest eigenvalue.
l2fileThe file to save the second largest eigenvalue.
l3fileThe file to save the smallest eigenvalue.
volfileA string specifying the file to save a scalar map with the scalar measure computed by the function.
vararginOptional arguments passed as -name value pairs
Returns
- volfile: scalar map with the scalar measure computed by the function.

Mandatory Inputs:

  • l1file The largest eigenvalue.
  • l2file The file to save the second largest eigenvalue.
  • l3file The file to save the smallest eigenvalue.
  • volfile A string specifying the file to save a scalar map with the scalar measure computed by the function.
  • varargin Optional arguments passed as -name value pairs

Optional Arguments scalar: A string, one of:

  • 'fa' [DEFAULT]: the fractional anisotropy is computed.
  • 'md': the mean diffusivity is computed.
  • 'ra': the relative anisotropy is computed.
  • 'cl': Westin's linear coefficient is computed.
  • 'cp': Westin's planar coefficient is computed.
  • 'cs': Westin's spherical coefficient is computed.

Westin's coeffcient can also be computed with a RMS normalizing factor as:

  • 'clsq': Westin's linear coefficient is computed.
  • 'cpsq': Westin's planar coefficient is computed.
  • 'cssq': Westin's spherical coefficient is computed.

mask: a MxNxP array of logicals. Only those voxels where mask is true are processed, the others are filled with [0,0,1].

Example:

spectrum2scalar l1file.nii l2file.nii l3file.nii volfile.nii -mask mask_file.nii
function spectrum2scalar(in l1file, in l2file, in l3file, in volfile, in varargin)
Note
This is the simplest use case
See also
dwi2atti, spectrum2scalar, parsevarargin, write_nifti_from_struct.