Mercurial > hg > orthanc
annotate OrthancServer/QueryRetrieveHandler.h @ 2799:6e3a60b85da6
New primitives to access Orthanc peers from plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 22 Aug 2018 16:55:07 +0200 |
parents | 5e2730c8e23c |
children | 4ee3a759afea |
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 |
2447
878b59270859
upgrade to year 2018
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
5 * Copyright (C) 2017-2018 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 | |
36 #include "ServerContext.h" | |
37 | |
38 namespace Orthanc | |
39 { | |
40 class QueryRetrieveHandler : public IDynamicObject | |
41 { | |
42 private: | |
43 ServerContext& context_; | |
1427
d710ea64f0fd
Custom setting of the local AET during C-Store SCU (both in Lua and in the REST API)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1368
diff
changeset
|
44 const std::string& localAet_; |
1368 | 45 bool done_; |
46 RemoteModalityParameters modality_; | |
47 ResourceType level_; | |
48 DicomMap query_; | |
49 DicomFindAnswers answers_; | |
50 std::string modalityName_; | |
51 | |
2590
5e2730c8e23c
getting rid of ReusableDicomConnection in QueryRetrieveHandler and OrthancMoveRequestHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
52 std::auto_ptr<DicomUserConnection> connection_; |
5e2730c8e23c
getting rid of ReusableDicomConnection in QueryRetrieveHandler and OrthancMoveRequestHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
53 |
1368 | 54 void Invalidate(); |
55 | |
2590
5e2730c8e23c
getting rid of ReusableDicomConnection in QueryRetrieveHandler and OrthancMoveRequestHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
56 DicomUserConnection& GetConnection(); |
1368 | 57 |
58 public: | |
59 QueryRetrieveHandler(ServerContext& context); | |
60 | |
61 void SetModality(const std::string& symbolicName); | |
62 | |
63 const RemoteModalityParameters& GetModality() const | |
64 { | |
65 return modality_; | |
66 } | |
67 | |
68 const std::string& GetModalitySymbolicName() const | |
69 { | |
70 return modalityName_; | |
71 } | |
72 | |
73 void SetLevel(ResourceType level); | |
74 | |
75 ResourceType GetLevel() const | |
76 { | |
77 return level_; | |
78 } | |
79 | |
80 void SetQuery(const DicomTag& tag, | |
81 const std::string& value); | |
82 | |
83 const DicomMap& GetQuery() const | |
84 { | |
85 return query_; | |
86 } | |
87 | |
88 void Run(); | |
89 | |
90 size_t GetAnswerCount(); | |
91 | |
1787
1b1d5470233f
refactoring of DicomFindAnswers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
92 void GetAnswer(DicomMap& target, |
1b1d5470233f
refactoring of DicomFindAnswers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
93 size_t i); |
1368 | 94 |
95 void Retrieve(const std::string& target, | |
96 size_t i); | |
97 | |
98 void Retrieve(const std::string& target); | |
99 }; | |
100 } |