[vtkusers] vtkGeometryFilter

Gregory Bleiker gregory.bleiker at phonak.ch
Wed May 15 06:09:32 EDT 2002


Hi VTKers
I'm trying to use vtkGeometryFilter to extract points out of a pointcloud. The pointcloud is a list of cells, each cell containing one point. I do something like

  vtkGeometryFilter *selFilter= vtkGeometryFilter::New();
  selFilter->SetInput(someData); //some data is the pointcloud
  selFilter->SetExtent(0.0,5.0,0.0,5.0,0.0,5.0);
  selFilter->ExtentClippingOn();
  vtkPolyData *seldata= vtkPolyData::New();
  seldata= selFilter->GetOutput();

Unfortunately, this doesn't work. seldata still has the whole dataset. (btw. not all values lie within [0,5] :) The documentation in either of the two VTK books (Visualization Toolkit, VTK Users Guide) is sparse and especially I miss an indication of which conditions a vtkPolyData has to fullfill for a filter or algorithm to work.
Do I generally missunderstand some concept of VTK or am I doing something wrong or should I use vtkClipPolyData (in which case the docu for vtkGeometryFilter is highly missleading: 
>> "It also is possible to specify conditions on point ids, cell ids, and on bounding box (referred to as "Extent") to control the extraction process." Sounds just what I'd like to do... :) Any help is highly appreciated.

Greetings
Gregi 

PS. An other example of missing indication of conditions for algorithms is the OBBTree. It only works if you're using Polys. (And personally, after consulting the SigGraph paper, I don't see why...)






More information about the vtkusers mailing list