comparison Framework/Layers/OrthancFrameLayerSource.h @ 89:f244018a4e4b wasm

BUGGY- trying to remove IVolumeSlicesObserver
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 26 May 2017 18:27:59 +0200
parents 02c3a7a4938f
children 5945e81734a3
comparison
equal deleted inserted replaced
88:90bf4116a23c 89:f244018a4e4b
21 21
22 #pragma once 22 #pragma once
23 23
24 #include "LayerSourceBase.h" 24 #include "LayerSourceBase.h"
25 #include "../Toolbox/IWebService.h" 25 #include "../Toolbox/IWebService.h"
26 #include "../Toolbox/IVolumeSlicesObserver.h"
27 #include "../Toolbox/OrthancSlicesLoader.h" 26 #include "../Toolbox/OrthancSlicesLoader.h"
28 27
29 namespace OrthancStone 28 namespace OrthancStone
30 { 29 {
31 class OrthancFrameLayerSource : 30 class OrthancFrameLayerSource :
34 { 33 {
35 private: 34 private:
36 std::string instanceId_; 35 std::string instanceId_;
37 unsigned int frame_; 36 unsigned int frame_;
38 OrthancSlicesLoader loader_; 37 OrthancSlicesLoader loader_;
39 IVolumeSlicesObserver* observer2_;
40 38
41 virtual void NotifyGeometryReady(const OrthancSlicesLoader& loader); 39 virtual void NotifyGeometryReady(const OrthancSlicesLoader& loader);
42 40
43 virtual void NotifyGeometryError(const OrthancSlicesLoader& loader); 41 virtual void NotifyGeometryError(const OrthancSlicesLoader& loader);
44 42
50 virtual void NotifySliceImageError(const OrthancSlicesLoader& loader, 48 virtual void NotifySliceImageError(const OrthancSlicesLoader& loader,
51 unsigned int sliceIndex, 49 unsigned int sliceIndex,
52 const Slice& slice); 50 const Slice& slice);
53 51
54 public: 52 public:
55 using LayerSourceBase::SetObserver;
56
57 OrthancFrameLayerSource(IWebService& orthanc, 53 OrthancFrameLayerSource(IWebService& orthanc,
58 const std::string& instanceId, 54 const std::string& instanceId,
59 unsigned int frame); 55 unsigned int frame);
60 56
61 void SetObserver(IVolumeSlicesObserver& observer); 57 virtual size_t GetSliceCount() const
58 {
59 return loader_.GetSliceCount();
60 }
61
62 virtual const Slice& GetSlice(size_t slice) const
63 {
64 return loader_.GetSlice(slice);
65 }
62 66
63 virtual bool GetExtent(double& x1, 67 virtual bool GetExtent(double& x1,
64 double& y1, 68 double& y1,
65 double& x2, 69 double& x2,
66 double& y2, 70 double& y2,