diff OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.h @ 4682:d38a7040474a

FromDcmtkBridge::RemovePath() and FromDcmtkBridge::ReplacePath()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 07 Jun 2021 18:35:46 +0200
parents 5b929e6b3c36
children 7182f5732480
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.h	Mon Jun 07 17:05:48 2021 +0200
+++ b/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.h	Mon Jun 07 18:35:46 2021 +0200
@@ -25,6 +25,7 @@
 #include "ITagVisitor.h"
 #include "../DicomFormat/DicomElement.h"
 #include "../DicomFormat/DicomMap.h"
+#include "../DicomFormat/DicomPath.h"
 
 #include <dcmtk/dcmdata/dcdatset.h>
 #include <dcmtk/dcmdata/dcmetinf.h>
@@ -59,6 +60,20 @@
 
     friend class ParsedDicomFile;
 
+  public:
+    // New in Orthanc 1.9.4
+    class ORTHANC_PUBLIC IDicomPathVisitor : public boost::noncopyable
+    {
+    public:
+      virtual ~IDicomPathVisitor()
+      {
+      }
+
+      virtual void Visit(DcmItem& item,
+                         const DicomTag& tag) = 0;
+    };
+    
+
   private:
     FromDcmtkBridge();  // Pure static class
 
@@ -226,5 +241,16 @@
                                             DcmDataset& dicom);
 
     static void LogMissingTagsForStore(DcmDataset& dicom);
+
+    static void Apply(IDicomPathVisitor& visitor,
+                      DcmDataset& dataset,
+                      const DicomPath& path);
+
+    static void RemovePath(DcmDataset& dataset,
+                           const DicomPath& path);
+
+    static void ReplacePath(DcmDataset& dataset,
+                            const DicomPath& path,
+                            const DcmElement& element);
   };
 }