[vtkusers] How to smooth a vtkPolyData Object?

Fritz Mielert fritz.mielert at napshell.com
Tue Nov 21 13:20:17 EST 2006


Hi Ming!
>  vtkSmoothPolyDataFilter* smooth = vtkSmoothPolyDataFilter::New();
>  smooth->SetInput(  ?????  ->GetOutput());  // what to replace with 
> ?????  is it my vtkPolyData object?
If you've got the pure object you don't need GetOutput.
You only need GetOutput if the pdata comes from a function you've uses 
before
i.e.
vtkPolyDataReader* reader = vtkPolyDataReader::New();
reader->SetSomeKindOfPath("myString");
vtkSmoothPolyDataFilter* smooth = vtkSmoothPolyDataFilter::New();
smooth->SetInput(reader->GetOutput());

Otherwise it goes like this:
vtkSmoothPolyDataFilter* smooth = vtkSmoothPolyDataFilter::New();
smooth->SetInput(myPolyDataObject);

bye

fritz



More information about the vtkusers mailing list