Mercurial > hg > orthanc
comparison OrthancServer/Sources/Search/DatabaseLookup.h @ 5248:a7d95f951f8a db-protobuf
replaced "WithLabels" and "WithoutLabels", by "Labels" and "LabelsConstraint"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Apr 2023 22:18:37 +0200 |
parents | df39c7583a49 |
children | 48b8dae6dc77 |
comparison
equal
deleted
inserted
replaced
5247:eb2684260c19 | 5248:a7d95f951f8a |
---|---|
20 **/ | 20 **/ |
21 | 21 |
22 | 22 |
23 #pragma once | 23 #pragma once |
24 | 24 |
25 #include "../Search/ISqlLookupFormatter.h" | |
25 #include "DicomTagConstraint.h" | 26 #include "DicomTagConstraint.h" |
26 | 27 |
27 class DcmItem; | 28 class DcmItem; |
28 | 29 |
29 namespace Orthanc | 30 namespace Orthanc |
30 { | 31 { |
31 class DatabaseLookup : public boost::noncopyable | 32 class DatabaseLookup : public boost::noncopyable |
32 { | 33 { |
33 private: | 34 private: |
34 std::vector<DicomTagConstraint*> constraints_; | 35 std::vector<DicomTagConstraint*> constraints_; |
35 std::set<std::string> withLabels_; | 36 std::set<std::string> labels_; |
36 std::set<std::string> withoutLabels_; | 37 LabelsConstraint labelsConstraint_; |
37 | 38 |
38 void AddDicomConstraintInternal(const DicomTag& tag, | 39 void AddDicomConstraintInternal(const DicomTag& tag, |
39 ValueRepresentation vr, | 40 ValueRepresentation vr, |
40 const std::string& dicomQuery, | 41 const std::string& dicomQuery, |
41 bool caseSensitive, | 42 bool caseSensitive, |
42 bool mandatoryTag); | 43 bool mandatoryTag); |
43 | 44 |
44 void AddConstraintInternal(DicomTagConstraint* constraint); // Takes ownership | 45 void AddConstraintInternal(DicomTagConstraint* constraint); // Takes ownership |
45 | 46 |
46 public: | 47 public: |
47 DatabaseLookup() | 48 DatabaseLookup() : |
49 labelsConstraint_(LabelsConstraint_All) | |
48 { | 50 { |
49 } | 51 } |
50 | 52 |
51 ~DatabaseLookup(); | 53 ~DatabaseLookup(); |
52 | 54 |
93 | 95 |
94 bool HasTag(const DicomTag& tag) const; | 96 bool HasTag(const DicomTag& tag) const; |
95 | 97 |
96 void RemoveConstraint(const DicomTag& tag); | 98 void RemoveConstraint(const DicomTag& tag); |
97 | 99 |
98 void AddWithLabel(const std::string& label); | 100 void AddLabel(const std::string& label); |
99 | 101 |
100 void AddWithoutLabel(const std::string& label); | 102 void SetLabelsConstraint(LabelsConstraint constraint) |
101 | |
102 const std::set<std::string>& GetWithLabels() const | |
103 { | 103 { |
104 return withLabels_; | 104 labelsConstraint_ = constraint; |
105 } | 105 } |
106 | 106 |
107 const std::set<std::string>& GetWithoutLabels() const | 107 const std::set<std::string>& GetLabels() const |
108 { | 108 { |
109 return withoutLabels_; | 109 return labels_; |
110 } | |
111 | |
112 LabelsConstraint GetLabelsConstraint() const | |
113 { | |
114 return labelsConstraint_; | |
110 } | 115 } |
111 }; | 116 }; |
112 } | 117 } |