Mercurial > hg > orthanc-wsi
comparison ViewerPlugin/Plugin.cpp @ 310:d374cb2a2277
fix deprecated calls
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 22 Mar 2024 15:51:16 +0100 |
parents | 7020852a8fa9 |
children | 0683312e21ba |
comparison
equal
deleted
inserted
replaced
309:7020852a8fa9 | 310:d374cb2a2277 |
---|---|
37 | 37 |
38 #include <EmbeddedResources.h> | 38 #include <EmbeddedResources.h> |
39 | 39 |
40 #include <cassert> | 40 #include <cassert> |
41 | 41 |
42 #define ORTHANC_PLUGIN_NAME "wsi" | |
43 | |
44 | |
42 static void AnswerSparseTile(OrthancPluginRestOutput* output, | 45 static void AnswerSparseTile(OrthancPluginRestOutput* output, |
43 unsigned int tileWidth, | 46 unsigned int tileWidth, |
44 unsigned int tileHeight) | 47 unsigned int tileHeight) |
45 { | 48 { |
46 Orthanc::Image tile(Orthanc::PixelFormat_RGB24, tileWidth, tileHeight, false); | 49 Orthanc::Image tile(Orthanc::PixelFormat_RGB24, tileWidth, tileHeight, false); |
340 | 343 |
341 char info[1024]; | 344 char info[1024]; |
342 sprintf(info, "The whole-slide imaging plugin will use at most %u threads to transcode the tiles", threads); | 345 sprintf(info, "The whole-slide imaging plugin will use at most %u threads to transcode the tiles", threads); |
343 OrthancPluginLogWarning(OrthancPlugins::GetGlobalContext(), info); | 346 OrthancPluginLogWarning(OrthancPlugins::GetGlobalContext(), info); |
344 | 347 |
345 OrthancPluginSetDescription(context, "Provides a Web viewer of whole-slide microscopic images within Orthanc."); | 348 OrthancPlugins::SetDescription(ORTHANC_PLUGIN_NAME, "Provides a Web viewer of whole-slide microscopic images within Orthanc."); |
346 | 349 |
347 OrthancWSI::DicomPyramidCache::InitializeInstance(10 /* Number of pyramids to be cached - TODO parameter */); | 350 OrthancWSI::DicomPyramidCache::InitializeInstance(10 /* Number of pyramids to be cached - TODO parameter */); |
348 | 351 |
349 OrthancPluginRegisterOnChangeCallback(OrthancPlugins::GetGlobalContext(), OnChangeCallback); | 352 OrthancPluginRegisterOnChangeCallback(OrthancPlugins::GetGlobalContext(), OnChangeCallback); |
350 | 353 |
426 dictionary["ENABLE_IIIF"] = (enableIIIF ? "true" : "false"); | 429 dictionary["ENABLE_IIIF"] = (enableIIIF ? "true" : "false"); |
427 dictionary["SERVE_MIRADOR"] = (serveMirador ? "true" : "false"); | 430 dictionary["SERVE_MIRADOR"] = (serveMirador ? "true" : "false"); |
428 dictionary["SERVE_OPEN_SEADRAGON"] = (serveOpenSeadragon ? "true" : "false"); | 431 dictionary["SERVE_OPEN_SEADRAGON"] = (serveOpenSeadragon ? "true" : "false"); |
429 explorer = Orthanc::Toolbox::SubstituteVariables(explorer, dictionary); | 432 explorer = Orthanc::Toolbox::SubstituteVariables(explorer, dictionary); |
430 | 433 |
431 OrthancPluginExtendOrthancExplorer(OrthancPlugins::GetGlobalContext(), explorer.c_str()); | 434 OrthancPlugins::ExtendOrthancExplorer(ORTHANC_PLUGIN_NAME, explorer); |
432 } | 435 } |
433 | 436 |
434 return 0; | 437 return 0; |
435 } | 438 } |
436 | 439 |
442 } | 445 } |
443 | 446 |
444 | 447 |
445 ORTHANC_PLUGINS_API const char* OrthancPluginGetName() | 448 ORTHANC_PLUGINS_API const char* OrthancPluginGetName() |
446 { | 449 { |
447 return "wsi"; | 450 return ORTHANC_PLUGIN_NAME; |
448 } | 451 } |
449 | 452 |
450 | 453 |
451 ORTHANC_PLUGINS_API const char* OrthancPluginGetVersion() | 454 ORTHANC_PLUGINS_API const char* OrthancPluginGetVersion() |
452 { | 455 { |