Mercurial > hg > orthanc-stl
comparison Sources/Plugin.cpp @ 47:5117515503bf
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 17 May 2024 13:13:44 +0200 |
parents | 8a1daa321afe |
children | a70fc4846be1 |
comparison
equal
deleted
inserted
replaced
44:111d952e7fa0 | 47:5117515503bf |
---|---|
703 | 703 |
704 extern "C" | 704 extern "C" |
705 { | 705 { |
706 ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) | 706 ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) |
707 { | 707 { |
708 OrthancPlugins::SetGlobalContext(context); | 708 OrthancPlugins::SetGlobalContext(context, ORTHANC_PLUGIN_NAME); |
709 | 709 |
710 /* Check the version of the Orthanc core */ | 710 /* Check the version of the Orthanc core */ |
711 if (OrthancPluginCheckVersion(OrthancPlugins::GetGlobalContext()) == 0) | 711 if (OrthancPluginCheckVersion(OrthancPlugins::GetGlobalContext()) == 0) |
712 { | 712 { |
713 char info[1024]; | 713 char info[1024]; |
718 ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER); | 718 ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER); |
719 OrthancPluginLogError(OrthancPlugins::GetGlobalContext(), info); | 719 OrthancPluginLogError(OrthancPlugins::GetGlobalContext(), info); |
720 return -1; | 720 return -1; |
721 } | 721 } |
722 | 722 |
723 #if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 7, 2) | 723 #if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 4) |
724 Orthanc::Logging::InitializePluginContext(context, ORTHANC_PLUGIN_NAME); | |
725 #elif ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 7, 2) | |
724 Orthanc::Logging::InitializePluginContext(context); | 726 Orthanc::Logging::InitializePluginContext(context); |
725 #else | 727 #else |
726 Orthanc::Logging::Initialize(context); | 728 Orthanc::Logging::Initialize(context); |
727 #endif | 729 #endif |
728 | 730 |
729 Orthanc::InitializeFramework("", false); | 731 Orthanc::InitializeFramework("", false); |
730 | 732 |
731 hasCreateDicomStl_ = OrthancPlugins::CheckMinimalOrthancVersion(1, 12, 1); | 733 hasCreateDicomStl_ = OrthancPlugins::CheckMinimalOrthancVersion(1, 12, 1); |
734 LOG(WARNING) << "Hello!"; | |
732 | 735 |
733 if (!hasCreateDicomStl_) | 736 if (!hasCreateDicomStl_) |
734 { | 737 { |
735 LOG(WARNING) << "Your version of Orthanc (" << std::string(context->orthancVersion) | 738 LOG(WARNING) << "Your version of Orthanc (" << std::string(context->orthancVersion) |
736 << ") is insufficient to create DICOM STL, it should be above 1.12.1"; | 739 << ") is insufficient to create DICOM STL, it should be above 1.12.1"; |