The CenteredTransformIntializer class, as the doxygen documentation mentions, is meant to be templated on Images, not PointSets. <br><br>There is no class in ITK that will help you with initializing your transform, although there are registration methods such as ICP.
<br><br>If you do not have any correspondances between the point-sets ( I assume you don't ), you can compute a crude rigid-transform initialization yourself by computing the centroids of the two point sets and the Eigen Vectors of the two pointsets and then finding a transform that maps the axes (defined by the eigen vectors, with the centroid as the origin) onto each other.
<br><br>HTH<br>--<br>Karthik Krishnan<br>R&D Engineer,<br>Kitware Inc.<br><br><div><span class="gmail_quote">On 1/7/08, <b class="gmail_sendername">Juan Pedro de Miguel Porta</b> <<a href="mailto:elkily69@hotmail.com">
elkily69@hotmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="text-align: left;">Hello,<br>I've found some problems setting the initial transform in my pointset to pointset registration application.<br>When I looked in the software guide I found 2 different ways to solve this problem.
<br>First it was with this method: transform->SetTranslation(centerMoving - centerFixed) as in the imageregistration5.cxx example, but it doesn't work because 'GetSpacing()','GetOrigin()' and 'GetSize()' are not applicable into pointsets.
<br>The other one was using the CenteredTransformInitializer class as in the imageregistration6.cxx example but when I tried to use it with pointsets instead of with fixed and moving images it also didn't work.This is the code:
<br><br>typedef itk::CenteredTransformInitializer < TransformType , PointSetType , PointSetType> TransformInitializerType;<br>TransformInitializerType::Pointer initializer = TransformInitializerType::New();<br><br>My questions are:
<br>1) Am I missing something and one of this methods should work? How can I do it?<br>2) And if not, is there any other way to initialize the transform?<br><br>Thanks.<br></div><span class="ad"><br><hr>Todo ruedas: información práctica y todo el glamour del mundo del motor.
<a href="http://estilo.es.msn.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">MSN Estilo y Tendencias</a></span></div><span class="ad">
</span><br>_______________________________________________<br>Insight-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">
http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote></div>