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

Method FindJoinNode

Common/DataModel/vtkReebGraph.cxx:911–945  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

909
910//------------------------------------------------------------------------------
911vtkIdType vtkReebGraph::Implementation::FindJoinNode(
912 vtkIdType arcId, vtkReebLabelTag label, bool onePathOnly)
913{
914 vtkIdType N = this->GetArc(arcId)->NodeId1;
915 vtkIdType Ret;
916
917 if (this->GetArc(arcId)->LabelId0 || !this->GetNode(N)->IsFinalized)
918 // other labels or not final node
919 return 0;
920
921 if (onePathOnly && (this->GetArc(arcId)->ArcDwId0 || this->GetArc(arcId)->ArcUpId0))
922 return 0;
923
924 // base case
925 if (this->GetArc(arcId)->ArcDwId1 || this->GetArc(arcId)->ArcUpId1)
926 {
927 if (label)
928 SetLabel(arcId, label);
929 return N;
930 }
931
932 for (vtkIdType C = this->GetNode(N)->ArcUpId; C; C = this->GetArc(C)->ArcDwId0)
933 {
934 Ret = FindJoinNode(C, label, onePathOnly);
935
936 if (Ret)
937 {
938 if (label)
939 SetLabel(arcId, label);
940 return Ret;
941 }
942 }
943
944 return 0;
945}
946
947//------------------------------------------------------------------------------
948vtkIdType vtkReebGraph::Implementation::FindSplitNode(

Callers

nothing calls this directly

Calls 3

GetArcMethod · 0.95
GetNodeMethod · 0.95
SetLabelFunction · 0.50

Tested by

no test coverage detected