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

Method RequestData

Filters/Generic/vtkGenericStreamTracer.cxx:546–584  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

544
545//------------------------------------------------------------------------------
546int vtkGenericStreamTracer::RequestData(vtkInformation* vtkNotUsed(request),
547 vtkInformationVector** inputVector, vtkInformationVector* outputVector)
548{
549 // get the info objects
550 vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);
551 vtkInformation* outInfo = outputVector->GetInformationObject(0);
552
553 // get the input and output
554 vtkGenericDataSet* input =
555 vtkGenericDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));
556 vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
557
558 vtkDataArray* seeds = nullptr;
559 vtkIdList* seedIds = nullptr;
560 vtkIntArray* integrationDirections = nullptr;
561 this->InitializeSeeds(seeds, seedIds, integrationDirections);
562
563 if (seeds)
564 {
565 double lastPoint[3];
566 vtkGenericInterpolatedVelocityField* func;
567 if (this->CheckInputs(func, inputVector) != VTK_OK)
568 {
569 vtkDebugMacro("No appropriate inputs have been found. Can not execute.");
570 func->Delete();
571 seeds->Delete();
572 integrationDirections->Delete();
573 seedIds->Delete();
574 return 1;
575 }
576 this->Integrate(input, output, seeds, seedIds, integrationDirections, lastPoint, func);
577 func->Delete();
578 seeds->Delete();
579 }
580
581 integrationDirections->Delete();
582 seedIds->Delete();
583 return 1;
584}
585
586//------------------------------------------------------------------------------
587int vtkGenericStreamTracer::CheckInputs(

Callers

nothing calls this directly

Calls 6

InitializeSeedsMethod · 0.95
CheckInputsMethod · 0.95
IntegrateMethod · 0.95
GetInformationObjectMethod · 0.80
DeleteMethod · 0.65
GetMethod · 0.45

Tested by

no test coverage detected