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

Method GetGraphRepresentation

Views/Infovis/vtkHierarchicalGraphView.cxx:22–43  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

20
21//------------------------------------------------------------------------------
22vtkRenderedGraphRepresentation* vtkHierarchicalGraphView::GetGraphRepresentation()
23{
24 vtkRenderedHierarchyRepresentation* graphRep = nullptr;
25 for (int i = 0; i < this->GetNumberOfRepresentations(); ++i)
26 {
27 vtkDataRepresentation* rep = this->GetRepresentation(i);
28 graphRep = vtkRenderedHierarchyRepresentation::SafeDownCast(rep);
29 if (graphRep)
30 {
31 break;
32 }
33 }
34 if (!graphRep)
35 {
36 vtkSmartPointer<vtkTree> t = vtkSmartPointer<vtkTree>::New();
37 graphRep =
38 vtkRenderedHierarchyRepresentation::SafeDownCast(this->AddRepresentationFromInput(t));
39 vtkSmartPointer<vtkDirectedGraph> g = vtkSmartPointer<vtkDirectedGraph>::New();
40 graphRep->SetInputData(1, g);
41 }
42 return graphRep;
43}
44
45//------------------------------------------------------------------------------
46vtkRenderedHierarchyRepresentation* vtkHierarchicalGraphView::GetHierarchyRepresentation()

Callers 1

Calls 5

GetRepresentationMethod · 0.80
NewFunction · 0.50
SetInputDataMethod · 0.45

Tested by

no test coverage detected