[vtkusers] vtkProcrustesAlignmentFilter

Jan Gregersen s973424 at student.dtu.dk
Tue Sep 21 04:27:42 EDT 2004


Hi

I'm having problems with the use of vtkProcrustesAlignmentFilter.
How do I get the resulting points from the filter? When I use
GetNumberOfPoints on the output it returns 0, so there is no output? The
following tcl code illustrates my problem.

package require vtk

vtkPoints points1
    points1 InsertPoint 0 0.0 0.0 0.0
    points1 InsertPoint 1 0.0 1.0 0.0
    points1 InsertPoint 2 1.0 0.0 0.0
    points1 InsertPoint 3 1.0 1.0 0.0

vtkPoints points2
    points2 InsertPoint 0 1.0 0.2 0.0
    points2 InsertPoint 1 1.0 0.6 0.0
    points2 InsertPoint 2 1.0 0.4 0.0
    points2 InsertPoint 3 0.2 1.0 0.0

vtkPoints points3
    points3 InsertPoint 0 0.0 0.2 0.0
    points3 InsertPoint 1 0.0 0.6 0.0
    points3 InsertPoint 2 0.0 0.4 0.0
    points3 InsertPoint 3 0.6 1.0 0.0

vtkPolyData tmp1
vtkPolyData tmp2
vtkPolyData tmp3
tmp1 SetPoints points1
tmp2 SetPoints points2
tmp3 SetPoints points3

vtkProcrustesAlignmentFilter procrustes
procrustes SetNumberOfInputs 3
procrustes SetInput 0 tmp1
procrustes SetInput 1 tmp2
procrustes SetInput 2 tmp3

puts [[[procrustes GetOutput 0] GetPoints] GetNumberOfPoints]


Thanks
Jan



More information about the vtkusers mailing list