annotate OrthancServer/Sources/ServerJobs/DicomModalityStoreJob.cpp @ 5410:16cbfefa15e9

Solved a deadlock related to the Job Engine events and plugins
author Alain Mazy <am@osimis.io>
date Tue, 07 Nov 2023 12:52:37 +0100
parents 0ea402b4d901
children 48b8dae6dc77
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
5185
0ea402b4d901 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4892
diff changeset
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
0ea402b4d901 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4892
diff changeset
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 *
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * This program is free software: you can redistribute it and/or
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * modify it under the terms of the GNU General Public License as
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * published by the Free Software Foundation, either version 3 of the
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * License, or (at your option) any later version.
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 *
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful, but
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * General Public License for more details.
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 *
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 **/
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 #include "../PrecompiledHeadersServer.h"
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #include "DicomModalityStoreJob.h"
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
26 #include "../../../OrthancFramework/Sources/Compatibility.h"
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
27 #include "../../../OrthancFramework/Sources/DicomNetworking/DicomAssociation.h"
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
28 #include "../../../OrthancFramework/Sources/Logging.h"
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
29 #include "../../../OrthancFramework/Sources/SerializationToolbox.h"
3095
beeeb6096f27 removing dependencies upon ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
30 #include "../ServerContext.h"
3737
f29843323daf accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3735
diff changeset
31 #include "../StorageCommitmentReports.h"
3095
beeeb6096f27 removing dependencies upon ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
32
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 namespace Orthanc
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 void DicomModalityStoreJob::OpenConnection()
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 if (connection_.get() == NULL)
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 {
3875
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
40 connection_.reset(new DicomStoreUserConnection(parameters_));
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 bool DicomModalityStoreJob::HandleInstance(const std::string& instance)
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 {
2640
c691fcf66071 ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2624
diff changeset
47 assert(IsStarted());
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 OpenConnection();
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 LOG(INFO) << "Sending instance " << instance << " to modality \""
3875
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
51 << parameters_.GetRemoteModality().GetApplicationEntityTitle() << "\"";
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 std::string dicom;
2624
714dcddeb65f asynchronous c-movoe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2603
diff changeset
54
714dcddeb65f asynchronous c-movoe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2603
diff changeset
55 try
714dcddeb65f asynchronous c-movoe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2603
diff changeset
56 {
714dcddeb65f asynchronous c-movoe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2603
diff changeset
57 context_.ReadDicom(dicom, instance);
714dcddeb65f asynchronous c-movoe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2603
diff changeset
58 }
714dcddeb65f asynchronous c-movoe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2603
diff changeset
59 catch (OrthancException& e)
714dcddeb65f asynchronous c-movoe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2603
diff changeset
60 {
714dcddeb65f asynchronous c-movoe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2603
diff changeset
61 LOG(WARNING) << "An instance was removed after the job was issued: " << instance;
714dcddeb65f asynchronous c-movoe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2603
diff changeset
62 return false;
714dcddeb65f asynchronous c-movoe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2603
diff changeset
63 }
4465
fe774d8e904b New configuration option: "DicomScuPreferredTransferSyntax" to control transcoding in C-STORE SCU
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
64
3734
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
65 std::string sopClassUid, sopInstanceUid;
3894
8f7ad4989fec transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3875
diff changeset
66 context_.StoreWithTranscoding(sopClassUid, sopInstanceUid, *connection_, dicom,
8f7ad4989fec transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3875
diff changeset
67 HasMoveOriginator(), moveOriginatorAet_, moveOriginatorId_);
3734
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
68
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
69 if (storageCommitment_)
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
70 {
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
71 sopClassUids_.push_back(sopClassUid);
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
72 sopInstanceUids_.push_back(sopInstanceUid);
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
73
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
74 if (sopClassUids_.size() != sopInstanceUids_.size() ||
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
75 sopClassUids_.size() > GetInstancesCount())
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
76 {
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
77 throw OrthancException(ErrorCode_InternalError);
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
78 }
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
79
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
80 if (sopClassUids_.size() == GetInstancesCount())
3737
f29843323daf accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3735
diff changeset
81 {
3862
594263db316a DicomModalityStoreJob now uses DicomStoreUserConnection
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3843
diff changeset
82 assert(IsStarted());
594263db316a DicomModalityStoreJob now uses DicomStoreUserConnection
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3843
diff changeset
83 connection_.reset(NULL);
594263db316a DicomModalityStoreJob now uses DicomStoreUserConnection
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3843
diff changeset
84
3875
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
85 const std::string& remoteAet = parameters_.GetRemoteModality().GetApplicationEntityTitle();
3737
f29843323daf accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3735
diff changeset
86
f29843323daf accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3735
diff changeset
87 LOG(INFO) << "Sending storage commitment request to modality: " << remoteAet;
f29843323daf accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3735
diff changeset
88
f29843323daf accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3735
diff changeset
89 // Create a "pending" storage commitment report BEFORE the
f29843323daf accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3735
diff changeset
90 // actual SCU call in order to avoid race conditions
f29843323daf accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3735
diff changeset
91 context_.GetStorageCommitmentReports().Store(
f29843323daf accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3735
diff changeset
92 transactionUid_, new StorageCommitmentReports::Report(remoteAet));
3734
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
93
3735
77183afbf55e simplification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3734
diff changeset
94 std::vector<std::string> a(sopClassUids_.begin(), sopClassUids_.end());
77183afbf55e simplification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3734
diff changeset
95 std::vector<std::string> b(sopInstanceUids_.begin(), sopInstanceUids_.end());
3862
594263db316a DicomModalityStoreJob now uses DicomStoreUserConnection
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3843
diff changeset
96
3875
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
97 DicomAssociation::RequestStorageCommitment(parameters_, transactionUid_, a, b);
3734
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
98 }
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 //boost::this_thread::sleep(boost::posix_time::milliseconds(500));
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 return true;
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106
2842
ff0ed5ea9e4e trailing step in SetOfInstancesJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2812
diff changeset
107 bool DicomModalityStoreJob::HandleTrailingStep()
ff0ed5ea9e4e trailing step in SetOfInstancesJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2812
diff changeset
108 {
ff0ed5ea9e4e trailing step in SetOfInstancesJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2812
diff changeset
109 throw OrthancException(ErrorCode_InternalError);
ff0ed5ea9e4e trailing step in SetOfInstancesJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2812
diff changeset
110 }
ff0ed5ea9e4e trailing step in SetOfInstancesJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2812
diff changeset
111
ff0ed5ea9e4e trailing step in SetOfInstancesJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2812
diff changeset
112
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 DicomModalityStoreJob::DicomModalityStoreJob(ServerContext& context) :
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 context_(context),
3734
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
115 moveOriginatorId_(0), // By default, not a C-MOVE
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
116 storageCommitment_(false) // By default, no storage commitment
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 {
3735
77183afbf55e simplification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3734
diff changeset
118 ResetStorageCommitment();
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 void DicomModalityStoreJob::SetLocalAet(const std::string& aet)
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 if (IsStarted())
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 throw OrthancException(ErrorCode_BadSequenceOfCalls);
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 else
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 {
3875
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
130 parameters_.SetLocalApplicationEntityTitle(aet);
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 void DicomModalityStoreJob::SetRemoteModality(const RemoteModalityParameters& remote)
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 if (IsStarted())
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 throw OrthancException(ErrorCode_BadSequenceOfCalls);
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 else
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 {
3875
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
143 parameters_.SetRemoteModality(remote);
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147
3875
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
148 void DicomModalityStoreJob::SetTimeout(uint32_t seconds)
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
149 {
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
150 if (IsStarted())
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
151 {
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
152 throw OrthancException(ErrorCode_BadSequenceOfCalls);
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
153 }
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
154 else
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
155 {
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
156 parameters_.SetTimeout(seconds);
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
157 }
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
158 }
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
159
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
160
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 const std::string& DicomModalityStoreJob::GetMoveOriginatorAet() const
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 if (HasMoveOriginator())
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 return moveOriginatorAet_;
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 else
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 throw OrthancException(ErrorCode_BadSequenceOfCalls);
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 uint16_t DicomModalityStoreJob::GetMoveOriginatorId() const
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 if (HasMoveOriginator())
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 return moveOriginatorId_;
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 else
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 throw OrthancException(ErrorCode_BadSequenceOfCalls);
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 void DicomModalityStoreJob::SetMoveOriginator(const std::string& aet,
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 int id)
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 if (IsStarted())
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 throw OrthancException(ErrorCode_BadSequenceOfCalls);
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 else if (id < 0 ||
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 id >= 65536)
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 throw OrthancException(ErrorCode_ParameterOutOfRange);
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 else
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 moveOriginatorId_ = static_cast<uint16_t>(id);
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 moveOriginatorAet_ = aet;
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205
2812
ea7aea6f6a95 improved naming of methods in IJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2811
diff changeset
206 void DicomModalityStoreJob::Stop(JobStopReason reason) // For pausing jobs
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 connection_.reset(NULL);
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 }
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211
3734
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
212 void DicomModalityStoreJob::ResetStorageCommitment()
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
213 {
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
214 if (storageCommitment_)
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
215 {
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
216 transactionUid_ = Toolbox::GenerateDicomPrivateUniqueIdentifier();
3735
77183afbf55e simplification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3734
diff changeset
217 sopClassUids_.clear();
77183afbf55e simplification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3734
diff changeset
218 sopInstanceUids_.clear();
3734
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
219 }
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
220 }
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
221
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
222
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
223 void DicomModalityStoreJob::Reset()
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
224 {
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
225 SetOfInstancesJob::Reset();
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
226
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
227 /**
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
228 * "After the N-EVENT-REPORT has been sent, the Transaction UID is
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
229 * no longer active and shall not be reused for other
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
230 * transactions." => Need to reset the transaction UID here
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
231 * http://dicom.nema.org/medical/dicom/2019a/output/chtml/part04/sect_J.3.3.html
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
232 **/
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
233 ResetStorageCommitment();
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
234 }
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
235
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
236
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
237 void DicomModalityStoreJob::EnableStorageCommitment(bool enabled)
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
238 {
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
239 storageCommitment_ = enabled;
3735
77183afbf55e simplification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3734
diff changeset
240 ResetStorageCommitment();
3734
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
241 }
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
242
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
243
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244 void DicomModalityStoreJob::GetPublicContent(Json::Value& value)
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
245 {
2640
c691fcf66071 ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2624
diff changeset
246 SetOfInstancesJob::GetPublicContent(value);
c691fcf66071 ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2624
diff changeset
247
3875
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
248 value["LocalAet"] = parameters_.GetLocalApplicationEntityTitle();
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
249 value["RemoteAet"] = parameters_.GetRemoteModality().GetApplicationEntityTitle();
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
250
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251 if (HasMoveOriginator())
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252 {
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
253 value["MoveOriginatorAET"] = GetMoveOriginatorAet();
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
254 value["MoveOriginatorID"] = GetMoveOriginatorId();
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255 }
3734
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
256
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
257 if (storageCommitment_)
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
258 {
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
259 value["StorageCommitmentTransactionUID"] = transactionUid_;
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
260 }
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
261 }
2664
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
262
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
263
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
264 static const char* MOVE_ORIGINATOR_AET = "MoveOriginatorAet";
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
265 static const char* MOVE_ORIGINATOR_ID = "MoveOriginatorId";
3734
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
266 static const char* STORAGE_COMMITMENT = "StorageCommitment";
2664
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
267
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
268
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
269 DicomModalityStoreJob::DicomModalityStoreJob(ServerContext& context,
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
270 const Json::Value& serialized) :
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
271 SetOfInstancesJob(serialized),
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
272 context_(context)
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
273 {
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
274 moveOriginatorAet_ = SerializationToolbox::ReadString(serialized, MOVE_ORIGINATOR_AET);
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
275 moveOriginatorId_ = static_cast<uint16_t>
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
276 (SerializationToolbox::ReadUnsignedInteger(serialized, MOVE_ORIGINATOR_ID));
3734
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
277 EnableStorageCommitment(SerializationToolbox::ReadBoolean(serialized, STORAGE_COMMITMENT));
3870
09798f2b985f added a Timeout argument to every DICOM command + 'TargetAet' not mandatory anymore in /retrieve
Alain Mazy <alain@mazy.be>
parents: 3862
diff changeset
278
3875
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
279 parameters_ = DicomAssociationParameters::UnserializeJob(serialized);
2664
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
280 }
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
281
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
282
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
283 bool DicomModalityStoreJob::Serialize(Json::Value& target)
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
284 {
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
285 if (!SetOfInstancesJob::Serialize(target))
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
286 {
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
287 return false;
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
288 }
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
289 else
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
290 {
3875
ea1d32861cfc moving timeout from DicomAssocation to DicomAssociationParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3874
diff changeset
291 parameters_.SerializeJob(target);
2664
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
292 target[MOVE_ORIGINATOR_AET] = moveOriginatorAet_;
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
293 target[MOVE_ORIGINATOR_ID] = moveOriginatorId_;
3734
4fc24b69446a triggering storage commitment scu from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3712
diff changeset
294 target[STORAGE_COMMITMENT] = storageCommitment_;
2664
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
295 return true;
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
296 }
a21b244efb37 serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2640
diff changeset
297 }
2603
988936118354 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
298 }