Hi Mark,
I have tested the approach you suggested. However,
:)
I am puzzeled with numbers I get. I want to get the value of normalized mutual
information so I use "-cost normmi" option. I am not setting dof and bins since
it doesn't seem to affect the result.
1. If I set both input and reference images to the same highres volume and
"-init unity.mat" (1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1), I would assume that the
cost function should be maximal, i.e. =2 and, I guess, in FSL =-2. However for
different input/reference image I am getting different numbers:
-1.786447 0.0 -0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 0.0 0.0 0.0
2. I would also assume that if I run flirt on the same input images in
registration mode and with "-schedule showcost", the cost function value should
be same. Provided the number after the iteration step XXX is a cost function value,
XXX : -1.1338 :: 0.852393 0.00369968 0.0853298 62.6364 69.734 -21.1884
^^^^^^
the very last iteration and "-schedule showcost" don't give me the same numbers.
Could you please shed some light on what am I missing? Thanks a lot.
Regards,
Martin
Quoting Mark Jenkinson <[log in to unmask]>:
> Hi Martin,
>
> I hadn't forgotten your email, I just needed time to make a schedule
> file to do what you wanted.
>
> There are three things you need in the schedule file:
> measurecost (which you had) , printparams and setscale commands
>
> Flirt (at present) requires all the scales to be stepped through
> sequentially in order to generate the appropriate reference and input
> images internally. Hence you need setscale for 8 then 4 then 2 then
> 1.
>
> I'm attaching my schedule file (showcost) which printed the correct
> cost
> function measurement for me. You need to use it in registration
> mode, rather than applyxfm mode. For example:
> flirt -in epi -ref highres -schedule showcost -init epi2out.mat
> -omat
> /dev/null
> where epi2out.mat is the previously generated registration matrix,
> and -omat /dev/null is just used to junk the printing out of the final
> matrix (which of course is just the same as the -init in this case).
>
> Let me know if you have any trouble with this.
> All the best,
> Mark
|