diff OrthancFramework/Sources/DicomFormat/DicomMap.h @ 5044:6fed78e13233

Refactored DicomMap to handle sequences when needed
author Alain Mazy <am@osimis.io>
date Tue, 28 Jun 2022 17:45:09 +0200
parents 1c08cd68250a
children 48005e522bd6
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomFormat/DicomMap.h	Mon Jun 27 15:22:19 2022 +0200
+++ b/OrthancFramework/Sources/DicomFormat/DicomMap.h	Tue Jun 28 17:45:09 2022 +0200
@@ -94,6 +94,9 @@
                   const std::string& str,
                   bool isBinary);
 
+    void SetValue(const DicomTag& tag,
+                  const Json::Value& value);
+
     bool HasTag(uint16_t group, uint16_t element) const;
 
     bool HasTag(const DicomTag& tag) const;
@@ -124,6 +127,8 @@
 
     void ExtractTags(DicomMap& result, const std::set<DicomTag>& tags) const;
 
+    void ExtractSequences(DicomMap& result) const;
+
     static void SetupFindPatientTemplate(DicomMap& result);
 
     static void SetupFindStudyTemplate(DicomMap& result);
@@ -149,10 +154,6 @@
 
     static bool HasComputedTags(const std::set<DicomTag>& tags);
 
-#if ORTHANC_ENABLE_DCMTK == 1
-    static void ExtractSequences(std::set<DicomTag>& sequences, const std::set<DicomTag>& tags);
-#endif
-
     static const std::set<DicomTag>& GetMainDicomTags(ResourceType level);
 
     // returns a string uniquely identifying the list of main dicom tags for a level
@@ -208,7 +209,8 @@
                      const DicomTag& tag) const;
 
     void FromDicomAsJson(const Json::Value& dicomAsJson, 
-                         bool append = false);
+                         bool append = false,
+                         bool parseSequences = false);
 
     void Merge(const DicomMap& other);
 
@@ -231,6 +233,8 @@
 
     void RemoveBinaryTags();
 
+    void RemoveSequences();
+
     void DumpMainDicomTags(Json::Value& target,
                            ResourceType level) const;