[vtkusers] Matrices and Transforms

Sean Richards sean at millwood.ca
Mon Sep 13 12:01:08 EDT 2004


Hello all,

I am trying to use ICP to register 2 planes together. I want the user to be able to move the planes on screen and then apply ICP to the moved planes. Because of this I need to apply the actor's transformation to the original data set (ICP requires a data set and NOT an actor). I found a filter called

vtkTransformPolyDataFilter

This filter can transform data points with a vtkAbstractTransform.

The transformation you get from vtkActor is a vtkMatrix4x4. In order to change a vtkMatrix4x4 into an AbstractTransform I tried using vtkMatrixToLinearTransform. Unfortunately I am not having any luck getting that to work.

I print out the vtkMatrix4x4 which shows the transformation of the actor, but when I print out the converted transform, all I get is the identity.

I have attached my code to this e-mail, if anyone can help I would greatly appreciate it.

Thanks!!

Sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkmyEx1.cxx
Type: application/octet-stream
Size: 6898 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040913/459a0575/attachment.obj>


More information about the vtkusers mailing list