This bug (and a number of others) has been fixed in SPM5, which is essentially
SPM2 with a few new features, a load of bug fixes and a manual. I think you
should be able to replace spm_powell.m with spm_powell.m from the SPM5
distribution (attached).
Best regards,
-John
On Thursday 28 August 2008 01:11, Cyrus Raji wrote:
> Hi, All
>
> I am trying to co-register a perfusion MRI image to the standard MNI
> template in SPM2 and I get the following error:
>
>
> ??? Attempt to reference field of non-structure array.
>
> Error in ==> spm_powell>linmineval at 76
> pt = lnm.p+p.*lnm.pi;
>
> Error in ==> spm_powell>brents at 228
> u.f = linmineval(u.p);
>
> Error in ==> spm_powell>linmin at 60
> [f,pmin] = brents(t,tol);
>
> Error in ==> spm_powell at 31
> [p,junk,f] = linmin(p,xi(:,i),func,f,tolsc,varargin{:});
>
> Error in ==> spm_coreg at 132
> [x,fval] = spm_powell(x(:),
> xi,sc,mfilename,VG,VF,samp,flags.cost_fun,flags.fwhm);
>
> Error in ==> spm_coreg_ui>run_ui at 282
> x = spm_coreg(mireg(i).VG, mireg(i).VF,flags.estimate);
>
> Error in ==> spm_coreg_ui at 220
> run_ui(defaults.coreg);
>
> ??? Error using ==> spm_coreg_ui;
> Attempt to reference field of non-structure array.
>
> ??? Error using ==> drawnow
> Error while evaluating uicontrol Callback
>
> ??? Attempt to reference field of non-structure array.
>
> Error in ==> spm_powell>linmineval at 76
> pt = lnm.p+p.*lnm.pi;
>
> Error in ==> spm_powell>brents at 228
> u.f = linmineval(u.p);
>
> Error in ==> spm_powell>linmin at 60
> [f,pmin] = brents(t,tol);
>
> Error in ==> spm_powell at 31
> [p,junk,f] = linmin(p,xi(:,i),func,f,tolsc,varargin{:});
>
> Error in ==> spm_coreg at 132
> [x,fval] = spm_powell(x(:),
> xi,sc,mfilename,VG,VF,samp,flags.cost_fun,flags.fwhm);
>
> Error in ==> spm_coreg_ui>run_ui at 282
> x = spm_coreg(mireg(i).VG, mireg(i).VF,flags.estimate);
>
> Error in ==> spm_coreg_ui at 220
> run_ui(defaults.coreg);
>
> ??? Error using ==> spm_coreg_ui;
> Attempt to reference field of non-structure array.
>
> ??? Error while evaluating uicontrol Callback
>
> This is the only image in my group that the co-registration isn't working
> on. I used the coregistration only option. Any thoughts about where I'm
> going wrong here? Your input is much appreciated!
>
> Thank you,
>
> Cyrus
|