[vtkusers] getting the points I see
Lars Matthäus
lars.matthaeus at web.de
Wed Apr 6 12:19:26 EDT 2005
Just for people searching the archive for solutions:
vtkCellCenter solves the problem. It takes only the visible stuff (i.e.
the cells) and returns their center as vtkPolyData. From there one could
go one getting the coordinates via a loop over all points
(poly.GetNumberOfPoints(), poly.GetPoint(i)) or visualizing them using
vtkMaskPoints.
> is there a simple way to get the "visible" points used for rendering an object? In detail I have an ImageData object which I process by a ContourFilter. The output of the ContourFilter is rendered. Everything is fine. Now I want to get the coordinates of the points "shown" in by the renderer. Using contour.GetOutput().GetPoints() is no solution since this returns all points of the original ImageData object (which are far more than the ones defining the isosurface displayed). How can I get only the points of the isosurface?
>
> Connected with that: How can I get from an Actor only the DataSet used for displaying something? Here again actor.GetMapper().GetInputAsDataSet() doesn't work since it returns all data, also the "hidden" one.
More information about the vtkusers
mailing list