<DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>Hello everyone,</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3></FONT> </P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>I want to use vtkLandmarkTransform to do some linear transformation. I have two sets of landmarks in two different coordinate systems and want to establish the transformation between these two spaces. Basically I gave two sets of landmarks to SetSourceLandmarks and SetTargetLandmarks, and each set has the same number of points. The problem is that I couldn’t get a correct transform matrix. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>SourceLandmarks = []</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>SourceLandmarks = vtkPoints()</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>SourceLandmarks.InsertNextPoint(SLandmark1)</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>SourceLandmarks.InsertNextPoint(SLandmark2)</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN>SourceLandmarks.InsertNextPoint(SLandmark3)</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>SourceLandmarks.Modified()</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>TargetLandmarks = []</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>TargetLandmarks = vtkPoints()</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>TargetLandmarks.InsertNextPoint(TLandmark1)</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>TargetLandmarks.InsertNextPoint(TLandmark2)</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN>TargetLandmarks.InsertNextPoint(TLandmark3)</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>TargetLandmarks.Modified()</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="mso-tab-count: 1"><FONT face="Times New Roman" size=3> </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>Transform = vtkLandmarkTransform()</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>Transform.SetSourceLandmarks(SourceLandmarks)</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>Transfrom.SetTargetLandmarks(TargetLandmarks)</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="mso-tab-count: 1"><FONT face="Times New Roman" size=3> </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>InputX = float(entryInputLandmarkX.get())</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>InputY = float(entryInputLandmarkY.get())</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>InputZ = float(entryInputLandmarkZ.get())</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>InputLandmark = [InputX, InputY, InputZ]</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> </SPAN>OutputLandmark = Transform.TransformFloatPoint(InputLandmark)</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>When I print the outputlandmark on the screen, I just got (nan, nan, nan)</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>Can I get the transform matrix by GetMatrix()? Could anyone help me? If anyone has such a script, could you share it with me? </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>Thank you very much!</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3></FONT> </P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>vtk learner</FONT></P></DIV><p>
                <hr size=1><font face=arial size=-1>Do you Yahoo!?<br>
Yahoo! Tax Center - <a href="http://taxes.yahoo.com/filing.html">File online by April 15th</a>