comparison Framework/Layers/ILayerSource.h @ 378:814fa32e2fcc

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 06 Nov 2018 14:21:02 +0100
parents 3a4ca166fafa
children 2308fe0b0b05
comparison
equal deleted inserted replaced
377:8eb4fe74000f 378:814fa32e2fcc
65 isError_(isError) 65 isError_(isError)
66 { 66 {
67 } 67 }
68 }; 68 };
69 69
70 struct ImageReadyMessage : public OriginMessage<MessageType_LayerSource_ImageReady, ILayerSource> 70
71 // TODO: Rename "ImageReadyMessage" as "SliceReadyMessage"
72 class ImageReadyMessage : public OriginMessage<MessageType_LayerSource_ImageReady, ILayerSource>
71 { 73 {
72 boost::shared_ptr<Orthanc::ImageAccessor> image_; 74 private:
73 SliceImageQuality imageQuality_; 75 const Orthanc::ImageAccessor& image_;
74 const Slice& slice_; 76 SliceImageQuality imageQuality_;
77 const Slice& slice_;
75 78
79 public:
76 ImageReadyMessage(ILayerSource& origin, 80 ImageReadyMessage(ILayerSource& origin,
77 boost::shared_ptr<Orthanc::ImageAccessor> image, 81 const Orthanc::ImageAccessor& image,
78 SliceImageQuality imageQuality, 82 SliceImageQuality imageQuality,
79 const Slice& slice 83 const Slice& slice) :
80 ) 84 OriginMessage(origin),
81 : OriginMessage(origin), 85 image_(image),
82 image_(image), 86 imageQuality_(imageQuality),
83 imageQuality_(imageQuality), 87 slice_(slice)
84 slice_(slice)
85 { 88 {
86 } 89 }
90
91 const Orthanc::ImageAccessor& GetImage() const
92 {
93 return image_;
94 }
95
96 SliceImageQuality GetImageQuality() const
97 {
98 return imageQuality_;
99 }
100
101 const Slice& GetSlice() const
102 {
103 return slice_;
104 }
87 }; 105 };
106
88 107
89 ILayerSource(MessageBroker& broker) 108 ILayerSource(MessageBroker& broker) :
90 : IObservable(broker) 109 IObservable(broker)
91 {} 110 {
92 111 }
112
93 virtual ~ILayerSource() 113 virtual ~ILayerSource()
94 { 114 {
95 } 115 }
96 116
97 virtual bool GetExtent(std::vector<Vector>& points, 117 virtual bool GetExtent(std::vector<Vector>& points,