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

Method GetDICOMCodeSequenceFromProperties

Modules/Multilabel/src/mitkLabel.cpp:676–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

674}
675
676std::optional<mitk::DICOMCodeSequence> mitk::Label::GetDICOMCodeSequenceFromProperties(const PropertyKeyPath& basePath) const
677{
678 PropertyKeyPath valuePath = basePath;
679 valuePath.AddElement(LabelPropertyConstants::GetValuePropertySubName());
680
681 PropertyKeyPath schemePath = basePath;
682 schemePath.AddElement(LabelPropertyConstants::GetSchemePropertySubName());
683
684 PropertyKeyPath meaningPath = basePath;
685 meaningPath.AddElement(LabelPropertyConstants::GetMeaningPropertySubName());
686
687 std::string value, scheme, meaning;
688 GetStringProperty(PropertyKeyPathToPropertyName(valuePath).c_str(), value);
689 GetStringProperty(PropertyKeyPathToPropertyName(schemePath).c_str(), scheme);
690 GetStringProperty(PropertyKeyPathToPropertyName(meaningPath).c_str(), meaning);
691
692 auto result = DICOMCodeSequence(value, scheme, meaning);
693
694 if (result.IsEmpty())
695 return std::optional<mitk::DICOMCodeSequence>();
696
697 return result;
698}
699
700std::optional<mitk::DICOMCodeSequenceWithModifiers> mitk::Label::GetDICOMCodeSequenceWithModifiersFromProperties(const PropertyKeyPath& basePath) const
701{

Callers

nothing calls this directly

Calls 4

DICOMCodeSequenceFunction · 0.85
AddElementMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected