Mercurial > hg > orthanc
annotate Core/DicomNetworking/DicomUserConnection.h @ 3799:320a2d224902
merge
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 01 Apr 2020 10:15:33 +0200 |
parents | 4fc24b69446a |
children | 3801435e34a1 7f083dfae62b |
rev | line source |
---|---|
0 | 1 /** |
62 | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
1900 | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1285
diff
changeset
|
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 |
0 | 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. | |
136 | 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. | |
0 | 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 | |
2380
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
36 #if ORTHANC_ENABLE_DCMTK_NETWORKING != 1 |
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
37 # error The macro ORTHANC_ENABLE_DCMTK_NETWORKING must be set to 1 |
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
38 #endif |
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
39 |
0 | 40 #include "DicomFindAnswers.h" |
2382
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
41 #include "../Enumerations.h" |
772
31cc399c7762
RemoteModalityParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
763
diff
changeset
|
42 #include "RemoteModalityParameters.h" |
0 | 43 |
44 #include <stdint.h> | |
45 #include <boost/shared_ptr.hpp> | |
46 #include <boost/noncopyable.hpp> | |
763
b5e6d2823115
dynamic negotiation of storage sop classes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
47 #include <list> |
0 | 48 |
62 | 49 namespace Orthanc |
0 | 50 { |
51 class DicomUserConnection : public boost::noncopyable | |
52 { | |
53 private: | |
54 struct PImpl; | |
55 boost::shared_ptr<PImpl> pimpl_; | |
56 | |
3605
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
57 enum Mode |
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
58 { |
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
59 Mode_Generic, |
3608
7ae553d9c366
created DicomUserConnection::RequestStorageCommitment()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3606
diff
changeset
|
60 Mode_ReportStorageCommitment, |
7ae553d9c366
created DicomUserConnection::RequestStorageCommitment()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3606
diff
changeset
|
61 Mode_RequestStorageCommitment |
3605
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
62 }; |
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
63 |
0 | 64 // Connection parameters |
662
70161eb45b5c
orthanc can act as a C-Store SCU for JPEG transfer syntax
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
519
diff
changeset
|
65 std::string preferredTransferSyntax_; |
0 | 66 std::string localAet_; |
1285
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
67 std::string remoteAet_; |
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
68 std::string remoteHost_; |
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
69 uint16_t remotePort_; |
519
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
399
diff
changeset
|
70 ModalityManufacturer manufacturer_; |
763
b5e6d2823115
dynamic negotiation of storage sop classes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
71 std::set<std::string> storageSOPClasses_; |
b5e6d2823115
dynamic negotiation of storage sop classes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
72 std::list<std::string> reservedStorageSOPClasses_; |
b5e6d2823115
dynamic negotiation of storage sop classes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
73 std::set<std::string> defaultStorageSOPClasses_; |
0 | 74 |
75 void CheckIsOpen() const; | |
76 | |
3605
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
77 void SetupPresentationContexts(Mode mode, |
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
78 const std::string& preferredTransferSyntax); |
0 | 79 |
1366 | 80 void MoveInternal(const std::string& targetAet, |
1371
f528849ee9f7
DICOM Query/Retrieve available from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1368
diff
changeset
|
81 ResourceType level, |
1366 | 82 const DicomMap& fields); |
0 | 83 |
763
b5e6d2823115
dynamic negotiation of storage sop classes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
84 void ResetStorageSOPClasses(); |
b5e6d2823115
dynamic negotiation of storage sop classes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
85 |
b5e6d2823115
dynamic negotiation of storage sop classes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
86 void CheckStorageSOPClassesInvariant() const; |
b5e6d2823115
dynamic negotiation of storage sop classes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
87 |
2587
bf14b037731f
new constructor for DicomUserConnection
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
88 void DefaultSetup(); |
bf14b037731f
new constructor for DicomUserConnection
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
89 |
3605
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
90 void OpenInternal(Mode mode); |
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
91 |
0 | 92 public: |
93 DicomUserConnection(); | |
94 | |
95 ~DicomUserConnection(); | |
96 | |
2587
bf14b037731f
new constructor for DicomUserConnection
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
97 // This constructor corresponds to behavior of the old class |
bf14b037731f
new constructor for DicomUserConnection
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
98 // "ReusableDicomUserConnection", without the call to "Open()" |
bf14b037731f
new constructor for DicomUserConnection
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
99 DicomUserConnection(const std::string& localAet, |
bf14b037731f
new constructor for DicomUserConnection
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
100 const RemoteModalityParameters& remote); |
bf14b037731f
new constructor for DicomUserConnection
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
101 |
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:
1371
diff
changeset
|
102 void SetRemoteModality(const RemoteModalityParameters& parameters); |
772
31cc399c7762
RemoteModalityParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
763
diff
changeset
|
103 |
0 | 104 void SetLocalApplicationEntityTitle(const std::string& aet); |
105 | |
106 const std::string& GetLocalApplicationEntityTitle() const | |
107 { | |
108 return localAet_; | |
109 } | |
110 | |
1285
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
111 void SetRemoteApplicationEntityTitle(const std::string& aet); |
0 | 112 |
1285
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
113 const std::string& GetRemoteApplicationEntityTitle() const |
0 | 114 { |
1285
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
115 return remoteAet_; |
0 | 116 } |
117 | |
1285
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
118 void SetRemoteHost(const std::string& host); |
0 | 119 |
1285
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
120 const std::string& GetRemoteHost() const |
0 | 121 { |
1285
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
122 return remoteHost_; |
0 | 123 } |
124 | |
1285
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
125 void SetRemotePort(uint16_t port); |
0 | 126 |
1285
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
127 uint16_t GetRemotePort() const |
0 | 128 { |
1285
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
129 return remotePort_; |
0 | 130 } |
131 | |
1285
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
132 void SetRemoteManufacturer(ModalityManufacturer manufacturer); |
519
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
399
diff
changeset
|
133 |
1285
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1186
diff
changeset
|
134 ModalityManufacturer GetRemoteManufacturer() const |
519
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
399
diff
changeset
|
135 { |
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
399
diff
changeset
|
136 return manufacturer_; |
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
399
diff
changeset
|
137 } |
1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
399
diff
changeset
|
138 |
662
70161eb45b5c
orthanc can act as a C-Store SCU for JPEG transfer syntax
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
519
diff
changeset
|
139 void ResetPreferredTransferSyntax(); |
70161eb45b5c
orthanc can act as a C-Store SCU for JPEG transfer syntax
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
519
diff
changeset
|
140 |
70161eb45b5c
orthanc can act as a C-Store SCU for JPEG transfer syntax
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
519
diff
changeset
|
141 void SetPreferredTransferSyntax(const std::string& preferredTransferSyntax); |
70161eb45b5c
orthanc can act as a C-Store SCU for JPEG transfer syntax
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
519
diff
changeset
|
142 |
70161eb45b5c
orthanc can act as a C-Store SCU for JPEG transfer syntax
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
519
diff
changeset
|
143 const std::string& GetPreferredTransferSyntax() const |
70161eb45b5c
orthanc can act as a C-Store SCU for JPEG transfer syntax
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
519
diff
changeset
|
144 { |
70161eb45b5c
orthanc can act as a C-Store SCU for JPEG transfer syntax
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
519
diff
changeset
|
145 return preferredTransferSyntax_; |
70161eb45b5c
orthanc can act as a C-Store SCU for JPEG transfer syntax
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
519
diff
changeset
|
146 } |
70161eb45b5c
orthanc can act as a C-Store SCU for JPEG transfer syntax
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
519
diff
changeset
|
147 |
763
b5e6d2823115
dynamic negotiation of storage sop classes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
148 void AddStorageSOPClass(const char* sop); |
b5e6d2823115
dynamic negotiation of storage sop classes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
149 |
3605
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
150 void Open() |
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
151 { |
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
152 OpenInternal(Mode_Generic); |
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
153 } |
0 | 154 |
155 void Close(); | |
156 | |
157 bool IsOpen() const; | |
158 | |
159 bool Echo(); | |
160 | |
3734
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
161 void Store(std::string& sopClassUid /* out */, |
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
162 std::string& sopInstanceUid /* out */, |
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
163 const char* buffer, |
1907
5011a597b6ce
Support of Move Originator Message ID (0000,1031) in C-Store responses driven by C-Move
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
164 size_t size, |
2222
21713ce8717b
Fix handling of Move Originator AET and ID in C-MOVE SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
165 const std::string& moveOriginatorAET, |
1997
f9f2aa1cc594
"MoveOriginatorID" can be specified for /modalities/.../store
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1907
diff
changeset
|
166 uint16_t moveOriginatorID); |
0 | 167 |
3734
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
168 void Store(std::string& sopClassUid /* out */, |
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
169 std::string& sopInstanceUid /* out */, |
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
170 const char* buffer, |
2222
21713ce8717b
Fix handling of Move Originator AET and ID in C-MOVE SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
171 size_t size) |
21713ce8717b
Fix handling of Move Originator AET and ID in C-MOVE SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
172 { |
3734
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
173 Store(sopClassUid, sopInstanceUid, buffer, size, "", 0); // Not a C-Move |
2222
21713ce8717b
Fix handling of Move Originator AET and ID in C-MOVE SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
174 } |
21713ce8717b
Fix handling of Move Originator AET and ID in C-MOVE SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
175 |
3734
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
176 void Store(std::string& sopClassUid /* out */, |
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
177 std::string& sopInstanceUid /* out */, |
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
178 const std::string& buffer, |
2222
21713ce8717b
Fix handling of Move Originator AET and ID in C-MOVE SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
179 const std::string& moveOriginatorAET, |
1997
f9f2aa1cc594
"MoveOriginatorID" can be specified for /modalities/.../store
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1907
diff
changeset
|
180 uint16_t moveOriginatorID); |
0 | 181 |
3734
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
182 void Store(std::string& sopClassUid /* out */, |
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
183 std::string& sopInstanceUid /* out */, |
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
184 const std::string& buffer) |
2222
21713ce8717b
Fix handling of Move Originator AET and ID in C-MOVE SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
185 { |
3734
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
186 Store(sopClassUid, sopInstanceUid, buffer, "", 0); // Not a C-Move |
2222
21713ce8717b
Fix handling of Move Originator AET and ID in C-MOVE SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
187 } |
21713ce8717b
Fix handling of Move Originator AET and ID in C-MOVE SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
188 |
3734
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
189 void StoreFile(std::string& sopClassUid /* out */, |
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
190 std::string& sopInstanceUid /* out */, |
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
191 const std::string& path, |
2222
21713ce8717b
Fix handling of Move Originator AET and ID in C-MOVE SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
192 const std::string& moveOriginatorAET, |
1997
f9f2aa1cc594
"MoveOriginatorID" can be specified for /modalities/.../store
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1907
diff
changeset
|
193 uint16_t moveOriginatorID); |
0 | 194 |
3734
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
195 void StoreFile(std::string& sopClassUid /* out */, |
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
196 std::string& sopInstanceUid /* out */, |
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
197 const std::string& path) |
2222
21713ce8717b
Fix handling of Move Originator AET and ID in C-MOVE SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
198 { |
3734
4fc24b69446a
triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3657
diff
changeset
|
199 StoreFile(sopClassUid, sopInstanceUid, path, "", 0); // Not a C-Move |
2222
21713ce8717b
Fix handling of Move Originator AET and ID in C-MOVE SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
200 } |
21713ce8717b
Fix handling of Move Originator AET and ID in C-MOVE SCP
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
201 |
1368 | 202 void Find(DicomFindAnswers& result, |
203 ResourceType level, | |
3370
872bd3b6ec72
"/modalities/{id}/query": New argument "Normalize"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
204 const DicomMap& fields, |
872bd3b6ec72
"/modalities/{id}/query": New argument "Normalize"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
205 bool normalize); // Whether to normalize the DICOM query |
0 | 206 |
1366 | 207 void Move(const std::string& targetAet, |
1998
9b61701c35f2
New URI "/modalities/.../move" to issue C-Move SCU requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1997
diff
changeset
|
208 ResourceType level, |
9b61701c35f2
New URI "/modalities/.../move" to issue C-Move SCU requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1997
diff
changeset
|
209 const DicomMap& findResult); |
9b61701c35f2
New URI "/modalities/.../move" to issue C-Move SCU requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1997
diff
changeset
|
210 |
9b61701c35f2
New URI "/modalities/.../move" to issue C-Move SCU requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1997
diff
changeset
|
211 void Move(const std::string& targetAet, |
1366 | 212 const DicomMap& findResult); |
213 | |
214 void MovePatient(const std::string& targetAet, | |
215 const std::string& patientId); | |
216 | |
217 void MoveStudy(const std::string& targetAet, | |
218 const std::string& studyUid); | |
0 | 219 |
220 void MoveSeries(const std::string& targetAet, | |
221 const std::string& studyUid, | |
222 const std::string& seriesUid); | |
223 | |
224 void MoveInstance(const std::string& targetAet, | |
225 const std::string& studyUid, | |
226 const std::string& seriesUid, | |
227 const std::string& instanceUid); | |
228 | |
1186
b17b6bd59747
timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
772
diff
changeset
|
229 void SetTimeout(uint32_t seconds); |
b17b6bd59747
timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
772
diff
changeset
|
230 |
b17b6bd59747
timeouts for HTTP and DICOM
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
772
diff
changeset
|
231 void DisableTimeout(); |
1805
f08978b1f45b
c-find scu for modality worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
232 |
f08978b1f45b
c-find scu for modality worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
233 void FindWorklist(DicomFindAnswers& result, |
f08978b1f45b
c-find scu for modality worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
234 ParsedDicomFile& query); |
2069
fabf7820d1f1
New configuration options: "DicomScuTimeout" and "DicomScpTimeout" + validation of non-negative options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1998
diff
changeset
|
235 |
fabf7820d1f1
New configuration options: "DicomScuTimeout" and "DicomScpTimeout" + validation of non-negative options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1998
diff
changeset
|
236 static void SetDefaultTimeout(uint32_t seconds); |
2600
140a539b4eba
SequenceOfOperationsJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2587
diff
changeset
|
237 |
140a539b4eba
SequenceOfOperationsJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2587
diff
changeset
|
238 bool IsSameAssociation(const std::string& localAet, |
140a539b4eba
SequenceOfOperationsJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2587
diff
changeset
|
239 const RemoteModalityParameters& remote) const; |
3605
05872838ebf3
DicomUserConnection: Opening of a connection for N-EVENT-REPORT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3370
diff
changeset
|
240 |
3606
33ba63637d48
DicomUserConnection: sending N-EVENT-REPORT-RQ
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3605
diff
changeset
|
241 void ReportStorageCommitment( |
33ba63637d48
DicomUserConnection: sending N-EVENT-REPORT-RQ
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3605
diff
changeset
|
242 const std::string& transactionUid, |
3657
115f82775c46
handling of storage commitment failure reasons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3641
diff
changeset
|
243 const std::vector<std::string>& sopClassUids, |
115f82775c46
handling of storage commitment failure reasons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3641
diff
changeset
|
244 const std::vector<std::string>& sopInstanceUids, |
115f82775c46
handling of storage commitment failure reasons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3641
diff
changeset
|
245 const std::vector<StorageCommitmentFailureReason>& failureReasons); |
3608
7ae553d9c366
created DicomUserConnection::RequestStorageCommitment()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3606
diff
changeset
|
246 |
3611
0ce9c1c6474f
test route in REST API for storage commitment
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3608
diff
changeset
|
247 // transactionUid: To be generated by Toolbox::GenerateDicomPrivateUniqueIdentifier() |
3608
7ae553d9c366
created DicomUserConnection::RequestStorageCommitment()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3606
diff
changeset
|
248 void RequestStorageCommitment( |
3611
0ce9c1c6474f
test route in REST API for storage commitment
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3608
diff
changeset
|
249 const std::string& transactionUid, |
3657
115f82775c46
handling of storage commitment failure reasons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3641
diff
changeset
|
250 const std::vector<std::string>& sopClassUids, |
115f82775c46
handling of storage commitment failure reasons
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3641
diff
changeset
|
251 const std::vector<std::string>& sopInstanceUids); |
0 | 252 }; |
253 } |