[vtk-developers] VTK-5 - Filter with multiple outputs
Ovidiu Toader
ovi at physics.utoronto.ca
Mon Oct 17 15:29:24 EDT 2005
> Your filter will need to override the ProcessRequest method and look for
> a REQUEST_DATA_NOT_GENERATED.
Thanks for this info! From your description it looks like this is what I am
looking for. I've already noticed this key but wasn't sure how to use it.
After I found out that this particular request was the only one returning a
Null from request->GetRequest() I decided to move away from it because it
appears different from the other requests.
> Override the ComputePipelineMTime
> method and look at the request object for the output port that made the
> request. Return the MTime from the object corresponding to that output
> port.
I tried this. My Algorithm overrides
ComputePipelineMTime(vtkInformation *request)
However, all the calls to this method have a Null request. I thought that this
request would be a good place to store info such as the output port which
initiated the update but to my surprise it wasn't.
I can provide more info about this request = 0 problem. When my algorithm's
ComputePipelineMTime is called the backtrace looks like this:
starts with:
int vtkDemandDrivenPipeline::UpdatePipelineMTime() {
...
this->ComputePipelineMTime(1,0,this->GetInputInformation());
...
}
followed by a variable number of calls like this:
unsigned long vtkDemandDrivenPipeline::ComputePipelineMTime(int
forward,vtkInformation *request,vtkInformationVector **inInfoVec) {
...
vtkInformation* info = inInfoVec[i]->GetInformationObject(j);
// call ComputePipelineMTime on the input
vtkExecutive* e;
int producerPort;
info->Get(vtkExecutive::PRODUCER(),e,producerPort);
if(e)
{
unsigned long mtime =
e->ComputePipelineMTime(1,request,e->GetInputInformation());
if(mtime > this->PipelineMTime)
{
this->PipelineMTime = mtime;
}
}
...
}
which, eventually, lead to a call to my ComputePipelineMTime. The problem with
this call sequence is that the same Null request initiated in
vtkDemandDrivenPipeline::UpdatePipelineMTime is propagated all the way to my
ComputePipelineMTime.
I don't feel like I have a good understanding of the implementation of this
new pipeline so I refrain -- at least for now -- from making any suggestion
about the way I see a possible fix to this problem.
Thanks,
Ovidiu
More information about the vtk-developers
mailing list