agibson at medphys.ucl.ac.uk
Thu Jun 27 08:09:13 EDT 2002
I'm working in medical imaging, trying to fit a generic head-shaped surface to
a set of points measured on an individual patient's scalp. In the first
instance, I'm fitting a sphere to 29 measured points unevenly spread over the
back of the head. I want to move the sphere using
vtkIterativeClosestPointTransform so it best fits these points.
My sphere is generated by vtkSphereSource, and I'm reading my points in from a
file so they're vtkPoints. If I run vtkIterativeClosestPointTransform with
the sphere as source and points as target, like this:
icp SetSource [sphere GetOutput]
icp SetTarget [pointSource GetOutput]
I get the error message
Error in startup script: Object named: pointSource, could not find requested
method: GetOutput or the method was called with incorrect arguments.
So I tried converting the points to a vtkPolyData surface. I could display the
sphere and the new surface nicely but when I ran
vtkIterativeClosestPointTransform, I got a different error
vtkIterativeClosestPointTransform (0x8fa4a00): Can't execute with NULL or
Can anybody tell me what I'm doing wrong? Or even better, how to fix it?
Thanks - I'm new to VTK so please go easy in your replies!
Adam Gibson PhD
Dept. Medical Physics and Bioengineering
1st Floor Shropshire House, 11-20 Capper St
London WC1E 6JA
020 7679 6415
More information about the vtkusers