Mercurial > hg > orthanc
annotate OrthancServer/QueryRetrieveHandler.h @ 3109:6aa8d90aeee5
minor layout modification
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 11 Jan 2019 10:46:16 +0100 |
parents | 4e43e67f8ecf |
children | d9eb978a1039 |
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 | |
36 #include "ServerContext.h" | |
37 | |
38 namespace Orthanc | |
39 { | |
40 class QueryRetrieveHandler : public IDynamicObject | |
41 { | |
42 private: | |
43 ServerContext& context_; | |
2867 | 44 std::string localAet_; |
1368 | 45 bool done_; |
46 RemoteModalityParameters modality_; | |
47 ResourceType level_; | |
48 DicomMap query_; | |
49 DicomFindAnswers answers_; | |
50 std::string modalityName_; | |
51 | |
52 void Invalidate(); | |
53 | |
54 public: | |
55 QueryRetrieveHandler(ServerContext& context); | |
56 | |
57 void SetModality(const std::string& symbolicName); | |
58 | |
2867 | 59 const RemoteModalityParameters& GetRemoteModality() const |
1368 | 60 { |
61 return modality_; | |
62 } | |
63 | |
2867 | 64 const std::string& GetLocalAet() const |
65 { | |
66 return localAet_; | |
67 } | |
68 | |
1368 | 69 const std::string& GetModalitySymbolicName() const |
70 { | |
71 return modalityName_; | |
72 } | |
73 | |
74 void SetLevel(ResourceType level); | |
75 | |
76 ResourceType GetLevel() const | |
77 { | |
78 return level_; | |
79 } | |
80 | |
81 void SetQuery(const DicomTag& tag, | |
82 const std::string& value); | |
83 | |
84 const DicomMap& GetQuery() const | |
85 { | |
86 return query_; | |
87 } | |
88 | |
2986
b1ba0a8311b5
exploring hierarchy of C-FIND answers finished
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2867
diff
changeset
|
89 void CopyStringTag(const DicomMap& from, |
b1ba0a8311b5
exploring hierarchy of C-FIND answers finished
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2867
diff
changeset
|
90 const DicomTag& tag); |
b1ba0a8311b5
exploring hierarchy of C-FIND answers finished
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2867
diff
changeset
|
91 |
1368 | 92 void Run(); |
93 | |
2867 | 94 size_t GetAnswersCount(); |
1368 | 95 |
1787
1b1d5470233f
refactoring of DicomFindAnswers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
96 void GetAnswer(DicomMap& target, |
1b1d5470233f
refactoring of DicomFindAnswers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
97 size_t i); |
1368 | 98 }; |
99 } |