comparison OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp @ 5042:120945ce48b6

fix
author Alain Mazy <am@osimis.io>
date Mon, 27 Jun 2022 14:09:17 +0200
parents 28db9663fc2d
children ec5c203a97ea
comparison
equal deleted inserted replaced
5041:71960fdfe5a8 5042:120945ce48b6
91 it != sequences_.end(); ++it) 91 it != sequences_.end(); ++it)
92 { 92 {
93 Json::Value sequenceForConversion = Json::objectValue; 93 Json::Value sequenceForConversion = Json::objectValue;
94 sequenceForConversion[it->first.Format()] = it->second; 94 sequenceForConversion[it->first.Format()] = it->second;
95 95
96 Json::Value requestedFormatJson; 96 Json::Value& requestedFormatJson = sequenceForConversion;
97 Toolbox::SimplifyDicomAsJson(requestedFormatJson, sequenceForConversion, format); 97 Json::Value convertedJson;
98
99 if (format != DicomToJsonFormat_Full)
100 {
101 Toolbox::SimplifyDicomAsJson(convertedJson, sequenceForConversion, format);
102 requestedFormatJson = convertedJson;
103 }
98 104
99 Json::Value::Members keys = requestedFormatJson.getMemberNames(); 105 Json::Value::Members keys = requestedFormatJson.getMemberNames();
100 for (size_t i = 0; i < keys.size(); i++) // there should always be only one member in this JSON 106 for (size_t i = 0; i < keys.size(); i++) // there should always be only one member in this JSON
101 { 107 {
102 target[keys[i]] = requestedFormatJson[keys[i]]; 108 target[keys[i]] = requestedFormatJson[keys[i]];