changeset 315:05bf4ccfdca9

fix deprecated calls
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 22 Mar 2024 15:46:33 +0100
parents 0a1ad7492050
children 591ca447ebf8
files Plugin/Plugin.cpp
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Plugin/Plugin.cpp	Fri Mar 22 15:45:07 2024 +0100
+++ b/Plugin/Plugin.cpp	Fri Mar 22 15:46:33 2024 +0100
@@ -37,6 +37,8 @@
 #include <EmbeddedResources.h>
 #include <boost/filesystem.hpp>
 
+#define ORTHANC_PLUGIN_NAME "web-viewer"
+
 
 /**
  * We force the redefinition of the "ORTHANC_PLUGINS_API" macro, that
@@ -418,7 +420,7 @@
       return -1;
     }
 
-    OrthancPluginSetDescription(context, "Provides a Web viewer of DICOM series within Orthanc.");
+    OrthancPlugins::SetDescription(ORTHANC_PLUGIN_NAME, "Provides a Web viewer of DICOM series within Orthanc.");
 
 
     /* By default, use half of the available processing cores for the decoding of DICOM images */
@@ -535,7 +537,7 @@
     /* Extend the default Orthanc Explorer with custom JavaScript */
     std::string explorer;
     Orthanc::EmbeddedResources::GetFileResource(explorer, Orthanc::EmbeddedResources::ORTHANC_EXPLORER);
-    OrthancPluginExtendOrthancExplorer(context, explorer.c_str());
+    OrthancPlugins::ExtendOrthancExplorer(ORTHANC_PLUGIN_NAME, explorer);
 
     return 0;
   }
@@ -557,7 +559,7 @@
 
   ORTHANC_PLUGINS_API const char* OrthancPluginGetName()
   {
-    return "web-viewer";
+    return ORTHANC_PLUGIN_NAME;
   }