# HG changeset patch # User Sebastien Jodogne # Date 1711120302 -3600 # Node ID 538c7b7c6e46ac08aeed45ce6b53f744ef0dc94a # Parent de049fd886976ad90404ce13cbf301b389e742bd# Parent 4cc9e4a54a8937a9f567a3dc9254001d183ad8e7 integration mainline->deep-learning diff -r de049fd88697 -r 538c7b7c6e46 Applications/Samples/RtViewerPlugin/Plugin.cpp --- a/Applications/Samples/RtViewerPlugin/Plugin.cpp Wed Jan 24 16:44:40 2024 +0100 +++ b/Applications/Samples/RtViewerPlugin/Plugin.cpp Fri Mar 22 16:11:42 2024 +0100 @@ -133,7 +133,7 @@ std::string explorer; Orthanc::EmbeddedResources::GetFileResource( explorer, Orthanc::EmbeddedResources::ORTHANC_EXPLORER); - OrthancPluginExtendOrthancExplorer(OrthancPlugins::GetGlobalContext(), explorer.c_str()); + OrthancPlugins::ExtendOrthancExplorer(PLUGIN_NAME, explorer); // RtViewer files below. // --------------------- diff -r de049fd88697 -r 538c7b7c6e46 Applications/StoneWebViewer/Plugin/Plugin.cpp --- a/Applications/StoneWebViewer/Plugin/Plugin.cpp Wed Jan 24 16:44:40 2024 +0100 +++ b/Applications/StoneWebViewer/Plugin/Plugin.cpp Fri Mar 22 16:11:42 2024 +0100 @@ -279,10 +279,12 @@ try { + OrthancPlugins::SetDescription(PLUGIN_NAME, "Stone Web viewer"); + std::string explorer; Orthanc::EmbeddedResources::GetFileResource( explorer, Orthanc::EmbeddedResources::ORTHANC_EXPLORER); - OrthancPluginExtendOrthancExplorer(OrthancPlugins::GetGlobalContext(), explorer.c_str()); + OrthancPlugins::ExtendOrthancExplorer(PLUGIN_NAME, explorer); OrthancPlugins::RegisterRestCallback (STONE_WEB_VIEWER_ROOT + "/configuration.json", true); diff -r de049fd88697 -r 538c7b7c6e46 OrthancStone/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake --- a/OrthancStone/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Wed Jan 24 16:44:40 2024 +0100 +++ b/OrthancStone/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Fri Mar 22 16:11:42 2024 +0100 @@ -160,6 +160,8 @@ set(ORTHANC_FRAMEWORK_MD5 "8a435140efc8ff4a01d8242f092f21de") elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.12.2") set(ORTHANC_FRAMEWORK_MD5 "d2476b9e796e339ac320b5333489bdb3") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.12.3") + set(ORTHANC_FRAMEWORK_MD5 "975f5bf2142c22cb1777b4f6a0a614c5") # Below this point are development snapshots that were used to # release some plugin, before an official release of the Orthanc diff -r de049fd88697 -r 538c7b7c6e46 RenderingPlugin/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp --- a/RenderingPlugin/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp Wed Jan 24 16:44:40 2024 +0100 +++ b/RenderingPlugin/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp Fri Mar 22 16:11:42 2024 +0100 @@ -4026,4 +4026,48 @@ result[request->headersKeys[i]] = request->headersValues[i]; } } + +#if !ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 4) + static void SetPluginProperty(const std::string& pluginIdentifier, + _OrthancPluginProperty property, + const std::string& value) + { + _OrthancPluginSetPluginProperty params; + params.plugin = pluginIdentifier.c_str(); + params.property = property; + params.value = value.c_str(); + + GetGlobalContext()->InvokeService(GetGlobalContext(), _OrthancPluginService_SetPluginProperty, ¶ms); + } +#endif + + void SetRootUri(const std::string& pluginIdentifier, + const std::string& uri) + { +#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 4) + OrthancPluginSetRootUri2(GetGlobalContext(), pluginIdentifier.c_str(), uri.c_str()); +#else + SetPluginProperty(pluginIdentifier, _OrthancPluginProperty_RootUri, uri); +#endif + } + + void SetDescription(const std::string& pluginIdentifier, + const std::string& description) + { +#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 4) + OrthancPluginSetDescription2(GetGlobalContext(), pluginIdentifier.c_str(), description.c_str()); +#else + SetPluginProperty(pluginIdentifier, _OrthancPluginProperty_Description, description); +#endif + } + + void ExtendOrthancExplorer(const std::string& pluginIdentifier, + const std::string& javascript) + { +#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 4) + OrthancPluginExtendOrthancExplorer2(GetGlobalContext(), pluginIdentifier.c_str(), javascript.c_str()); +#else + SetPluginProperty(pluginIdentifier, _OrthancPluginProperty_OrthancExplorer, javascript); +#endif + } } diff -r de049fd88697 -r 538c7b7c6e46 RenderingPlugin/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h --- a/RenderingPlugin/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h Wed Jan 24 16:44:40 2024 +0100 +++ b/RenderingPlugin/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h Fri Mar 22 16:11:42 2024 +0100 @@ -1435,4 +1435,13 @@ IWebDavCollection& collection); }; #endif + + void SetRootUri(const std::string& pluginIdentifier, + const std::string& uri); + + void SetDescription(const std::string& pluginIdentifier, + const std::string& description); + + void ExtendOrthancExplorer(const std::string& pluginIdentifier, + const std::string& javascript); }