[Insight-users] Rigid + Scale transform

Hans J. Johnson hans-johnson at uiowa.edu
Wed Aug 1 21:31:17 EDT 2007


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



More information about the Insight-users mailing list