I would suggest displaying the second image. If P(2).mat is all NaN, then
this would partially explain the problem and is likely to show itself when
you try to display the image.
I'm a bit confused by the line numbers reported by the error message. In
MATLAB, if you type the following:
dbtype spm_uw_estimate.m
Do you get the following lines:
: :
370 % Check that residual error still decreases.
: :
483 elseif strcmp(lower(exp_round),'last');
484 mT = inv(P(end).mat) * P(1).mat;
485 else
: :
766 function [m_ref,D] = get_refD(ds,def,ddefa,P,xyz,msk)
: :
If not, then please tell me what is written on lines 370, 484 and 766.
Best regards,
-John
On Friday 16 January 2009 17:20, Cecile Bordier wrote:
> Hi,
>
> again about the troubles I have using function spm_realign&unwarp.
> I have done more tests trying to understand the following error
>
> ------------
> Warning: Matrix is singular, close to singular or badly scaled.
> Results may be inaccurate. RCOND = NaN.
>
> > In spm_uw_estimate>make_q at 484
>
> In spm_uw_estimate>make_ref at 766
> In spm_uw_estimate at 370
> In spm_run_realignunwarp at 89
> In matlabbatch/private/cfg_run_cm at 29
> In cfg_util>local_runcj at 1345
> In cfg_util at 686
> In cfg_ui>MenuFileRun_Callback at 1129
> In gui_mainfcn at 96
> In cfg_ui at 53
> procedure terminated abnormally:
> Error using ==> schur
> Input to SCHUR must not contain NaN or Inf.Failed 'Realign & Unwarp'
> Reference to non-existent field 'beta'.
> In file "/usr/local/etc/Matlab/toolbox/spm8b/spm_uw_apply.m" (v1358),
> function "spm_uw_apply" at line 226.
> In file
> "/usr/local/etc/Matlab/toolbox/spm8b/config/spm_run_realignunwarp.m"
> (v2337), function "spm_run_realignunwarp" at line 106.
>
> The following modules did not run:
> Failed: Realign & Unwarp
>
> --------------------
>
> In fact, my voxel size is ok and I can realign (without unwarping) all the
> data set.
> Using the FieldMap toolbox, the computation of the fieldmap and its
> application for unwarping an EPI image are OK
>
> Using Realign&Unwarp function, if only one image is used, the computation
> is correct with the following warning message :
>
> Warning: Matrix is singular, close to singular or badly scaled.
> Results may be inaccurate. RCOND = NaN.
> In spm_uw_estimate at 395
> In spm_run_realignunwarp at 89
> In matlabbatch/private/cfg_run_cm at 29
> In cfg_util>local_runcj at 1345
> In cfg_util at 686
> In cfg_ui>MenuFileRun_Callback at 1129
> In gui_mainfcn at 96
> In cfg_ui at 53
>
>
> Then If I use 2 images the error in
>
> spm_uw_estimate is raised
>
>
> It seems to come from the loop commented by
> % Here starts iterative search for deformation fields.
>
> In this loop the variable P, is set to 2 structures (I guess because I
> have 2 images) of temporary file.
> The mat field of the second structure P(2) is a 4*4 matrix of NaN leading
> to the error.
>
> Any suggestion to solve my problem ?
>
> Cécile
|