Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Toolbox/ParsedDicomCache.cpp @ 1714:a878e807cd96
configuration option "DicomCacheSize", warning if cache should be larger
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 30 Nov 2020 17:57:10 +0100 |
parents | 59f95b9ea858 |
children | 9ac2a65d4172 |
comparison
equal
deleted
inserted
replaced
1713:aec45e0b2528 | 1714:a878e807cd96 |
---|---|
80 Orthanc::ParsedDicomFile* dicom, | 80 Orthanc::ParsedDicomFile* dicom, |
81 size_t fileSize, | 81 size_t fileSize, |
82 bool hasPixelData) | 82 bool hasPixelData) |
83 { | 83 { |
84 LOG(TRACE) << "new item stored in cache: bucket " << bucket << ", key " << bucketKey; | 84 LOG(TRACE) << "new item stored in cache: bucket " << bucket << ", key " << bucketKey; |
85 | |
86 if (lowCacheSizeWarning_ < fileSize && | |
87 cache_.GetMaximumSize() > 0 && | |
88 fileSize >= cache_.GetMaximumSize()) | |
89 { | |
90 lowCacheSizeWarning_ = fileSize; | |
91 LOG(WARNING) << "The DICOM cache size should be larger: Storing a DICOM instance of " | |
92 << (fileSize / (1024 * 1024)) << "MB, whereas the cache size is only " | |
93 << (cache_.GetMaximumSize() / (1024 * 1024)) << "MB wide"; | |
94 } | |
95 | |
85 cache_.Acquire(GetIndex(bucket, bucketKey), new Item(dicom, fileSize, hasPixelData)); | 96 cache_.Acquire(GetIndex(bucket, bucketKey), new Item(dicom, fileSize, hasPixelData)); |
86 } | 97 } |
87 | 98 |
88 | 99 |
89 ParsedDicomCache::Reader::Reader(ParsedDicomCache& cache, | 100 ParsedDicomCache::Reader::Reader(ParsedDicomCache& cache, |