comparison OrthancServer/Internals/FindScp.cpp @ 2256:de1ba22fd28a

simplification wrt. modality manufacturers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 01 Feb 2017 16:26:57 +0100
parents a3a65de1840f
children b8969010b534
comparison
equal deleted inserted replaced
2255:1442da6a03dd 2256:de1ba22fd28a
189 { 189 {
190 bool ok = false; 190 bool ok = false;
191 191
192 try 192 try
193 { 193 {
194 RemoteModalityParameters modality;
195
196 /**
197 * Ensure that the remote modality is known to Orthanc for C-FIND requests.
198 **/
199
200 if (!Configuration::LookupDicomModalityUsingAETitle(modality, *data.remoteAet_))
201 {
202 LOG(ERROR) << "Modality with AET \"" << *data.remoteAet_
203 << "\" is not defined in the \"DicomModalities\" configuration option";
204 throw OrthancException(ErrorCode_UnknownModality);
205 }
206
207
194 if (sopClassUid == UID_FINDModalityWorklistInformationModel) 208 if (sopClassUid == UID_FINDModalityWorklistInformationModel)
195 { 209 {
196 data.answers_.SetWorklist(true); 210 data.answers_.SetWorklist(true);
197 211
198 if (data.worklistHandler_ != NULL) 212 if (data.worklistHandler_ != NULL)
200 ParsedDicomFile query(*requestIdentifiers); 214 ParsedDicomFile query(*requestIdentifiers);
201 FixWorklistQuery(query); 215 FixWorklistQuery(query);
202 216
203 data.worklistHandler_->Handle(data.answers_, query, 217 data.worklistHandler_->Handle(data.answers_, query,
204 *data.remoteIp_, *data.remoteAet_, 218 *data.remoteIp_, *data.remoteAet_,
205 *data.calledAet_); 219 *data.calledAet_, modality.GetManufacturer());
206 ok = true; 220 ok = true;
207 } 221 }
208 else 222 else
209 { 223 {
210 LOG(ERROR) << "No worklist handler is installed, cannot handle this C-FIND request"; 224 LOG(ERROR) << "No worklist handler is installed, cannot handle this C-FIND request";
240 DicomMap input; 254 DicomMap input;
241 Configuration::ExtractDicomSummary(input, *requestIdentifiers); 255 Configuration::ExtractDicomSummary(input, *requestIdentifiers);
242 256
243 data.findHandler_->Handle(data.answers_, input, sequencesToReturn, 257 data.findHandler_->Handle(data.answers_, input, sequencesToReturn,
244 *data.remoteIp_, *data.remoteAet_, 258 *data.remoteIp_, *data.remoteAet_,
245 *data.calledAet_); 259 *data.calledAet_, modality.GetManufacturer());
246 ok = true; 260 ok = true;
247 } 261 }
248 else 262 else
249 { 263 {
250 LOG(ERROR) << "No C-Find handler is installed, cannot handle this request"; 264 LOG(ERROR) << "No C-Find handler is installed, cannot handle this request";