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

Method RequestData

Common/ExecutionModel/vtkImageAlgorithm.cxx:39–74  ·  view source on GitHub ↗

------------------------------------------------------------------------------ This is the superclasses style of Execute method. Convert it into an imaging style Execute method.

Source from the content-addressed store, hash-verified

37// This is the superclasses style of Execute method. Convert it into
38// an imaging style Execute method.
39int vtkImageAlgorithm::RequestData(vtkInformation* request,
40 vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector)
41{
42 // the default implementation is to do what the old pipeline did find what
43 // output is requesting the data, and pass that into ExecuteData
44
45 // which output port did the request come from
46 int outputPort = request->Get(vtkDemandDrivenPipeline::FROM_OUTPUT_PORT());
47
48 // if output port is negative then that means this filter is calling the
49 // update directly, in that case just assume port 0
50 if (outputPort == -1)
51 {
52 outputPort = 0;
53 }
54
55 // get the data object
56 vtkInformation* outInfo = outputVector->GetInformationObject(outputPort);
57 // call ExecuteData
58 this->SetErrorCode(vtkErrorCode::NoError);
59 if (outInfo)
60 {
61 this->ExecuteDataWithInformation(outInfo->Get(vtkDataObject::DATA_OBJECT()), outInfo);
62 }
63 else
64 {
65 this->ExecuteData(nullptr);
66 }
67 // Check for any error set by downstream filter (IO in most case)
68 if (this->GetErrorCode())
69 {
70 return 0;
71 }
72
73 return 1;
74}
75
76//------------------------------------------------------------------------------
77vtkTypeBool vtkImageAlgorithm::ProcessRequest(

Callers 1

ProcessRequestMethod · 0.95

Calls 4

ExecuteDataMethod · 0.95
GetInformationObjectMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected