annotate Framework/Toolbox/ParsedDicomFileCache.cpp @ 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1116
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #include "ParsedDicomFileCache.h"
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 namespace OrthancStone
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 {
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 class ParsedDicomFileCache::Item : public Orthanc::ICacheable
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 {
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 private:
1136
42581a6182c8 reactivation of the cache of parsed DICOM files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1124
diff changeset
29 boost::mutex mutex_;
42581a6182c8 reactivation of the cache of parsed DICOM files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1124
diff changeset
30 std::auto_ptr<Orthanc::ParsedDicomFile> dicom_;
42581a6182c8 reactivation of the cache of parsed DICOM files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1124
diff changeset
31 size_t fileSize_;
42581a6182c8 reactivation of the cache of parsed DICOM files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1124
diff changeset
32 bool hasPixelData_;
1124
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
33
1116
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 public:
1136
42581a6182c8 reactivation of the cache of parsed DICOM files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1124
diff changeset
35 Item(Orthanc::ParsedDicomFile* dicom,
1124
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
36 size_t fileSize,
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
37 bool hasPixelData) :
1116
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 dicom_(dicom),
1124
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
39 fileSize_(fileSize),
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
40 hasPixelData_(hasPixelData)
1116
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 {
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 if (dicom == NULL)
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 {
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer);
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 }
1124
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
46 }
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
47
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
48 boost::mutex& GetMutex()
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
49 {
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
50 return mutex_;
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
51 }
1116
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 virtual size_t GetMemoryUsage() const
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 {
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 return fileSize_;
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 }
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
1136
42581a6182c8 reactivation of the cache of parsed DICOM files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1124
diff changeset
58 Orthanc::ParsedDicomFile& GetDicom() const
1116
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 {
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 assert(dicom_.get() != NULL);
1136
42581a6182c8 reactivation of the cache of parsed DICOM files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1124
diff changeset
61 return *dicom_;
1124
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
62 }
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
63
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
64 bool HasPixelData() const
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
65 {
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
66 return hasPixelData_;
1116
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 }
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 };
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70
1124
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
71 void ParsedDicomFileCache::Acquire(const std::string& path,
1136
42581a6182c8 reactivation of the cache of parsed DICOM files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1124
diff changeset
72 Orthanc::ParsedDicomFile* dicom,
1124
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
73 size_t fileSize,
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
74 bool hasPixelData)
1116
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 {
1124
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
76 cache_.Acquire(path, new Item(dicom, fileSize, hasPixelData));
1116
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 }
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79
1124
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
80 ParsedDicomFileCache::Reader::Reader(ParsedDicomFileCache& cache,
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
81 const std::string& path) :
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
82 reader_(cache.cache_, path)
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
83 {
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
84 if (reader_.IsValid())
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
85 {
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
86 /**
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
87 * The "Orthanc::MemoryObjectCache" uses readers/writers. The
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
88 * "Reader" subclass of the cache locks as a reader. This means
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
89 * that multiple threads can still access the underlying
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
90 * "ParsedDicomFile" object, which is not supported by DCMTK. We
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
91 * thus protect the DCMTK object by a simple mutex.
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
92 **/
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
93
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
94 item_ = &dynamic_cast<Item&>(reader_.GetValue());
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
95 lock_.reset(new boost::mutex::scoped_lock(item_->GetMutex()));
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
96 }
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
97 else
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
98 {
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
99 item_ = NULL;
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
100 }
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
101 }
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
102
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
103
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
104 bool ParsedDicomFileCache::Reader::HasPixelData() const
1116
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 {
1124
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
106 if (item_ == NULL)
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
107 {
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
108 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
109 }
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
110 else
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
111 {
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
112 return item_->HasPixelData();
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
113 }
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
114 }
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
115
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
116
1136
42581a6182c8 reactivation of the cache of parsed DICOM files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1124
diff changeset
117 Orthanc::ParsedDicomFile& ParsedDicomFileCache::Reader::GetDicom() const
1124
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
118 {
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
119 if (item_ == NULL)
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
120 {
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
121 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
122 }
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
123 else
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
124 {
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
125 return item_->GetDicom();
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
126 }
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
127 }
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
128
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
129
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
130 size_t ParsedDicomFileCache::Reader::GetFileSize() const
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
131 {
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
132 if (item_ == NULL)
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
133 {
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
134 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
135 }
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
136 else
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
137 {
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
138 return item_->GetMemoryUsage();
a8bf81756839 unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1116
diff changeset
139 }
1116
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 }
a08699daf78b ParsedDicomFileCache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 }