[vtkusers] vtkPolyDataConnectivityFilter and world position of the vtkActors
Mark K. Batesole, DDS, MS
mbatesole at yahoo.com
Wed Jun 23 18:26:29 EDT 2010
I'm having a heck of a time getting this little application to work correctly. Here's the problem I'm having: after splitting the polydata and assigning each part an actor. I'd like to get the world position of each actor so that I can then run an vtkIterativeClosestPointTransform and know what the transformation matrix is from one of the actors to another. So I've used vtkActor->GetPosition() which according to all the documentation I've found should return the actor's world coordinates. But each actor returns (0.0, 0.0, 0.0). Since they are not all on top of each other at the origin, I don't see how this could be correct.
I know I must be missing something... any help would be sincerely appreciated.
<code snippet follows>
conn = vtk.vtkPolyDataConnectivityFilter()
nregions = conn.GetNumberOfExtractedRegions()
polydata_collection = 
for region in xrange(nregions):
p = vtk.vtkPolyData()
reader = vtk.vtkXMLPolyDataReader()
polydataCollection = splitParts(reader.GetOutput())
actorCollection = 
for item in xrange(len(polydataCollection)):
mapper = vtk.vtkPolyDataMapper()
actor = vtk.vtkActor()
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers