[vtkusers] Problems with Visualization Pipeline Execution

Wes Turner wes.turner at kitware.com
Tue Mar 3 12:00:27 EST 2009


Did you try ((vtkPolyData) ((vtkPolyDataMapper)
vtkactVerts.GetMapper()).GetInput()).GetPoints().Modified() ?

On Tue, Mar 3, 2009 at 11:53 AM, John L. Papp <jpapp at craft-tech.com> wrote:

> Hello,
>
> 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
>     vtkPoints
>  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
>
> vtkPoints->vtkPolyData->vtkPolyDataMapper->vtkActor
> (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)
> vtkactVerts.GetMapper()).GetInput()).GetPoints()
>
> 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,
> dblZ);
>
> 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?
>
> Thanks,
>
> John
>
> --
> **************************************************************
> Dr. John Papp
> Senior Research Scientist
> CRAFT Tech.
> 6210 Kellers Church Road
> Pipersville, PA 18947
>
> Email:  jpapp at craft-tech.com
> Phone:  (215) 766-1520
> Fax  :  (215) 766-1524
> www.craft-tech.com
>
> **************************************************************
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Wesley D. Turner, Ph.D.
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x120
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090303/3eeaa37a/attachment.htm>


More information about the vtkusers mailing list