[Insight-users] Rigid + Scale transform

Vicente Grau vicente at robots.ox.ac.uk
Thu Oct 11 11:52:21 EDT 2007


Dear Hans,

sorry I didn't answer this message when you posted it - I haven't
followed the list much lately. Anyway, in case this is still useful, I
did implement a rigid+scale transform at the time, and I will be happy
to send you the files if they are of any use to you. In the
application I was working on at the time (registration of 3D cardiac
ultrasound) this transform didn't seem to provide enough flexibility
and I couldn't use it in the end.

Vicente

On 02/08/2007, Hans J. Johnson <hans-johnson at uiowa.edu> wrote:
> Vicente,
>
> We have started down exactly the same path.  Did you have any luck with your
> efforts?  Were you able to successfully remove skew?
>
> Thanks,
> Hans
>
> --
> Hans J. Johnson, Ph.D.
> Hans-johnson at uiowa.edu
>
> 278 GH
> The University of Iowa
> Iowa City, IA 52241
> (319) 353 8587
>
>
>       Kitware Inc - Leaders in Visualization Technology             Search
> [Insight-users] Rigid + Scale transform
> Vicente Grau vicente at robots.ox.ac.uk
> Tue Sep 20 14:04:59 EDT 2005
>
>     * Previous message: [Insight-users] Rigid + Scale transform
>     * Next message: [Insight-users] Problem with BilateralImageFilter
>     * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>
> Luis, thanks very much for the information, and thanks to Daniel for the
> useful extension. I have tried it and it works fine for me.
> Now I have a question about the way the order of the rotation and
> scaling in the ScaleSkewVersor3DTransform. The way the transformation
> matrix is calculated in the code is:
>
> const TScalarType vx = versor.GetX();
>   const TScalarType vy = versor.GetY();
>   const TScalarType vz = versor.GetZ();
>   const TScalarType vw = versor.GetW();
>
>   const TScalarType xx = vx * vx;
>   const TScalarType yy = vy * vy;
>   const TScalarType zz = vz * vz;
>   const TScalarType xy = vx * vy;
>   const TScalarType xz = vx * vz;
>   const TScalarType xw = vx * vw;
>   const TScalarType yz = vy * vz;
>   const TScalarType yw = vy * vw;
>   const TScalarType zw = vz * vw;
>
>   MatrixType newMatrix;
>   newMatrix[0][0] = m_Scale[0] - 2.0 * ( yy + zz );
>   newMatrix[1][1] = m_Scale[1] - 2.0 * ( xx + zz );
>   newMatrix[2][2] = m_Scale[2] - 2.0 * ( xx + yy );
>   newMatrix[0][1] = 2.0 * ( xy - zw );
>   newMatrix[0][2] = 2.0 * ( xz + yw );
>   newMatrix[1][0] = 2.0 * ( xy + zw );
>   newMatrix[1][2] = 2.0 * ( yz - xw );
>   newMatrix[2][0] = 2.0 * ( xz - yw );
>   newMatrix[2][1] = 2.0 * ( yz + xw );
>
> where I have removed the skew part. I can see this is the expression for
> transforming a quaternion into a rotation matrix, with the addition of
> the scale parameters but I don't know how the composition of the two is
> done here. Actually what I would like to know is if this is equivalent
> to scaling + rotation, or rotation + scaling. But if you could point me
> to a document where these expressions are explained in detail, it would
> be really helpful. Thanks!
>
> Vicente
>
>
> Luis Ibanez wrote:
>
> >
> > Hi Vicente,
> >
> > Daniel Blezek modified the VersorRigidTransformOptimizer in order to
> > make possible to use it for Transforms different from the VersorRigid3D
> > Transform.
> >
> > As long as you arrange your extra transforms parameters to be at the
> > end of the parameters array when you call GetParameters() and
> > SetParameters(), then this optimizers should work for your purpose.
> >
> >
> >
> > Daniel: It took me a while to understand the reason why you extended
> >         this optimizer. My apologies for being slow.
> >
> >
> >
> >   Regards,
> >
> >
> >      Luis
> >
> >
> >
> > ----------------------
> > Vicente Grau wrote:
> >
> >> I am trying to do a 3D registration combining a rigid transform with
> >> independent scaling in the three axes. The closest I've found in the
> >> library is the itkScaleSkewVersor3DTransform, so my idea was to use
> >> this as a base and remove the skew part, either by writing a new
> >> transform class or by introducing a factor with SetScale() that
> >> effectively eliminates this effect. I also thought about modifying
> >> QuaternionRigidTransform to allow for non-unit quaternions. What do
> >> you think is the best way to do this?
> >> Furthermore, I guess I will need a special optimizer due to the
> >> parameters forming a non-vector space. Is there an optimizer that
> >> works with the ScaleSkewVersor3DTransform? Or, if not, how should I
> >> modify the existing optimizers (VersorRigid3DTransformOptimizer, I
> >> guess)?
> >> Any help will be much appreciated!
> >>
> >> Vicente Grau
> >> _______________________________________________
> >> Insight-users mailing list
> >> Insight-users at itk.org
> >> http://www.itk.org/mailman/listinfo/insight-users
> >>
> >>
>
>     * Previous message: [Insight-users] Rigid + Scale transform
>     * Next message: [Insight-users] Problem with BilateralImageFilter
>     * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>
> More information about the Insight-users mailing list
>
>


-- 
Vicente Grau
Oxford e-Research Centre
Department of Engineering Science
University of Oxford
7 Keble Road
OX1 3QG
+44 (0) 1865 610684


More information about the Insight-users mailing list