TractSeg ValueError: zero-size array to reduction operation minimum which has no identity

Hi everyone,

I ran into an issue I don’t quite know what to do with while running sh2peaks in MRtrix on WM FODs (in order to then use TractSeg) from single-shell diffusion MRI data. I ran the following:

dwi2response tournier -fslgrad sub-1.bvec sub-1.bval sub-1_dwi.mif sub-1_response.txt
dwiextract sub-1_dwi.mif - \| dwi2fod msmt_csd - sub-1_response.txt sub-1_wmfod.mif -mask sub-1_dwi_mask.mif
mrconvert sub-1_wmfod.mif sub-1_wmfod.nii.gz
sh2peaks sub-1_wmfod.nii.gz sub-1_peaks.nii.gz
TractSeg -i sub-1_peaks.nii.gz

and am getting the error “ValueError: zero-size array to reduction operation minimum which has no identity”. The WM FODs look alright so I’m not sure what went wrong and would appreciate any help!

Hi @TJS,

It is recommended to use dhollander instead of tournier for response function estimation. Also is there a reason you are using msmt_csd if your data are single-shell? I’d recommend using SS3T instead.

Best,
Steven

Hi Steven,

thank you, I’ll give this suggestion a try! I followed the steps in the documentation here Fibre density and cross-section - Single-tissue CSD — MRtrix3 3.0 documentation where the Tournier algorithm was used (which I also thought was recommended for single-shell data) and where it then says “Note that dwi2fod csd can be used, however here we use dwi2fod msmt_csd (even with single shell data) to benefit from the hard non-negativity constraint, which has been observed to lead to more robust outcomes”.
I’m also not sure if the choice of algorithms is the issue since this exact pipeline worked for a different dataset with the same b-values and number of directions, but I’ll try this out and see if it changes anything.