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

David Gobbi dgobbi at irus.rri.on.ca
Mon Jul 17 13:21:16 EDT 2000


Hi Prabhu,

This came up not too long ago.  If you are using a recent copy of
VTK (i.e. post-3.1) then you can use SetInput(None).  Basically,
python 'None' is always translated to 'NULL' and vice-versa.

 - David

--
  David Gobbi, MSc                    dgobbi at irus.rri.on.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

On Wed, 5 Jul 2000, Prabhu Ramachandran wrote:

> hi,
> 
> 	Thanks for all the tips.  But how does one do all this with
> python?  Using SetInput(0) results in an exception (SystemError).  Or
> should I just do something like
> 
> c = vtkContourFilter()
> # do something with c
> ...
> # turn c off
> s = vtkPolyDataReader()
> c.SetInput(s.GetOutput())
> # do whatever
> ...
> # turn it back on
> c.SetInput(correct_object.GetOutput())
> 
> Is there no other way to do this?  Or am I missing something?
> 
> prabhu
> 
> >>>>> "Law" == Charles Law <charles.law at kitware.com> writes:
> 
>     Law> Setting the output of a source/filter to NULL will have the
>     Law> same effect.  Turn the pipeline back on by setting the output
>     Law> back to the old value.
> 
>     Law> Charles.
> 
>     Law> 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??
>     >> 
>     >> Write a simple filter which takes an input, and generates an
>     >> output, all it does is copystructure from input to output and
>     >> pass point and cell data, override the update mechanism so that
>     >> when flag=false, output doesn't get updated, when flag=true it
>     >> acts as usual.
>     >> 
> 
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> vtkusers mailing list
> vtkusers at public.kitware.com
> http://public.kitware.com/mailman/listinfo/vtkusers
> 





More information about the vtkusers mailing list