[vtkusers] How to smooth a vtkPolyData Object?

Ming Chao mingchao2005 at gmail.com
Tue Nov 21 14:58:35 EST 2006


Hi Luca and Fritz,

Thanks for pointing out the input to smooth->SetInput(). I just tried to
input the polydata object directly to the smoother, but I got an error from
the vtkOutputWindow:

C:\VTK\VTK\Common\vtkObject.cxx, line 131
vtkObject: Destructing!

Then the program stopped running. Could anybody spot what is going wrong?

Thanks,
Ming


On 11/21/06, Fritz Mielert <fritz.mielert at napshell.com> wrote:
>
> 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
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061121/2d770621/attachment.htm>


More information about the vtkusers mailing list