MCPcopy Create free account
hub / github.com/MITK/MITK / RemoveDICOMCodeSequenceProperties

Method RemoveDICOMCodeSequenceProperties

Modules/Multilabel/src/mitkLabel.cpp:733–764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

731}
732
733void 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
766void mitk::Label::SetAnatomicRegion(const DICOMCodeSequenceWithModifiers& code, std::size_t index)
767{

Callers

nothing calls this directly

Calls 5

AddElementMethod · 0.80
RemovePropertyMethod · 0.45
GetPropertyKeysMethod · 0.45

Tested by

no test coverage detected