annotate Framework/Loaders/LoaderCache.h @ 929:408bcc6c1505

Added Loader cache. Not activated yet.
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 24 Jul 2019 14:27:06 +0200
parents
children bf03cb879eb4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
929
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
1 /**
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
2 * Stone of Orthanc
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
6 *
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
10 * the License, or (at your option) any later version.
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
11 *
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
15 * Affero General Public License for more details.
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
16 *
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
19 **/
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
20
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
21 #pragma once
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
22
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
23 #include <boost/shared_ptr.hpp>
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
24
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
25 #include <map>
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
26 #include <string>
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
27
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
28 namespace OrthancStone
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
29 {
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
30 class OrthancSeriesVolumeProgressiveLoader;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
31 class DicomVolumeImageMPRSlicer;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
32 class DicomStructureSetLoader;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
33 class OrthancMultiframeVolumeLoader;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
34 class IOracle;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
35
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
36 #if ORTHANC_ENABLE_WASM == 1
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
37 //class WebAssemblyOracle;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
38 #else
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
39 //class ThreadedOracle;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
40 class LockingEmitter;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
41 #endif
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
42
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
43 class LoaderCache
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
44 {
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
45 public:
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
46 #if ORTHANC_ENABLE_WASM == 1
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
47 LoaderCache(IOracle& oracle);
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
48 #else
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
49 LoaderCache(IOracle& oracle, LockingEmitter& lockingEmitter);
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
50 #endif
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
51
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
52 boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader>
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
53 GetSeriesVolumeProgressiveLoader (std::string seriesUuid);
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
54 boost::shared_ptr<DicomVolumeImageMPRSlicer>
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
55 GetMultiframeDicomVolumeImageMPRSlicer(std::string instanceUuid);
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
56 boost::shared_ptr<DicomStructureSetLoader>
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
57 GetDicomStructureSetLoader (std::string instanceUuid);
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
58
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
59 void ClearCache();
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
60
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
61 private:
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
62 IOracle& oracle_;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
63 #if ORTHANC_ENABLE_WASM == 1
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
64 //WebAssemblyOracle& oracle_;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
65 #else
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
66 //ThreadedOracle& oracle_;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
67 LockingEmitter& lockingEmitter_;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
68 #endif
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
69
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
70 std::map<std::string, boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader> >
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
71 seriesVolumeProgressiveLoaders_;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
72 std::map<std::string, boost::shared_ptr<OrthancMultiframeVolumeLoader> >
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
73 multiframeVolumeLoaders_;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
74 std::map<std::string, boost::shared_ptr<DicomVolumeImageMPRSlicer> >
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
75 dicomVolumeImageMPRSlicers_;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
76 std::map<std::string, boost::shared_ptr<DicomStructureSetLoader> >
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
77 dicomStructureSetLoaders_;
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
78 };
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
79 }
408bcc6c1505 Added Loader cache. Not activated yet.
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
80