| 137 | } |
| 138 | |
| 139 | void 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 | |
| 158 | void AddFeatureSettings(const mitk::AbstractGlobalImageFeature::FeatureListType& features, tinyxml2::XMLElement* featSettingsNode) |
| 159 | { |