Mercurial > hg > orthanc-stone
diff Framework/Volumes/VolumeSceneLayerSource.h @ 1433:8635b333fa5b
[BREAKING] VolumeSceneLayerSource now locks the viewport properly before using the scene. The ctor now accepts the viewport instead of a ref. to the scene. RtViewer sample has been adapted accordingly.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 19 May 2020 13:22:48 +0200 |
parents | 0d6a01ffa1dd |
children |
line wrap: on
line diff
--- a/Framework/Volumes/VolumeSceneLayerSource.h Fri May 15 21:14:35 2020 +0200 +++ b/Framework/Volumes/VolumeSceneLayerSource.h Tue May 19 13:22:48 2020 +0200 @@ -28,6 +28,7 @@ namespace OrthancStone { + class IViewport; /** This class applies one "volume slicer" to a "3D volume", in order to create one "2D scene layer" that will be set onto the "2D @@ -38,7 +39,7 @@ class VolumeSceneLayerSource : public boost::noncopyable { private: - Scene2D& scene_; + boost::shared_ptr<OrthancStone::IViewport> viewport_; int layerDepth_; boost::shared_ptr<IVolumeSlicer> slicer_; std::unique_ptr<ILayerStyleConfigurator> configurator_; @@ -50,7 +51,7 @@ void ClearLayer(); public: - VolumeSceneLayerSource(Scene2D& scene, + VolumeSceneLayerSource(boost::shared_ptr<OrthancStone::IViewport> viewport, int layerDepth, const boost::shared_ptr<IVolumeSlicer>& slicer);