Mercurial > hg > orthanc-stone
diff 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 |
line wrap: on
line diff
--- a/Framework/Layers/ILayerSource.h Mon Nov 05 16:18:27 2018 +0100 +++ b/Framework/Layers/ILayerSource.h Tue Nov 06 14:21:02 2018 +0100 @@ -67,29 +67,49 @@ } }; - struct ImageReadyMessage : public OriginMessage<MessageType_LayerSource_ImageReady, ILayerSource> + + // TODO: Rename "ImageReadyMessage" as "SliceReadyMessage" + class ImageReadyMessage : public OriginMessage<MessageType_LayerSource_ImageReady, ILayerSource> { - boost::shared_ptr<Orthanc::ImageAccessor> image_; - SliceImageQuality imageQuality_; - const Slice& slice_; + private: + const Orthanc::ImageAccessor& image_; + SliceImageQuality imageQuality_; + const Slice& slice_; + public: ImageReadyMessage(ILayerSource& origin, - boost::shared_ptr<Orthanc::ImageAccessor> image, + const Orthanc::ImageAccessor& image, SliceImageQuality imageQuality, - const Slice& slice - ) - : OriginMessage(origin), - image_(image), - imageQuality_(imageQuality), - slice_(slice) + const Slice& slice) : + OriginMessage(origin), + image_(image), + imageQuality_(imageQuality), + slice_(slice) { } + + const Orthanc::ImageAccessor& GetImage() const + { + return image_; + } + + SliceImageQuality GetImageQuality() const + { + return imageQuality_; + } + + const Slice& GetSlice() const + { + return slice_; + } }; + - ILayerSource(MessageBroker& broker) - : IObservable(broker) - {} - + ILayerSource(MessageBroker& broker) : + IObservable(broker) + { + } + virtual ~ILayerSource() { }