Dear FSL list,
I'm still struggling with the cost function in flirt. Could you help me?
Using the following command line with flirt version 5.5 in fsl 4.1.9 to get the cost measure:
flirt -in toto.nii.gz -ref titi.nii.gz -schedule $FSLDIR/etc/flirtsch/measurecost1.sch -init tutu.mat -refweight tata.nii.gz
I get:
0.136744 0.000000 -0.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 1.000000 0.000000 0.000000 0.000000
Final result:
0.999592 0.002647 0.028430 -42.797900
0.001663 0.988606 -0.150519 -34.175900
-0.028504 0.150505 0.988198 -20.129200
0.000000 0.000000 0.000000 1.000000
Using the same command line with flirt version 6 in fsl 5.0.8, I get:
0.224454 0.000000 -0.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 1.000000 0.000000 0.000000 0.000000
Final result:
0.999592 0.002647 0.028430 -42.797900
0.001663 0.988606 -0.150519 -34.175900
-0.028504 0.150505 0.988198 -20.129200
0.000000 0.000000 0.000000 1.000000
I used the cost measure to compare different registrations. The problem is not that these numbers are different but that based on the old or the new flirt version I have opposite results considering the best match. Could you tell me why and how to solve this issue.
Thanks,
Hervé Lemaître
PS: with the -v option
flirt version 5.5
WARNING: Both reference and input images have an sform matrix set
The output image will use the sform from the reference image
The output image will use the transformed sform from the input image
Init Matrix =
0.999592 0.002647 0.028430 -42.797900
0.001663 0.988606 -0.150519 -34.175900
-0.028504 0.150505 0.988198 -20.129200
0.000000 0.000000 0.000000 1.000000
>> # 1mm scale
>> setscale 1
>> setoption smoothing 1
>> setoption boundguess 1
>> clear U
>> setrow UA 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
>> measurecost 7 UA 0 0 0 0 0 0 abs
>> printparams U
0.136744 0.000000 -0.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 1.000000 0.000000 0.000000 0.000000
>>
>>
Final result:
0.999592 0.002647 0.028430 -42.797900
0.001663 0.988606 -0.150519 -34.175900
-0.028504 0.150505 0.988198 -20.129200
0.000000 0.000000 0.000000 1.000000
flirt version 6:
WARNING: Both reference and input images have an sform matrix set
The output image will use the sform from the reference image
The output image will use the transformed sform from the input image
Init Matrix =
0.999592 0.002647 0.028430 -42.797900
0.001663 0.988606 -0.150519 -34.175900
-0.028504 0.150505 0.988198 -20.129200
0.000000 0.000000 0.000000 1.000000
>> # 1mm scale
>> setscale 1
>> setoption smoothing 1
>> setoption boundguess 1
>> clear U
>> setrow UA 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
>> measurecost 7 UA 0 0 0 0 0 0 abs
>> printparams U
0.224454 0.000000 -0.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 1.000000 0.000000 0.000000 0.000000
>>
>>
Final result:
0.999592 0.002647 0.028430 -42.797900
0.001663 0.988606 -0.150519 -34.175900
-0.028504 0.150505 0.988198 -20.129200
0.000000 0.000000 0.000000 1.000000
|