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

Method GetLabelValuesByName

Modules/Multilabel/src/mitkLabelSetImage.cpp:1499–1508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1497}
1498
1499const mitk::MultiLabelSegmentation::LabelValueVectorType mitk::MultiLabelSegmentation::GetLabelValuesByName(const std::string_view name) const
1500{
1501 LabelValueVectorType result;
1502
1503 auto searchName = [&result, name](const Label* l) { if (l->GetName() == name) result.push_back(l->GetValue()); };
1504
1505 this->VisitLabels(this->GetAllLabelValues(), searchName);
1506
1507 return result;
1508}
1509
1510const mitk::MultiLabelSegmentation::LabelValueVectorType mitk::MultiLabelSegmentation::GetLabelValuesByName(GroupIndexType index, const std::string_view name) const
1511{

Callers 10

IsNewInstanceAllowedMethod · 0.80
FilterSuggestionsMethod · 0.80
TestGetLabelValuesMethod · 0.80
TestLoadJSONPresetMethod · 0.80
loadMaskImageFunction · 0.80

Calls 5

VisitLabelsMethod · 0.95
GetAllLabelValuesMethod · 0.95
GetLabelValuesByGroupMethod · 0.95
GetNameMethod · 0.45
GetValueMethod · 0.45

Tested by 3

TestGetLabelValuesMethod · 0.64
TestLoadJSONPresetMethod · 0.64