[Insight-users] rotating with itkVersorTransform

Luis Ibanez luis.ibanez at kitware.com
Fri Feb 26 16:19:10 EST 2010


Hi J.

This computation is implemented in the class:

    itk::CenteredVersorTransformInitializer


That you will find in:

  Insight/Code/Common/
        itkCenteredVersorTransformInitializer.h
        itkCenteredVersorTransformInitializer.txx


This class computes the first order moments of
two input images, and then from those moments,
it computes the Versor that will align their main
axes.

It also computes the Translation that will superimpose
the center of mass (moment zero) of both images.


    Regards,


          Luis


-----------------------------------------------------------------------------
On Fri, Feb 26, 2010 at 8:11 AM, J. Pura <puraj at mail.nih.gov> wrote:
>
> Hello,
>
> I am trying to rotate a binary 3D blob relative to the principal axis of
> another blob. The principal axes have been computed and have the following
> unit vectors Blob1: <0.7171, -0.6963, -0.0296> and Blob2: <0.8658, -0.4995,
> -0.0316>. Blob 1 is rotated. I used the Versor Transform, and in order to
> initialize it, I found the angle between the two vectors = 0.2473 radians,
> as well as the rotation axis, by finding the unit normal to the two vectors.
> Then I followed the equation in a previous post by Luis Ibanez, which
> suggested setting the parameters to Ax * sin ( T/2), etc... where Ax, Ay, Az
> = the x,y,z components of the unit normal, and T = 0.2473 rad. I plugged
> these values in, but the resulting image seems to have only been rotated
> counter-clockwise "about the z-axis" (I understand that it's not a purely
> z-rotation, but the final image seems to have been rotated slice by slice on
> the xy plane). Is there anything wrong in my setup of the parameters? Also I
> made sure to set the center of rotation to the centroid of Blob1. Any help
> on this issue is much appreciated.
>
> Best,
>
> J. Pura
> --
> View this message in context: http://n2.nabble.com/rotating-with-itkVersorTransform-tp4638986p4638986.html
> Sent from the ITK Insight Users mailing list archive at Nabble.com.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list