comparison OrthancServer/OrthancFindRequestHandler.cpp @ 2115:a657f7772e69

Handling of private tags/creators in the "Dictionary" configuration option
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 31 Oct 2016 15:23:32 +0100
parents b9428d5f7eaf
children 4b02ec79728a
comparison
equal deleted inserted replaced
2114:e4f8e377782f 2115:a657f7772e69
580 for (size_t i = 0; i < query.GetSize(); i++) 580 for (size_t i = 0; i < query.GetSize(); i++)
581 { 581 {
582 if (!query.GetElement(i).GetValue().IsNull()) 582 if (!query.GetElement(i).GetValue().IsNull())
583 { 583 {
584 LOG(INFO) << " " << query.GetElement(i).GetTag() 584 LOG(INFO) << " " << query.GetElement(i).GetTag()
585 << " " << FromDcmtkBridge::GetName(query.GetElement(i).GetTag()) 585 << " " << FromDcmtkBridge::GetTagName(query.GetElement(i))
586 << " = " << query.GetElement(i).GetValue().GetContent(); 586 << " = " << query.GetElement(i).GetValue().GetContent();
587 } 587 }
588 } 588 }
589 589
590 for (std::list<DicomTag>::const_iterator it = sequencesToReturn.begin(); 590 for (std::list<DicomTag>::const_iterator it = sequencesToReturn.begin();
591 it != sequencesToReturn.end(); ++it) 591 it != sequencesToReturn.end(); ++it)
592 { 592 {
593 LOG(INFO) << " (" << it->Format() 593 LOG(INFO) << " (" << it->Format()
594 << ") " << FromDcmtkBridge::GetName(*it) 594 << ") " << FromDcmtkBridge::GetTagName(*it, "")
595 << " : sequence tag whose content will be copied"; 595 << " : sequence tag whose content will be copied";
596 } 596 }
597 597
598 598
599 /** 599 /**
602 602
603 LookupResource finder(level); 603 LookupResource finder(level);
604 604
605 for (size_t i = 0; i < query.GetSize(); i++) 605 for (size_t i = 0; i < query.GetSize(); i++)
606 { 606 {
607 const DicomTag tag = query.GetElement(i).GetTag(); 607 const DicomElement& element = query.GetElement(i);
608 608 const DicomTag tag = element.GetTag();
609 if (query.GetElement(i).GetValue().IsNull() || 609
610 if (element.GetValue().IsNull() ||
610 tag == DICOM_TAG_QUERY_RETRIEVE_LEVEL || 611 tag == DICOM_TAG_QUERY_RETRIEVE_LEVEL ||
611 tag == DICOM_TAG_SPECIFIC_CHARACTER_SET) 612 tag == DICOM_TAG_SPECIFIC_CHARACTER_SET)
612 { 613 {
613 continue; 614 continue;
614 } 615 }
615 616
616 std::string value = query.GetElement(i).GetValue().GetContent(); 617 std::string value = element.GetValue().GetContent();
617 if (value.size() == 0) 618 if (value.size() == 0)
618 { 619 {
619 // An empty string corresponds to a "*" wildcard constraint, so we ignore it 620 // An empty string corresponds to a "*" wildcard constraint, so we ignore it
620 continue; 621 continue;
621 } 622 }
635 finder.AddDicomConstraint(tag, value, sensitive); 636 finder.AddDicomConstraint(tag, value, sensitive);
636 } 637 }
637 else 638 else
638 { 639 {
639 LOG(INFO) << "Because of a patch for the manufacturer of the remote modality, " 640 LOG(INFO) << "Because of a patch for the manufacturer of the remote modality, "
640 << "ignoring constraint on tag (" << tag.Format() << ") " << FromDcmtkBridge::GetName(tag); 641 << "ignoring constraint on tag (" << tag.Format() << ") " << FromDcmtkBridge::GetTagName(element);
641 } 642 }
642 } 643 }
643 644
644 645
645 /** 646 /**