[vtkusers] vtkSelectPolyData output is not what I expected

Katherine Kerekes kerekes at fastmail.fm
Thu Jun 9 21:11:42 EDT 2005


Answering my own question--this is something that is really simple, but I
found the solution difficult to find.

1) I did not understand that vtkSelectPolyData will output all of the point
data that was input and only the cell data that was selected.  This means
that there is point data in the output that does not lie within the selected
cells.

2) The solution to getting rid of these extra points is vtkCleanPolyData
which will "merge duplicate points, and/or remove unused points and/or
remove degenerate cells" according to the documentation.

Again, this is a simple solution, but I was really confused when the
vtkSelectPolyData output all of those "extra" points.  It might be helpful
to explain the output more fully in the documentation, and also to have a
link to the vtkCleanPolyData class on the vtkSelectPolyData page.

Kate Kerekes

-----Original Message-----
From: vtkusers-bounces+kerekes=fastmail.fm at vtk.org
[mailto:vtkusers-bounces+kerekes=fastmail.fm at vtk.org] On Behalf Of Katherine
Kerekes
Sent: Thursday, June 02, 2005 8:24 PM
To: 'VTK Group'
Subject: [vtkusers] vtkSelectPolyData output is not what I expected

I am confused about the output of vtkSelectPolyData.  According to the
documentation, either the cells laying inside the loop or outside the loop
are output.  Either way, the output of vtkSelectPolyData should be smaller
(fewer cells/points) than the input right?

But when I do this:

puts "selectPolyData number of points=[[selectPolyData GetOutput]
GetNumberOfPoints]"	
puts "selectPolyData input number of points=[[selectPolyData GetInput]
GetNumberOfPoints]"


the input number of points into the vtkSelectPolyData and the output number
of points are the same.  When I visualize the output of vtkSelectPolyData, I
see what I expect (I have drawn a loop on one slice of data and only the
parts of the data that are inside my loop are visualized), but I want to
compute stats on only those points lying inside my loop.  I thought I could
use the output of vtkSelectPolyData to do this.  Is there a different class
I should use (must be able to define an irregular loop of points)?

Any help would be appreciated.

Kate Kerekes

_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list