comparison Framework/Loaders/LoaderCache.h @ 1019:29f5f2031310

Added a way to specificy which structures are to be initially displayed (the default being ALL structures displayed) + the loader maintains a list of structure display state, that can be modified continuously + the cache now takes the initial list of structure into account for computing the entry + added methods to change the loaded structure visibility + disabled the alternate loaders (DicomStructureSetLoader2 and friends) + disabled corresponding tests
author Benjamin Golinvaux <bgo@osimis.io>
date Fri, 27 Sep 2019 13:32:05 +0200
parents e704a53c9d0a
children 4383382db01d 2d8ab34c8c91
comparison
equal deleted inserted replaced
1018:58eed6bbcabb 1019:29f5f2031310
22 22
23 #include <boost/shared_ptr.hpp> 23 #include <boost/shared_ptr.hpp>
24 24
25 #include <map> 25 #include <map>
26 #include <string> 26 #include <string>
27 #include <vector>
27 28
28 namespace OrthancStone 29 namespace OrthancStone
29 { 30 {
30 class OrthancSeriesVolumeProgressiveLoader; 31 class OrthancSeriesVolumeProgressiveLoader;
31 class DicomVolumeImageMPRSlicer; 32 class DicomVolumeImageMPRSlicer;
32 class DicomStructureSetLoader; 33 class DicomStructureSetLoader;
34 #ifdef BGO_ENABLE_DICOMSTRUCTURESETLOADER2
33 class DicomStructureSetLoader2; 35 class DicomStructureSetLoader2;
34 class DicomStructureSetSlicer2; 36 class DicomStructureSetSlicer2;
35 class DicomStructureSet2; 37 class DicomStructureSet2;
38 #endif
39 //BGO_ENABLE_DICOMSTRUCTURESETLOADER2
36 class OrthancMultiframeVolumeLoader; 40 class OrthancMultiframeVolumeLoader;
37 41
38 #if ORTHANC_ENABLE_WASM == 1 42 #if ORTHANC_ENABLE_WASM == 1
39 class WebAssemblyOracle; 43 class WebAssemblyOracle;
40 #else 44 #else
59 63
60 boost::shared_ptr<OrthancMultiframeVolumeLoader> 64 boost::shared_ptr<OrthancMultiframeVolumeLoader>
61 GetMultiframeVolumeLoader(std::string instanceUuid); 65 GetMultiframeVolumeLoader(std::string instanceUuid);
62 66
63 boost::shared_ptr<DicomStructureSetLoader> 67 boost::shared_ptr<DicomStructureSetLoader>
64 GetDicomStructureSetLoader (std::string instanceUuid); 68 GetDicomStructureSetLoader(
69 std::string instanceUuid,
70 const std::vector<std::string>& initiallyVisibleStructures);
65 71
72 #ifdef BGO_ENABLE_DICOMSTRUCTURESETLOADER2
66 boost::shared_ptr<DicomStructureSetLoader2> 73 boost::shared_ptr<DicomStructureSetLoader2>
67 GetDicomStructureSetLoader2(std::string instanceUuid); 74 GetDicomStructureSetLoader2(std::string instanceUuid);
68 75
69 boost::shared_ptr<DicomStructureSetSlicer2> 76 boost::shared_ptr<DicomStructureSetSlicer2>
70 GetDicomStructureSetSlicer2(std::string instanceUuid); 77 GetDicomStructureSetSlicer2(std::string instanceUuid);
78 #endif
79 //BGO_ENABLE_DICOMSTRUCTURESETLOADER2
71 80
72 void ClearCache(); 81 void ClearCache();
73 82
74 private: 83 private:
75 84
87 multiframeVolumeLoaders_; 96 multiframeVolumeLoaders_;
88 std::map<std::string, boost::shared_ptr<DicomVolumeImageMPRSlicer> > 97 std::map<std::string, boost::shared_ptr<DicomVolumeImageMPRSlicer> >
89 dicomVolumeImageMPRSlicers_; 98 dicomVolumeImageMPRSlicers_;
90 std::map<std::string, boost::shared_ptr<DicomStructureSetLoader> > 99 std::map<std::string, boost::shared_ptr<DicomStructureSetLoader> >
91 dicomStructureSetLoaders_; 100 dicomStructureSetLoaders_;
101 #ifdef BGO_ENABLE_DICOMSTRUCTURESETLOADER2
92 std::map<std::string, boost::shared_ptr<DicomStructureSetLoader2> > 102 std::map<std::string, boost::shared_ptr<DicomStructureSetLoader2> >
93 dicomStructureSetLoaders2_; 103 dicomStructureSetLoaders2_;
94 std::map<std::string, boost::shared_ptr<DicomStructureSet2> > 104 std::map<std::string, boost::shared_ptr<DicomStructureSet2> >
95 dicomStructureSets2_; 105 dicomStructureSets2_;
96 std::map<std::string, boost::shared_ptr<DicomStructureSetSlicer2> > 106 std::map<std::string, boost::shared_ptr<DicomStructureSetSlicer2> >
97 dicomStructureSetSlicers2_; 107 dicomStructureSetSlicers2_;
108 #endif
109 //BGO_ENABLE_DICOMSTRUCTURESETLOADER2
98 }; 110 };
99 } 111 }
100 112