Mercurial > hg > orthanc
diff OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp @ 4936:8422e4f99a18 more-tags
Handling RequestedTags in ExpandResource -> read parent main dicom tags if required. Not yet getting missing tags from file. Integration tests ok
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 11 Mar 2022 17:38:16 +0100 |
parents | acd3f72e2a21 |
children | 96a3e81eba90 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp Thu Mar 10 19:00:43 2022 +0100 +++ b/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp Fri Mar 11 17:38:16 2022 +0100 @@ -1332,6 +1332,23 @@ } + void FromDcmtkBridge::ParseListOfTags(std::set<DicomTag>& result, const Json::Value& source) + { + result.clear(); + + if (!source.isArray()) + { + throw OrthancException(ErrorCode_BadRequest, "List of tags is not an array"); + } + + for (Json::ArrayIndex i = 0; i < source.size(); i++) + { + const std::string& value = source[i].asString(); + DicomTag tag = FromDcmtkBridge::ParseTag(value); + result.insert(tag); + } + } + const DicomValue &FromDcmtkBridge::GetValue(const DicomMap &fields, const std::string &tagName) {