Mercurial > hg > orthanc-stl
comparison Sources/Plugin.cpp @ 25:5fc3ea6acbd5
fix deprecated calls
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 22 Mar 2024 15:35:42 +0100 |
parents | dd0cd39e6259 |
children | 410003c50b17 |
comparison
equal
deleted
inserted
replaced
24:dd0cd39e6259 | 25:5fc3ea6acbd5 |
---|---|
48 | 48 |
49 #include <boost/thread/shared_mutex.hpp> | 49 #include <boost/thread/shared_mutex.hpp> |
50 | 50 |
51 #include <nifti1_io.h> | 51 #include <nifti1_io.h> |
52 | 52 |
53 #define ORTHANC_PLUGIN_NAME "stl" | |
54 | |
53 | 55 |
54 // Forward declaration | 56 // Forward declaration |
55 void ReadStaticAsset(std::string& target, | 57 void ReadStaticAsset(std::string& target, |
56 const std::string& path); | 58 const std::string& path); |
57 | 59 |
1630 { | 1632 { |
1631 LOG(WARNING) << "Your version of Orthanc (" << std::string(context->orthancVersion) | 1633 LOG(WARNING) << "Your version of Orthanc (" << std::string(context->orthancVersion) |
1632 << ") is insufficient to create DICOM STL, it should be above 1.12.1"; | 1634 << ") is insufficient to create DICOM STL, it should be above 1.12.1"; |
1633 } | 1635 } |
1634 | 1636 |
1635 OrthancPluginSetDescription(context, "STL plugin for Orthanc."); | 1637 OrthancPlugins::SetDescription(ORTHANC_PLUGIN_NAME, "STL plugin for Orthanc."); |
1636 | 1638 |
1637 OrthancPlugins::RegisterRestCallback<ServeFile>("/stl/app/(.*)", true); | 1639 OrthancPlugins::RegisterRestCallback<ServeFile>("/stl/app/(.*)", true); |
1638 OrthancPlugins::RegisterRestCallback<ExtractStl>("/instances/([0-9a-f-]+)/stl", true); | 1640 OrthancPlugins::RegisterRestCallback<ExtractStl>("/instances/([0-9a-f-]+)/stl", true); |
1639 OrthancPlugins::RegisterRestCallback<ListStructures>("/stl/rt-struct/([0-9a-f-]+)", true); | 1641 OrthancPlugins::RegisterRestCallback<ListStructures>("/stl/rt-struct/([0-9a-f-]+)", true); |
1640 | 1642 |
1652 | 1654 |
1653 std::map<std::string, std::string> dictionary; | 1655 std::map<std::string, std::string> dictionary; |
1654 dictionary["HAS_CREATE_DICOM_STL"] = (hasCreateDicomStl_ ? "true" : "false"); | 1656 dictionary["HAS_CREATE_DICOM_STL"] = (hasCreateDicomStl_ ? "true" : "false"); |
1655 explorer = Orthanc::Toolbox::SubstituteVariables(explorer, dictionary); | 1657 explorer = Orthanc::Toolbox::SubstituteVariables(explorer, dictionary); |
1656 | 1658 |
1657 OrthancPluginExtendOrthancExplorer(OrthancPlugins::GetGlobalContext(), explorer.c_str()); | 1659 OrthancPlugins::ExtendOrthancExplorer(ORTHANC_PLUGIN_NAME, explorer); |
1658 } | 1660 } |
1659 | 1661 |
1660 return 0; | 1662 return 0; |
1661 } | 1663 } |
1662 | 1664 |
1667 } | 1669 } |
1668 | 1670 |
1669 | 1671 |
1670 ORTHANC_PLUGINS_API const char* OrthancPluginGetName() | 1672 ORTHANC_PLUGINS_API const char* OrthancPluginGetName() |
1671 { | 1673 { |
1672 return "stl"; | 1674 return ORTHANC_PLUGIN_NAME; |
1673 } | 1675 } |
1674 | 1676 |
1675 | 1677 |
1676 ORTHANC_PLUGINS_API const char* OrthancPluginGetVersion() | 1678 ORTHANC_PLUGINS_API const char* OrthancPluginGetVersion() |
1677 { | 1679 { |