Mercurial > hg > orthanc-stone
comparison Framework/Toolbox/ParsedDicomFileCache.h @ 1136:42581a6182c8 broker
reactivation of the cache of parsed DICOM files
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 06 Nov 2019 17:54:14 +0100 |
parents | a8bf81756839 |
children | 6333e6f7248e |
comparison
equal
deleted
inserted
replaced
1135:a0a33e5ea5bb | 1136:42581a6182c8 |
---|---|
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include <Core/Cache/MemoryObjectCache.h> | 24 #include <Core/Cache/MemoryObjectCache.h> |
25 #include <Core/DicomParsing/ParsedDicomFile.h> | 25 #include <Core/DicomParsing/ParsedDicomFile.h> |
26 | 26 |
27 #include <boost/shared_ptr.hpp> | |
28 | |
29 namespace OrthancStone | 27 namespace OrthancStone |
30 { | 28 { |
31 class ParsedDicomFileCache : public boost::noncopyable | 29 class ParsedDicomFileCache : public boost::noncopyable |
32 { | 30 { |
33 private: | 31 private: |
40 { | 38 { |
41 cache_.SetMaximumSize(size); | 39 cache_.SetMaximumSize(size); |
42 } | 40 } |
43 | 41 |
44 void Acquire(const std::string& path, | 42 void Acquire(const std::string& path, |
45 boost::shared_ptr<Orthanc::ParsedDicomFile> dicom, | 43 Orthanc::ParsedDicomFile* dicom, |
46 size_t fileSize, | 44 size_t fileSize, |
47 bool hasPixelData); | 45 bool hasPixelData); |
48 | 46 |
49 class Reader : public boost::noncopyable | 47 class Reader : public boost::noncopyable |
50 { | 48 { |
62 return item_ != NULL; | 60 return item_ != NULL; |
63 } | 61 } |
64 | 62 |
65 bool HasPixelData() const; | 63 bool HasPixelData() const; |
66 | 64 |
67 boost::shared_ptr<Orthanc::ParsedDicomFile> GetDicom() const; | 65 Orthanc::ParsedDicomFile& GetDicom() const; |
68 | 66 |
69 size_t GetFileSize() const; | 67 size_t GetFileSize() const; |
70 }; | 68 }; |
71 }; | 69 }; |
72 } | 70 } |