Mercurial > hg > orthanc-stone
diff 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 |
line wrap: on
line diff
--- a/Framework/Layers/OrthancFrameLayerSource.h Tue Aug 21 16:48:25 2018 +0200 +++ b/Framework/Layers/OrthancFrameLayerSource.h Tue Aug 21 18:14:22 2018 +0200 @@ -27,29 +27,18 @@ namespace OrthancStone { + // this class is in charge of loading a Frame. + // once it's been loaded (first the geometry and then the image), + // messages are sent to observers so they can use it class OrthancFrameLayerSource : public LayerSourceBase, - private OrthancSlicesLoader::ISliceLoaderObserver + public IObserver + //private OrthancSlicesLoader::ISliceLoaderObserver { private: OrthancSlicesLoader loader_; SliceImageQuality quality_; - virtual void OnSliceGeometryReady(const OrthancSlicesLoader& loader); - - virtual void OnSliceGeometryError(const OrthancSlicesLoader& loader); - - virtual void OnSliceImageReady(const OrthancSlicesLoader& loader, - unsigned int sliceIndex, - const Slice& slice, - std::auto_ptr<Orthanc::ImageAccessor>& image, - SliceImageQuality quality); - - virtual void OnSliceImageError(const OrthancSlicesLoader& loader, - unsigned int sliceIndex, - const Slice& slice, - SliceImageQuality quality); - public: OrthancFrameLayerSource(MessageBroker& broker, IWebService& orthanc); @@ -79,5 +68,7 @@ const CoordinateSystem3D& viewportSlice); virtual void ScheduleLayerCreation(const CoordinateSystem3D& viewportSlice); + + virtual void HandleMessage(const IObservable& from, const IMessage& message); }; }