Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp @ 4939:e8a2e145c80e more-tags
cleanup
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 15 Mar 2022 09:09:52 +0100 |
parents | f630796a59b1 |
children | 304514ce84ee |
comparison
equal
deleted
inserted
replaced
4938:f630796a59b1 | 4939:e8a2e145c80e |
---|---|
711 | 711 |
712 | 712 |
713 bool StatelessDatabaseOperations::ExpandResource(ExpandedResource& target, | 713 bool StatelessDatabaseOperations::ExpandResource(ExpandedResource& target, |
714 const std::string& publicId, | 714 const std::string& publicId, |
715 ResourceType level, | 715 ResourceType level, |
716 DicomToJsonFormat format, | |
717 const std::set<DicomTag>& requestedTags) | 716 const std::set<DicomTag>& requestedTags) |
718 { | 717 { |
719 class Operations : public ReadOnlyOperationsT6< | 718 class Operations : public ReadOnlyOperationsT5< |
720 bool&, ExpandedResource&, const std::string&, ResourceType, DicomToJsonFormat, const std::set<DicomTag>&> | 719 bool&, ExpandedResource&, const std::string&, ResourceType, const std::set<DicomTag>&> |
721 { | 720 { |
722 private: | 721 private: |
723 | 722 |
724 static bool LookupStringMetadata(std::string& result, | 723 static bool LookupStringMetadata(std::string& result, |
725 const std::map<MetadataType, std::string>& metadata, | 724 const std::map<MetadataType, std::string>& metadata, |
1023 | 1022 |
1024 // read all tags from DB | 1023 // read all tags from DB |
1025 transaction.GetMainDicomTags(target.tags_, internalId); | 1024 transaction.GetMainDicomTags(target.tags_, internalId); |
1026 | 1025 |
1027 // check if we have access to all requestedTags or if we must get tags from parents | 1026 // check if we have access to all requestedTags or if we must get tags from parents |
1028 const std::set<DicomTag>& requestedTags = tuple.get<5>(); | 1027 const std::set<DicomTag>& requestedTags = tuple.get<4>(); |
1029 | 1028 |
1030 if (requestedTags.size() > 0) | 1029 if (requestedTags.size() > 0) |
1031 { | 1030 { |
1032 std::set<DicomTag> savedMainDicomTags; | 1031 std::set<DicomTag> savedMainDicomTags; |
1033 | 1032 |
1138 } | 1137 } |
1139 }; | 1138 }; |
1140 | 1139 |
1141 bool found; | 1140 bool found; |
1142 Operations operations; | 1141 Operations operations; |
1143 operations.Apply(*this, found, target, publicId, level, format, requestedTags); | 1142 operations.Apply(*this, found, target, publicId, level, requestedTags); |
1144 return found; | 1143 return found; |
1145 } | 1144 } |
1146 | 1145 |
1147 | 1146 |
1148 void StatelessDatabaseOperations::GetAllMetadata(std::map<MetadataType, std::string>& target, | 1147 void StatelessDatabaseOperations::GetAllMetadata(std::map<MetadataType, std::string>& target, |