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

Method ProcessComposite

Filters/General/vtkRandomAttributeGenerator.cxx:285–324  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

283
284//------------------------------------------------------------------------------
285int vtkRandomAttributeGenerator::ProcessComposite(
286 vtkCompositeDataSet* input, vtkCompositeDataSet* output)
287{
288 if (input == nullptr || output == nullptr)
289 {
290 return 0;
291 }
292 output->CopyStructure(input);
293
294 vtkSmartPointer<vtkCompositeDataIterator> it;
295 it.TakeReference(input->NewIterator());
296 for (it->InitTraversal(); !it->IsDoneWithTraversal(); it->GoToNextItem())
297 {
298 if (this->CheckAbort())
299 {
300 break;
301 }
302
303 vtkDataSet* inputDS = vtkDataSet::SafeDownCast(it->GetCurrentDataObject());
304 if (inputDS)
305 {
306 vtkSmartPointer<vtkDataSet> outputDS;
307 outputDS.TakeReference(inputDS->NewInstance());
308 output->SetDataSet(it, outputDS);
309 this->ProcessDataSet(inputDS, outputDS);
310 continue;
311 }
312
313 vtkHyperTreeGrid* inputHTG = vtkHyperTreeGrid::SafeDownCast(it->GetCurrentDataObject());
314 if (inputHTG)
315 {
316 vtkSmartPointer<vtkHyperTreeGrid> outputHTG;
317 outputHTG.TakeReference(inputHTG->NewInstance());
318 output->SetDataSet(it, outputHTG);
319 this->ProcessHTG(inputHTG, outputHTG);
320 continue;
321 }
322 }
323 return 1;
324}
325
326//------------------------------------------------------------------------------
327int vtkRandomAttributeGenerator::ProcessDataSet(vtkDataSet* input, vtkDataSet* output)

Callers 1

RequestDataMethod · 0.95

Calls 12

ProcessDataSetMethod · 0.95
ProcessHTGMethod · 0.95
CheckAbortMethod · 0.80
CopyStructureMethod · 0.45
TakeReferenceMethod · 0.45
NewIteratorMethod · 0.45
InitTraversalMethod · 0.45
IsDoneWithTraversalMethod · 0.45
GoToNextItemMethod · 0.45
GetCurrentDataObjectMethod · 0.45
NewInstanceMethod · 0.45
SetDataSetMethod · 0.45

Tested by

no test coverage detected