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

Function DICOMTagPathToPropertyName

Modules/DICOM/src/mitkDICOMTagPath.cpp:729–765  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

727 };
728
729 std::string
730 DICOMTagPathToPropertyName(const mitk::DICOMTagPath& tagPath)
731 {
732 std::ostringstream nameStream;
733
734 nameStream << "DICOM";
735
736 for (const auto& node : tagPath.GetNodes())
737 {
738 nameStream << ".";
739
740 if (node.type == DICOMTagPath::NodeInfo::NodeType::AnyElement)
741 {
742 nameStream << "*";
743 }
744 else if (node.type != DICOMTagPath::NodeInfo::NodeType::Invalid)
745 {
746 nameStream << std::setw(4) << std::setfill('0') << std::hex << std::uppercase << node.tag.GetGroup() << std::nouppercase << "."
747 << std::setw(4) << std::setfill('0') << std::hex << std::uppercase << node.tag.GetElement();
748
749 if (node.type == DICOMTagPath::NodeInfo::NodeType::SequenceSelection)
750 {
751 nameStream << ".[" << node.selection << "]";
752 }
753 else if (node.type == DICOMTagPath::NodeInfo::NodeType::AnySelection)
754 {
755 nameStream << ".[*]";
756 }
757 }
758 else
759 {
760 nameStream << "INVALID_NODE";
761 }
762 }
763
764 return nameStream.str();
765 }
766
767 std::string DICOMTagPathToReadableName(const DICOMTagPath& tagPath, bool includeTagNumbers)
768 {

Callers 15

AddTagOfInterestMethod · 0.85
setUpMethod · 0.85
ExecutePropertyRegExMethod · 0.85
SetPropertiesFunction · 0.85
ReadMethod · 0.85
SetDicomTagFunction · 0.85
PropNameFunction · 0.85
SeqPropNameFunction · 0.85

Calls 3

GetNodesMethod · 0.45
GetGroupMethod · 0.45
GetElementMethod · 0.45