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

Method GetGraphRepresentation

Views/Infovis/vtkGraphLayoutView.cxx:39–57  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

37
38//------------------------------------------------------------------------------
39vtkRenderedGraphRepresentation* vtkGraphLayoutView::GetGraphRepresentation()
40{
41 vtkRenderedGraphRepresentation* graphRep = nullptr;
42 for (int i = 0; i < this->GetNumberOfRepresentations(); ++i)
43 {
44 vtkDataRepresentation* rep = this->GetRepresentation(i);
45 graphRep = vtkRenderedGraphRepresentation::SafeDownCast(rep);
46 if (graphRep)
47 {
48 break;
49 }
50 }
51 if (!graphRep)
52 {
53 vtkSmartPointer<vtkDirectedGraph> g = vtkSmartPointer<vtkDirectedGraph>::New();
54 graphRep = vtkRenderedGraphRepresentation::SafeDownCast(this->AddRepresentationFromInput(g));
55 }
56 return graphRep;
57}
58
59//------------------------------------------------------------------------------
60vtkDataRepresentation* vtkGraphLayoutView::CreateDefaultRepresentation(vtkAlgorithmOutput* port)

Calls 4

GetRepresentationMethod · 0.80
NewFunction · 0.50

Tested by

no test coverage detected