Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
4935:acd3f72e2a21 | 4936:8422e4f99a18 |
---|---|
1329 result.insert(tag); | 1329 result.insert(tag); |
1330 } | 1330 } |
1331 } | 1331 } |
1332 } | 1332 } |
1333 | 1333 |
1334 | |
1335 void FromDcmtkBridge::ParseListOfTags(std::set<DicomTag>& result, const Json::Value& source) | |
1336 { | |
1337 result.clear(); | |
1338 | |
1339 if (!source.isArray()) | |
1340 { | |
1341 throw OrthancException(ErrorCode_BadRequest, "List of tags is not an array"); | |
1342 } | |
1343 | |
1344 for (Json::ArrayIndex i = 0; i < source.size(); i++) | |
1345 { | |
1346 const std::string& value = source[i].asString(); | |
1347 DicomTag tag = FromDcmtkBridge::ParseTag(value); | |
1348 result.insert(tag); | |
1349 } | |
1350 } | |
1334 | 1351 |
1335 const DicomValue &FromDcmtkBridge::GetValue(const DicomMap &fields, | 1352 const DicomValue &FromDcmtkBridge::GetValue(const DicomMap &fields, |
1336 const std::string &tagName) | 1353 const std::string &tagName) |
1337 { | 1354 { |
1338 return fields.GetValue(ParseTag(tagName)); | 1355 return fields.GetValue(ParseTag(tagName)); |