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

Method SetLabel

Common/DataModel/vtkReebGraph.cxx:728–758  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

726
727//------------------------------------------------------------------------------
728void vtkReebGraph::Implementation::SetLabel(vtkIdType arcId, vtkReebLabelTag Label)
729{
730 inputMesh = nullptr;
731
732 ResizeMainLabelTable(1);
733
734 // create a new label in the graph
735 vtkIdType L = this->MainLabelTable.FreeZone;
736 this->MainLabelTable.FreeZone = this->GetLabel(L)->ArcId;
737 ++(this->MainLabelTable.Number);
738 memset(this->GetLabel(L), 0, sizeof(vtkReebLabel));
739 vtkReebLabel* l = this->GetLabel(L);
740
741 l->HPrev = 0;
742 l->HNext = 0;
743 this->GetArc(arcId)->LabelId0 = L;
744 this->GetArc(arcId)->LabelId1 = L;
745
746 l->ArcId = arcId;
747 l->label = Label;
748
749 vtkIdType Lp = FindDwLabel(this->GetArc(arcId)->NodeId0, Label);
750 vtkIdType Ln = FindUpLabel(this->GetArc(arcId)->NodeId1, Label);
751
752 l->VPrev = Lp;
753 if (Lp)
754 this->GetLabel(Lp)->VNext = L;
755 l->VNext = Ln;
756 if (Ln)
757 this->GetLabel(Ln)->VPrev = L;
758}
759
760//------------------------------------------------------------------------------
761void vtkReebGraph::Implementation::FastArcSimplify(

Callers

nothing calls this directly

Calls 2

GetLabelMethod · 0.95
GetArcMethod · 0.95

Tested by

no test coverage detected