| 731 | } |
| 732 | |
| 733 | void mitk::Label::RemoveDICOMCodeSequenceProperties(const PropertyKeyPath& basePath) |
| 734 | { |
| 735 | PropertyKeyPath valuePath = basePath; |
| 736 | valuePath.AddElement(LabelPropertyConstants::GetValuePropertySubName()); |
| 737 | |
| 738 | PropertyKeyPath schemePath = basePath; |
| 739 | schemePath.AddElement(LabelPropertyConstants::GetSchemePropertySubName()); |
| 740 | |
| 741 | PropertyKeyPath meaningPath = basePath; |
| 742 | meaningPath.AddElement(LabelPropertyConstants::GetMeaningPropertySubName()); |
| 743 | |
| 744 | this->RemoveProperty(PropertyKeyPathToPropertyName(valuePath).c_str()); |
| 745 | this->RemoveProperty(PropertyKeyPathToPropertyName(schemePath).c_str()); |
| 746 | this->RemoveProperty(PropertyKeyPathToPropertyName(meaningPath).c_str()); |
| 747 | |
| 748 | // Also remove any modifiers |
| 749 | PropertyKeyPath modifierSearchPath = basePath; |
| 750 | modifierSearchPath.AddAnySelection(LabelPropertyConstants::GetModifierPropertySubName()); |
| 751 | modifierSearchPath.AddAnyElement(); |
| 752 | |
| 753 | std::string modifierPattern = PropertyKeyPathToPropertyRegEx(modifierSearchPath); |
| 754 | std::regex modifierRegex(modifierPattern); |
| 755 | |
| 756 | auto propertyKeys = this->GetPropertyKeys(); |
| 757 | for (const auto& key : propertyKeys) |
| 758 | { |
| 759 | if (std::regex_match(key, modifierRegex)) |
| 760 | { |
| 761 | this->RemoveProperty(key); |
| 762 | } |
| 763 | } |
| 764 | } |
| 765 | |
| 766 | void mitk::Label::SetAnatomicRegion(const DICOMCodeSequenceWithModifiers& code, std::size_t index) |
| 767 | { |
nothing calls this directly
no test coverage detected