Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/StatelessDatabaseOperations.h @ 5043:ec5c203a97ea
returning sequences in MainDicomTags and RequestedTags
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 27 Jun 2022 15:22:19 +0200 |
parents | 28db9663fc2d |
children | 6fed78e13233 |
comparison
equal
deleted
inserted
replaced
5042:120945ce48b6 | 5043:ec5c203a97ea |
---|---|
21 | 21 |
22 | 22 |
23 #pragma once | 23 #pragma once |
24 | 24 |
25 #include "../../../OrthancFramework/Sources/DicomFormat/DicomMap.h" | 25 #include "../../../OrthancFramework/Sources/DicomFormat/DicomMap.h" |
26 #include "../../../OrthancFramework/Sources/DicomFormat/DicomSequencesMap.h" | |
26 | 27 |
27 #include "IDatabaseWrapper.h" | 28 #include "IDatabaseWrapper.h" |
28 #include "../DicomInstanceOrigin.h" | 29 #include "../DicomInstanceOrigin.h" |
29 | 30 |
30 #include <boost/shared_ptr.hpp> | 31 #include <boost/shared_ptr.hpp> |
35 { | 36 { |
36 class DatabaseLookup; | 37 class DatabaseLookup; |
37 class ParsedDicomFile; | 38 class ParsedDicomFile; |
38 struct ServerIndexChange; | 39 struct ServerIndexChange; |
39 | 40 |
40 /* | |
41 * contains a map of dicom sequences where: | |
42 * the key is a DicomTag | |
43 * the sequence is serialized in Json "full" format | |
44 */ | |
45 struct DicomSequencesMap : public boost::noncopyable | |
46 { | |
47 std::map<DicomTag, Json::Value> sequences_; | |
48 | |
49 void Deserialize(const Json::Value& serialized); | |
50 void Serialize(Json::Value& target, const std::set<DicomTag>& tags) const; | |
51 void FromDicomAsJson(const Json::Value& dicomAsJson, const std::set<DicomTag>& tags); | |
52 void ToJson(Json::Value& target, DicomToJsonFormat format) const; | |
53 | |
54 size_t GetSize() const | |
55 { | |
56 return sequences_.size(); | |
57 } | |
58 }; | |
59 | |
60 struct ExpandedResource : public boost::noncopyable | 41 struct ExpandedResource : public boost::noncopyable |
61 { | 42 { |
62 std::string id_; | 43 std::string id_; |
63 DicomMap tags_; // all tags from DB (only leaf tags, not sequences !) | 44 DicomMap tags_; // all tags from DB (only leaf tags, not sequences !) |
64 DicomSequencesMap sequences_; // the requested sequences | 45 DicomSequencesMap sequences_; // the requested sequences (from MainDicomTags or RequestedTags) |
65 std::string mainDicomTagsSignature_; | 46 std::string mainDicomTagsSignature_; |
66 std::string parentId_; | 47 std::string parentId_; |
67 std::list<std::string> childrenIds_; | 48 std::list<std::string> childrenIds_; |
68 std::map<MetadataType, std::string> metadata_; | 49 std::map<MetadataType, std::string> metadata_; |
69 ResourceType type_; | 50 ResourceType type_; |