Mercurial > hg > orthanc
comparison OrthancServer/Sources/OrthancFindRequestHandler.cpp @ 4287:5a3374b6e707
using CLOG in Orthanc DICOM handlers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 04 Nov 2020 17:48:11 +0100 |
parents | 318c16cfccab |
children | 91554aecff9a |
comparison
equal
deleted
inserted
replaced
4286:526bd8bad850 | 4287:5a3374b6e707 |
---|---|
366 } | 366 } |
367 | 367 |
368 if (result.GetSize() == 0 && | 368 if (result.GetSize() == 0 && |
369 sequencesToReturn.empty()) | 369 sequencesToReturn.empty()) |
370 { | 370 { |
371 LOG(WARNING) << "The C-FIND request does not return any DICOM tag"; | 371 CLOG(WARNING, DICOM) << "The C-FIND request does not return any DICOM tag"; |
372 } | 372 } |
373 else if (sequencesToReturn.empty()) | 373 else if (sequencesToReturn.empty()) |
374 { | 374 { |
375 answers.Add(result); | 375 answers.Add(result); |
376 } | 376 } |
377 else if (dicomAsJson == NULL) | 377 else if (dicomAsJson == NULL) |
378 { | 378 { |
379 LOG(WARNING) << "C-FIND query requesting a sequence, but reading JSON from disk is disabled"; | 379 CLOG(WARNING, DICOM) << "C-FIND query requesting a sequence, but reading JSON from disk is disabled"; |
380 answers.Add(result); | 380 answers.Add(result); |
381 } | 381 } |
382 else | 382 else |
383 { | 383 { |
384 ParsedDicomFile dicom(result, GetDefaultDicomEncoding(), | 384 ParsedDicomFile dicom(result, GetDefaultDicomEncoding(), |
629 throw OrthancException(ErrorCode_NotImplemented); | 629 throw OrthancException(ErrorCode_NotImplemented); |
630 } | 630 } |
631 | 631 |
632 | 632 |
633 DicomArray query(*filteredInput); | 633 DicomArray query(*filteredInput); |
634 LOG(INFO) << "DICOM C-Find request at level: " << EnumerationToString(level); | 634 CLOG(INFO, DICOM) << "DICOM C-Find request at level: " << EnumerationToString(level); |
635 | 635 |
636 for (size_t i = 0; i < query.GetSize(); i++) | 636 for (size_t i = 0; i < query.GetSize(); i++) |
637 { | 637 { |
638 if (!query.GetElement(i).GetValue().IsNull()) | 638 if (!query.GetElement(i).GetValue().IsNull()) |
639 { | 639 { |
640 LOG(INFO) << " " << query.GetElement(i).GetTag() | 640 CLOG(INFO, DICOM) << " " << query.GetElement(i).GetTag() |
641 << " " << FromDcmtkBridge::GetTagName(query.GetElement(i)) | 641 << " " << FromDcmtkBridge::GetTagName(query.GetElement(i)) |
642 << " = " << query.GetElement(i).GetValue().GetContent(); | 642 << " = " << query.GetElement(i).GetValue().GetContent(); |
643 } | 643 } |
644 } | 644 } |
645 | 645 |
646 for (std::list<DicomTag>::const_iterator it = sequencesToReturn.begin(); | 646 for (std::list<DicomTag>::const_iterator it = sequencesToReturn.begin(); |
647 it != sequencesToReturn.end(); ++it) | 647 it != sequencesToReturn.end(); ++it) |
648 { | 648 { |
649 LOG(INFO) << " (" << it->Format() | 649 CLOG(INFO, DICOM) << " (" << it->Format() |
650 << ") " << FromDcmtkBridge::GetTagName(*it, "") | 650 << ") " << FromDcmtkBridge::GetTagName(*it, "") |
651 << " : sequence tag whose content will be copied"; | 651 << " : sequence tag whose content will be copied"; |
652 } | 652 } |
653 | 653 |
654 // collect the private creators from the query itself | 654 // collect the private creators from the query itself |
655 std::map<uint16_t, std::string> privateCreators; | 655 std::map<uint16_t, std::string> privateCreators; |
656 for (size_t i = 0; i < query.GetSize(); i++) | 656 for (size_t i = 0; i < query.GetSize(); i++) |
708 | 708 |
709 lookup.AddDicomConstraint(tag, value, sensitive, true /* mandatory */); | 709 lookup.AddDicomConstraint(tag, value, sensitive, true /* mandatory */); |
710 } | 710 } |
711 else | 711 else |
712 { | 712 { |
713 LOG(INFO) << "Because of a patch for the manufacturer of the remote modality, " | 713 CLOG(INFO, DICOM) << "Because of a patch for the manufacturer of the remote modality, " |
714 << "ignoring constraint on tag (" << tag.Format() << ") " << FromDcmtkBridge::GetTagName(element); | 714 << "ignoring constraint on tag (" << tag.Format() << ") " |
715 << FromDcmtkBridge::GetTagName(element); | |
715 } | 716 } |
716 } | 717 } |
717 | 718 |
718 | 719 |
719 /** | 720 /** |