[Insight-users] Doing Shearing by using Rotation +
non-homogeneous Scaling
Dennis Wenzel
wenzeld at att.net
Thu Aug 11 22:06:07 EDT 2005
Hello Luis,
Perhaps I should have clarified my statement. Yes, you have shown that a
shearing transform can be decomposed into "a specific" sequence of rotations
and non-uniform scales. However, for practical purposes, I am interested in
decomposing a general affine transform into a predetermined sequence of
rotations, scales, and translations. So, that was the basis of my
statement, i.e., that you could not decompose a general affine transform,
e.g., one that contains skew, into a specific sequence of rotations, scales,
and translations.
In practice, I am interested in registration which handles rigid body
alignment (rotation and translation) and scale which adjusts for
miscalibrated sampling in a scanner such as an MRI.
Dennis
----- Original Message -----
From: "Luis Ibanez" <luis.ibanez at kitware.com>
To: "Dennis Wenzel" <wenzeld at worldnet.att.net>
Cc: "Insight Users" <insight-users at itk.org>
Sent: Thursday, August 11, 2005 5:50 PM
Subject: Re: [Insight-users] Doing Shearing by using Rotation +
non-homogeneous Scaling
>
> Hi Dennis,
>
>
> Here is how you can decompose a Shearing Transform into
> a combination of rotations and non-homogeneous scaling
> operations:
>
>
> 1) Apply a 45 degrees rotation transform
>
> | r -r |
> | r r |
>
> where r = sqrt(2)/2
>
>
> 2) Apply a non-homogeneous scaling by a factor k
>
> | 1 0 |
> | 0 k |
>
>
> 3) Apply a rotation that will align the original Y
> axis with the current one
>
>
> | k 1 |
> | | . 1/sqrt( 1 + k^2 )
> | -1 k |
>
>
> 4) Correct for the differenct between the horizontal
> and vertical expansions, using another
> non-homogeneouos scaling:
>
>
> | 1/(k.sqrt(2)) 0 |
> | 0 1/sqrt(2.(1+k^2)) |
>
>
>
> This sequence of operation will be equivalent to
> the shearing that you proposed:
>
>
> | 1 0 |
> | S 1 |
>
>
> as long as we choose k to satisfy the relationship
>
>
> S = ( k^1 - 1 ) / sqrt( k^2+1)
>
>
>
>
>
> A more elegant descripcion could be done using elements
> of transformational geometry.. but unfortunately is
> harder to represent it in an email.
>
>
> For the intuitive support of the opreration you may
> consider the analogy of taking a matrix and computing
> its UL decomposition, which after all, is like applying
> two shearing operations one after another. You may
> also want to consider the analogy of QR matrix
> decomposition.
>
>
> ...The transformational geometry equivalent is still the
> most elegant though...
>
>
>
> Regards,
>
>
> Luis
>
>
> -------------------
> Dennis Wenzel wrote:
>> Hello Luis,
>>
>>> I will be interested in seeing your counter examples that
>>> indicate that non-homogeneous scaling combined with
>>> rotation is not equivalent to shearing.
>>
>>
>> Ok, given the following 4x4 matrix with shear_xy
>>
>> | 1 0 0 0 |
>> | s_xy 1 0 0 |
>> | 0 0 1 0 |
>> | 0 0 0 1 |
>>
>> How do you decompose this into rotations and scale only?
>>
>>
>>>
>>> About the ScaleSkewVersor transform... if you dont want
>>> skew to happen, then simply set the skew parameters to
>>> zero...
>>
>>
>> That is fine if I want to *set* the skew parameters, but the optimizer(s)
>> know nothing about which parameters *not* to try in a particular
>> transform, i.e. to skip the skew parameters. My whole concern is about
>> the transform determined by the optimizer!
>>
>>>
>>>
>>> Otherwise, plan B, is for you to take the source code
>>> of the Similarity3DTransform or the ScaleSkewVersorTransform
>>> and modify it to suit your needs. If you do so, we will
>>> be happy to include your new transform into the toolkit.
>>> Writing a transform is not too difficult. You mainly have
>>> to work on the "TransformPoint" method and the "GetJacobian"
>>> method.
>>
>>
>> I had begun to decide that is something I am probably going to have to
>> do. I will start to look at Similarity3DTransform (downloaded from CVS)
>> to see what is involved.
>>
>>>
>>> Please let us know if you need any assistance in writing
>>> these new Transform class.
>>
>>
>> Thanks. I appreciate that.
>>
>> Dennis
>>
>>
>
>
More information about the Insight-users
mailing list