[vtkusers] "Destructive" filtering

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Wed Apr 10 17:53:42 EDT 2002


> I could be wrong, someone please correct me if I am,

OK.

>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...

Almost. But the last filter in the pipeline before you grab the output is
registered by the output itself (Source).
you need to

mydata = lastfilter->GetOutput();
mydata->Register(NULL);
lastfilter->UnregisterAllOutputs();
now delete all the filters and you can keep the data

JB




More information about the vtkusers mailing list