[vtkusers] How to smooth a vtkPolyData Object?
Ming Chao
mingchao2005 at gmail.com
Mon Nov 20 18:12:30 EST 2006
Hi,
I am kinda new to VTK. Could anybody give me a hint how to smooth a
vtkPolyData object (3D). I searched around and found that
vtkSmoothPolyDataFilter might be able to do the trick. But I am not sure how
to use it. What I am having is a vtkPolyData object which is too spiky and I
want to smooth it. It could be very simple to do it but I do need help. I
have the following code:
vtkSmoothPolyDataFilter* smooth = vtkSmoothPolyDataFilter::New();
smooth->SetInput( ????? ->GetOutput()); // what to replace with ?????
is it my vtkPolyData object?
smooth->SetNumberOfIterations(10);
smooth->SetRelaxationFactor(0.5);
smooth->Update();
vtkPolyData* smoothedPoly = smooth->GetOutput();
......
TIA,
Ming
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061120/e26ea8a2/attachment.htm>
More information about the vtkusers
mailing list