The output of the function sh2peaks contains the peak directions of the FODs, and I am wondering if the amplitude of the direction vecter is the FOD amplitude along that direction, that is the AFD? And is this amplitude is used as the cutoff value for tractography? By the way, I want to know the order of SH generated from MSMT-CSD and how many directions are used for the default Newton search of sh2peaks function.

Kind of. It used to be in previous versions of the AFD analysis, but now we use the integral of the FOD over the solid angle corresponding to that FOD lobe. Itâ€™s much more robust to minor changes in the spread of the FOD - even a minor increase in dispersion can dramatically reduce the amplitude of the peak, even though the integral remains constant. So nowadays, no, this isnâ€™t what we use as the AFD.

Not quite. It is if you use the deterministic streamlines approach (SD_Stream), but for the probabilistic approaches, the algorithm considers any direction along which the FOD amplitude exceeds that threshold - and in general that direction wonâ€™t be the peak direction.

The simplest way to figure this out is to use mrinfo on the output FOD image, and look at how many volumes were generated, for example this image contains 45 volumes (size along 4th dimension):

mrinfo fod.mif
...
Dimensions: 128 x 128 x 64 x 45
...

You can then compare that to the number of SH coefficients youâ€™d expect for each l_{max}. For reference, these are:

l_{max}=L â†’ Â½(L+1)Ã—(L+2) coefficients

l_{max}=0 â†’ 1 coefficients

l_{max}=2 â†’ 6 coefficients

l_{max}=4 â†’ 15 coefficients

l_{max}=6 â†’ 28 coefficients

l_{max}=8 â†’ 45 coefficients

l_{max}=10 â†’ 66 coefficients

l_{max}=12 â†’ 91 coefficients

This one is actually documented (admittedly not always the caseâ€¦). The -seeds option of sh2peaks allows you to set the seed directions, and by default will use 60 uniformly distributed directions to initiate the search:

-seeds file specify a set of directions from which to start the multiple restarts of the optimisation (by default, the built-in 60 direction set is used)