| 166 | { |
| 167 | |
| 168 | PyLabelVector MakeLabelVector(const LabelVector& src) |
| 169 | { |
| 170 | PyLabelVector result; |
| 171 | result.items.reserve(src.size()); |
| 172 | for (const auto& lbl : src) |
| 173 | result.items.push_back(lbl); |
| 174 | |
| 175 | // Sort by label value for deterministic output |
| 176 | std::sort(result.items.begin(), result.items.end(), |
| 177 | [](const Label::Pointer& a, const Label::Pointer& b) { |
| 178 | return a->GetValue() < b->GetValue(); |
| 179 | }); |
| 180 | |
| 181 | return result; |
| 182 | } |
| 183 | |
| 184 | Label::AlgorithmType ParseAlgorithmType(const std::string& s) |
| 185 | { |
no test coverage detected