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

Method RequestData

Infovis/BoostGraphAlgorithms/vtkBoostDividedEdgeBundling.cxx:539–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537}
538
539int vtkBoostDividedEdgeBundling::RequestData(vtkInformation* vtkNotUsed(request),
540 vtkInformationVector** inputVector, vtkInformationVector* outputVector)
541{
542 // get the info objects
543 vtkInformation* graphInfo = inputVector[0]->GetInformationObject(0);
544 vtkInformation* outInfo = outputVector->GetInformationObject(0);
545
546 // get the input and output
547 vtkDirectedGraph* g =
548 vtkDirectedGraph::SafeDownCast(graphInfo->Get(vtkDataObject::DATA_OBJECT()));
549 vtkDirectedGraph* output =
550 vtkDirectedGraph::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
551
552 vtkBundlingMetadata* meta = new vtkBundlingMetadata(this, g);
553
554 meta->NormalizeNodePositions();
555 meta->CalculateEdgeLengths();
556 meta->CalculateNodeDistances();
557 meta->CalculateEdgeCompatibilities();
558 meta->LayoutEdgePoints();
559 meta->DenormalizeNodePositions();
560
561 output->ShallowCopy(g);
562
563 for (vtkIdType e = 0; e < g->GetNumberOfEdges(); ++e)
564 {
565 output->ClearEdgePoints(e);
566 for (int m = 1; m < meta->MeshCount - 1; ++m)
567 {
568 vtkVector3f edgePoint = meta->EdgeMesh[e][m];
569 output->AddEdgePoint(e, edgePoint[0], edgePoint[1], edgePoint[2]);
570 }
571 }
572
573 delete meta;
574
575 return 1;
576}
577
578void vtkBoostDividedEdgeBundling::PrintSelf(ostream& os, vtkIndent indent)
579{

Callers

nothing calls this directly

Calls 12

GetInformationObjectMethod · 0.80
CalculateEdgeLengthsMethod · 0.80
ClearEdgePointsMethod · 0.80
AddEdgePointMethod · 0.80
GetMethod · 0.45
LayoutEdgePointsMethod · 0.45
ShallowCopyMethod · 0.45
GetNumberOfEdgesMethod · 0.45

Tested by

no test coverage detected