<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Dear VTK experts,<br></div><div class="gmail_quote"><div dir="ltr"><div style="font-family:tahoma,sans-serif">
<br>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!</div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">I attach <div class="gmail_default" style="font-family:tahoma,sans-serif;display:inline">​snaps from the</div> original<div class="gmail_default" style="font-family:tahoma,sans-serif;display:inline">​ mesh​</div>, the poor result I get from VTK and the one that's looks good, which I got using the Laplacian filter in MeshLab. <br>
<br>
<br>
This is my code:<br>
<br>


<p style="margin:0px">reader = vtk.vtkPolyDataReader()</p>

<p style="margin:0px">reader.SetFileName(meshInputPath)</p>

<p style="margin:0px">reader.Update()</p>

<p style="margin:0px"><br></p>
<p style="margin:0px">mesh = reader.GetOutput()</p>
<p style="margin:0px"><br></p>
<p style="margin:0px">smoothFilter = vtk.vtkSmoothPolyDataFilter()</p>
<p style="margin:0px">smoothFilter.SetNumberOfIterations(500)</p>
<p style="margin:0px">smoothFilter.SetInput(mesh)</p>
<p style="margin:0px">smoothFilter.Update()</p>
<p style="margin:0px"><br></p>
<p style="margin:0px">writer = vtk.vtkPolyDataWriter()</p>
<p style="margin:0px">writer.SetInput(smoothFilter.GetOutput())</p>
<p style="margin:0px">writer.SetFileName(meshOutputPath)</p>
<p style="margin:0px">writer.Write()</p><br><br>Do you know what I'm doing wrong?</div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">Thank you,</div><div style="font-family:tahoma,sans-serif"><br>Fernando<br><br></div></div>
</div><br></div>