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

Method RequestData

Common/ExecutionModel/vtkHyperTreeGridAlgorithm.cxx:239–280  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

237
238//------------------------------------------------------------------------------
239int vtkHyperTreeGridAlgorithm::RequestData(vtkInformation* vtkNotUsed(request),
240 vtkInformationVector** inputVector, vtkInformationVector* outputVector)
241{
242 // Update progress
243 this->UpdateProgress(0.);
244
245 // Retrieve input and output
246 vtkHyperTreeGrid* input = vtkHyperTreeGrid::GetData(inputVector[0], 0);
247 if (!input)
248 {
249 vtkErrorMacro("No input available. Cannot proceed with hyper tree grid algorithm.");
250 return 0;
251 }
252 vtkDataObject* outputDO = vtkDataObject::GetData(outputVector, 0);
253 if (!outputDO)
254 {
255 vtkErrorMacro("No output available. Cannot proceed with hyper tree grid algorithm.");
256 return 0;
257 }
258
259 this->OutData = nullptr;
260
261 // Process all trees in input grid and generate input data object
262 // only if extents are correct
263 if ((input->GetExtent()[0] <= input->GetExtent()[1] ||
264 input->GetExtent()[2] <= input->GetExtent()[3] ||
265 input->GetExtent()[4] <= input->GetExtent()[5]) &&
266 !this->ProcessTrees(input, outputDO))
267 {
268 return 0;
269 }
270
271 // Squeeze output data if present
272 if (this->OutData)
273 {
274 this->OutData->Squeeze();
275 }
276
277 // Update progress and return
278 this->UpdateProgress(1.);
279 return 1;
280}
281
282//------------------------------------------------------------------------------
283void vtkHyperTreeGridAlgorithm::SetInputData(vtkDataObject* input)

Callers 1

ProcessRequestMethod · 0.95

Calls 5

GetDataFunction · 0.50
UpdateProgressMethod · 0.45
GetExtentMethod · 0.45
ProcessTreesMethod · 0.45
SqueezeMethod · 0.45

Tested by

no test coverage detected