Embedded filters

John Biddiscombe j.biddiscombe at rl.ac.uk
Thu Oct 7 19:45:10 EDT 1999


Charles & rest of vtk'ers

>Some Imaging filters (maybe vtkImageGaussianSmooth, vtkImageOpen/Close)
>do this by defineing a GetOutput/SetInputMethods that return a sub filters 
>input/output.

Thanks, I got some assistance on this from various people (thanks to you
all). But for the sake of preventing anyone going down this path I'd say -
don't do the above - Reason? Well, if a filter just overrides 

vtkDataSet *GetOutput(int i=0) {.....

etc etc and returns the output of another filter. When
filter->Output->Update is called, it in turn calls
filter->Output->Source->Update, but the output's source will be the filter
embedded inside the wrapper and not the wrapper itself. I tried this
approach myself at first but got tangled up on never ending calls to
filters calling sources which were owned by other filters and eventually
decided it'd be easier to simply die painlessly than try to decipher what
was going on. I appreciate that you have a better understanding and
probably know exactly which methods to override, but my advice to others
would be the same as that given to me....

...have a look at vtkOutlineFilter, which generates bounding boxes by using
an embedded outline source.

Sorry for giving contradictory advice - and do please criticize if necessary.

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