Hi,
I'm afraid that you cannot cleanly separate the translations
from the other parameters, as rotation, scales and skews
are all applied with respect to some origin point. As the
origin of the FLIRT parameters is arbitrarily at the
centre of gravity of the image, it means that in order to have
the centre somewhere else in the image you need to have
non-zero translation components. Hence, as you don't know
where the centre should be, you need to allow this to be
estimated as well. So if you want xy shear that is not about
the centre of gravity then you need to have an x-shift too.
Even if you don't allow x-shifts, and force the centre to be
at the centre of gravity, then the values will still be non-zero
in general as the coordinate origin is different, it is in the
lower left corner. This is the difference between the values
stored in the matrix files (origin at the corner) and the
parameter values (origin at the centre of gravity).
In short I recommend that you include x-shift, as this should
then do what you want.
All the best,
Mark
On 22 Nov 2010, at 13:53, Silvia De Santis wrote:
> Hi,
> I created a flirt schedule to perform eddy current correction on a phantom. Thus, I need to correct for y shift but NOT for x (and z) shift. Though, even if I select 3 DoF:
> setoption paramsubset 3 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
> (corresponding to yshift, xyshear and yscale)
> in the affine matrix xshift is still different from zero.
>
> Does anyone knows how to disentangle x and y shift?
>
> Many thanks,
> Silvia
>
> PS
> the schedule is the following:
> # 8mm scale
> setscale 8
> setoption smoothing 8
> setoption paramsubset 3 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 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 3 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 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
> copy U UM
> # select best 4 optimised solutions and try perturbations of these
> clear U
> copy UM:1-4 U
> optimise 12 UM:1-3 0.0 0.0 0.0 0.0 0.05 0.0 0.0 rel 4
> optimise 12 UM:1-3 0.0 0.0 0.0 0.0 -0.05 0.0 0.0 rel 4
> optimise 12 UM:1-3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.05 0.0 abs 4
> optimise 12 UM:1-3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.05 0.0 abs 4
> optimise 12 UM:1-3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.05 0.0 0.0 abs 4
> optimise 12 UM:1-3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.05 0.0 0.0 abs 4
> sort U
> clear UB
> copy U UB
>
> # 2mm scale
> setscale 2
> setoption smoothing 2
> setoption paramsubset 3 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 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 3 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
> clear U
> optimise 12 UF:1-2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 1
> sort U
>
|