[vtkusers] vtkLandmarkTransform -> nan?

Louis Desjardins lost_bits1110 at hotmail.com
Thu Jul 15 11:37:06 EDT 2004


Hi, my question is essentially the same as the question posted in april 
(below)

However there was no answer posted..

So does anyone know of any reason why one would get 'nan' after applying the 
transformation?

Thanks in advance,

Any tips would surely help me alot

LD




-------------------------------------------------------------------------------------------------

[vtkusers] Problem with vtkLandmarkTransform
vtk learner dandangege99 at yahoo.com
Tue Apr 13 21:37:44 EDT 2004

Hello everyone,


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.

            SourceLandmarks = []

            SourceLandmarks = vtkPoints()

            SourceLandmarks.InsertNextPoint(SLandmark1)

            SourceLandmarks.InsertNextPoint(SLandmark2)

            SourceLandmarks.InsertNextPoint(SLandmark3)

            SourceLandmarks.Modified()



            TargetLandmarks = []

            TargetLandmarks = vtkPoints()

            TargetLandmarks.InsertNextPoint(TLandmark1)

            TargetLandmarks.InsertNextPoint(TLandmark2)

            TargetLandmarks.InsertNextPoint(TLandmark3)

            TargetLandmarks.Modified()



            Transform = vtkLandmarkTransform()

            Transform.SetSourceLandmarks(SourceLandmarks)

            Transfrom.SetTargetLandmarks(TargetLandmarks)



            InputX = float(entryInputLandmarkX.get())

            InputY = float(entryInputLandmarkY.get())

            InputZ = float(entryInputLandmarkZ.get())

            InputLandmark = [InputX, InputY, InputZ]

            OutputLandmark = Transform.TransformFloatPoint(InputLandmark)



When I print the outputlandmark on the screen, I just got (nan, nan, nan)

Can I get the transform matrix by GetMatrix()? Could anyone help me? If 
anyone has such a script, could you share it with me?



Thank you very much!



vtk learner

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/




More information about the vtkusers mailing list