Commit e41126a2 authored by David Cole's avatar David Cole
Browse files

ENH: Merge changes from main tree into VTK-5-0 branch. (cvs -q up -j1.43...

ENH: Merge changes from main tree into VTK-5-0 branch. (cvs -q up -j1.43 -j1.44 Filtering/vtkDemandDrivenPipeline.cxx)
parent 11b40147
......@@ -42,7 +42,7 @@
#include <vtkstd/vector>
vtkCxxRevisionMacro(vtkDemandDrivenPipeline, "1.37.4.4");
vtkCxxRevisionMacro(vtkDemandDrivenPipeline, "1.37.4.5");
vtkStandardNewMacro(vtkDemandDrivenPipeline);
vtkInformationKeyMacro(vtkDemandDrivenPipeline, DATA_NOT_GENERATED, Integer);
......@@ -513,6 +513,8 @@ void vtkDemandDrivenPipeline::ExecuteDataStart(vtkInformation* request,
vtkInformationVector** inInfo,
vtkInformationVector* outputs)
{
int i;
// Ask the algorithm to mark outputs that it will not generate.
request->Remove(REQUEST_DATA());
request->Set(REQUEST_DATA_NOT_GENERATED());
......@@ -522,7 +524,7 @@ void vtkDemandDrivenPipeline::ExecuteDataStart(vtkInformation* request,
request->Set(REQUEST_DATA());
// Prepare outputs that will be generated to receive new data.
for(int i=0; i < outputs->GetNumberOfInformationObjects(); ++i)
for(i=0; i < outputs->GetNumberOfInformationObjects(); ++i)
{
vtkInformation* outInfo = outputs->GetInformationObject(i);
vtkDataObject* data = outInfo->Get(vtkDataObject::DATA_OBJECT());
......@@ -533,6 +535,25 @@ void vtkDemandDrivenPipeline::ExecuteDataStart(vtkInformation* request,
}
}
// Pass the vtkDataObject's field data from the first input to all
// outputs.
if (this->GetNumberOfInputPorts() > 0)
{
vtkDataObject* input = this->GetInputData(0, 0);
if (input && input->GetFieldData())
{
for(i=0; i < outputs->GetNumberOfInformationObjects(); ++i)
{
vtkInformation* outInfo = outputs->GetInformationObject(i);
vtkDataObject* output = outInfo->Get(vtkDataObject::DATA_OBJECT());
if(output)
{
output->GetFieldData()->PassData(input->GetFieldData());
}
}
}
}
// Tell observers the algorithm is about to execute.
this->Algorithm->InvokeEvent(vtkCommand::StartEvent,NULL);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment