changeset 310:d374cb2a2277

fix deprecated calls
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 22 Mar 2024 15:51:16 +0100
parents 7020852a8fa9
children 4315bd3bffa7
files ViewerPlugin/Plugin.cpp
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ViewerPlugin/Plugin.cpp	Fri Mar 22 15:48:12 2024 +0100
+++ b/ViewerPlugin/Plugin.cpp	Fri Mar 22 15:51:16 2024 +0100
@@ -39,6 +39,9 @@
 
 #include <cassert>
 
+#define ORTHANC_PLUGIN_NAME "wsi"
+
+
 static void AnswerSparseTile(OrthancPluginRestOutput* output,
                              unsigned int tileWidth,
                              unsigned int tileHeight)
@@ -342,7 +345,7 @@
     sprintf(info, "The whole-slide imaging plugin will use at most %u threads to transcode the tiles", threads);
     OrthancPluginLogWarning(OrthancPlugins::GetGlobalContext(), info);
 
-    OrthancPluginSetDescription(context, "Provides a Web viewer of whole-slide microscopic images within Orthanc.");
+    OrthancPlugins::SetDescription(ORTHANC_PLUGIN_NAME, "Provides a Web viewer of whole-slide microscopic images within Orthanc.");
 
     OrthancWSI::DicomPyramidCache::InitializeInstance(10 /* Number of pyramids to be cached - TODO parameter */);
 
@@ -428,7 +431,7 @@
       dictionary["SERVE_OPEN_SEADRAGON"] = (serveOpenSeadragon ? "true" : "false");
       explorer = Orthanc::Toolbox::SubstituteVariables(explorer, dictionary);
 
-      OrthancPluginExtendOrthancExplorer(OrthancPlugins::GetGlobalContext(), explorer.c_str());
+      OrthancPlugins::ExtendOrthancExplorer(ORTHANC_PLUGIN_NAME, explorer);
     }
 
     return 0;
@@ -444,7 +447,7 @@
 
   ORTHANC_PLUGINS_API const char* OrthancPluginGetName()
   {
-    return "wsi";
+    return ORTHANC_PLUGIN_NAME;
   }