[vtkusers] Urgent Help Required with VTKDecimatePro!

Amy Squillacote amy.squillacote at kitware.com
Tue Nov 29 12:16:45 EST 2005


Hi Salman,

Assuming your VTK pipeline looks something like the following:

...
vtkPolyData *input = someFilter->GetOutput();
vtkDecimatePro *deci = vtkDecimatePro::New();
deci->SetInput(input);
...
deci->Update();
...

Then, to find the number of triangles before decimation call 
input->GetNumberOfCells();
To find the number of triangles after decimation, call 
deci->GetOutput()->GetNumberOfCells(); *after* the vtkDecimatePro 
filter has run (i.e., after Update has been called on it).

- Amy

At 12:06 PM 11/29/2005, Salman Bhatti wrote:
>I have used VTKDecimatePro, the program runs well and the output 
>"seems" to be decimated.How can I make sure that the mesh has  been 
>decimated , is there any way in VTK to find the number of triangles 
>after and before decimation.Even a slightest help would be greatly appreciated.
>Regards,
>Salman
>_______________________________________________
>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