changeset 32:89f9cf1a0074

removed deprecated calls
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 17 Mar 2024 09:05:27 +0100
parents 5e04a5406f1d
children 80db8aba6a77
files CMakeLists.txt Plugin/Plugin.cpp
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Sun Mar 17 09:03:49 2024 +0100
+++ b/CMakeLists.txt	Sun Mar 17 09:05:27 2024 +0100
@@ -109,6 +109,7 @@
 
 add_definitions(
   -DHAS_ORTHANC_EXCEPTION=1
+  -DORTHANC_PLUGIN_NAME="tcia"
   -DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}"
   -DTCIA_BASE_URL="https://services.cancerimagingarchive.net/services/v4/TCIA/query"
   )
--- a/Plugin/Plugin.cpp	Sun Mar 17 09:03:49 2024 +0100
+++ b/Plugin/Plugin.cpp	Sun Mar 17 09:05:27 2024 +0100
@@ -300,7 +300,7 @@
       return -1;
     }
 
-    OrthancPluginSetDescription(context, "Interface with TCIA (The Cancer Imaging Archive).");
+    OrthancPlugins::SetDescription(ORTHANC_PLUGIN_NAME, "Interface with TCIA (The Cancer Imaging Archive).");
 
     try
     {
@@ -324,13 +324,13 @@
         return 0;
       }
       
-      OrthancPluginSetRootUri(context, "/tcia/app/index.html");
+      OrthancPlugins::SetRootUri(ORTHANC_PLUGIN_NAME, "/tcia/app/index.html");
 
       {
         std::string explorer;
         Orthanc::EmbeddedResources::GetFileResource(
           explorer, Orthanc::EmbeddedResources::ORTHANC_EXPLORER_JS);
-        OrthancPluginExtendOrthancExplorer(OrthancPlugins::GetGlobalContext(), explorer.c_str());
+        OrthancPlugins::ExtendOrthancExplorer(ORTHANC_PLUGIN_NAME, explorer);
       }
   
       OrthancPluginRegisterJobsUnserializer(context, TciaJobUnserializer);
@@ -387,7 +387,7 @@
 
   ORTHANC_PLUGINS_API const char* OrthancPluginGetName()
   {
-    return "tcia";
+    return ORTHANC_PLUGIN_NAME;
   }