Mercurial > hg > orthanc-ohif
comparison Sources/Plugin.cpp @ 38:fae02fc69b46
fix deprecated calls
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 22 Mar 2024 15:30:54 +0100 |
parents | 63a5b4277cfc |
children | a63247d45917 |
comparison
equal
deleted
inserted
replaced
37:63a5b4277cfc | 38:fae02fc69b46 |
---|---|
35 | 35 |
36 #include <EmbeddedResources.h> | 36 #include <EmbeddedResources.h> |
37 | 37 |
38 #include <boost/thread.hpp> | 38 #include <boost/thread.hpp> |
39 #include <boost/thread/shared_mutex.hpp> | 39 #include <boost/thread/shared_mutex.hpp> |
40 | |
41 #define ORTHANC_PLUGIN_NAME "ohif" | |
40 | 42 |
41 | 43 |
42 static const std::string METADATA_OHIF = "4202"; | 44 static const std::string METADATA_OHIF = "4202"; |
43 static const char* const KEY_VERSION = "Version"; | 45 static const char* const KEY_VERSION = "Version"; |
44 static const unsigned int MAX_INSTANCES_IN_QUEUE = 10000; | 46 static const unsigned int MAX_INSTANCES_IN_QUEUE = 10000; |
919 routerBasename_[routerBasename_.size() - 1] != '/') | 921 routerBasename_[routerBasename_.size() - 1] != '/') |
920 { | 922 { |
921 routerBasename_ += "/"; | 923 routerBasename_ += "/"; |
922 } | 924 } |
923 | 925 |
924 OrthancPluginSetDescription(context, "OHIF plugin for Orthanc."); | 926 OrthancPlugins::SetDescription(ORTHANC_PLUGIN_NAME, "OHIF plugin for Orthanc."); |
925 | 927 |
926 OrthancPlugins::RegisterRestCallback<ServeFile>("/ohif", true); | 928 OrthancPlugins::RegisterRestCallback<ServeFile>("/ohif", true); |
927 OrthancPlugins::RegisterRestCallback<ServeFile>("/ohif/(.*)", true); | 929 OrthancPlugins::RegisterRestCallback<ServeFile>("/ohif/(.*)", true); |
928 OrthancPlugins::RegisterRestCallback<GetOhifStudy>("/studies/([0-9a-f-]+)/ohif-dicom-json", true); | 930 OrthancPlugins::RegisterRestCallback<GetOhifStudy>("/studies/([0-9a-f-]+)/ohif-dicom-json", true); |
929 | 931 |
936 | 938 |
937 std::map<std::string, std::string> dictionary; | 939 std::map<std::string, std::string> dictionary; |
938 dictionary["USE_DICOM_WEB"] = (dataSource_ == DataSource_DicomWeb ? "true" : "false"); | 940 dictionary["USE_DICOM_WEB"] = (dataSource_ == DataSource_DicomWeb ? "true" : "false"); |
939 explorer = Orthanc::Toolbox::SubstituteVariables(explorer, dictionary); | 941 explorer = Orthanc::Toolbox::SubstituteVariables(explorer, dictionary); |
940 | 942 |
941 OrthancPluginExtendOrthancExplorer(context, explorer.c_str()); | 943 OrthancPlugins::ExtendOrthancExplorer(ORTHANC_PLUGIN_NAME, explorer.c_str()); |
942 } | 944 } |
943 } | 945 } |
944 catch (Orthanc::OrthancException& e) | 946 catch (Orthanc::OrthancException& e) |
945 { | 947 { |
946 return -1; | 948 return -1; |
955 } | 957 } |
956 | 958 |
957 | 959 |
958 ORTHANC_PLUGINS_API const char* OrthancPluginGetName() | 960 ORTHANC_PLUGINS_API const char* OrthancPluginGetName() |
959 { | 961 { |
960 return "ohif"; | 962 return ORTHANC_PLUGIN_NAME; |
961 } | 963 } |
962 | 964 |
963 | 965 |
964 ORTHANC_PLUGINS_API const char* OrthancPluginGetVersion() | 966 ORTHANC_PLUGINS_API const char* OrthancPluginGetVersion() |
965 { | 967 { |