comparison OrthancServer/Sources/ResourceFinder.cpp @ 5694:4a85ee2cbe1f find-refactoring

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 12 Jul 2024 07:59:00 +0200
parents 023787ecaff2
children 0f8b6214308a
comparison
equal deleted inserted replaced
5693:023787ecaff2 5694:4a85ee2cbe1f
560 } 560 }
561 561
562 562
563 void ResourceFinder::SetDatabaseLookup(const DatabaseLookup& lookup) 563 void ResourceFinder::SetDatabaseLookup(const DatabaseLookup& lookup)
564 { 564 {
565 MainDicomTagsRegistry registry;
566
565 lookup_.reset(lookup.Clone()); 567 lookup_.reset(lookup.Clone());
566 568
567 for (size_t i = 0; i < lookup.GetConstraintsCount(); i++) 569 for (size_t i = 0; i < lookup.GetConstraintsCount(); i++)
568 { 570 {
569 DicomTag tag = lookup.GetConstraint(i).GetTag(); 571 DicomTag tag = lookup.GetConstraint(i).GetTag();
570 if (IsComputedTag(tag)) 572 if (IsComputedTag(tag))
571 { 573 {
572 AddRequestedTag(tag); 574 AddRequestedTag(tag);
573 } 575 }
574 } 576 else
575 577 {
576 MainDicomTagsRegistry registry; 578 ResourceType level;
579 DicomTagType tagType;
580 registry.LookupTag(level, tagType, tag);
581 if (tagType == DicomTagType_Generic)
582 {
583 AddRequestedTag(tag);
584 }
585 }
586 }
587
577 isSimpleLookup_ = registry.NormalizeLookup(request_.GetDicomTagConstraints(), lookup, request_.GetLevel()); 588 isSimpleLookup_ = registry.NormalizeLookup(request_.GetDicomTagConstraints(), lookup, request_.GetLevel());
578 589
579 // "request_.GetDicomTagConstraints()" only contains constraints on main DICOM tags 590 // "request_.GetDicomTagConstraints()" only contains constraints on main DICOM tags
580 591
581 for (size_t i = 0; i < request_.GetDicomTagConstraints().GetSize(); i++) 592 for (size_t i = 0; i < request_.GetDicomTagConstraints().GetSize(); i++)