| 1473 | } |
| 1474 | |
| 1475 | const 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 | |
| 1491 | const mitk::MultiLabelSegmentation::LabelValueVectorType mitk::MultiLabelSegmentation::GetLabelValuesByGroup(GroupIndexType index) const |
| 1492 | { |