Mercurial > hg > orthanc
annotate OrthancServer/QueryRetrieveHandler.h @ 3664:85acfcc15829 storage-commitment
sample storage commitment plugin, C++ wrapper
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 12 Feb 2020 16:06:58 +0100 |
parents | 94f4a18a79cc |
children |
rev | line source |
---|---|
1368 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
1900 | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1368 | 4 * Department, University Hospital of Liege, Belgium |
3640
94f4a18a79cc
upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
1368 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU General Public License as | |
9 * published by the Free Software Foundation, either version 3 of the | |
10 * License, or (at your option) any later version. | |
11 * | |
12 * In addition, as a special exception, the copyright holders of this | |
13 * program give permission to link the code of its release with the | |
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it | |
15 * that use the same license as the "OpenSSL" library), and distribute | |
16 * the linked executables. You must obey the GNU General Public License | |
17 * in all respects for all of the code used other than "OpenSSL". If you | |
18 * modify file(s) with this exception, you may extend this exception to | |
19 * your version of the file(s), but you are not obligated to do so. If | |
20 * you do not wish to do so, delete this exception statement from your | |
21 * version. If you delete this exception statement from all source files | |
22 * in the program, then also delete it here. | |
23 * | |
24 * This program is distributed in the hope that it will be useful, but | |
25 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
27 * General Public License for more details. | |
28 * | |
29 * You should have received a copy of the GNU General Public License | |
30 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
31 **/ | |
32 | |
33 | |
34 #pragma once | |
35 | |
3096 | 36 #include "../Core/DicomNetworking/DicomFindAnswers.h" |
37 #include "../Core/DicomNetworking/RemoteModalityParameters.h" | |
1368 | 38 |
39 namespace Orthanc | |
40 { | |
3096 | 41 class ServerContext; |
42 | |
1368 | 43 class QueryRetrieveHandler : public IDynamicObject |
44 { | |
45 private: | |
46 ServerContext& context_; | |
2867 | 47 std::string localAet_; |
1368 | 48 bool done_; |
49 RemoteModalityParameters modality_; | |
50 ResourceType level_; | |
51 DicomMap query_; | |
52 DicomFindAnswers answers_; | |
53 std::string modalityName_; | |
3370
872bd3b6ec72
"/modalities/{id}/query": New argument "Normalize"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3096
diff
changeset
|
54 bool findNormalized_; |
1368 | 55 |
56 void Invalidate(); | |
57 | |
58 public: | |
59 QueryRetrieveHandler(ServerContext& context); | |
60 | |
61 void SetModality(const std::string& symbolicName); | |
62 | |
2867 | 63 const RemoteModalityParameters& GetRemoteModality() const |
1368 | 64 { |
65 return modality_; | |
66 } | |
67 | |
2867 | 68 const std::string& GetLocalAet() const |
69 { | |
70 return localAet_; | |
71 } | |
72 | |
1368 | 73 const std::string& GetModalitySymbolicName() const |
74 { | |
75 return modalityName_; | |
76 } | |
77 | |
78 void SetLevel(ResourceType level); | |
79 | |
80 ResourceType GetLevel() const | |
81 { | |
82 return level_; | |
83 } | |
84 | |
85 void SetQuery(const DicomTag& tag, | |
86 const std::string& value); | |
87 | |
88 const DicomMap& GetQuery() const | |
89 { | |
90 return query_; | |
91 } | |
92 | |
2986
b1ba0a8311b5
exploring hierarchy of C-FIND answers finished
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2867
diff
changeset
|
93 void CopyStringTag(const DicomMap& from, |
b1ba0a8311b5
exploring hierarchy of C-FIND answers finished
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2867
diff
changeset
|
94 const DicomTag& tag); |
b1ba0a8311b5
exploring hierarchy of C-FIND answers finished
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2867
diff
changeset
|
95 |
1368 | 96 void Run(); |
97 | |
2867 | 98 size_t GetAnswersCount(); |
1368 | 99 |
1787
1b1d5470233f
refactoring of DicomFindAnswers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
100 void GetAnswer(DicomMap& target, |
1b1d5470233f
refactoring of DicomFindAnswers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
101 size_t i); |
3370
872bd3b6ec72
"/modalities/{id}/query": New argument "Normalize"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3096
diff
changeset
|
102 |
872bd3b6ec72
"/modalities/{id}/query": New argument "Normalize"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3096
diff
changeset
|
103 bool IsFindNormalized() const |
872bd3b6ec72
"/modalities/{id}/query": New argument "Normalize"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3096
diff
changeset
|
104 { |
872bd3b6ec72
"/modalities/{id}/query": New argument "Normalize"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3096
diff
changeset
|
105 return findNormalized_; |
872bd3b6ec72
"/modalities/{id}/query": New argument "Normalize"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3096
diff
changeset
|
106 } |
872bd3b6ec72
"/modalities/{id}/query": New argument "Normalize"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3096
diff
changeset
|
107 |
872bd3b6ec72
"/modalities/{id}/query": New argument "Normalize"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3096
diff
changeset
|
108 void SetFindNormalized(bool normalized); |
1368 | 109 }; |
110 } |