CPlusPlus
VTK – Decimate Polydata With Scalar
How to decimate a PolyData without changing pointData’s scalar’s position? Two classes vtkQuadricDecimation and vtkDecimatePro are worth discussing. vtkQuadricDecimation can decimate pointdata’s scalar. We have to set AttributeErrorMetric true to handle it. #include <iostream> #include <vtkSmartPointer.h> #include <vtkSphereSource.h> #include <vtkActor.h> #include <vtkConeSource.h> #include <vtkRenderer.h> #include <vtkRenderWindow.h> #include <vtkPolyDataMapper.h> #include <vtkProperty.h> Read more…