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

Function AddFeatures

Modules/Classification/CLUtilities/src/mitkCLResultXMLWriter.cpp:139–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139void AddFeatures(const mitk::AbstractGlobalImageFeature::FeatureListType& features, tinyxml2::XMLElement* featsNode)
140{
141 auto* doc = featsNode->GetDocument();
142 for (const auto& feat : features)
143 {
144 auto featNode = doc->NewElement("mp:feature");
145 featNode->SetAttribute("name", feat.first.name.c_str());
146 featNode->SetAttribute("version", feat.first.version.c_str());
147 featNode->SetAttribute("class", feat.first.featureClass.c_str());
148 featNode->SetAttribute("setting", feat.first.settingID.c_str());
149 std::ostringstream sstream;
150 sstream.imbue(std::locale("C"));
151 sstream << feat.second;
152 auto* valueText = doc->NewText(sstream.str().c_str());
153 featNode->InsertEndChild(valueText);
154 featsNode->InsertEndChild(featNode);
155 }
156}
157
158void AddFeatureSettings(const mitk::AbstractGlobalImageFeature::FeatureListType& features, tinyxml2::XMLElement* featSettingsNode)
159{

Callers 1

WriteDocumentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected