diff Applications/Samples/SingleFrameApplication.h @ 235:ce4405d98b92 am

Added SimpleViewerApplication (working in SDL)
author am@osimis.io
date Tue, 19 Jun 2018 16:02:41 +0200
parents 5412adf19980
children 37ab9d83dc9b
line wrap: on
line diff
--- a/Applications/Samples/SingleFrameApplication.h	Fri Jun 15 16:36:29 2018 +0200
+++ b/Applications/Samples/SingleFrameApplication.h	Tue Jun 19 16:02:41 2018 +0200
@@ -214,7 +214,7 @@
       {
       }
       
-      virtual void DeclareCommandLineOptions(boost::program_options::options_description& options)
+      virtual void DeclareStartupOptions(boost::program_options::options_description& options)
       {
         boost::program_options::options_description generic("Sample options");
         generic.add_options()
@@ -229,8 +229,7 @@
         options.add(generic);    
       }
 
-      virtual void Initialize(BasicApplicationContext& context,
-                              IStatusBar& statusBar,
+      virtual void Initialize(IStatusBar& statusBar,
                               const boost::program_options::variables_map& parameters)
       {
         using namespace OrthancStone;
@@ -250,7 +249,7 @@
 
 #if 1
         std::auto_ptr<OrthancFrameLayerSource> layer
-          (new OrthancFrameLayerSource(context.GetWebService()));
+          (new OrthancFrameLayerSource(context_->GetWebService()));
         //layer->SetImageQuality(SliceImageQuality_Jpeg50);
         layer->LoadFrame(instance, frame);
         //layer->LoadSeries("6f1b492a-e181e200-44e51840-ef8db55e-af529ab6");
@@ -271,7 +270,7 @@
         // 0178023P**
         // Extent of the CT layer: (-35.068 -20.368) => (34.932 49.632)
         std::auto_ptr<OrthancFrameLayerSource> ct;
-        ct.reset(new OrthancFrameLayerSource(context.GetWebService()));
+        ct.reset(new OrthancFrameLayerSource(context_->GetWebService()));
         //ct->LoadInstance("c804a1a2-142545c9-33b32fe2-3df4cec0-a2bea6d6", 0);
         //ct->LoadInstance("4bd4304f-47478948-71b24af2-51f4f1bc-275b6c1b", 0);  // BAD SLICE
         //ct->SetImageQuality(SliceImageQuality_Jpeg50);
@@ -281,7 +280,7 @@
         widget->AddLayer(ct.release());
 
         std::auto_ptr<OrthancFrameLayerSource> pet;
-        pet.reset(new OrthancFrameLayerSource(context.GetWebService()));
+        pet.reset(new OrthancFrameLayerSource(context_->GetWebService()));
         //pet->LoadInstance("a1c4dc6b-255d27f0-88069875-8daed730-2f5ee5c6", 0);
         pet->LoadSeries("aabad2e7-80702b5d-e599d26c-4f13398e-38d58a9e");
         pet->Register(*this);
@@ -309,8 +308,8 @@
 
         widget_ = widget.get();
         widget_->SetTransmitMouseOver(true);
-        widget_->SetInteractor(context.AddInteractor(new Interactor(*this)));
-        context.SetCentralWidget(widget.release());
+        widget_->SetInteractor(context_->AddInteractor(new Interactor(*this)));
+        context_->SetCentralWidget(widget.release());
       }
     };
   }