[Insight-users] registration results

tony hakki tony2007vtk at yahoo.com
Fri Mar 23 14:31:10 EST 2007


Dear Luis; first of all I would like to thank your quick reply, I just want to verify something, you know I have tried to implement poinst set to image registration. I would like to use final registration parameters to the my point set,which was selected  Fixedpoint set at the beginning of the registration.  So, Instead of  to apply final registration results to my moving image I  would like to apply the  "OPPOSITE" final registration parameters  to my point set I can save time and it can be implemented quickler.  Am I right ?
Thank you
Tony


----- Original Message ----
From: Luis Ibanez <luis.ibanez at kitware.com>
To: tony hakki <tony2007vtk at yahoo.com>
Cc: insight-users at itk.org
Sent: Friday, March 23, 2007 8:05:38 PM
Subject: Re: [Insight-users] registration results


Hi Tony,

The components of a Versor *ARE NOT* angles.

A versor *IS NOT* a triplet of Euler angles.


Instead, it is equivalent to a Unit Quaternion.


Please refer to the ITK Software Guide for
a description of the concept of Versors.

   http://www.itk.org/ItkSoftwareGuide.pdf


If you have a rotation of T degrees around
an axis defined by a unit vertor x,y,z,

Then the components of the Versor will be
equal to:


        Vx = x * sin( T / 2 )
        Vy = y * sin( T / 2 )
        Vz = z * sin( T / 2 )


You may find useful to read also the Tutorials
on Quaternions:


http://www.itk.org/CourseWare/Training/QuaternionsI.pdf
http://www.itk.org/CourseWare/Training/QuaternionsII.pdf


The reason why your image "seems" to translate is probably
that you have not set correctly the center of rotation
of the transformation.  A rotation performed around a
center that is far from the field of view of the image,
will 'look' like a translation.

You will find this effect explained in detail in the
ITK Software Guide:

      http://www.itk.org/ItkSoftwareGuide.pdf


in section "6.9.4" "Resample Image Filter",
in pdf-pages 254-275.

Pay particular attention to figuires:

           6.51 and 6.52



    Regards,


       Luis


-----------------
tony hakki wrote:
> hello all;
> I have tried to implement point set to image registration;I would like 
> to manipulate the results like that:
> Supposing that these are the registation results;
> 
> const double versorX = finalParameters[0];
> 
> const double versorY = finalParameters[1];
> 
> const double versorZ = finalParameters[2];
> 
> const double finalTranslationX = finalParameters[3];
> 
> const double finalTranslationY = finalParameters[4];
> 
> const double finalTranslationZ = finalParameters[5];
> 
>  
> 
>  
> 
> I would like to manipulate them like that:
> 
>  
> 
> finalParameters[0]=2*vtkMath::Pi()-versorX;
> 
> finalParameters[1]=2*vtkMath::Pi()-versorY;
> 
> finalParameters[2]= 2*vtkMath::Pi()-versorZ;
> 
> *finalParameters[3]=finalTranslationX *(-1);*
> 
> *finalParameters[4]=finalTranslationY *(-1);*
> 
> *finalParameters[5]=finalTranslationZ *(-1);*
> 
> ** 
> 
> ** 
> 
> *When I manipulate *finalParameters[0], 
> finalParameters[1],finalParameters[2]  , It doesn't give any error,  but 
> these parameters are for rotation parameters  where as my image 
> translate when I change these parameters.*Why it doesn't rotate but 
> translates through the x,y,z coordinate system When I manupulate them.*
> 
> On the other hand I couldn't manupulate the rest of the parameters 
> finalParameters[3],,finalParameters[4],,finalParameters[5], ,it gives 
> break or continue error when I run my program. And these are the 
> translation parameters,aren't they? *Why I couldn't manupulate these 
> parameters as I showed above? *
> 
>  
> 
> here is the my translation code:
> 
> typedef itk::TranslationTransform<float,3> NTransformType;
> 
> NTransformType::Pointer finalTransform = NTransformType::New();
> 
> finalTransform->SetParameters( finalParameters );  //this is 
> registration result
> 
> typedef FMeshType::PointsContainer PointsContainerType;
> 
> typedef FMeshType::PointsContainerPointer
> 
> PointsContainerPointer;
> 
> typedef itk::TransformMeshFilter<
> 
> FMeshType,
> 
> FMeshType,
> 
> NTransformType > FilterType;
> 
>  
> 
> // Create a Filter
> 
> FilterType::Pointer filter = FilterType::New();
> 
> // Connect the inputs
> 
> filter->SetInput( input_mesh );
> 
> filter->SetTransform( finalTransform );
> 
> // Execute the filter
> 
> filter->Update();
> 
> std::cout << "Filter: " << filter;
> 
> // Get the Smart Pointer to the Filter Output
> 
> FMeshType::Pointer outputMesh = filter->GetOutput();
> 
> std::cout << "Output Mesh has " << outputMesh->GetNumberOfPoints();
> 
> std::cout << " points " << std::endl;
> 
> // Get the the point container
> 
> FMeshType::PointsContainerPointer
> 
> transformedPoints = outputMesh->GetPoints();
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



 
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070323/89b38833/attachment.html


More information about the Insight-users mailing list