Mercurial > hg > orthanc
comparison Core/DicomParsing/FromDcmtkBridge.cpp @ 3156:0c2b719c3796
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 22 Jan 2019 12:55:41 +0100 |
parents | c8b75e207a82 |
children | 47ef29168698 |
comparison
equal
deleted
inserted
replaced
3155:077e1101d908 | 3156:0c2b719c3796 |
---|---|
2053 } | 2053 } |
2054 | 2054 |
2055 if (output.type() != Json::objectValue) | 2055 if (output.type() != Json::objectValue) |
2056 { | 2056 { |
2057 throw OrthancException(ErrorCode_LuaBadOutput, | 2057 throw OrthancException(ErrorCode_LuaBadOutput, |
2058 "Lua: IncomingFindRequestFilter must return a table"); | 2058 "Lua: The script must return a table"); |
2059 } | 2059 } |
2060 | 2060 |
2061 Json::Value::Members members = output.getMemberNames(); | 2061 Json::Value::Members members = output.getMemberNames(); |
2062 | 2062 |
2063 for (size_t i = 0; i < members.size(); i++) | 2063 for (size_t i = 0; i < members.size(); i++) |
2064 { | 2064 { |
2065 if (output[members[i]].type() != Json::stringValue) | 2065 if (output[members[i]].type() != Json::stringValue) |
2066 { | 2066 { |
2067 throw OrthancException(ErrorCode_LuaBadOutput, | 2067 throw OrthancException(ErrorCode_LuaBadOutput, |
2068 "Lua: IncomingFindRequestFilter must return a table " | 2068 "Lua: The script must return a table " |
2069 "mapping names of DICOM tags to strings"); | 2069 "mapping names of DICOM tags to strings"); |
2070 } | 2070 } |
2071 | 2071 |
2072 DicomTag tag(ParseTag(members[i])); | 2072 DicomTag tag(ParseTag(members[i])); |
2073 target.SetValue(tag, output[members[i]].asString(), false); | 2073 target.SetValue(tag, output[members[i]].asString(), false); |