David,<div><br></div><div>I didn't use your Paraview plug in, but I did run this by hand using the vtk.exe Tcl/Tk environment. After reading in the two files, generating a landmark transform, setting the Source/TargetLandmarks to the source and target points, setting the transform type to Affine, and updating, I get the following matrix:</div>
<div><br></div><div><div><br></div><div>% [l GetMatrix] Print</div><div>vtkMatrix4x4 (0780E5D0)</div><div> Debug: Off</div><div> Modified Time: 54371</div><div> Reference Count: 1</div><div> Registered Events:</div><div>
Registered Observers:</div><div> vtkObserver (077E6A88)</div><div> Event: 2</div><div> EventName: DeleteEvent</div><div> Command: 077E69D8</div><div> Priority: 0</div><div> Tag: 1</div>
<div> Elements:</div><div> 0.5 0 0 0</div><div> -5.12758e-012 1 -8.20414e-011 -5</div><div> 0 0 1 0</div><div> 0 0 0 1</div><div><br></div><div>It is within 10e-11 of the exact answer. This was using all 21 points of the source and target PolyDatas. I am fairly confident saying that any problem isn't within the vtkLandmarkTransform ... </div>
<div><br></div><div>- Wes</div><div><br></div><div class="gmail_quote">On Thu, Nov 12, 2009 at 6:09 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Tue, Nov 10, 2009 at 2:57 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
> On Tue, Nov 10, 2009 at 11:59 AM, David Doria <<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>> wrote:<br>
>> On Tue, Nov 10, 2009 at 11:06 AM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>>> Hi David,<br>
>>><br>
>>> The vtkLandmarkTransform requires that the two sets of vtkPoints are<br>
>>> homologous with each other, i.e. they must each represent the same set<br>
>>> of landmarks listed in the same order. Using it to register polydata<br>
>>> by taking the points from each data set is a bad idea, since the<br>
>>> points are probably not going to be homologous. You should use<br>
>>> iterative closest point instead.<br>
>>><br>
>>> David<br>
<br>
David,<br>
<br>
Here is a good example:<br>
<a href="http://www.rpi.edu/~doriad/Paraview_List/LandmarkFilter/Data/" target="_blank">http://www.rpi.edu/~doriad/Paraview_List/LandmarkFilter/Data/</a><br>
<br>
If you use Source.vtp for both the Source Dataset AND the Source<br>
Landmarks (because we want to use all of the points anyway)<br>
<br>
and use Target.vtp for Target Landmarks, you will see that the<br>
resulting alignment is way off.<br>
<br>
Source.vtp was generated FROM Target.vtp by scaling it [2,1,1] and<br>
then translating it [0,5,0]. The resulting inverse transformation<br>
should then be<br>
<br>
1.0000 0 0 -5.0000<br>
0 0.5000 0 0<br>
0 0 1.0000 0<br>
0 0 0 1.0000<br>
<br>
Please let me know what you find.<br>
<br>
Thanks,<br>
<br>
David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Wesley D. Turner, Ph.D.<br>Kitware, Inc.<br>Technical Leader<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4920<br>
</div>