Mercurial > hg > orthanc
annotate OrthancServer/Sources/Database/MainDicomTagsRegistry.h @ 5619:1864b16bc7b1 find-refactoring
added FindRequest::ParentRetrieveSpecification
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 11 May 2024 12:13:31 +0200 |
parents | 4640b7ae9a11 |
children | 3f13db27b399 |
rev | line source |
---|---|
5614
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 * Copyright (C) 2017-2024 Osimis S.A., Belgium |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * This program is free software: you can redistribute it and/or |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * modify it under the terms of the GNU General Public License as |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * published by the Free Software Foundation, either version 3 of the |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * License, or (at your option) any later version. |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, but |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * General Public License for more details. |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 **/ |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 #pragma once |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 #include "../Search/DicomTagConstraint.h" |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 #include <boost/noncopyable.hpp> |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 namespace Orthanc |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 { |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 class MainDicomTagsRegistry : public boost::noncopyable |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 { |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 private: |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 class TagInfo |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 { |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 private: |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 ResourceType level_; |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 DicomTagType type_; |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 public: |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 TagInfo() |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 { |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 } |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 TagInfo(ResourceType level, |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 DicomTagType type) : |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 level_(level), |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 type_(type) |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 { |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 } |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 ResourceType GetLevel() const |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 { |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 return level_; |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 } |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 DicomTagType GetType() const |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 { |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 return type_; |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 } |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 }; |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 typedef std::map<DicomTag, TagInfo> Registry; |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 Registry registry_; |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
68 void LoadTags(ResourceType level); |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 public: |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 MainDicomTagsRegistry(); |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 void LookupTag(ResourceType& level, |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 DicomTagType& type, |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 const DicomTag& tag) const; |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 }; |
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 } |