comparison Framework/Layers/OrthancFrameLayerSource.h @ 266:c9cf95b49a86 am-2

removed OrthancSlicesLoader::ISliceLoaderObserver; now using standard messages instead
author am@osimis.io
date Tue, 21 Aug 2018 18:14:22 +0200
parents 40b21c1f8b8d
children 5bd4161bf11b
comparison
equal deleted inserted replaced
265:30dc6e383b0b 266:c9cf95b49a86
25 #include "../Toolbox/IWebService.h" 25 #include "../Toolbox/IWebService.h"
26 #include "../Toolbox/OrthancSlicesLoader.h" 26 #include "../Toolbox/OrthancSlicesLoader.h"
27 27
28 namespace OrthancStone 28 namespace OrthancStone
29 { 29 {
30 // this class is in charge of loading a Frame.
31 // once it's been loaded (first the geometry and then the image),
32 // messages are sent to observers so they can use it
30 class OrthancFrameLayerSource : 33 class OrthancFrameLayerSource :
31 public LayerSourceBase, 34 public LayerSourceBase,
32 private OrthancSlicesLoader::ISliceLoaderObserver 35 public IObserver
36 //private OrthancSlicesLoader::ISliceLoaderObserver
33 { 37 {
34 private: 38 private:
35 OrthancSlicesLoader loader_; 39 OrthancSlicesLoader loader_;
36 SliceImageQuality quality_; 40 SliceImageQuality quality_;
37
38 virtual void OnSliceGeometryReady(const OrthancSlicesLoader& loader);
39
40 virtual void OnSliceGeometryError(const OrthancSlicesLoader& loader);
41
42 virtual void OnSliceImageReady(const OrthancSlicesLoader& loader,
43 unsigned int sliceIndex,
44 const Slice& slice,
45 std::auto_ptr<Orthanc::ImageAccessor>& image,
46 SliceImageQuality quality);
47
48 virtual void OnSliceImageError(const OrthancSlicesLoader& loader,
49 unsigned int sliceIndex,
50 const Slice& slice,
51 SliceImageQuality quality);
52 41
53 public: 42 public:
54 OrthancFrameLayerSource(MessageBroker& broker, IWebService& orthanc); 43 OrthancFrameLayerSource(MessageBroker& broker, IWebService& orthanc);
55 44
56 void LoadSeries(const std::string& seriesId); 45 void LoadSeries(const std::string& seriesId);
77 66
78 virtual bool GetExtent(std::vector<Vector>& points, 67 virtual bool GetExtent(std::vector<Vector>& points,
79 const CoordinateSystem3D& viewportSlice); 68 const CoordinateSystem3D& viewportSlice);
80 69
81 virtual void ScheduleLayerCreation(const CoordinateSystem3D& viewportSlice); 70 virtual void ScheduleLayerCreation(const CoordinateSystem3D& viewportSlice);
71
72 virtual void HandleMessage(const IObservable& from, const IMessage& message);
82 }; 73 };
83 } 74 }