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

Method ProcessRequest

Common/ExecutionModel/vtkDemandDrivenPipeline.cxx:133–267  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

131
132//------------------------------------------------------------------------------
133vtkTypeBool vtkDemandDrivenPipeline::ProcessRequest(
134 vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec)
135{
136 // The algorithm should not invoke anything on the executive.
137 if (!this->CheckAlgorithm("ProcessRequest", request))
138 {
139 return 0;
140 }
141
142 if (this->Algorithm && request->Has(REQUEST_DATA_OBJECT()))
143 {
144 // if we are up to date then short circuit
145 if (this->PipelineMTime < this->DataObjectTime.GetMTime())
146 {
147 return 1;
148 }
149 // Update inputs first if they are out of date
150 if (!this->ForwardUpstream(request))
151 {
152 return 0;
153 }
154
155 // Make sure our output data type is up-to-date.
156 int result = 1;
157 if (this->PipelineMTime > this->DataObjectTime.GetMTime())
158 {
159 // Request data type from the algorithm.
160 vtkLogF(TRACE, "%s execute-data-object", vtkLogIdentifier(this->Algorithm));
161 result = this->ExecuteDataObject(request, inInfoVec, outInfoVec);
162
163 // Make sure the data object exists for all output ports.
164 for (int i = 0; result && i < outInfoVec->GetNumberOfInformationObjects(); ++i)
165 {
166 vtkInformation* info = outInfoVec->GetInformationObject(i);
167 if (!info->Get(vtkDataObject::DATA_OBJECT()))
168 {
169 result = 0;
170 }
171 }
172
173 if (result)
174 {
175 // Data object is now up to date.
176 this->DataObjectTime.Modified();
177 }
178 }
179
180 return result;
181 }
182
183 if (this->Algorithm && request->Has(REQUEST_INFORMATION()))
184 {
185 // if we are up to date then short circuit
186 if (this->PipelineMTime < this->InformationTime.GetMTime())
187 {
188 return 1;
189 }
190 // Update inputs first.

Callers 3

UpdateDataObjectMethod · 0.95
UpdateInformationMethod · 0.95
UpdateDataMethod · 0.95

Calls 14

ExecuteDataObjectMethod · 0.95
InputCountIsValidMethod · 0.95
InputTypeIsValidMethod · 0.95
ExecuteInformationMethod · 0.95
InputFieldsAreValidMethod · 0.95
ExecuteDataMethod · 0.95
CheckAlgorithmMethod · 0.80
GetInformationObjectMethod · 0.80
HasMethod · 0.45
GetMTimeMethod · 0.45
ForwardUpstreamMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected