Mercurial > hg > orthanc-stl
changeset 25:5fc3ea6acbd5
fix deprecated calls
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 22 Mar 2024 15:35:42 +0100 (14 months ago) |
parents | dd0cd39e6259 |
children | d223da14537e |
files | Sources/Plugin.cpp |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Sources/Plugin.cpp Fri Mar 22 15:34:22 2024 +0100 +++ b/Sources/Plugin.cpp Fri Mar 22 15:35:42 2024 +0100 @@ -50,6 +50,8 @@ #include <nifti1_io.h> +#define ORTHANC_PLUGIN_NAME "stl" + // Forward declaration void ReadStaticAsset(std::string& target, @@ -1632,7 +1634,7 @@ << ") is insufficient to create DICOM STL, it should be above 1.12.1"; } - OrthancPluginSetDescription(context, "STL plugin for Orthanc."); + OrthancPlugins::SetDescription(ORTHANC_PLUGIN_NAME, "STL plugin for Orthanc."); OrthancPlugins::RegisterRestCallback<ServeFile>("/stl/app/(.*)", true); OrthancPlugins::RegisterRestCallback<ExtractStl>("/instances/([0-9a-f-]+)/stl", true); @@ -1654,7 +1656,7 @@ dictionary["HAS_CREATE_DICOM_STL"] = (hasCreateDicomStl_ ? "true" : "false"); explorer = Orthanc::Toolbox::SubstituteVariables(explorer, dictionary); - OrthancPluginExtendOrthancExplorer(OrthancPlugins::GetGlobalContext(), explorer.c_str()); + OrthancPlugins::ExtendOrthancExplorer(ORTHANC_PLUGIN_NAME, explorer); } return 0; @@ -1669,7 +1671,7 @@ ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "stl"; + return ORTHANC_PLUGIN_NAME; }