Mercurial > hg > orthanc-stl
diff Sources/Plugin.cpp @ 36:13698d34e059
preparing to include O3DV
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 05 Apr 2024 07:42:06 +0200 |
parents | ee3bc8f7df5b |
children | 970994058acd |
line wrap: on
line diff
--- a/Sources/Plugin.cpp Thu Apr 04 20:37:08 2024 +0200 +++ b/Sources/Plugin.cpp Fri Apr 05 07:42:06 2024 +0200 @@ -46,6 +46,7 @@ #include <vtkNew.h> +#include <boost/algorithm/string.hpp> #include <boost/thread/shared_mutex.hpp> #define ORTHANC_PLUGIN_NAME "stl" @@ -132,21 +133,21 @@ std::string file = request->groups[0]; - if (file == "viewer.html") + if (file == "three.html") { std::string s; - Orthanc::EmbeddedResources::GetFileResource(s, Orthanc::EmbeddedResources::VIEWER_HTML); + Orthanc::EmbeddedResources::GetFileResource(s, Orthanc::EmbeddedResources::THREE_HTML); OrthancPluginAnswerBuffer(OrthancPlugins::GetGlobalContext(), output, s.c_str(), s.size(), Orthanc::EnumerationToString(Orthanc::MimeType_Html)); } - else if (file == "viewer.js") + else if (file == "three.js") { std::string s; - Orthanc::EmbeddedResources::GetFileResource(s, Orthanc::EmbeddedResources::VIEWER_JS); + Orthanc::EmbeddedResources::GetFileResource(s, Orthanc::EmbeddedResources::THREE_JS); OrthancPluginAnswerBuffer(OrthancPlugins::GetGlobalContext(), output, s.c_str(), s.size(), Orthanc::EnumerationToString(Orthanc::MimeType_JavaScript)); } - else + else if (boost::starts_with(file, "libs/")) { - cache_.Answer(output, file); + cache_.Answer(output, file.substr(5)); } }