------------------------------------------------------------------------------
| 372 | |
| 373 | //------------------------------------------------------------------------------ |
| 374 | int vtkDemandDrivenPipeline::UpdateData(int outputPort) |
| 375 | { |
| 376 | // The algorithm should not invoke anything on the executive. |
| 377 | if (!this->CheckAlgorithm("UpdateData", nullptr)) |
| 378 | { |
| 379 | return 0; |
| 380 | } |
| 381 | |
| 382 | // Range check. |
| 383 | if (outputPort < -1 || outputPort >= this->Algorithm->GetNumberOfOutputPorts()) |
| 384 | { |
| 385 | vtkErrorMacro("UpdateData given output port index " << outputPort << " on an algorithm with " |
| 386 | << this->Algorithm->GetNumberOfOutputPorts() |
| 387 | << " output ports."); |
| 388 | return 0; |
| 389 | } |
| 390 | |
| 391 | // Setup the request for data. |
| 392 | if (!this->DataRequest) |
| 393 | { |
| 394 | this->DataRequest = vtkInformation::New(); |
| 395 | this->DataRequest->Set(REQUEST_DATA()); |
| 396 | // The request is forwarded upstream through the pipeline. |
| 397 | this->DataRequest->Set(vtkExecutive::FORWARD_DIRECTION(), vtkExecutive::RequestUpstream); |
| 398 | // Algorithms process this request after it is forwarded. |
| 399 | this->DataRequest->Set(vtkExecutive::ALGORITHM_AFTER_FORWARD(), 1); |
| 400 | } |
| 401 | |
| 402 | // Send the request. |
| 403 | this->DataRequest->Set(FROM_OUTPUT_PORT(), outputPort); |
| 404 | return this->ProcessRequest( |
| 405 | this->DataRequest, this->GetInputInformation(), this->GetOutputInformation()); |
| 406 | } |
| 407 | |
| 408 | //------------------------------------------------------------------------------ |
| 409 | int vtkDemandDrivenPipeline::ExecuteDataObject( |
no test coverage detected