| 1457 | } |
| 1458 | |
| 1459 | const mitk::MultiLabelSegmentation::LabelVectorType mitk::MultiLabelSegmentation::GetLabelsByValue(const LabelValueVectorType& labelValues, bool ignoreMissing) |
| 1460 | { |
| 1461 | LabelVectorType result; |
| 1462 | for (const auto& labelValue : labelValues) |
| 1463 | { |
| 1464 | Label::Pointer label = this->GetLabel(labelValue); |
| 1465 | |
| 1466 | if (label.IsNotNull()) |
| 1467 | { |
| 1468 | result.emplace_back(label); |
| 1469 | } |
| 1470 | else if (!ignoreMissing) mitkThrow() << "Error cannot get labels by Value. At least one passed value is unknown. Unknown value: " << labelValue; |
| 1471 | } |
| 1472 | return result; |
| 1473 | } |
| 1474 | |
| 1475 | const mitk::MultiLabelSegmentation::ConstLabelVectorType mitk::MultiLabelSegmentation::GetConstLabelsByValue(const LabelValueVectorType& labelValues, bool ignoreMissing) const |
| 1476 | { |
no test coverage detected