[vtkusers] "Destructive" filtering
Kevin Wright
krw at viz-solutions.com
Wed Apr 10 13:18:52 EDT 2002
At 06:06 PM 4/10/2002 +0100, you wrote:
>I am trying to implement a VTK/MSVC++ app, whose partial goal is to apply
>filters to 3D objects *destructively*, i.e., collapse the visualisation
>pipeline so that only the PolyData containing the filter's output and the
>Mapper are present everytime the 3D object is processed (possibily
>allowing some levels of undo). Lets say that I would like to develop a
>kind of a simplified "3D Adobe Photoshop" type of app.
I could be wrong, someone please correct me if I am, but if you create a
pipeline, take the output of the last filter, Register it, then delete the
entire pipeline, you should get what you're after (minus the ability to
undo). Like...
vtkSphereSource *sphere = vtkSphereSource::New();
vtkDecimatePro *decimate = vtkDecimatePro::New();
vtkPolyData *finalGeometry;
decimate->SetInput(sphere->GetOutput());
decimate->Update();
finalGeometry = decimate->GetOutput();
finalGeometry->Register(0);
decimate->Delete();
sphere->Delete();
----------------------------
Kevin.
More information about the vtkusers
mailing list