Mercurial > hg > orthanc
comparison Core/Lua/LuaFunctionCall.cpp @ 2218:3eefb84ac0bd
dynamically fix outgoing C-Find requests using "OutgoingFindRequestFilter()"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 13 Dec 2016 10:27:20 +0100 |
parents | 45c4387a379c |
children | a3a65de1840f |
comparison
equal
deleted
inserted
replaced
2217:4f39ab2cb453 | 2218:3eefb84ac0bd |
---|---|
164 json[it->first] = it->second; | 164 json[it->first] = it->second; |
165 } | 165 } |
166 | 166 |
167 PushJson(json); | 167 PushJson(json); |
168 } | 168 } |
169 | |
170 | |
171 void LuaFunctionCall::PushDicom(const DicomMap& dicom) | |
172 { | |
173 DicomArray a(dicom); | |
174 PushDicom(a); | |
175 } | |
176 | |
177 | |
178 void LuaFunctionCall::PushDicom(const DicomArray& dicom) | |
179 { | |
180 Json::Value value = Json::objectValue; | |
181 | |
182 for (size_t i = 0; i < dicom.GetSize(); i++) | |
183 { | |
184 const DicomValue& v = dicom.GetElement(i).GetValue(); | |
185 std::string s = (v.IsNull() || v.IsBinary()) ? "" : v.GetContent(); | |
186 value[dicom.GetElement(i).GetTag().Format()] = s; | |
187 } | |
188 | |
189 PushJson(value); | |
190 } | |
169 } | 191 } |