Mercurial > hg > orthanc
annotate OrthancServer/QueryRetrieveHandler.h @ 3300:5b7f56cf4a38
note
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 23 Feb 2019 15:58:59 +0100 |
parents | d9eb978a1039 |
children | 872bd3b6ec72 |
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 |
3060
4e43e67f8ecf
preparing for 2019
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2986
diff
changeset
|
5 * Copyright (C) 2017-2019 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_; | |
54 | |
55 void Invalidate(); | |
56 | |
57 public: | |
58 QueryRetrieveHandler(ServerContext& context); | |
59 | |
60 void SetModality(const std::string& symbolicName); | |
61 | |
2867 | 62 const RemoteModalityParameters& GetRemoteModality() const |
1368 | 63 { |
64 return modality_; | |
65 } | |
66 | |
2867 | 67 const std::string& GetLocalAet() const |
68 { | |
69 return localAet_; | |
70 } | |
71 | |
1368 | 72 const std::string& GetModalitySymbolicName() const |
73 { | |
74 return modalityName_; | |
75 } | |
76 | |
77 void SetLevel(ResourceType level); | |
78 | |
79 ResourceType GetLevel() const | |
80 { | |
81 return level_; | |
82 } | |
83 | |
84 void SetQuery(const DicomTag& tag, | |
85 const std::string& value); | |
86 | |
87 const DicomMap& GetQuery() const | |
88 { | |
89 return query_; | |
90 } | |
91 | |
2986
b1ba0a8311b5
exploring hierarchy of C-FIND answers finished
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2867
diff
changeset
|
92 void CopyStringTag(const DicomMap& from, |
b1ba0a8311b5
exploring hierarchy of C-FIND answers finished
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2867
diff
changeset
|
93 const DicomTag& tag); |
b1ba0a8311b5
exploring hierarchy of C-FIND answers finished
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2867
diff
changeset
|
94 |
1368 | 95 void Run(); |
96 | |
2867 | 97 size_t GetAnswersCount(); |
1368 | 98 |
1787
1b1d5470233f
refactoring of DicomFindAnswers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
99 void GetAnswer(DicomMap& target, |
1b1d5470233f
refactoring of DicomFindAnswers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
100 size_t i); |
1368 | 101 }; |
102 } |