Filters deleting output

John Biddiscombe j.biddiscombe at rl.ac.uk
Wed Dec 1 11:42:01 EST 1999


Dear all,

Some filters such as vtkElevationFilter can produce outputs of various
types. Frequently they delete their output and recreate a new one, issuing
a warning when they do so.

Is there any way of "sensing" when a filter has deleted its output and
hooking into it? so that (for example) a gui passing the output onto
another filter can drop its copy of the output and catch the new one.

If there is no way (I haven't found a simple way - other than a clumsy
check of pointers before and after execution), could I please request an
additional hook along the lines of 

SetProcessDeleteOutput (or ChangeOutput or SetOutput)
and 
SetProcessDeleteOutputArg 
???

this ought to be fairly straightforward to implement by adding a call into
DataSetToDataSet filters and other similar variable type processes. (In
fact the SetOutput() member of all processes could be modified so that a
callback could be inserted whenever an output is Set or changed)

There is a DeleteMethod provided for all objects, however, it does not have
an argument, which means that a static member intercepting the call has no
way of knowing which filter has dumped an output unless a table of pointer
references is maintained (by the main program) - this seems a little
wasteful. 
[In any case, a program hooking into the deletemethod might be fooled when
an output with multiple references was passed through a filter chain and
finally deleted - having been replaced long ago by a different dataobject
in the relevant filter.]

thanks again

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