Mercurial > hg > orthanc
comparison Core/DicomFormat/DicomMap.cpp @ 3498:957e06cbe76a
additional check
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 22 Aug 2019 15:02:19 +0200 |
parents | 109631ed3564 |
children | a57c8163d9ae |
comparison
equal
deleted
inserted
replaced
3497:db71bd11affc | 3498:957e06cbe76a |
---|---|
983 } | 983 } |
984 | 984 |
985 | 985 |
986 void DicomMap::FromDicomAsJson(const Json::Value& dicomAsJson) | 986 void DicomMap::FromDicomAsJson(const Json::Value& dicomAsJson) |
987 { | 987 { |
988 if (dicomAsJson.type() != Json::objectValue) | |
989 { | |
990 throw OrthancException(ErrorCode_BadFileFormat); | |
991 } | |
992 | |
988 Clear(); | 993 Clear(); |
989 | 994 |
990 Json::Value::Members tags = dicomAsJson.getMemberNames(); | 995 Json::Value::Members tags = dicomAsJson.getMemberNames(); |
991 for (Json::Value::Members::const_iterator | 996 for (Json::Value::Members::const_iterator |
992 it = tags.begin(); it != tags.end(); ++it) | 997 it = tags.begin(); it != tags.end(); ++it) |