Mercurial > hg > orthanc-stone
changeset 92:961ee171d933 wasm
cleaning up
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 29 May 2017 11:42:53 +0200 |
parents | 81f73efd81a1 |
children | 5945e81734a3 |
files | Applications/Samples/SingleFrameApplication.h Framework/Widgets/LayerWidget.cpp Framework/Widgets/LayeredSceneWidget.cpp Framework/Widgets/LayeredSceneWidget.h Framework/Widgets/WorldSceneWidget.h |
diffstat | 5 files changed, 6 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/Applications/Samples/SingleFrameApplication.h Mon May 29 11:18:35 2017 +0200 +++ b/Applications/Samples/SingleFrameApplication.h Mon May 29 11:42:53 2017 +0200 @@ -94,6 +94,10 @@ virtual void NotifyGeometryReady(const ILayerSource& source) { + // Once the geometry of the series is downloaded from Orthanc, + // display its first slice, and adapt the viewport to fit this + // slice + const OrthancFrameLayerSource& frame = dynamic_cast<const OrthancFrameLayerSource&>(source);
--- a/Framework/Widgets/LayerWidget.cpp Mon May 29 11:18:35 2017 +0200 +++ b/Framework/Widgets/LayerWidget.cpp Mon May 29 11:42:53 2017 +0200 @@ -393,7 +393,7 @@ slice_ = slice; ResetPendingScene(); - InvalidateAllLayers(); + InvalidateAllLayers(); // TODO Removing this line avoid loading twice the image in WASM } }
--- a/Framework/Widgets/LayeredSceneWidget.cpp Mon May 29 11:18:35 2017 +0200 +++ b/Framework/Widgets/LayeredSceneWidget.cpp Mon May 29 11:42:53 2017 +0200 @@ -535,23 +535,6 @@ - struct LayeredSceneWidget::SliceChangeFunctor - { - const SliceGeometry& slice_; - - SliceChangeFunctor(const SliceGeometry& slice) : - slice_(slice) - { - } - - void operator() (ISliceObserver& observer, - const LayeredSceneWidget& source) - { - observer.NotifySliceChange(source, slice_); - } - }; - - void LayeredSceneWidget::SetSlice(const SliceGeometry& slice) { { @@ -561,8 +544,7 @@ InvalidateAllLayers(); - SliceChangeFunctor functor(slice); - observers_.Notify(*this, functor); + observers_.Apply(*this, &ISliceObserver::NotifySliceChange, slice); }