[vtk-developers] Proposed addition to vtkProcessObject

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Mon Dec 23 06:51:41 EST 2002


If you have a (parent) filter which creates one or more filters internally
and executes them inside the parent Execute method, the progress messages
from the internal (child) filters are lost and for complex filters this can
result in poor feedback.

I'd like to add
vtkProcessObject::InterceptProgress(vtkProcessObject *child, float r0, float
r1);

which will install a hook to the child's Progrees Updates and reroute it to
the parent. The range modifiers r0 and r1 would allow you to do the
following...

parentFilter->InterceptProgress(childfilter1, 0.0,  0.25);
parentFilter->InterceptProgress(childfilter1, 0.25, 0.5);
parentFilter->InterceptProgress(childfilter1, 0.5,  0.75);
parentFilter->InterceptProgress(childfilter1, 0.75, 1.0);
(for example), and thereby have say 4 filters which each contribute a
fraction of the overall progress of the parent filter.

This would all be fine except that I need to add an int to
vtkProcessObject's private data to keep track of the Command ID. I don't
like the idea of adding data to vtkProcessObject when it is not going to be
used 99% of the time (I only really want it for a few complex filters which
take forever to update and internally use several others).

NB (The int could be avoided if I could access the vtkCommand object that
spawns the message - subclass vtkCommand, store r0 and r1 in the command
object, and then access this directly - need the int to get the command
object ID)

I suspect this is a question for the ARB because if nobody replies either
for or against this message I'll be left wondering if I should add it or
not.

JB





More information about the vtk-developers mailing list