Hi,
That's odd. The exact same schedule file behaves correctly with some test data of mine.
Can you send me (off list) the image files you are working with so I can try exactly the same thing as you?
All the best,
Mark
> On 28 Jul 2017, at 22:15, Jack Grinband <[log in to unmask]> wrote:
>
> Hi Mark,
> Getting back to this 2D registration problem...
>
>> Can you try running fslcpgeom on the input image, to copy the info from the reference image, and then see if the results are different?
>
> Same result.
>
>> It shouldn't revert to the default schedule, but if you want to be sure, just turn on the verbose output with -v and you'll see exactly what schedule lines it is using.
>
> So here are my commands:
>
> fslcpgeop ref in
> flirt -in in -ref ref -out out -cost mutualinfo -2D -schedule sch2D_2dof_Xtranslation_Xscale -refweight ref -v
>
> It is set to use only X translation and X scale (i.e. 0 0 0 1 0 0 0 0 0 0 0 0 and 0 0 0 0 0 0 1 0 0 0 0 0), but the final matrix (see verbose output below) has values that indicate rotation (i.e. -0.153358 and 0.156434) in addition to translation and scale. Any idea why rotation is a free parameter here?
> thanks!
>
> jack
>
>
> Init Matrix =
> 1.000000 0.000000 0.000000 0.000000
> 0.000000 1.000000 0.000000 0.000000
> 0.000000 0.000000 1.000000 0.000000
> 0.000000 0.000000 0.000000 1.000000
>
>>> # 8mm scale
>>> setscale 8
>>> setoption smoothing 8
>>> setoption paramsubset 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
>>> clear U
>>> clear UA
>>> setrow UA 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
>>> optimise 12 UA:1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 4
>>>
>>> # 4mm scale
>>> setscale 4
>>> setoption smoothing 4
>>> setoption paramsubset 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
>>> clear UB
>>> clear UL
>>> clear UM
>>> # remeasure costs at this scale
>>> clear U
>>> measurecost 12 UA 0 0 0 0 0 0 rel
>>> sort U
>>> copy U UL
>>> # optimise best 3 candidates
>>> clear U
>>> optimise 12 UL:1-3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 4
>>> # also try the identity transform as a starting point at this resolution
>>> clear UQ
>>> setrow UQ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
>>> optimise 7 UQ 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 4
>>> copy U UM
>>> # select best 4 optimised solutions and try perturbations of these
>>> clear U
>>> copy UM:1-4 U
>>> optimise 12 UM:1-4 0.0 0.0 1.0 0.0 0.0 0.0 0.0 rel 4
>>> optimise 12 UM:1-4 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 rel 4
>>> sort U
>>> clear UB
>>> copy U UB
>>>
>>> # 2mm scale
>>> setscale 2
>>> setoption smoothing 2
>>> setoption paramsubset 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
>>> clear U
>>> clear UC
>>> clear UD
>>> clear UE
>>> clear UF
>>> # remeasure costs at this scale
>>> measurecost 12 UB 0 0 0 0 0 0 rel
>>> sort U
>>> copy U UC
>>> clear U
>>> optimise 12 UC:1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 4
>>> copy U UD
>>> setoption boundguess 1
>>> if MAXDOF > 7
>>> clear U
>>> if MAXDOF > 7
>>> optimise 9 UD:1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 1
>>> copy U UE
>>> if MAXDOF > 9
>>> clear U
>>> if MAXDOF > 9
>>> optimise 12 UE:1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 2
>>> sort U
>>> copy U UF
>>>
>>> # 1mm scale
>>> setscale 1
>>> setoption smoothing 1
>>> setoption boundguess 1
>>> setoption paramsubset 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
>>> clear U
>>> # also try the identity transform as a starting point at this resolution
>>> setrow UF 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
>>> optimise 12 UF:1-2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 1
>>> sort U
>>>
>
> Final result:
> 0.968262 0.156434 0.000000 -12.192340
> -0.153358 0.987688 0.000000 20.952641
> 0.000000 0.000000 1.000000 0.000000
> 0.000000 0.000000 0.000000 1.000000
|