[vtkusers] vtkSmoothPolyDataFilter doesn't smooth much

Fernando Pérez-García fepegar at gmail.com
Fri Nov 27 06:15:55 EST 2015


Dear VTK experts,

This is my first post here. I'm trying to smooth a mesh created from a
mask. I've tried different parameters but I don't get the result I want,
some vertices don't move at all!

I attach
​snaps from the
 original
​ mesh​
, the poor result I get from VTK and the one that's looks good, which I got
using the Laplacian filter in MeshLab.


This is my code:

reader = vtk.vtkPolyDataReader()

reader.SetFileName(meshInputPath)

reader.Update()


mesh = reader.GetOutput()


smoothFilter = vtk.vtkSmoothPolyDataFilter()

smoothFilter.SetNumberOfIterations(500)

smoothFilter.SetInput(mesh)

smoothFilter.Update()


writer = vtk.vtkPolyDataWriter()

writer.SetInput(smoothFilter.GetOutput())

writer.SetFileName(meshOutputPath)

writer.Write()


Do you know what I'm doing wrong?


Thank you,

Fernando
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151127/9d996bc7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: meshLabResult.png
Type: image/png
Size: 72953 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151127/9d996bc7/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: original.png
Type: image/png
Size: 32530 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151127/9d996bc7/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkResult.png
Type: image/png
Size: 70053 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151127/9d996bc7/attachment-0005.png>


More information about the vtkusers mailing list