| 684 | return lookup; |
| 685 | } |
| 686 | std::string EnsureCorrectPropertyName(const std::string& externalName) |
| 687 | { |
| 688 | auto mapping = GetDeprecatedNameLookup(); |
| 689 | auto finding = mapping.find(externalName); |
| 690 | |
| 691 | if (finding != mapping.end()) |
| 692 | { |
| 693 | MITK_DEBUG << "Deserialized label used deprecated property names. Converted deprecated name into valid name. Deprecated name: \"" << externalName << "\"; new name: \"" << finding->second << "\""; |
| 694 | return finding->second; |
| 695 | } |
| 696 | |
| 697 | auto mapping2 = GetConvinienceNameLookup(); |
| 698 | auto finding2 = mapping2.find(externalName); |
| 699 | |
| 700 | if (finding2 != mapping2.end()) |
| 701 | { |
| 702 | MITK_DEBUG << "Deserialized label used a simplified index-less name. Converted name into valid name. Original name: \"" << externalName << "\"; new name: \"" << finding2->second << "\""; |
| 703 | return finding2->second; |
| 704 | } |
| 705 | |
| 706 | return externalName; |
| 707 | } |
| 708 | } |
| 709 | |
| 710 | mitk::Label::Pointer mitk::MultiLabelIOHelper::DeserializeLabelFromJSON(const nlohmann::json& labelJson) |
no test coverage detected