comparison OrthancServer/Sources/ServerIndex.cpp @ 4505:97d103b57cd1

removed cached dicom summary from DicomInstanceToStore
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Feb 2021 12:07:03 +0100
parents 6f99949b2878
children ac69c9f76c71
comparison
equal deleted inserted replaced
4504:7d1eabfac6e0 4505:97d103b57cd1
755 } 755 }
756 756
757 757
758 StoreStatus ServerIndex::Store(std::map<MetadataType, std::string>& instanceMetadata, 758 StoreStatus ServerIndex::Store(std::map<MetadataType, std::string>& instanceMetadata,
759 DicomInstanceToStore& instanceToStore, 759 DicomInstanceToStore& instanceToStore,
760 const DicomMap& dicomSummary,
761 DicomInstanceHasher& hasher,
760 const Attachments& attachments, 762 const Attachments& attachments,
761 bool overwrite, 763 bool overwrite,
762 bool hasPixelDataOffset, 764 bool hasPixelDataOffset,
763 uint64_t pixelDataOffset) 765 uint64_t pixelDataOffset)
764 { 766 {
765 boost::mutex::scoped_lock lock(mutex_); 767 boost::mutex::scoped_lock lock(mutex_);
766 768
767 const DicomMap& dicomSummary = instanceToStore.GetSummary();
768 const ServerIndex::MetadataMap& metadata = instanceToStore.GetMetadata(); 769 const ServerIndex::MetadataMap& metadata = instanceToStore.GetMetadata();
769 770
770 int64_t expectedInstances; 771 int64_t expectedInstances;
771 const bool hasExpectedInstances = 772 const bool hasExpectedInstances =
772 ComputeExpectedNumberOfInstances(expectedInstances, dicomSummary); 773 ComputeExpectedNumberOfInstances(expectedInstances, dicomSummary);
773 774
774 instanceMetadata.clear(); 775 instanceMetadata.clear();
775 776
776 const std::string hashPatient = instanceToStore.GetHasher().HashPatient(); 777 const std::string hashPatient = hasher.HashPatient();
777 const std::string hashStudy = instanceToStore.GetHasher().HashStudy(); 778 const std::string hashStudy = hasher.HashStudy();
778 const std::string hashSeries = instanceToStore.GetHasher().HashSeries(); 779 const std::string hashSeries = hasher.HashSeries();
779 const std::string hashInstance = instanceToStore.GetHasher().HashInstance(); 780 const std::string hashInstance = hasher.HashInstance();
780 781
781 try 782 try
782 { 783 {
783 Transaction t(*this); 784 Transaction t(*this);
784 785