Embedded filters

John Biddiscombe j.biddiscombe at rl.ac.uk
Thu Sep 23 13:54:15 EDT 1999


Dear All,

I'd like to embed a filter inside another filter and make the output of the
"whole" filter equal to the output of (one of) the internal filter(s).

Example

input ---> Myfilter containing vtkPolyDataSource ---> output

in this case I'd like to set the output of the filter to the output of the
polydatasource

How do I correctly handle the updates and suchlike

the update sequence follows this kind of pattern (?)

Filter->Update

output->Update

output->InternalUpdate

output->source->internalupdate

output->source->execute (this is the filter execute now!!!! hoorah)

The final step here means the filter ouput calls its source and request an
update, but my output is "owned" by the embedded filter, and so it calls
the embedded filter execute and bypasses the external wrapper filter.

vtkDataSetReader appears to do something similar, but I'm confused after
trying to work out the correct chain of events.

Can anyone shed some light on the process?

e.g. Should I make my filter a source (and then do a
embeddedfilter->GetOutput->SetSource(my filter) ) - or should it be a full
polydatasource, or maybe just a processobject. It needs to be a source if
I'm going to setsource on outputs, but then vtksource does things in its
update chain.

Recent changes to vtk have made everything a bit more intricate. Any chance
of a few notes for us hapless developers from you chaps at kitware?

Anyone got a simple example of a filter which contains a source inside it
and passes its output to its own output?


Thanks

John B



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list