| 304 | } |
| 305 | |
| 306 | mitk::LabelSetImageHelper::GroupIDToLabelValueMapType |
| 307 | mitk::LabelSetImageHelper::SplitLabelValuesByGroup(const MultiLabelSegmentation* labelSetImage, const MultiLabelSegmentation::LabelValueVectorType& labelValues) |
| 308 | { |
| 309 | if (nullptr == labelSetImage) |
| 310 | mitkThrow() << "Cannot split label values. Invalid MultiLabelSegmentation pointer passed"; |
| 311 | |
| 312 | GroupIDToLabelValueMapType result; |
| 313 | |
| 314 | for (auto value : labelValues) |
| 315 | { |
| 316 | auto groupID = labelSetImage->GetGroupIndexOfLabel(value); |
| 317 | |
| 318 | //if groupID does not exist in result this call will also init an empty vector. |
| 319 | result[groupID].push_back(value); |
| 320 | } |
| 321 | |
| 322 | return result; |
| 323 | } |
| 324 | |
| 325 | mitk::LabelSetImageHelper::LabelClassNameToLabelValueMapType |
| 326 | mitk::LabelSetImageHelper::SplitLabelValuesByClassName(const MultiLabelSegmentation* labelSetImage, MultiLabelSegmentation::GroupIndexType groupID) |
nothing calls this directly
no test coverage detected