comparison Plugin/Plugin.cpp @ 315:05bf4ccfdca9

fix deprecated calls
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 22 Mar 2024 15:46:33 +0100
parents 0a1ad7492050
children 591ca447ebf8
comparison
equal deleted inserted replaced
314:0a1ad7492050 315:05bf4ccfdca9
35 #include <boost/thread.hpp> 35 #include <boost/thread.hpp>
36 #include <boost/lexical_cast.hpp> 36 #include <boost/lexical_cast.hpp>
37 #include <EmbeddedResources.h> 37 #include <EmbeddedResources.h>
38 #include <boost/filesystem.hpp> 38 #include <boost/filesystem.hpp>
39 39
40 #define ORTHANC_PLUGIN_NAME "web-viewer"
41
40 42
41 /** 43 /**
42 * We force the redefinition of the "ORTHANC_PLUGINS_API" macro, that 44 * We force the redefinition of the "ORTHANC_PLUGINS_API" macro, that
43 * was left empty with gcc until Orthanc SDK 1.5.7 (no "default" 45 * was left empty with gcc until Orthanc SDK 1.5.7 (no "default"
44 * visibility). This causes the version script, if run from "Holy 46 * visibility). This causes the version script, if run from "Holy
416 ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER); 418 ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER);
417 OrthancPluginLogError(context, info); 419 OrthancPluginLogError(context, info);
418 return -1; 420 return -1;
419 } 421 }
420 422
421 OrthancPluginSetDescription(context, "Provides a Web viewer of DICOM series within Orthanc."); 423 OrthancPlugins::SetDescription(ORTHANC_PLUGIN_NAME, "Provides a Web viewer of DICOM series within Orthanc.");
422 424
423 425
424 /* By default, use half of the available processing cores for the decoding of DICOM images */ 426 /* By default, use half of the available processing cores for the decoding of DICOM images */
425 int decodingThreads = boost::thread::hardware_concurrency() / 2; 427 int decodingThreads = boost::thread::hardware_concurrency() / 2;
426 if (decodingThreads == 0) 428 if (decodingThreads == 0)
533 535
534 536
535 /* Extend the default Orthanc Explorer with custom JavaScript */ 537 /* Extend the default Orthanc Explorer with custom JavaScript */
536 std::string explorer; 538 std::string explorer;
537 Orthanc::EmbeddedResources::GetFileResource(explorer, Orthanc::EmbeddedResources::ORTHANC_EXPLORER); 539 Orthanc::EmbeddedResources::GetFileResource(explorer, Orthanc::EmbeddedResources::ORTHANC_EXPLORER);
538 OrthancPluginExtendOrthancExplorer(context, explorer.c_str()); 540 OrthancPlugins::ExtendOrthancExplorer(ORTHANC_PLUGIN_NAME, explorer);
539 541
540 return 0; 542 return 0;
541 } 543 }
542 544
543 545
555 } 557 }
556 558
557 559
558 ORTHANC_PLUGINS_API const char* OrthancPluginGetName() 560 ORTHANC_PLUGINS_API const char* OrthancPluginGetName()
559 { 561 {
560 return "web-viewer"; 562 return ORTHANC_PLUGIN_NAME;
561 } 563 }
562 564
563 565
564 ORTHANC_PLUGINS_API const char* OrthancPluginGetVersion() 566 ORTHANC_PLUGINS_API const char* OrthancPluginGetVersion()
565 { 567 {