diff OrthancServer/Sources/Database/FindRequest.h @ 5668:bd1352bd9d82 find-refactoring

configuring requests for ModalitiesInStudy and SOPClassesInStudy
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 Jul 2024 21:57:39 +0200
parents 93dff1fccf36
children 74f3aab95886
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/FindRequest.h	Thu Jul 04 21:31:48 2024 +0200
+++ b/OrthancServer/Sources/Database/FindRequest.h	Thu Jul 04 21:57:39 2024 +0200
@@ -198,7 +198,9 @@
     class ChildrenRetrieveSpecification : public boost::noncopyable
     {
     private:
-      bool  identifiers_;
+      bool                    identifiers_;
+      std::set<MetadataType>  metadata_;
+      std::set<DicomTag>      mainDicomTags_;
 
     public:
       ChildrenRetrieveSpecification() :
@@ -216,9 +218,29 @@
         return identifiers_;
       }
 
+      void AddMetadata(MetadataType metadata)
+      {
+        metadata_.insert(metadata);
+      }
+
+      const std::set<MetadataType>& GetMetadata() const
+      {
+        return metadata_;
+      }
+
+      void AddMainDicomTag(const DicomTag& tag)
+      {
+        mainDicomTags_.insert(tag);
+      }
+
+      const std::set<DicomTag>& GetMainDicomTags() const
+      {
+        return mainDicomTags_;
+      }
+
       bool IsOfInterest() const
       {
-        return identifiers_;
+        return (identifiers_ || !metadata_.empty() || !mainDicomTags_.empty());
       }
     };