[vtkusers] Problems with Visualization Pipeline Execution

John L. Papp jpapp at craft-tech.com
Tue Mar 3 11:53:05 EST 2009


I've created a render pipeline roughly as follows

   1. Created a vtkPoints object and filled with points
   2. Created a vtkCellArray and filled with indexes associated with
   3. Created a vtkPolyData object and SetPoints with vtkPoints object
      and SetVerts with vtkCellArray object
   4. Created a vtkPolyDataMapper object and SetInput to vtkPolyData object
   5. Created a vtkActor object and SetMapper to vtkPolyDataMapper object

Here is what I think the visualization pipeline looks like

(source)          (filter)                 (mapper)              (actor)

Everything renders fine and displays perfectly.  The issue arises when I 
attempt to modify the location of any of points in the vtkPoints 
object.  I access the vtkPoint object associated with the vtkActor 
through (using Java):

((vtkPolyData) ((vtkPolyDataMapper) 

I then use the member function of the vtkPoints class to modify the 
first point location:

((vtkPolyData) ((vtkPolyDataMapper) 
vtkactVerts.GetMapper()).GetInput()).GetPoints().SetPoint(0, dblX, dblY, 

I verified that the point locational information has changed to the new 
values, however, I can't get the visualization pipeline to recognize the 
locational change.  I tried to force a render of the pipeline, an 
Update() of the vtkPolyDataMapper, and an Update() of the vtkActor 
object associated with the vtkPoints object but the plotted location of 
the point does not change.  My previous implementation would just create 
a new of vtkPoints and vtkCellArray object, fill with new points with 
the locational change (although only one of the points actually has a 
different location) and then associate this with the vtkPolyData 
mapper.  This seems wasteful since all I am doing is changing the 
location of one point.  Obviously, I'm missing something as to how the 
visualization pipeline is updated.  So what am I doing wrong?



Dr. John Papp
Senior Research Scientist
6210 Kellers Church Road
Pipersville, PA 18947

Email:  jpapp at craft-tech.com
Phone:  (215) 766-1520
Fax  :  (215) 766-1524


More information about the vtkusers mailing list