Difference in sh2peaks and fod2peaks output. How to use -split command on fod2peaks output?

Hello Mrtrix Team,
I would like to view just the first peak direction so that I have to separate my peak file in the 4th dimension in two 3 volumes.
I prefer to calculate my peaks via fod2peaks but the output is not like the output from sh2peaks? Thus I can not split it. Actually I do not understand the peak dimension of the fod2peak output.

  1. How do I get just the first peak image from the fod2peak output?

  2. In addition I also get slightly different results when I compare the peaks results from fod2peak and sh2peak via mrview. Is this normal?

  3. I was wondering if there is a possibility to get the phi/theta coordinates of the peak as output via a command option.

Thank you for your help!
Best
Max

There is no fod2peak command that I’m aware of… Do you mean fod2fixel…?

For sh2peaks, you can simply use the -num 1 option to request the single largest peak. If you’ve already computed your peaks using sh2peaks and want to extract the largest one, then:

$ mrconvert peaks.mif -coord 3 0,1,2 first_peak.mif`

will do the trick (just extract the first 3 volumes).

Other than that:

  1. Assuming your fod2peaks actually refers to fod2fixel, then the output of that command is in fixel format, which is quite a different beast. You can convert back to a ‘regular’ image using the fixel2voxel command. If you want the single largest direction, then I think the correct call would be something like

    $ fixel2voxel fixel_folder/peaks.mik split_data first_peak.mif -number 1
    

    No doubt @rsmith will correct me if I’ve got this wrong.

  2. Yes, this is normal: sh2peaks returns the actual peak of the FOD, while fod2fixel will provide the mean orientation of the peak, integrated over its solid angle. The idea is that this might be more robust to subtle asymmetries and other potential oddities in the FOD.

  3. Unfortunately not, sorry…

Thank you for this detailed answer!
Yes of course I mean the fod2fixel command.
Thank you for all the help.
Best
Max

I would like to view just the first peak direction

For just the first peak direction (as opposed to the data value associated with the largest fixel in the voxel), you want: fixel2voxel split_dir -number 1.

I was wondering if there is a possibility to get the phi/theta coordinates of the peak as output via a command option.

Not via a command-line option. But if you really wanted to, you could split the x, y and z volumes into separate images, and do the cartesian → spherical conversion via mrcalc (all the trigonometric functions are there).