[vtkusers] vtkExecution: How to modify to control pipeline execution???

Steven Boyd skboyd at ucalgary.ca
Fri Jul 8 15:48:50 EDT 2005


This is further to my earlier e-mail (7/7/2005).

I am writing a filter that has N inputs, and one output (sub-classed 
from vtkImageMultipleInputFilter) where I need to control the pipeline 
execution so that only one input is updated at a time and then released 
from memory.

In my filter (f), how can I modify vtkExecute for each input so that 
when an f->Update() is called, not all inputs to the filter are read 
into memory until explicitly instructed?  Explicit update should be 
controlled within f::ExecuteThreaded(...).

In my filter I propose the following:

f - filter
i - input

In f::ExecuteInformation()
   -- collect input connections (GetInputConnection for all connections)
   -- for each connection, i, get the vtkExecute pointer
   -- modify vtkExecute so it won't update at f->Update() (HOW??)

Then, in f::ExecuteThreaded(...)
   -- loop through inputs, i:
       - explicitly update vtkImageData input connection n (HOW??)
       - process data and add to output vtkImageData
       - release input from memory
       - *repeat with next input connection

Can somebody please help me understand how to modify vtkExecute?  Any 
other ideas?



ps. If I break the pipeline in f::ExecuteInformation() with 
i->SetSource(NULL) then upon f->Update() the filter errors out because 
there are no inputs.

Steven Boyd

PhD, PEng
Assistant Professor
Department of Mechanical and Manufacturing Engineering
University of Calgary
2500 University Drive, N.W.
Calgary, Alberta, Canada, T2N 1N4

tel. 1.403.220.4173  fax. 1.403.282.8406  skboyd at ucalgary.ca
web. http://www.enme.ucalgary.ca/~skboyd

More information about the vtkusers mailing list