diff 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
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/StatelessDatabaseOperations.h	Mon Jun 27 14:09:17 2022 +0200
+++ b/OrthancServer/Sources/Database/StatelessDatabaseOperations.h	Mon Jun 27 15:22:19 2022 +0200
@@ -23,6 +23,7 @@
 #pragma once
 
 #include "../../../OrthancFramework/Sources/DicomFormat/DicomMap.h"
+#include "../../../OrthancFramework/Sources/DicomFormat/DicomSequencesMap.h"
 
 #include "IDatabaseWrapper.h"
 #include "../DicomInstanceOrigin.h"
@@ -37,31 +38,11 @@
   class ParsedDicomFile;
   struct ServerIndexChange;
 
-  /*
-   * contains a map of dicom sequences where:
-   * the key is a DicomTag
-   * the sequence is serialized in Json "full" format
-   */
-  struct DicomSequencesMap : public boost::noncopyable
-  {
-    std::map<DicomTag, Json::Value>     sequences_;
-
-    void Deserialize(const Json::Value& serialized);
-    void Serialize(Json::Value& target, const std::set<DicomTag>& tags) const;
-    void FromDicomAsJson(const Json::Value& dicomAsJson, const std::set<DicomTag>& tags);
-    void ToJson(Json::Value& target, DicomToJsonFormat format) const;
-
-    size_t GetSize() const
-    {
-      return sequences_.size();
-    }
-  };
-
   struct ExpandedResource : public boost::noncopyable
   {
     std::string                         id_;
     DicomMap                            tags_;          // all tags from DB (only leaf tags, not sequences !)
-    DicomSequencesMap                   sequences_;     // the requested sequences
+    DicomSequencesMap                   sequences_;     // the requested sequences (from MainDicomTags or RequestedTags)
     std::string                         mainDicomTagsSignature_;
     std::string                         parentId_;
     std::list<std::string>              childrenIds_;