Reputation: 1344
I have a poly data that looks like this:
What I want to obtain is something that would be smoother, something like this (edited in paint for demonstration purpose):
So far I've tried the following filters:
vtkWindowedSincPolyDataFilter
vtkSmoothPolyDataFilter
However, the closest I got was with the first one, with a result like this:
Is there any filter or strategy in VTK that would allow me to reach something really close to the second picture?
Thanks in advance.
Upvotes: 4
Views: 1923
Reputation: 66
One other solution could be to generate a binary vtkImageData from this polydata, using vtkPolyDataToImageStencil, then smooth the image using something like vtkImageGaussianSmooth and then go back to the polydata world using vtkMarchingCubes
You'll need to tweak some parameters for each filter, but that should work and give you more control other the smoothing
Upvotes: 1
Reputation: 1858
I suggest you play with the convergence and iterations parameter of vtkSmoothPolyDataFilter
to achieve the optimal result for a single application of that filter. If this is not satisfying, why don't you go ahead and apply it multiple times, one after the other? This is what I would do if I had this problem at my hands.
Upvotes: 3