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

Method GetConstLabelsByValue

Modules/Multilabel/src/mitkLabelSetImage.cpp:1475–1489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1473}
1474
1475const mitk::MultiLabelSegmentation::ConstLabelVectorType mitk::MultiLabelSegmentation::GetConstLabelsByValue(const LabelValueVectorType& labelValues, bool ignoreMissing) const
1476{
1477 ConstLabelVectorType result;
1478 for (const auto& labelValue : labelValues)
1479 {
1480 Label::ConstPointer label = this->GetLabel(labelValue);
1481
1482 if (label.IsNotNull())
1483 {
1484 result.emplace_back(label);
1485 }
1486 else if (!ignoreMissing) mitkThrow() << "Error cannot get labels by Value. At least one passed value is unknown. Unknown value: " << labelValue;
1487 }
1488 return result;
1489}
1490
1491const mitk::MultiLabelSegmentation::LabelValueVectorType mitk::MultiLabelSegmentation::GetLabelValuesByGroup(GroupIndexType index) const
1492{

Callers 15

MergeLabelsMethod · 0.95
AddLabelWithContentMethod · 0.95
VisitLabelsMethod · 0.95
DoReadMethod · 0.80
WriteMethod · 0.80
BuildMetaInfoHandlerMethod · 0.80

Calls 2

GetLabelMethod · 0.95
IsNotNullMethod · 0.80