Error in batch_fitting with GridSearchRician

Skip to first unread message

Blake Neyland

Oct 15, 2019, 6:26:47 AM10/15/19
Hi Gary and NODDI group,

I am running into a new issue with batch_fitting. I am using matlab 2015a and have the parallel computing toolbox installed. My binary masks are created using BET in FSL. I have attached my mask and bvec/bval files here as a reference if needed. Would this error have anything to do with my data type? I can convert with fslmaths if needed. Currently, the NODDI is FLOAT32.

>> protocol = FSL2Protocol('subject1_dwi.bval', 'subject1_dwi.bvec');
>> noddi = MakeModel('WatsonSHStickTortIsoV_B0');
>> CreateROI('subject1_dwi.nii','subject1_bet_mask_final.nii','noddi_roi.mat');
loading the DWI volume : sub-imove1011_ses-1_acq-apNoddi_run-1_dwi.nii
loading the brain mask : noddi_bet_mask_final.nii
creating the output ROI ...
saving the output ROI as noddi_roi.mat
>> batch_fitting('noddi_roi.mat', protocol, noddi, 'FittedParams_imove1011.mat', 8);
143759 of voxels to fit
Error using GridSearchRician (line 60)
Input to EIG must not contain NaN or Inf.

Error in ThreeStageFittingVoxel (line 66)
[x0 liks] = GridSearchRician(Epn, modelname, grid, protocol, constantsGD, sig);

Error in batch_fitting>(parfor body) (line 96)
            [gsps(i,:), fobj_gs(i), mlps(i,:), fobj_ml(i), error_code(i)] = ThreeStageFittingVoxel(voxel, protocol,

Error in batch_fitting (line 89)
    parfor i=split_start:split_end

Hui Zhang

Oct 15, 2019, 1:55:53 PM10/15/19
Hi Blake,

The issue is that in your bval file, b=0 values are non-zero.  If you take a look at the protocol structure, you will see that it says the number of b=0 volumes is zero.  With NODDI toolbox 1.01, you can resolve this issue by calling FSL2Protocol with an extra parameter like this:

protocol = FSL2Protocol('NODDI.bval', 'NODDI.bvec', 10);

This way, any b-values up to 10 will be rounded off to 0.


You received this message because you are subscribed to the Google Groups "NODDI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages