[vtkusers] Decimating contour lines
Frederic Perez
fredericpcx at gmail.com
Thu Apr 24 06:02:33 EDT 2008
> is there an algorithm that can decimate contour lines ?
> We are generating contour lines from high-resolution images
> and the poly-line count gets too high.
I used once vtkSmoothPolyDataFilter for the same problem. Some code:
vtkSmoothPolyDataFilter* smoothPol = vtkSmoothPolyDataFilter::New();
smoothPol->SetInput( connect->GetOutput() );
//smoothPol->SetConvergence( 10. );
smoothPol->SetNumberOfIterations( 50 );
smoothPol->SetRelaxationFactor( 0.125 );
//smoothPol->SetFeatureAngle( 75.0 );
smoothPol->Update();
In addition, depending on your application, maybe you can smooth the
high resolution images before generating the contour lines.
Cheers,
Frederic Perez
More information about the vtkusers
mailing list