Hi,
You are using the printcost.sch rather than the measurecost1.sch
that I sent out recently. These work differently. The printcost.sch
does a full registration and then prints the final cost values.
The measurecost1.sch does not do a registration - it just evaluates
the cost at the current transformation (specified by the -init).
So you are actually getting different transformations in these
two cases by using printcost.sch - is that what you want?
The 12 values after the cost value represent the parameters
of the transformation (3 rotation, 3 translation, 3 scale & 3 skew).
You are using different cost functions, so you get different results
accordingly. See the original FLIRT paper (Jenkinson and
Smith, Medical Image Analysis, 5(2), 143-156, 2001) for the
definitions of the cost functions. Also note that they are
sometimes negative versions of "similarity" functions. For
instance, high correlation represents a good match and
hence a _low_ cost, so the corresponding "cost" function is
1-correlation.
Hope this helps.
All the best,
Mark
On 8 Dec 2008, at 21:16, siamak wrote:
> Hi Mark,
>
> Thanks for your reply. I have been confused with these results:
>
> flirt -in t1_icbm_normal_1mm_pn0_rf0_ns.nii -ref t1_icbm_norm
> al_1mm_pn0_rf0_ns.nii.gz -cost leastsq -searchcost leastsq -schedule
> printcost.sch
> 12.2295 -0.000059 0.000117 0.000000 -0.005570 -0.019585 -0.001332
> 1.000052 0.999776 0 .999986 0.000000 0.000000 -0.000000
> -------------------------------------------------------------------------
>
> flirt -in t1_icbm_normal_1mm_pn0_rf0_ns.nii -ref
> t1_icbm_normal_1mm_pn0_rf0_ns.nii.gz -schedule printcost.sch
> -0.000650764 -0.000190 0.000237 -0.000000 -0.010421 0.008329 -0.003826
> 1.000553 0.999961 1.000011 0.000000 0.000136 -0.000391
>
>
> As you see, both images are the same. The first cost function is the
> least
> square difference, the second one is the correlation ratio. What do
> these
> results mean? least square result of the first command should be
> near zero
> and correlation of the second command should be near one. Is there any
> document about the meaning of these cost functions?
>
> Siamak
>
|