Filter to Data newbie question

Dmitry Brodsky dima at cs.ubc.ca
Wed Mar 1 21:47:31 EST 2000


Hi,

How does one obtain data from a filter, or make the filter execute
such that a concrete object is instantiated and data can be obtained.

I have the output from vtkContourFilter and I would like to retrieve all
the vertices and polygons.  I have tried to do

vtkPolyData *pd = contourfilter->GetOutput( );

and then 

vtkCellArray *verts = pd->GetVerts( );
cerr << verts->GetNumberOfCells( ) << endl;
vtkCellArray *polys = pd->GetPolys( );
cerr << polys->GetNumberOfCells( ) << endl;

But the number of verts and polys is always zero.

Thanks for any help
ttyl
Dima

-- 
Dima Brodsky                                   dima at cs.ubc.ca
201-2366 Main Mall                             (604) 822-6179 (Office)
Department of Computer Science                 (604) 822-2895 (DSG Lab)
University of British Columbia, Canada         (604) 822-5485 (FAX)

Computers are like Old Testament gods; lots of rules and no mercy.
							  (Joseph Campbell)
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list