MCPcopy Create free account
hub / github.com/MITK/MITK / MergeLabels

Function MergeLabels

Modules/Multilabel/src/mitkLabelSuggestionHelper.cpp:49–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 }
48
49 void MergeLabels(mitk::LabelSuggestionHelper::ConstLabelVectorType& target, const mitk::LabelSuggestionHelper::ConstLabelVectorType& source)
50 {
51 for (const auto& label : source)
52 {
53 const auto labelName = label->GetName();
54 bool exists =
55 std::any_of(target.begin(), target.end(), [&labelName](const mitk::Label* l) { return l->GetName() == labelName; });
56 if (!exists)
57 target.push_back(label);
58 }
59 }
60}
61
62namespace mitk

Callers 1

ParseSuggestionsMethod · 0.85

Calls 3

GetNameMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected