Thanks for the help. After your mails, I configured the system again
according to tolerance/stopping criteria,
now it is working properly.
Thanks a lot.
best wishes
ulas
Ged Ridgway wrote:
> ulas bagci wrote:
>> Hi everybody,
>> in coregistration code( spm_coreg and spm_powell)
>> do you know that what is the meaning of
>> xi = diag(sc*20); where sc is defined as follows:
>> sc=[0.02 0.02 0.02 0.001 0.001 0.001 0.01 0.01 0.01 0.001 0.001 0.001]';
>
> sc gets passed to spm_powell as tolsc, the tolerance/stopping
> criteria, as described in the help for spm_powell.
>
> The 12 numbers are the affine parameters, as described in spm_matrix.
> The motivation for setting these is that e.g. translation in mm
> requires looser precision as a number (0.02mm) than rotation in
> radians (0.001). Phrasing that differently, you would notice an error
> of 0.1 radian in rotation (much) more than you would 0.1mm of
> translation.
>
> Note that in spm_coreg, only the first 6 rigid Degrees of Freedom of
> the 12 affine DF are used:
> sc = sc(1:length(flags.params));
>
>> in powell optimization xi should show the direction of search
>> [...] in spm code, it is taken multiple of tolerance with 20.
>
> Indeed, it's the initial search direction *and size*. 20 times the
> tolerance was probably guessed to be a reasonable search step size. It
> means that e.g. from the starting position, the code will begin by
> considering a translation of 20*0.02=0.4mm, etc. which sounds fair
> enough.
>
>> [...] When I enter manually, identity in replace to xi,
>> co-registration result is not promising.
>
> I'm guessing that an initial step of 1 radian is just too large for
> the bracketing in the line minimisation to work. You'd need to look
> into the search and bracketing subfunctions in spm_powell (and
> Numerical Recipes book?) to be more certain of what's going wrong.
>
> Hope that helps,
> Ged.
> Hi Ulas,
> I'm not sure that sc is used as an initialisation. In spm_powell it
> is the stopping criteria where optimisation stops at
> sqrt(sum((p-p_prev)./tolsc.^2, so obviously if it's 0.05 for
> everything that's alot more tolerant.
> Looking at the function min1d within spm_powell, pi (or xi) is used to
> calculate the tolerance, tol =
> 1/sqrt(sum((pi(:)./tolsc(:)).^2));, where 2*tol is the stopping
> criteria in the line search.
>
> Tell me if this makes sense, it seems to be what is shown in the
> code. One way of testing this is by shifting your image by several mm
> in one direction before using spm_coreg and comparing the results with
> different xi.
>
> Best wishes,
> Geoffrey
This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
|