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

Method FindSplitNode

Common/DataModel/vtkReebGraph.cxx:948–983  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

946
947//------------------------------------------------------------------------------
948vtkIdType vtkReebGraph::Implementation::FindSplitNode(
949 vtkIdType arcId, vtkReebLabelTag label, bool onePathOnly)
950{
951 vtkIdType N = this->GetArc(arcId)->NodeId0;
952 vtkIdType Ret;
953
954 if (this->GetArc(arcId)->LabelId0 || !this->GetNode(N)->IsFinalized)
955 // other labels or not final node
956 return 0;
957
958 if (onePathOnly && (this->GetArc(arcId)->ArcDwId1 || this->GetArc(arcId)->ArcUpId1))
959 return 0;
960
961 // base case
962 if (this->GetArc(arcId)->ArcDwId0 || this->GetArc(arcId)->ArcUpId0)
963 {
964 if (label)
965 SetLabel(arcId, label);
966 return N;
967 }
968
969 // iterative case
970 for (vtkIdType C = this->GetNode(N)->ArcDownId; C; C = this->GetArc(C)->ArcDwId1)
971 {
972 Ret = FindSplitNode(C, label, onePathOnly);
973
974 if (Ret)
975 {
976 if (label)
977 SetLabel(arcId, label);
978 return Ret;
979 }
980 }
981
982 return 0;
983}
984
985//------------------------------------------------------------------------------
986vtkReebGraph::Implementation::vtkReebPath vtkReebGraph::Implementation::FindPath(

Callers

nothing calls this directly

Calls 3

GetArcMethod · 0.95
GetNodeMethod · 0.95
SetLabelFunction · 0.50

Tested by

no test coverage detected