Low precision in resulting maps

314 views
Skip to first unread message

Luis Concha

unread,
Jan 24, 2014, 4:32:16 PM1/24/14
to no...@googlegroups.com
Hello Gary.

Thanks very much for making your toolbox available and so user-friendly.

I have successfully completed your tutorial using the supplied example data and I am able to produce the resulting quantitative maps. Oddly, these look fine but have very few possible values. For example, ficvf.nii map only contains values of 0,0.5,0.75 and 1. The same applies to fiso.nii map and others. The contrast in these maps seems similar to those pre-computed by you and supplied in the output directory, it is just that my maps do not have such precision. Using my own data (Philips 3.0T) I get similar low precision maps.

Do you have any suggestions of where the problem may be? Thanks a lot.

Luis

Things you may or may not need:

During the fitting procedure, I get many, many messages like:
Fitting voxel 9

MException object with properties:

identifier: 'MATLAB:mir_invalid_end_index'
message: [1x225 char]
stack: [7x1 struct]
cause: {[1x1 MException]}

tracing this back I get:
err.cause{1}.message
ans =
Failure in initial user-supplied objective function evaluation. FMINCON cannot continue.

Also, the error code map contains only the value=2 in every voxel.

I can trace back in the matlab functions that these values have such low precision in the variable x0 of GridSearchRician.m

I use Matlab R2008b.

Hui Zhang

unread,
Jan 24, 2014, 5:43:02 PM1/24/14
to no...@googlegroups.com
Hi Luis,

It looks like the fitting has terminated after only the first of its two stages. The fitting consists of two stages: a coarse grid search followed by a nonlinear least square.  The first step gives the coarse estimate that you see.  The second step refines the coarse estimate, which appears to have failed.  I suspect it may be an issue with the Matlab version you are using.  Do you have access to more recent versions?  I have tested the toolbox against R2011b and later.

Gary
--
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 noddi+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Luis Concha

unread,
Jan 24, 2014, 5:51:49 PM1/24/14
to no...@googlegroups.com
That sounds reasonable. I will try to get a box with a newer matlab and report back.

Dr. Luis Concha
Instituto de Neurobiología
Laboratorio C-13
UNAM, Campus Juriquilla
Boulervard Juriquilla 3001
Juriquilla, Querétaro.
C.P. 76230
México
Tel (442) 2 38 10 54
Fax (442) 2 38 10 46
http://personal.inb.unam.mx/lconcha/

Luis Concha

unread,
Jan 27, 2014, 6:43:04 PM1/27/14
to no...@googlegroups.com
Unfortunately I am still getting low precision maps using Matlab R2013a. Do you have any suggestions on how I can debug this or what kind of information I should provide for debugging? Thanks.

Dr. Luis Concha
Instituto de Neurobiología
Laboratorio C-13
UNAM, Campus Juriquilla
Boulervard Juriquilla 3001
Juriquilla, Querétaro.
C.P. 76230
México
Tel (442) 2 38 10 54
Fax (442) 2 38 10 46
http://personal.inb.unam.mx/lconcha/


Hui Zhang

unread,
Jan 28, 2014, 6:41:42 AM1/28/14
to no...@googlegroups.com
Very strange.  Do you have the optimisation toolbox as required?

Gary

Luis Concha

unread,
Jan 28, 2014, 10:46:19 AM1/28/14
to no...@googlegroups.com
Yes, I do have the required toolbox and can run optimtool as a verification.



I have traced the error to fnmicon.m, line 635:

 try
      initVals.f = feval(funfcn{3},X,varargin{:});
   catch userFcn_ME
        optim_ME = MException('optimlib:fmincon:ObjectiveError', ...
            getString(message('optimlib:fmincon:ObjectiveError')));
        userFcn_ME = addCause(userFcn_ME,optim_ME);
        rethrow(userFcn_ME)
   end


which catches:


userFcn_ME =

  MException with properties:


    identifier: 'MATLAB:mir_invalid_end_index'
       message: [1x225 char]
         cause: {}
         stack: [7x1 struct]

K>> userFcn_ME.message

ans =

Error: File: fobj_rician_st.m Line: 41 Column: 28
The end operator must be used within an array index expression.


I cannot set a breakpoint in fob_rician_st.m because of a supposed syntax error in line 41. Perhaps the variable scale is empty?

I hope this information helps.



Dr. Luis Concha
Instituto de Neurobiología
Laboratorio C-13
UNAM, Campus Juriquilla
Boulervard Juriquilla 3001
Juriquilla, Querétaro.
C.P. 76230
México
Tel (442) 2 38 10 54
Fax (442) 2 38 10 46
http://personal.inb.unam.mx/lconcha/


Hui Zhang

unread,
Jan 28, 2014, 2:37:56 PM1/28/14
to no...@googlegroups.com
This is completely baffling.  I haven't had anyone else who can't process the example dataset as it is.

So I went through a fitting run in the debug mode to see if I ever get into the segment of the code in fobj_rician_st.m (Line: 41 ..).  Guess what.  I didn't.  That piece of code is never used.  I don't understand why on your computer it did.

Gary
--

Luis Concha

unread,
Jan 28, 2014, 8:06:19 PM1/28/14
to no...@googlegroups.com
I have set up matlab R2013a in another computer (ubuntu 12.04 64 bits, required toolboxes installed). I still get the same results.



Here is what I find:

I put a breakpoint (BP) in line 365 of fmincon.m:

      initVals.f = feval(funfcn{3},X,varargin{:});
as this is where I believe the first "catch" happens (*). I then evaluate the line with F11...

this takes me to a function within optimfcnchk.m called checkfun. I evaluate F11 the line 316...
    f = userfcn(x,varargin{:});
note that userfcn has the function handle @fobj_rician_fix
takes me to fobj_rician_fix, which in turn takes me to fobj_rician

and, at line 38, it evaluates sumRes and automatically takes me back to fmincon.m, to the "catch":
  catch userFcn_ME

and here I display the contents of userFcn_ME


K>> userFcn_ME


userFcn_ME =

  MException with properties:

    identifier: 'MATLAB:mir_invalid_end_index'
       message: [1x231 char]

         cause: {}
         stack: [7x1 struct]

K>> userFcn_ME.message

ans =

Error: File: fobj_rician_st.m Line: 41 Column: 28
The end operator must be used within an array index expression.


So, I do not get to fobj_rician_st.m either, but the error is mentioning it.


(*): Am I debugging the wrong function/wrong place?





Dr. Luis Concha
Instituto de Neurobiología
Laboratorio C-13
UNAM, Campus Juriquilla
Boulervard Juriquilla 3001
Juriquilla, Querétaro.
C.P. 76230
México
Tel (442) 2 38 10 54
Fax (442) 2 38 10 46
http://personal.inb.unam.mx/lconcha/


Hui Zhang

unread,
Jan 29, 2014, 5:34:57 AM1/29/14
to no...@googlegroups.com
Your issue is unique.  I haven't seen anyway who can't reproduce the tutorial dataset.  The only logical conclusion I can come up with is that it has to do with your own set up.

So, rather than debugging the toolbox, I suggest that you

1) try on a computer running Windows or Mac or a different linux distribution like CentOS.

2) make sure the example dataset is not corrupted during the download.

3) recreate the ROI files and make sure they are not corrupted.

Good luck.

Gary

Luis Concha

unread,
Jan 29, 2014, 7:37:24 PM1/29/14
to no...@googlegroups.com
You were right, I can run the tutorial and get good results if on Windows. It is a sad day for linux...

This supports your view that the toolbox needs no fixing, so I won't bother you any more with this. I will try to debug the linux-specific problem on this end and, if I manage to find something, will let you know.

I am sorry to have wasted your time with an OS bug, and appreciate all your kind help.

Dr. Luis Concha
Instituto de Neurobiología
Laboratorio C-13
UNAM, Campus Juriquilla
Boulervard Juriquilla 3001
Juriquilla, Querétaro.
C.P. 76230
México
Tel (442) 2 38 10 54
Fax (442) 2 38 10 46
http://personal.inb.unam.mx/lconcha/


Hui Zhang

unread,
Jan 30, 2014, 10:42:14 AM1/30/14
to no...@googlegroups.com
Thanks a lot for confirming that.

Regarding Linux, I process NODDI data primarily on our local Linux cluster, which is powered by CentOS.  So, I suspect it is just a specific issue with the Ubuntu version that you are using.  I suggest that you take a look at Mathworks' supported OS list for guidance.

Gary

Sjoerd Vos

unread,
May 30, 2014, 9:46:47 AM5/30/14
to no...@googlegroups.com
Hi Gary,

I'm having the same problem as Luis, unfortunately. I've checked Matlab's system OS support (https://www.mathworks.co.uk/support/sysreq/roadmap.html), and Luis' Linux version should be fully supported and operational with his Matlab. Very strange it doesn't work. My Linux isn't stated, so not sure about mine.

Since it's a pure Matlab problem I know it's a lot too ask, but if you happen to have any news on this that's be greatly appreciated.

Thanks,
Sjoerd

Hui Zhang

unread,
May 30, 2014, 1:18:48 PM5/30/14
to no...@googlegroups.com
Hi Sjoerd,

It is good that you were able to reproduce the problem.  Since you are local, we can look at it together.  Hopefully we can figure out a fix.

Gary



--
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 noddi+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

peter...@brown.edu

unread,
May 3, 2016, 6:45:51 AM5/3/16
to NODDI
Hello all,

I just encountered the same issue with the example dataset (voxel values are 0.25, 0.5, etc...). I am also using linux (LMDE 2).

Did you ever find a solution? Or should I just process datasets on windows?

Thank you,
Pete
Reply all
Reply to author
Forward
0 new messages