annotate OrthancFramework/Sources/DicomNetworking/Internals/StoreScp.cpp @ 5842:08e47734328e find-refactoring

StatelessDatabaseOperations: reimplementing GetAllUuids() and GetAllMetadata()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 29 Oct 2024 12:46:11 +0000
parents f7adfb22e20e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
62
a70bb32802ae renaming Server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 57
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
1900
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1854
diff changeset
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
5640
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5485
diff changeset
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5485
diff changeset
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
5485
48b8dae6dc77 upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 *
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * This program is free software: you can redistribute it and/or
4119
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
10 * modify it under the terms of the GNU Lesser General Public License
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
11 * as published by the Free Software Foundation, either version 3 of
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
12 * the License, or (at your option) any later version.
136
fe180eae201d openssl exception
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 103
diff changeset
13 *
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful, but
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4119
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
17 * Lesser General Public License for more details.
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 *
4119
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
19 * You should have received a copy of the GNU Lesser General Public
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
20 * License along with this program. If not, see
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
21 * <http://www.gnu.org/licenses/>.
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 **/
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
766
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
25
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
26
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
27 /*=========================================================================
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
28
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
29 This file is based on portions of the following project:
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
30
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
31 Program: DCMTK 3.6.0
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
32 Module: http://dicom.offis.de/dcmtk.php.en
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
33
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
34 Copyright (C) 1994-2011, OFFIS e.V.
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
35 All rights reserved.
766
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
36
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
37 This software and supporting documentation were developed by
766
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
38
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
39 OFFIS e.V.
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
40 R&D Division Health
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
41 Escherweg 2
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
42 26121 Oldenburg, Germany
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
43
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
44 Redistribution and use in source and binary forms, with or without
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
45 modification, are permitted provided that the following conditions
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
46 are met:
766
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
47
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
48 - Redistributions of source code must retain the above copyright
766
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
49 notice, this list of conditions and the following disclaimer.
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
50
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
51 - Redistributions in binary form must reproduce the above copyright
766
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
52 notice, this list of conditions and the following disclaimer in the
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
53 documentation and/or other materials provided with the distribution.
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
54
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
55 - Neither the name of OFFIS nor the names of its contributors may be
766
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
56 used to endorse or promote products derived from this software
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
57 without specific prior written permission.
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
58
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
59 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
60 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
61 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
62 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
63 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
64 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
65 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
66 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
67 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
68 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
69 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
766
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
70
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
71 =========================================================================*/
766
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
72
0a2f8c707c78 Fix missing licensing terms about reuse of some DCMTK code
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 730
diff changeset
73
2382
7284093111b0 big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2381
diff changeset
74 #include "../../PrecompiledHeaders.h"
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 #include "StoreScp.h"
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76
3118
8849677c2cbc compatibility with dcmtk 3.6.4
s.jodogne@gmail.com
parents: 3060
diff changeset
77 #if !defined(DCMTK_VERSION_NUMBER)
8849677c2cbc compatibility with dcmtk 3.6.4
s.jodogne@gmail.com
parents: 3060
diff changeset
78 # error The macro DCMTK_VERSION_NUMBER must be defined
8849677c2cbc compatibility with dcmtk 3.6.4
s.jodogne@gmail.com
parents: 3060
diff changeset
79 #endif
8849677c2cbc compatibility with dcmtk 3.6.4
s.jodogne@gmail.com
parents: 3060
diff changeset
80
2382
7284093111b0 big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2381
diff changeset
81 #include "../../DicomParsing/FromDcmtkBridge.h"
7284093111b0 big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2381
diff changeset
82 #include "../../DicomParsing/ToDcmtkBridge.h"
7284093111b0 big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2381
diff changeset
83 #include "../../OrthancException.h"
7284093111b0 big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2381
diff changeset
84 #include "../../Logging.h"
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 #include <dcmtk/dcmdata/dcfilefo.h>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 #include <dcmtk/dcmdata/dcmetinf.h>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 #include <dcmtk/dcmdata/dcostrmb.h>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 #include <dcmtk/dcmdata/dcdeftag.h>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 #include <dcmtk/dcmnet/diutil.h>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92
62
a70bb32802ae renaming Server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 57
diff changeset
93 namespace Orthanc
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 namespace
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 struct StoreCallbackData
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 IStoreRequestHandler* handler;
1573
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
100 const std::string* remoteIp;
1285
5730f374e4e6 Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1004
diff changeset
101 const char* remoteAET;
5730f374e4e6 Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1004
diff changeset
102 const char* calledAET;
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 const char* modality;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 const char* affectedSOPInstanceUID;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 uint32_t messageID;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 };
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107
730
309e686b41e7 better logging about nonexistent tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
108
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 static void
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 storeScpCallback(
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 void *callbackData,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 T_DIMSE_StoreProgress *progress,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 T_DIMSE_C_StoreRQ *req,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 char * /*imageFileName*/, DcmDataset **imageDataSet,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 T_DIMSE_C_StoreRSP *rsp,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 DcmDataset **statusDetail)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 /*
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 * This function.is used to indicate progress when storescp receives instance data over the
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 * network. On the final call to this function (identified by progress->state == DIMSE_StoreEnd)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 * this function will store the data set which was received over the network to a file.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 * Earlier calls to this function will simply cause some information to be dumped to stdout.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 *
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 * Parameters:
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 * callbackData - [in] data for this callback function
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 * progress - [in] The state of progress. (identifies if this is the initial or final call
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 * to this function, or a call in between these two calls.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 * req - [in] The original store request message.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 * imageFileName - [in] The path to and name of the file the information shall be written to.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 * imageDataSet - [in] The data set which shall be stored in the image file
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 * rsp - [inout] the C-STORE-RSP message (will be sent after the call to this function)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 * statusDetail - [inout] This variable can be used to capture detailed information with regard to
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 * the status information which is captured in the status element (0000,0900). Note
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 * that this function does specify any such information, the pointer will be set to NULL.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 */
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 StoreCallbackData *cbdata = OFstatic_cast(StoreCallbackData *, callbackData);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 DIC_UI sopClass;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 DIC_UI sopInstance;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 // if this is the final call of this function, save the data which was received to a file
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 // (note that we could also save the image somewhere else, put it in database, etc.)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 if (progress->state == DIMSE_StoreEnd)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 OFString tmpStr;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 // do not send status detail information
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 *statusDetail = NULL;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 // Concerning the following line: an appropriate status code is already set in the resp structure,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 // it need not be success. For example, if the caller has already detected an out of resources problem
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 // then the status will reflect this. The callback function is still called to allow cleanup.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 //rsp->DimseStatus = STATUS_Success;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 // we want to write the received information to a file only if this information
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 // is present and the options opt_bitPreserving and opt_ignore are not set.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 if ((imageDataSet != NULL) && (*imageDataSet != NULL))
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 // check the image to make sure it is consistent, i.e. that its sopClass and sopInstance correspond
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 // to those mentioned in the request. If not, set the status in the response message variable.
1333
732b6a4ed541 clang warning removal
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
161 if (rsp->DimseStatus == STATUS_Success)
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 // which SOP class and SOP instance ?
3118
8849677c2cbc compatibility with dcmtk 3.6.4
s.jodogne@gmail.com
parents: 3060
diff changeset
164
8849677c2cbc compatibility with dcmtk 3.6.4
s.jodogne@gmail.com
parents: 3060
diff changeset
165 #if DCMTK_VERSION_NUMBER >= 364
4796
94616af363ec added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents: 4502
diff changeset
166 if (!DU_findSOPClassAndInstanceInDataSet(*imageDataSet, sopClass, sizeof(sopClass),
94616af363ec added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents: 4502
diff changeset
167 sopInstance, sizeof(sopInstance), /*opt_correctUIDPadding*/ OFFalse))
3118
8849677c2cbc compatibility with dcmtk 3.6.4
s.jodogne@gmail.com
parents: 3060
diff changeset
168 #else
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
169 if (!DU_findSOPClassAndInstanceInDataSet(*imageDataSet, sopClass, sopInstance, /*opt_correctUIDPadding*/ OFFalse))
3118
8849677c2cbc compatibility with dcmtk 3.6.4
s.jodogne@gmail.com
parents: 3060
diff changeset
170 #endif
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
171 {
4796
94616af363ec added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents: 4502
diff changeset
172 //LOG4CPP_ERROR(Internals::GetLogger(), "bad DICOM file: " << fileName);
94616af363ec added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents: 4502
diff changeset
173 rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand;
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
174 }
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
175 else if (strcmp(sopClass, req->AffectedSOPClassUID) != 0)
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
176 {
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
177 rsp->DimseStatus = STATUS_STORE_Error_DataSetDoesNotMatchSOPClass;
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
178 }
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
179 else if (strcmp(sopInstance, req->AffectedSOPInstanceUID) != 0)
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
180 {
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
181 rsp->DimseStatus = STATUS_STORE_Error_DataSetDoesNotMatchSOPClass;
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
182 }
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
183 else
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 {
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
185 try
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
186 {
4796
94616af363ec added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents: 4502
diff changeset
187 rsp->DimseStatus = cbdata->handler->Handle(**imageDataSet, *cbdata->remoteIp, cbdata->remoteAET, cbdata->calledAET);
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
188 }
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
189 catch (OrthancException& e)
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
190 {
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
191 rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources;
730
309e686b41e7 better logging about nonexistent tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
192
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
193 if (e.GetErrorCode() == ErrorCode_InexistentTag)
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
194 {
4502
e3e759cbd19c refactoring IStoreRequestHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
195 FromDcmtkBridge::LogMissingTagsForStore(**imageDataSet);
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
196 }
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
197 else
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
198 {
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
199 CLOG(ERROR, DICOM) << "Exception while storing DICOM: " << e.What();
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
200 }
730
309e686b41e7 better logging about nonexistent tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
201 }
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 /*
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 * This function processes a DIMSE C-STORE-RQ commmand that was
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 * received over the network connection.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 *
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 * Parameters:
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214 * assoc - [in] The association (network connection to another DICOM application).
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 * msg - [in] The DIMSE C-STORE-RQ message that was received.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 * presID - [in] The ID of the presentation context which was specified in the PDV which contained
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217 * the DIMSE command.
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218 */
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 OFCondition Internals::storeScp(T_ASC_Association * assoc,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 T_DIMSE_Message * msg,
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221 T_ASC_PresentationContextID presID,
1573
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
222 IStoreRequestHandler& handler,
3704
58f92b1c8061 Fix issue #167 (Job can't be cancelled - Handling of timeouts after established association)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
223 const std::string& remoteIp,
58f92b1c8061 Fix issue #167 (Job can't be cancelled - Handling of timeouts after established association)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
224 int timeout)
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 OFCondition cond = EC_Normal;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227 T_DIMSE_C_StoreRQ *req;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229 // assign the actual information of the C-STORE-RQ command to a local variable
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230 req = &msg->msg.CStoreRQ;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
231
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 // intialize some variables
1573
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
233 StoreCallbackData data;
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
234 data.handler = &handler;
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
235 data.remoteIp = &remoteIp;
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
236 data.modality = dcmSOPClassUIDToModality(req->AffectedSOPClassUID/*, "UNKNOWN"*/);
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
237 if (data.modality == NULL)
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
238 data.modality = "UNKNOWN";
101
428784e59dcd trying to use log4cplus
jodogne
parents: 62
diff changeset
239
1573
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
240 data.affectedSOPInstanceUID = req->AffectedSOPInstanceUID;
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
241 data.messageID = req->MessageID;
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242 if (assoc && assoc->params)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243 {
1573
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
244 data.remoteAET = assoc->params->DULparams.callingAPTitle;
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
245 data.calledAET = assoc->params->DULparams.calledAPTitle;
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
246 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
247 else
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
248 {
1573
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
249 data.remoteAET = "";
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
250 data.calledAET = "";
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
253 DcmFileFormat dcmff;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
254
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255 // store SourceApplicationEntityTitle in metaheader
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256 if (assoc && assoc->params)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
257 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
258 const char *aet = assoc->params->DULparams.callingAPTitle;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
259 if (aet) dcmff.getMetaInfo()->putAndInsertString(DCM_SourceApplicationEntityTitle, aet);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
260 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
261
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
262 // define an address where the information which will be received over the network will be stored
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
263 DcmDataset *dset = dcmff.getDataset();
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
264
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
265 cond = DIMSE_storeProvider(assoc, presID, req, NULL, /*opt_useMetaheader*/OFFalse, &dset,
1573
3309878b3e16 more information about the origin of requests submitted to the DICOM handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1486
diff changeset
266 storeScpCallback, &data,
3704
58f92b1c8061 Fix issue #167 (Job can't be cancelled - Handling of timeouts after established association)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
267 /*opt_blockMode*/ (timeout ? DIMSE_NONBLOCKING : DIMSE_BLOCKING),
58f92b1c8061 Fix issue #167 (Job can't be cancelled - Handling of timeouts after established association)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
268 /*opt_dimse_timeout*/ timeout);
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
269
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
270 // if some error occured, dump corresponding information and remove the outfile if necessary
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
271 if (cond.bad())
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
272 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
273 OFString temp_str;
4284
756126cd2219 moving all logs from DicomNetworking folder into the "dicom" category
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4140
diff changeset
274 CLOG(ERROR, DICOM) << "Store SCP Failed: " << cond.text();
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
275 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
276
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
277 // return return value
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
278 return cond;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
279 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
280 }