changeset 79:4e21f6b3aa0d wasm

cleaning up
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 24 May 2017 21:23:29 +0200
parents 93b917b02fee
children f40a78cc7070
files Applications/Samples/SingleFrameApplication.h
diffstat 1 files changed, 3 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/Samples/SingleFrameApplication.h	Wed May 24 21:20:06 2017 +0200
+++ b/Applications/Samples/SingleFrameApplication.h	Wed May 24 21:23:29 2017 +0200
@@ -23,16 +23,8 @@
 
 #include "SampleApplicationBase.h"
 
-#define OLD 0
-
-#if OLD == 1
-#  include "../../Framework/Layers/SingleFrameRendererFactory.h"
-#  include "../../Framework/Widgets/LayeredSceneWidget.h"
-#else
-#  include "../../Framework/Layers/OrthancFrameLayerSource.h"
-#  include "../../Framework/Widgets/LayerWidget.h"
-#endif
-
+#include "../../Framework/Layers/OrthancFrameLayerSource.h"
+#include "../../Framework/Widgets/LayerWidget.h"
 #include "../../Resources/Orthanc/Core/Logging.h"
 
 namespace OrthancStone
@@ -90,28 +82,9 @@
         std::string instance = parameters["instance"].as<std::string>();
         int frame = parameters["frame"].as<unsigned int>();
 
-#if OLD == 1
-        std::auto_ptr<SingleFrameRendererFactory>  renderer;
-        renderer.reset
-          (new SingleFrameRendererFactory(context.GetWebService().GetConnection(), instance, frame));
-
-        std::auto_ptr<LayeredSceneWidget> widget(new LayeredSceneWidget);
-        widget->SetSlice(renderer->GetSliceGeometry());
-        widget->AddLayer(renderer.release());
-
-        if (parameters["smooth"].as<bool>())
-        {
-          RenderStyle s; 
-          s.interpolation_ = ImageInterpolation_Linear;
-          widget->SetLayerStyle(0, s);
-        }
-
-        context.SetCentralWidget(widget.release());
-
-#else
         std::auto_ptr<LayerWidget> widget(new LayerWidget);
 
-#if 1
+#if 0
         std::auto_ptr<OrthancFrameLayerSource> layer
           (new OrthancFrameLayerSource(context.GetWebService(), instance, frame));
         layer->SetObserver(*this);
@@ -145,7 +118,6 @@
       
         widget_ = widget.get();
         context.SetCentralWidget(widget.release());
-#endif
       }
     };
   }