comparison OrthancServer/QueryRetrieveHandler.cpp @ 2867:251614c2edac

DicomMoveScuJob
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 08 Oct 2018 16:08:51 +0200
parents 4ee3a759afea
children 4767d36679ed
comparison
equal deleted inserted replaced
2866:437e6ba20a5e 2867:251614c2edac
136 Invalidate(); 136 Invalidate();
137 query_.SetValue(tag, value, false); 137 query_.SetValue(tag, value, false);
138 } 138 }
139 139
140 140
141 size_t QueryRetrieveHandler::GetAnswerCount() 141 size_t QueryRetrieveHandler::GetAnswersCount()
142 { 142 {
143 Run(); 143 Run();
144 return answers_.GetSize(); 144 return answers_.GetSize();
145 } 145 }
146 146
149 size_t i) 149 size_t i)
150 { 150 {
151 Run(); 151 Run();
152 answers_.GetAnswer(i).ExtractDicomSummary(target); 152 answers_.GetAnswer(i).ExtractDicomSummary(target);
153 } 153 }
154
155
156 void QueryRetrieveHandler::RetrieveInternal(DicomUserConnection& connection,
157 const std::string& target,
158 size_t i)
159 {
160 DicomMap map;
161 GetAnswer(map, i);
162 connection.Move(target, map);
163 }
164
165
166 void QueryRetrieveHandler::Retrieve(const std::string& target,
167 size_t i)
168 {
169 DicomUserConnection connection(localAet_, modality_);
170 connection.Open();
171
172 RetrieveInternal(connection, target, i);
173 }
174
175
176 void QueryRetrieveHandler::Retrieve(const std::string& target)
177 {
178 DicomUserConnection connection(localAet_, modality_);
179 connection.Open();
180
181 for (size_t i = 0; i < GetAnswerCount(); i++)
182 {
183 RetrieveInternal(connection, target, i);
184 }
185 }
186 } 154 }