Mercurial > hg > orthanc-stone
comparison StoneWebViewer/Plugin/Plugin.cpp @ 1526:61023b0d39c8
Reverted the Stone Web Viewer plugin to rev. 307a805d0587
(mistakenly changed to serve the RT Viewer and make it
available in the Orthanc Explorer while it should have been
done in a separate plugin)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Sun, 02 Aug 2020 13:53:48 +0200 |
parents | 22d1bd085c19 |
children | 3eca4f9c2827 |
comparison
equal
deleted
inserted
replaced
1525:31b0449a163a | 1526:61023b0d39c8 |
---|---|
189 std::string explorer; | 189 std::string explorer; |
190 Orthanc::EmbeddedResources::GetFileResource( | 190 Orthanc::EmbeddedResources::GetFileResource( |
191 explorer, Orthanc::EmbeddedResources::ORTHANC_EXPLORER); | 191 explorer, Orthanc::EmbeddedResources::ORTHANC_EXPLORER); |
192 OrthancPluginExtendOrthancExplorer(OrthancPlugins::GetGlobalContext(), explorer.c_str()); | 192 OrthancPluginExtendOrthancExplorer(OrthancPlugins::GetGlobalContext(), explorer.c_str()); |
193 | 193 |
194 // Stone Web Viewer files | |
195 // --------------------- | |
196 OrthancPlugins::RegisterRestCallback | 194 OrthancPlugins::RegisterRestCallback |
197 <ServeEmbeddedFile<Orthanc::EmbeddedResources::STONE_WEB_VIEWER_WASM> > | 195 <ServeEmbeddedFile<Orthanc::EmbeddedResources::STONE_WEB_VIEWER_WASM> > |
198 ("/stone-webviewer/StoneWebViewer.wasm", true); | 196 ("/stone-webviewer/StoneWebViewer.wasm", true); |
199 | 197 |
200 OrthancPlugins::RegisterRestCallback | 198 OrthancPlugins::RegisterRestCallback |
211 | 209 |
212 OrthancPlugins::RegisterRestCallback | 210 OrthancPlugins::RegisterRestCallback |
213 <ServeEmbeddedFolder<Orthanc::EmbeddedResources::WEB_APPLICATION> > | 211 <ServeEmbeddedFolder<Orthanc::EmbeddedResources::WEB_APPLICATION> > |
214 ("/stone-webviewer/(.*)", true); | 212 ("/stone-webviewer/(.*)", true); |
215 | 213 |
216 // RtViewer files below. | |
217 // --------------------- | |
218 // we do not serve the whole directory at once (with ServeEmbeddedFolder) | |
219 // because it contains uppercase characters that are forbidden by the | |
220 // resource embedding system | |
221 | |
222 OrthancPlugins::RegisterRestCallback | |
223 <ServeEmbeddedFile<Orthanc::EmbeddedResources::RT_VIEWER_WASM_JS> > | |
224 ("/stone-rtviewer/RtViewerWasm.js", true); | |
225 | |
226 OrthancPlugins::RegisterRestCallback | |
227 <ServeEmbeddedFile<Orthanc::EmbeddedResources::RT_VIEWER_WASM> > | |
228 ("/stone-rtviewer/RtViewerWasm.wasm", true); | |
229 | |
230 OrthancPlugins::RegisterRestCallback | |
231 <ServeEmbeddedFile<Orthanc::EmbeddedResources::RT_VIEWER_WASM_APP_JS> > | |
232 ("/stone-rtviewer/RtViewerWasmApp.js", true); | |
233 | |
234 OrthancPlugins::RegisterRestCallback | |
235 <ServeEmbeddedFile<Orthanc::EmbeddedResources::RT_VIEWER_INDEX_HTML> > | |
236 ("/stone-rtviewer/index.html", true); | |
237 | |
238 OrthancPluginRegisterOnChangeCallback(context, OnChangeCallback); | 214 OrthancPluginRegisterOnChangeCallback(context, OnChangeCallback); |
239 } | 215 } |
240 catch (...) | 216 catch (...) |
241 { | 217 { |
242 OrthancPlugins::LogError("Exception while initializing the Stone Web viewer plugin"); | 218 OrthancPlugins::LogError("Exception while initializing the Stone Web viewer plugin"); |