Mercurial > hg > orthanc-python
changeset 153:c78ec45f3695
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 16 Mar 2024 11:55:27 +0100 |
parents | 3c98306828de |
children | 802d744d54d3 |
files | Resources/Orthanc/CMake/AutoGeneratedCode.cmake Resources/Orthanc/CMake/Compiler.cmake Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Resources/Orthanc/CMake/DownloadPackage.cmake Resources/Orthanc/CMake/EmbedResources.py Resources/Orthanc/CMake/GoogleTestConfiguration.cmake Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h Resources/Orthanc/Plugins/OrthancPluginException.h Resources/Orthanc/Plugins/OrthancPluginsExports.cmake Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake Resources/Orthanc/Toolchains/MinGWToolchain.cmake |
diffstat | 14 files changed, 101 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/Orthanc/CMake/AutoGeneratedCode.cmake Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/CMake/AutoGeneratedCode.cmake Sat Mar 16 11:55:27 2024 +0100 @@ -1,8 +1,8 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2024 Osimis S.A., Belgium +# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License
--- a/Resources/Orthanc/CMake/Compiler.cmake Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/CMake/Compiler.cmake Sat Mar 16 11:55:27 2024 +0100 @@ -1,8 +1,8 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2024 Osimis S.A., Belgium +# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License @@ -43,6 +43,13 @@ # use by "ExternalProject" in CMake SET(CMAKE_LSB_CC $ENV{LSB_CC} CACHE STRING "") SET(CMAKE_LSB_CXX $ENV{LSB_CXX} CACHE STRING "") + + # This is necessary to build "Orthanc mainline - Framework LSB + # Release" on "buildbot-worker-debian11" + set(LSB_PTHREAD_NONSHARED "${LSB_PATH}/lib64-${LSB_TARGET_VERSION}/libpthread_nonshared.a") + if (EXISTS ${LSB_PTHREAD_NONSHARED}) + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LSB_PTHREAD_NONSHARED}") + endif() endif() @@ -124,12 +131,17 @@ ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") - if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" AND + if (# NOT ${CMAKE_SYSTEM_VERSION} STREQUAL "LinuxStandardBase" AND + NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") # The "--no-undefined" linker flag makes the shared libraries # (plugins ModalityWorklists and ServeFolders) fail to compile on # OpenBSD, and make the PostgreSQL plugin complain about missing - # "environ" global variable in FreeBSD + # "environ" global variable in FreeBSD. + # + # TODO - Furthermore, on Linux Standard Base running on Debian 12, + # the "-Wl,--no-undefined" seems to break the compilation (added + # after Orthanc 1.12.2). This is disabled for now. set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") endif()
--- a/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Sat Mar 16 11:55:27 2024 +0100 @@ -1,8 +1,8 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2024 Osimis S.A., Belgium +# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License @@ -158,6 +158,10 @@ set(ORTHANC_FRAMEWORK_MD5 "d32a0cde03b6eb603d8dd2b33d38bf1b") elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.12.1") set(ORTHANC_FRAMEWORK_MD5 "8a435140efc8ff4a01d8242f092f21de") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.12.2") + set(ORTHANC_FRAMEWORK_MD5 "d2476b9e796e339ac320b5333489bdb3") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.12.3") + set(ORTHANC_FRAMEWORK_MD5 "975f5bf2142c22cb1777b4f6a0a614c5") # Below this point are development snapshots that were used to # release some plugin, before an official release of the Orthanc @@ -189,7 +193,7 @@ elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "daf4807631c5") # DICOMweb 1.15 (framework pre-1.12.2) set(ORTHANC_FRAMEWORK_PRE_RELEASE ON) - set(ORTHANC_FRAMEWORK_MD5 "c644aff2817306b3207c98c92e43f35f") + set(ORTHANC_FRAMEWORK_MD5 "ebe8bdf388319f1c9536b2b680451848") endif() endif() endif()
--- a/Resources/Orthanc/CMake/DownloadPackage.cmake Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/CMake/DownloadPackage.cmake Sat Mar 16 11:55:27 2024 +0100 @@ -1,8 +1,8 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2024 Osimis S.A., Belgium +# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License
--- a/Resources/Orthanc/CMake/EmbedResources.py Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/CMake/EmbedResources.py Sat Mar 16 11:55:27 2024 +0100 @@ -3,8 +3,8 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2024 Osimis S.A., Belgium +# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License
--- a/Resources/Orthanc/CMake/GoogleTestConfiguration.cmake Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/CMake/GoogleTestConfiguration.cmake Sat Mar 16 11:55:27 2024 +0100 @@ -1,8 +1,8 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2024 Osimis S.A., Belgium +# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License
--- a/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp Sat Mar 16 11:55:27 2024 +0100 @@ -2,8 +2,8 @@ * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics * Department, University Hospital of Liege, Belgium - * Copyright (C) 2017-2023 Osimis S.A., Belgium - * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium + * Copyright (C) 2017-2024 Osimis S.A., Belgium + * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -2607,7 +2607,7 @@ if (body.isMember(KEY_PRIORITY)) { - if (body[KEY_PRIORITY].type() != Json::booleanValue) + if (body[KEY_PRIORITY].type() != Json::intValue) { #if HAS_ORTHANC_EXCEPTION == 1 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat, @@ -4026,4 +4026,48 @@ result[request->headersKeys[i]] = request->headersValues[i]; } } + +#if !ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 4) + static void SetPluginProperty(const std::string& pluginIdentifier, + _OrthancPluginProperty property, + const std::string& value) + { + _OrthancPluginSetPluginProperty params; + params.plugin = pluginIdentifier.c_str(); + params.property = property; + params.value = value.c_str(); + + GetGlobalContext()->InvokeService(GetGlobalContext(), _OrthancPluginService_SetPluginProperty, ¶ms); + } +#endif + + void SetRootUri(const std::string& pluginIdentifier, + const std::string& uri) + { +#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 4) + OrthancPluginSetRootUri2(GetGlobalContext(), pluginIdentifier.c_str(), uri.c_str()); +#else + SetPluginProperty(pluginIdentifier, _OrthancPluginProperty_RootUri, uri); +#endif + } + + void SetDescription(const std::string& pluginIdentifier, + const std::string& description) + { +#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 4) + OrthancPluginSetDescription2(GetGlobalContext(), pluginIdentifier.c_str(), description.c_str()); +#else + SetPluginProperty(pluginIdentifier, _OrthancPluginProperty_Description, description); +#endif + } + + void ExtendOrthancExplorer(const std::string& pluginIdentifier, + const std::string& javascript) + { +#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 4) + OrthancPluginExtendOrthancExplorer2(GetGlobalContext(), pluginIdentifier.c_str(), javascript.c_str()); +#else + SetPluginProperty(pluginIdentifier, _OrthancPluginProperty_OrthancExplorer, javascript); +#endif + } }
--- a/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h Sat Mar 16 11:55:27 2024 +0100 @@ -2,8 +2,8 @@ * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics * Department, University Hospital of Liege, Belgium - * Copyright (C) 2017-2023 Osimis S.A., Belgium - * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium + * Copyright (C) 2017-2024 Osimis S.A., Belgium + * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -1435,4 +1435,13 @@ IWebDavCollection& collection); }; #endif + + void SetRootUri(const std::string& pluginIdentifier, + const std::string& uri); + + void SetDescription(const std::string& pluginIdentifier, + const std::string& description); + + void ExtendOrthancExplorer(const std::string& pluginIdentifier, + const std::string& javascript); }
--- a/Resources/Orthanc/Plugins/OrthancPluginException.h Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/Plugins/OrthancPluginException.h Sat Mar 16 11:55:27 2024 +0100 @@ -2,8 +2,8 @@ * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics * Department, University Hospital of Liege, Belgium - * Copyright (C) 2017-2023 Osimis S.A., Belgium - * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium + * Copyright (C) 2017-2024 Osimis S.A., Belgium + * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as
--- a/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake Sat Mar 16 11:55:27 2024 +0100 @@ -1,8 +1,8 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2024 Osimis S.A., Belgium +# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as
--- a/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake Sat Mar 16 11:55:27 2024 +0100 @@ -1,8 +1,8 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2024 Osimis S.A., Belgium +# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License
--- a/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake Sat Mar 16 11:55:27 2024 +0100 @@ -1,8 +1,8 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2024 Osimis S.A., Belgium +# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License
--- a/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake Sat Mar 16 11:55:27 2024 +0100 @@ -1,8 +1,8 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2024 Osimis S.A., Belgium +# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License
--- a/Resources/Orthanc/Toolchains/MinGWToolchain.cmake Mon Jan 22 17:58:48 2024 +0100 +++ b/Resources/Orthanc/Toolchains/MinGWToolchain.cmake Sat Mar 16 11:55:27 2024 +0100 @@ -1,8 +1,8 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2024 Osimis S.A., Belgium +# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License