Mercurial > hg > orthanc-stone
comparison Framework/Deprecated/Loaders/LoaderCache.h @ 1225:16738485e457 broker
deprecating DicomStructureSetLoader, OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sun, 08 Dec 2019 11:45:09 +0100 |
parents | Framework/Loaders/LoaderCache.h@4383382db01d |
children | 05d05cba0f4f |
comparison
equal
deleted
inserted
replaced
1224:37bc7f115f81 | 1225:16738485e457 |
---|---|
1 /** | |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium | |
6 * | |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Affero General Public License | |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Affero General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Affero General Public License | |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 **/ | |
20 | |
21 #pragma once | |
22 | |
23 #include "../../Messages/LockingEmitter.h" | |
24 #include "../../Volumes/DicomVolumeImageMPRSlicer.h" | |
25 #include "OrthancSeriesVolumeProgressiveLoader.h" | |
26 #include "OrthancMultiframeVolumeLoader.h" | |
27 #include "DicomStructureSetLoader.h" | |
28 | |
29 #include <boost/shared_ptr.hpp> | |
30 | |
31 #include <map> | |
32 #include <string> | |
33 #include <vector> | |
34 | |
35 namespace OrthancStone | |
36 { | |
37 #if ORTHANC_ENABLE_WASM == 1 | |
38 class WebAssemblyOracle; | |
39 #else | |
40 class ThreadedOracle; | |
41 #endif | |
42 } | |
43 | |
44 namespace Deprecated | |
45 { | |
46 class LoaderCache | |
47 { | |
48 public: | |
49 #if ORTHANC_ENABLE_WASM == 1 | |
50 LoaderCache(OrthancStone::WebAssemblyOracle& oracle); | |
51 #else | |
52 LoaderCache(OrthancStone::ThreadedOracle& oracle, OrthancStone::Deprecated::LockingEmitter& lockingEmitter); | |
53 #endif | |
54 | |
55 boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader> | |
56 GetSeriesVolumeProgressiveLoader (std::string seriesUuid); | |
57 | |
58 boost::shared_ptr<OrthancStone::DicomVolumeImageMPRSlicer> | |
59 GetMultiframeDicomVolumeImageMPRSlicer(std::string instanceUuid); | |
60 | |
61 boost::shared_ptr<OrthancMultiframeVolumeLoader> | |
62 GetMultiframeVolumeLoader(std::string instanceUuid); | |
63 | |
64 boost::shared_ptr<DicomStructureSetLoader> | |
65 GetDicomStructureSetLoader( | |
66 std::string instanceUuid, | |
67 const std::vector<std::string>& initiallyVisibleStructures); | |
68 | |
69 #ifdef BGO_ENABLE_DICOMSTRUCTURESETLOADER2 | |
70 boost::shared_ptr<DicomStructureSetLoader2> | |
71 GetDicomStructureSetLoader2(std::string instanceUuid); | |
72 | |
73 boost::shared_ptr<DicomStructureSetSlicer2> | |
74 GetDicomStructureSetSlicer2(std::string instanceUuid); | |
75 #endif | |
76 //BGO_ENABLE_DICOMSTRUCTURESETLOADER2 | |
77 | |
78 void ClearCache(); | |
79 | |
80 private: | |
81 | |
82 void DebugDisplayObjRefCounts(); | |
83 #if ORTHANC_ENABLE_WASM == 1 | |
84 OrthancStone::WebAssemblyOracle& oracle_; | |
85 #else | |
86 OrthancStone::ThreadedOracle& oracle_; | |
87 OrthancStone::Deprecated::LockingEmitter& lockingEmitter_; | |
88 #endif | |
89 | |
90 std::map<std::string, boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader> > | |
91 seriesVolumeProgressiveLoaders_; | |
92 std::map<std::string, boost::shared_ptr<OrthancMultiframeVolumeLoader> > | |
93 multiframeVolumeLoaders_; | |
94 std::map<std::string, boost::shared_ptr<OrthancStone::DicomVolumeImageMPRSlicer> > | |
95 dicomVolumeImageMPRSlicers_; | |
96 std::map<std::string, boost::shared_ptr<DicomStructureSetLoader> > | |
97 dicomStructureSetLoaders_; | |
98 #ifdef BGO_ENABLE_DICOMSTRUCTURESETLOADER2 | |
99 std::map<std::string, boost::shared_ptr<DicomStructureSetLoader2> > | |
100 dicomStructureSetLoaders2_; | |
101 std::map<std::string, boost::shared_ptr<DicomStructureSet2> > | |
102 dicomStructureSets2_; | |
103 std::map<std::string, boost::shared_ptr<DicomStructureSetSlicer2> > | |
104 dicomStructureSetSlicers2_; | |
105 #endif | |
106 //BGO_ENABLE_DICOMSTRUCTURESETLOADER2 | |
107 }; | |
108 } | |
109 |