[vtkusers] How do you turn on/off a pipeline?

Matthew Hall mahall at uiuc.edu
Wed Jul 5 16:51:10 EDT 2000


Charles Law wrote:

> Setting the output of a source/filter to NULL will have the same
> effect.  Turn the pipeline back on by setting the output back to the old value.
>
> Charles.
>
> At 10:57 AM 7/5/00 +0100, John Biddiscombe wrote:
> > >A simple question:
> > >       How does one turn on or off a particular VTK pipeline?  Or how
> > >does one disconnect a pipeline??
> >

You could also set the actor's mapper to NULL as well, then none of the pipeline will be
executed.
One has to be careful of reference counting then. If you call:
myMapper=vtkMapper::New();
myActor->SetMapper(MyMapper);
myMapper->Delete();

then when you call: myMapper->SetActor(NULL); the mapper will be deleted, I believe.
The solution is to only call myMapper->Delete() when you really want it deleted, say
at the end of your program.

-matt





More information about the vtkusers mailing list