Mercurial > hg > orthanc
comparison OrthancServer/OrthancFindRequestHandler.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 | 5b7556568fa4 |
comparison
equal
deleted
inserted
replaced
2255:1442da6a03dd | 2256:de1ba22fd28a |
---|---|
514 void OrthancFindRequestHandler::Handle(DicomFindAnswers& answers, | 514 void OrthancFindRequestHandler::Handle(DicomFindAnswers& answers, |
515 const DicomMap& input, | 515 const DicomMap& input, |
516 const std::list<DicomTag>& sequencesToReturn, | 516 const std::list<DicomTag>& sequencesToReturn, |
517 const std::string& remoteIp, | 517 const std::string& remoteIp, |
518 const std::string& remoteAet, | 518 const std::string& remoteAet, |
519 const std::string& calledAet) | 519 const std::string& calledAet, |
520 { | 520 ModalityManufacturer manufacturer) |
521 /** | 521 { |
522 * Ensure that the remote modality is known to Orthanc. | |
523 **/ | |
524 | |
525 RemoteModalityParameters modality; | |
526 | |
527 if (!Configuration::LookupDicomModalityUsingAETitle(modality, remoteAet)) | |
528 { | |
529 throw OrthancException(ErrorCode_UnknownModality); | |
530 } | |
531 | |
532 bool caseSensitivePN = Configuration::GetGlobalBoolParameter("CaseSensitivePN", false); | |
533 | |
534 | |
535 /** | 522 /** |
536 * Possibly apply the user-supplied Lua filter. | 523 * Possibly apply the user-supplied Lua filter. |
537 **/ | 524 **/ |
538 | 525 |
539 DicomMap lua; | 526 DicomMap lua; |
596 * Build up the query object. | 583 * Build up the query object. |
597 **/ | 584 **/ |
598 | 585 |
599 LookupResource finder(level); | 586 LookupResource finder(level); |
600 | 587 |
588 const bool caseSensitivePN = Configuration::GetGlobalBoolParameter("CaseSensitivePN", false); | |
589 | |
601 for (size_t i = 0; i < query.GetSize(); i++) | 590 for (size_t i = 0; i < query.GetSize(); i++) |
602 { | 591 { |
603 const DicomElement& element = query.GetElement(i); | 592 const DicomElement& element = query.GetElement(i); |
604 const DicomTag tag = element.GetTag(); | 593 const DicomTag tag = element.GetTag(); |
605 | 594 |
615 { | 604 { |
616 // An empty string corresponds to a "*" wildcard constraint, so we ignore it | 605 // An empty string corresponds to a "*" wildcard constraint, so we ignore it |
617 continue; | 606 continue; |
618 } | 607 } |
619 | 608 |
620 if (FilterQueryTag(value, level, tag, modality.GetManufacturer())) | 609 if (FilterQueryTag(value, level, tag, manufacturer)) |
621 { | 610 { |
622 ValueRepresentation vr = FromDcmtkBridge::LookupValueRepresentation(tag); | 611 ValueRepresentation vr = FromDcmtkBridge::LookupValueRepresentation(tag); |
623 | 612 |
624 // DICOM specifies that searches must be case sensitive, except | 613 // DICOM specifies that searches must be case sensitive, except |
625 // for tags with a PN value representation | 614 // for tags with a PN value representation |