MCPcopy Create free account
hub / github.com/Kitware/VTK / UpdateData

Method UpdateData

Common/ExecutionModel/vtkDemandDrivenPipeline.cxx:374–406  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

372
373//------------------------------------------------------------------------------
374int 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//------------------------------------------------------------------------------
409int vtkDemandDrivenPipeline::ExecuteDataObject(

Callers 2

UpdateMethod · 0.95
UpdateMethod · 0.80

Calls 7

ProcessRequestMethod · 0.95
CheckAlgorithmMethod · 0.80
NewFunction · 0.50
SetMethod · 0.45
GetInputInformationMethod · 0.45
GetOutputInformationMethod · 0.45

Tested by

no test coverage detected