dMRI-Lab 1.0
dti2spectrum.m File Reference

Functions

function dti2spectrum (in tensorfile, in u1file, in u2file, in u3file, in l1file, in l2file, in l3file, in varargin)
 

Function Documentation

◆ dti2spectrum()

function dti2spectrum ( in tensorfile,
in u1file,
in u2file,
in u3file,
in l1file,
in l2file,
in l3file,
in varargin )
Parameters
tensorfileA string specifying the unique coefficients of the tensor at each voxel.
u1fileA string specifying the file to save the eigenvector associated to the largest eigenvalue, l1.
u2fileA string specifying the file to save the eigenvector associated to the second largest eigenvalue, l2.
u3fileA string specifying the file to save the eigenvector associated to the smallest eigenvalue, l3.
l1fileA string specifying the file to save the largest eigenvalue.
l2fileA string specifying the file to save the second largest eigenvalue.
l3fileA string specifying the file to save the smallest eigenvalue.
vararginOptional arguments passed as -name value pairs (e.g. -clip 0).
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.
  • u1file A string specifying the file to save the eigenvector associated to the largest eigenvalue, l1.
  • u2file A string specifying the file to save the eigenvector associated to the second largest eigenvalue, l2.
  • u3file A string specifying the file to save the eigenvector associated to the smallest eigenvalue, l3.
  • l1file A string specifying the file to save the largest eigenvalue.
  • l2file A string specifying the file to save the second largest eigenvalue.
  • l3file A string specifying the file to save the smallest eigenvalue.
  • varargin: Optional arguments passed as -name value pairs.

Optional Arguments

  • clip: wether (true) or not (false) clip negative eigenvalues (if present) to 0 (default: false).
  • maxthreads: the algorithm is run with multiple threads. This is the maximum allowed number of threads, which can indeed be reduced if it exceeds the number of logical cores (default: the number of logical cores in the machine).
  • mask: a MxNxP array of logicals. Only those voxels where mask is true are processed, the others are filled with [0,0,1].

Example:

dti2spectrum tensorfile.nii u1file.nii u2file.nii u3file.nii l1file.nii l2file.nii l3file.nii -mask mask_file.nii
function dti2spectrum(in tensorfile, in u1file, in u2file, in u3file, in l1file, in l2file, in l3file, in varargin)
Note
This is the simplest use case
See also
dwi2atti, dti2spectrum, parsevarargin, write_nifti_from_struct.