Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package orthanc-ohif for openSUSE:Leap:16.0 checked in at 2025-07-15 17:54:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:16.0/orthanc-ohif (Old) and /work/SRC/openSUSE:Leap:16.0/.orthanc-ohif.new.7373 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "orthanc-ohif" Tue Jul 15 17:54:51 2025 rev:2 rq:1293156 version:1.6 Changes: -------- --- /work/SRC/openSUSE:Leap:16.0/orthanc-ohif/orthanc-ohif.changes 2025-03-19 11:53:21.674416647 +0100 +++ /work/SRC/openSUSE:Leap:16.0/.orthanc-ohif.new.7373/orthanc-ohif.changes 2025-07-15 17:55:29.759494942 +0200 @@ -1,0 +2,35 @@ +Mon May 5 19:38:12 UTC 2025 - Axel Braun <axel.br...@gmx.de> + +- version 1.6 + * Updated OHIF to 3.10.1 + * Known issues: + - authorization tokens are not functional with videos. + Waiting for this PR to be validated and incorporated: + https://github.com/OHIF/Viewers/pull/4958 + +------------------------------------------------------------------- +Sun Jan 19 10:06:41 UTC 2025 - Axel Braun <axel.br...@gmx.de> + +- version 1.5 + * Updated OHIF to 3.9.2 + * In "dicom-web" data source, fixed the default "app-config.js" + configuration to enable display of PDFs. + * Updated cached "dicom-json" version to 2. This implies that, when using + the "dicom-json" source, the cached metadata will have to be recomputed + the first time you open a study. + +------------------------------------------------------------------- +Sun Dec 8 14:50:32 UTC 2024 - Axel Braun <axel.br...@gmx.de> + +- license string corrected + +------------------------------------------------------------------- +Sat Nov 30 11:21:41 UTC 2024 - Axel Braun <axel.br...@gmx.de> + +- version 1.4 + * Updated OHIF to 3.9.1 + * The default value for the "DataSource" configuration is now "dicom-web" + instead of "dicom-json" since "dicom-web" is usually + more optimized. + +------------------------------------------------------------------- Old: ---- OrthancOHIF-1.3.tar.gz New: ---- OrthancOHIF-1.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ orthanc-ohif.spec ++++++ --- /var/tmp/diff_new_pack.Y0yGzM/_old 2025-07-15 17:55:30.023505968 +0200 +++ /var/tmp/diff_new_pack.Y0yGzM/_new 2025-07-15 17:55:30.023505968 +0200 @@ -1,8 +1,8 @@ # # spec file for package orthanc-ohif # -# Copyright (c) 2024 SUSE LLC -# Copyright (c) 2023-2024 Dr. Axel Braun <d...@opensuse.org> +# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2023-2025 Dr. Axel Braun <d...@opensuse.org> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,13 +20,13 @@ %{?sle15_python_module_pythons} Name: orthanc-ohif Summary: OHIF plugin for Orthanc -License: AGPL-3.0-or-later +License: GPL-3.0-or-later Group: Productivity/Graphics/Viewers -Version: 1.3 +Version: 1.6 Release: 0 URL: https://orthanc-server.com Source0: https://orthanc.uclouvain.be/downloads/sources/%{name}/OrthancOHIF-%{version}.tar.gz -Source1: https://orthanc.uclouvain.be/downloads/linux-standard-base/orthanc-ohif/1.1/dist.zip +Source1: https://orthanc.uclouvain.be/downloads/linux-standard-base/orthanc-ohif/%{version}/dist.zip BuildRequires: cmake BuildRequires: e2fsprogs-devel ++++++ OrthancOHIF-1.3.tar.gz -> OrthancOHIF-1.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/.hg_archival.txt new/OrthancOHIF-1.6/.hg_archival.txt --- old/OrthancOHIF-1.3/.hg_archival.txt 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/.hg_archival.txt 2025-04-29 10:59:02.000000000 +0200 @@ -1,6 +1,6 @@ repo: 39585ba26f209c4a9d12ece8e4eda1c466775a94 -node: 7a0d9fab6ae8abf83ca259b1453837d1378705cc -branch: OrthancOHIF-1.3 +node: 99652ce0db93c291de98be12f24ec5424033a33c +branch: OrthancOHIF-1.6 latesttag: null -latesttagdistance: 51 -changessincelatesttag: 51 +latesttagdistance: 74 +changessincelatesttag: 74 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/.hgignore new/OrthancOHIF-1.6/.hgignore --- old/OrthancOHIF-1.3/.hgignore 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/.hgignore 2025-04-29 10:59:02.000000000 +0200 @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# SPDX-FileCopyrightText: 2023-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # SPDX-License-Identifier: CC0-1.0 syntax: glob diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/.reuse/dep5 new/OrthancOHIF-1.6/.reuse/dep5 --- old/OrthancOHIF-1.3/.reuse/dep5 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/.reuse/dep5 2025-04-29 10:59:02.000000000 +0200 @@ -3,16 +3,16 @@ Upstream-Contact: Sebastien Jodogne <s.jodo...@gmail.com> Source: https://orthanc.uclouvain.be/ -Files: NEWS README -Copyright: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium, and 2018-2024 Open Health Imaging Foundation +Files: NEWS README TODO CITATION.cff +Copyright: 2023-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium, and 2018-2025 Open Health Imaging Foundation License: GPL-3.0-or-later Files: Resources/Orthanc/CMake/* Resources/Orthanc/Toolchains/* -Copyright: 2012-2016 Sebastien Jodogne <s.jodo...@gmail.com>, University Hospital of Liege (Belgium), and 2017-2024 Osimis S.A. (Belgium), and 2021-2024 UCLouvain (Belgium) +Copyright: 2012-2016 Sebastien Jodogne <s.jodo...@gmail.com>, University Hospital of Liege (Belgium), and 2017-2023 Osimis S.A. (Belgium), and 2021-2025 ICTEAM UCLouvain (Belgium) License: LGPL-3.0-or-later Files: Resources/Orthanc/Plugins/* -Copyright: 2012-2016 Sebastien Jodogne <s.jodo...@gmail.com>, University Hospital of Liege (Belgium), and 2017-2024 Osimis S.A. (Belgium), and 2021-2024 UCLouvain (Belgium) +Copyright: 2012-2016 Sebastien Jodogne <s.jodo...@gmail.com>, University Hospital of Liege (Belgium), and 2017-2023 Osimis S.A. (Belgium), and 2021-2025 ICTEAM UCLouvain (Belgium) License: GPL-3.0-or-later Files: Resources/Orthanc/Sdk-1.0.0/orthanc/OrthancCPlugin.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/CITATION.cff new/OrthancOHIF-1.6/CITATION.cff --- old/OrthancOHIF-1.3/CITATION.cff 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/CITATION.cff 2025-04-29 10:59:02.000000000 +0200 @@ -10,5 +10,5 @@ doi: "10.1007/s10278-018-0082-y" license: "GPL-3.0-or-later" repository-code: "https://orthanc.uclouvain.be/hg/orthanc/" -version: 1.12.3 -date-released: 2024-01-31 +version: 1.12.5 +date-released: 2024-12-17 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/CMakeLists.txt new/OrthancOHIF-1.6/CMakeLists.txt --- old/OrthancOHIF-1.3/CMakeLists.txt 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/CMakeLists.txt 2025-04-29 10:59:02.000000000 +0200 @@ -1,9 +1,9 @@ -# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# SPDX-FileCopyrightText: 2023-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # SPDX-License-Identifier: GPL-3.0-or-later # OHIF plugin for Orthanc -# Copyright (C) 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# Copyright (C) 2023-2025 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 @@ -22,17 +22,17 @@ cmake_minimum_required(VERSION 2.8) project(OrthancOHIF) -set(ORTHANC_OHIF_VERSION "1.3") +set(ORTHANC_OHIF_VERSION "1.6") if (ORTHANC_OHIF_VERSION STREQUAL "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") else() - set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.12.2") + set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.12.5") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") endif() -set(METADATA_VERSION 1) +set(METADATA_VERSION 2) ##################################################################### diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/NEWS new/OrthancOHIF-1.6/NEWS --- old/OrthancOHIF-1.3/NEWS 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/NEWS 2025-04-29 10:59:02.000000000 +0200 @@ -1,3 +1,33 @@ +Version 1.6 (2025-04-29) +======================== + +* Updated OHIF to 3.10.1 +* Known issues: + - authorization tokens are not functional with videos. + Waiting for this PR to be validated and incorporated: + https://github.com/OHIF/Viewers/pull/4958 + + +Version 1.5 (2025-01-17) +======================== + +* Updated OHIF to 3.9.2 +* In "dicom-web" data source, fixed the default "app-config.js" + configuration to enable display of PDFs. +* Updated cached "dicom-json" version to 2. This implies that, when using + the "dicom-json" source, the cached metadata will have to be recomputed + the first time you open a study. + + +Version 1.4 (2024-11-26) +======================== + +* Updated OHIF to 3.9.1 +* The default value for the "DataSource" configuration is now "dicom-web" + instead of "dicom-json" since "dicom-web" is usually + more optimized. + + Version 1.3 (2024-07-12) ======================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/ClearMetadataCache.py new/OrthancOHIF-1.6/Resources/ClearMetadataCache.py --- old/OrthancOHIF-1.3/Resources/ClearMetadataCache.py 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/ClearMetadataCache.py 2025-04-29 10:59:02.000000000 +0200 @@ -1,5 +1,25 @@ #!/usr/bin/env python3 +# SPDX-FileCopyrightText: 2023-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# SPDX-License-Identifier: GPL-3.0-or-later + +# OHIF plugin for Orthanc +# Copyright (C) 2023-2025 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 +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + + import argparse import requests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/CreateOHIFDist/Dockerfile new/OrthancOHIF-1.6/Resources/CreateOHIFDist/Dockerfile --- old/OrthancOHIF-1.3/Resources/CreateOHIFDist/Dockerfile 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/CreateOHIFDist/Dockerfile 2025-04-29 10:59:02.000000000 +0200 @@ -1,8 +1,8 @@ -# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# SPDX-FileCopyrightText: 2023-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # SPDX-License-Identifier: GPL-3.0-or-later # OHIF plugin for Orthanc -# Copyright (C) 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# Copyright (C) 2023-2025 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 @@ -17,10 +17,12 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -FROM node:21.2-bullseye-slim +FROM node:20.18.1-slim MAINTAINER Sebastien Jodogne <s.jodo...@gmail.com> LABEL Description="Orthanc, free DICOM server" Vendor="The Orthanc project" -RUN apt-get -y clean && apt-get -y update && \ +RUN apt-get -y clean && apt-get -y update && apt-get install -y build-essential python3 && \ apt-get clean && rm -rf /var/lib/apt/lists/* + +RUN npm install -g bun \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/CreateOHIFDist/build.sh new/OrthancOHIF-1.6/Resources/CreateOHIFDist/build.sh --- old/OrthancOHIF-1.3/Resources/CreateOHIFDist/build.sh 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/CreateOHIFDist/build.sh 2025-04-29 10:59:02.000000000 +0200 @@ -1,10 +1,10 @@ #!/bin/bash -# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# SPDX-FileCopyrightText: 2023-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # SPDX-License-Identifier: GPL-3.0-or-later # OHIF plugin for Orthanc -# Copyright (C) 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# Copyright (C) 2023-2025 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 @@ -30,7 +30,17 @@ tar xvf /source/$1.tar.gz cd /tmp/$1 -HOME=/tmp yarn install --frozen-lockfile -HOME=/tmp QUICK_BUILD=true PUBLIC_URL=./ yarn run build +bun pm cache rm +bun install --frozen-lockfile + +APP_CONFIG=config/default.js QUICK_BUILD=true PUBLIC_URL=./ bun run show:config +APP_CONFIG=config/default.js QUICK_BUILD=true PUBLIC_URL=./ bun run build + +# patch files where the PUBLIC_URL was not taken into account +# Note that, for the microscopy, this is currently not working: https://github.com/OHIF/Viewers/issues/4906 +sed -i "s|'/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js|'./dicom-microscopy-viewer/dicomMicroscopyViewer.min.js|g" /tmp/$1/platform/app/dist/app.bundle.*.js +sed -i 's|"/dicom-microscopy-viewer|"./dicom-microscopy-viewer|g' /tmp/$1/platform/app/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js +sed -i 's|"/dicom-microscopy-viewer|"./dicom-microscopy-viewer|g' /tmp/$1/platform/app/dist/dicom-microscopy-viewer/index.worker.min.worker.js +sed -i 's|"/assets/android-chrome-|"./assets/android-chrome-|g' /tmp/$1/platform/app/dist/manifest.json cp -r /tmp/$1/platform/app/dist/* /target diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/CreateOHIFDist.sh new/OrthancOHIF-1.6/Resources/CreateOHIFDist.sh --- old/OrthancOHIF-1.3/Resources/CreateOHIFDist.sh 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/CreateOHIFDist.sh 2025-04-29 10:59:02.000000000 +0200 @@ -1,10 +1,10 @@ #!/bin/bash -# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# SPDX-FileCopyrightText: 2023-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # SPDX-License-Identifier: GPL-3.0-or-later # OHIF plugin for Orthanc -# Copyright (C) 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# Copyright (C) 2023-2025 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 @@ -21,14 +21,18 @@ -# This command-line script uses the "yarn" tool to populate the "dist" +# This command-line script uses the "bun" tool to populate the "dist" # folder of OHIF. It uses Docker to this end, in order to be usable on # our CIS. +# sample command to create the tar.gz archive from OHIF github repo: +# git archive --format tar.gz --prefix Viewers-fix-video-auth-token/ -o ohif-fix-video-auth-token.tar.gz HEAD + set -ex if [ "$1" = "" ]; then - PACKAGE=Viewers-3.8.3 + PACKAGE=Viewers-3.10.1 + # PACKAGE=Viewers-fix-video-auth-token else PACKAGE=$1 fi @@ -59,6 +63,8 @@ ( cd ${ROOT_DIR}/Resources/CreateOHIFDist && \ docker build --no-cache -t ${IMAGE} . ) +# sample manual command: docker run -it --rm -v ./Resources/CreateOHIFDist/build.sh:/source/build.sh -v ./OHIF/Viewers-3.11.0-beta.9.tar.gz:/source/Viewers-3.11.0-beta.9.tar.gz -v ./OHIF/dist/:/target orthanc-ohif-node bash + docker run -t ${DOCKER_FLAGS} --rm \ --user $(id -u):$(id -g) \ -v ${ROOT_DIR}/Resources/CreateOHIFDist/build.sh:/source/build.sh:ro \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/EmbedStaticAssets.py new/OrthancOHIF-1.6/Resources/EmbedStaticAssets.py --- old/OrthancOHIF-1.3/Resources/EmbedStaticAssets.py 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/EmbedStaticAssets.py 2025-04-29 10:59:02.000000000 +0200 @@ -1,10 +1,10 @@ #!/usr/bin/python3 -# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# SPDX-FileCopyrightText: 2023-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # SPDX-License-Identifier: GPL-3.0-or-later # OHIF plugin for Orthanc -# Copyright (C) 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# Copyright (C) 2023-2025 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/Orthanc/CMake/AutoGeneratedCode.cmake new/OrthancOHIF-1.6/Resources/Orthanc/CMake/AutoGeneratedCode.cmake --- old/OrthancOHIF-1.3/Resources/Orthanc/CMake/AutoGeneratedCode.cmake 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/Orthanc/CMake/AutoGeneratedCode.cmake 2025-04-29 10:59:02.000000000 +0200 @@ -1,8 +1,9 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2024 Osimis S.A., Belgium -# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2023 Osimis S.A., Belgium +# Copyright (C) 2024-2025 Orthanc Team SRL, Belgium +# Copyright (C) 2021-2025 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/Orthanc/CMake/Compiler.cmake new/OrthancOHIF-1.6/Resources/Orthanc/CMake/Compiler.cmake --- old/OrthancOHIF-1.3/Resources/Orthanc/CMake/Compiler.cmake 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/Orthanc/CMake/Compiler.cmake 2025-04-29 10:59:02.000000000 +0200 @@ -1,8 +1,9 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2024 Osimis S.A., Belgium -# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2023 Osimis S.A., Belgium +# Copyright (C) 2024-2025 Orthanc Team SRL, Belgium +# Copyright (C) 2021-2025 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 @@ -231,6 +232,10 @@ endif() elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + + # fix this error that appears with recent compilers on MacOS: boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion] + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-enum-constexpr-conversion") + add_definitions( -D_XOPEN_SOURCE=1 ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake new/OrthancOHIF-1.6/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake --- old/OrthancOHIF-1.3/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake 2025-04-29 10:59:02.000000000 +0200 @@ -1,8 +1,9 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2024 Osimis S.A., Belgium -# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2023 Osimis S.A., Belgium +# Copyright (C) 2024-2025 Orthanc Team SRL, Belgium +# Copyright (C) 2021-2025 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 @@ -162,6 +163,10 @@ set(ORTHANC_FRAMEWORK_MD5 "d2476b9e796e339ac320b5333489bdb3") elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.12.3") set(ORTHANC_FRAMEWORK_MD5 "975f5bf2142c22cb1777b4f6a0a614c5") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.12.4") + set(ORTHANC_FRAMEWORK_MD5 "1e61779ea4a7cd705720bdcfed8a6a73") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.12.5") + set(ORTHANC_FRAMEWORK_MD5 "5bb69f092981fdcfc11dec0a0f9a7db3") # Below this point are development snapshots that were used to # release some plugin, before an official release of the Orthanc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/Orthanc/CMake/DownloadPackage.cmake new/OrthancOHIF-1.6/Resources/Orthanc/CMake/DownloadPackage.cmake --- old/OrthancOHIF-1.3/Resources/Orthanc/CMake/DownloadPackage.cmake 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/Orthanc/CMake/DownloadPackage.cmake 2025-04-29 10:59:02.000000000 +0200 @@ -1,8 +1,9 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2024 Osimis S.A., Belgium -# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2023 Osimis S.A., Belgium +# Copyright (C) 2024-2025 Orthanc Team SRL, Belgium +# Copyright (C) 2021-2025 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/Orthanc/CMake/EmbedResources.py new/OrthancOHIF-1.6/Resources/Orthanc/CMake/EmbedResources.py --- old/OrthancOHIF-1.3/Resources/Orthanc/CMake/EmbedResources.py 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/Orthanc/CMake/EmbedResources.py 2025-04-29 10:59:02.000000000 +0200 @@ -3,8 +3,9 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2024 Osimis S.A., Belgium -# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2023 Osimis S.A., Belgium +# Copyright (C) 2024-2025 Orthanc Team SRL, Belgium +# Copyright (C) 2021-2025 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp new/OrthancOHIF-1.6/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp --- old/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp 2025-04-29 10:59:02.000000000 +0200 @@ -2,8 +2,9 @@ * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics * Department, University Hospital of Liege, Belgium - * Copyright (C) 2017-2024 Osimis S.A., Belgium - * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium + * Copyright (C) 2017-2023 Osimis S.A., Belgium + * Copyright (C) 2024-2025 Orthanc Team SRL, Belgium + * Copyright (C) 2021-2025 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 @@ -333,9 +334,9 @@ std::vector<const char*> headersValues_; public: - explicit PluginHttpHeaders(const std::map<std::string, std::string>& httpHeaders) + explicit PluginHttpHeaders(const HttpHeaders& httpHeaders) { - for (std::map<std::string, std::string>::const_iterator + for (HttpHeaders::const_iterator it = httpHeaders.begin(); it != httpHeaders.end(); ++it) { headersKeys_.push_back(it->first.c_str()); @@ -360,7 +361,7 @@ }; bool MemoryBuffer::RestApiGet(const std::string& uri, - const std::map<std::string, std::string>& httpHeaders, + const HttpHeaders& httpHeaders, bool applyPlugins) { Clear(); @@ -399,7 +400,7 @@ bool MemoryBuffer::RestApiPost(const std::string& uri, const void* body, size_t bodySize, - const std::map<std::string, std::string>& httpHeaders, + const HttpHeaders& httpHeaders, bool applyPlugins) { MemoryBuffer answerHeaders; @@ -421,7 +422,7 @@ bool MemoryBuffer::RestApiPost(const std::string& uri, const Json::Value& body, - const std::map<std::string, std::string>& httpHeaders, + const HttpHeaders& httpHeaders, bool applyPlugins) { std::string s; @@ -1489,7 +1490,7 @@ bool RestApiGetString(std::string& result, const std::string& uri, - const std::map<std::string, std::string>& httpHeaders, + const HttpHeaders& httpHeaders, bool applyPlugins) { MemoryBuffer answer; @@ -1507,7 +1508,7 @@ bool RestApiGet(Json::Value& result, const std::string& uri, - const std::map<std::string, std::string>& httpHeaders, + const HttpHeaders& httpHeaders, bool applyPlugins) { MemoryBuffer answer; @@ -1597,7 +1598,7 @@ bool RestApiPost(Json::Value& result, const std::string& uri, const Json::Value& body, - const std::map<std::string, std::string>& httpHeaders, + const HttpHeaders& httpHeaders, bool applyPlugins) { MemoryBuffer answer; @@ -1962,7 +1963,7 @@ bool OrthancPeers::DoGet(MemoryBuffer& target, size_t index, const std::string& uri, - const std::map<std::string, std::string>& headers) const + const HttpHeaders& headers) const { if (index >= index_.size()) { @@ -1993,7 +1994,7 @@ bool OrthancPeers::DoGet(MemoryBuffer& target, const std::string& name, const std::string& uri, - const std::map<std::string, std::string>& headers) const + const HttpHeaders& headers) const { size_t index; return (LookupName(index, name) && @@ -2004,7 +2005,7 @@ bool OrthancPeers::DoGet(Json::Value& target, size_t index, const std::string& uri, - const std::map<std::string, std::string>& headers) const + const HttpHeaders& headers) const { MemoryBuffer buffer; @@ -2023,7 +2024,7 @@ bool OrthancPeers::DoGet(Json::Value& target, const std::string& name, const std::string& uri, - const std::map<std::string, std::string>& headers) const + const HttpHeaders& headers) const { MemoryBuffer buffer; @@ -2043,7 +2044,7 @@ const std::string& name, const std::string& uri, const std::string& body, - const std::map<std::string, std::string>& headers) const + const HttpHeaders& headers) const { size_t index; return (LookupName(index, name) && @@ -2055,7 +2056,7 @@ size_t index, const std::string& uri, const std::string& body, - const std::map<std::string, std::string>& headers) const + const HttpHeaders& headers) const { MemoryBuffer buffer; @@ -2075,7 +2076,7 @@ const std::string& name, const std::string& uri, const std::string& body, - const std::map<std::string, std::string>& headers) const + const HttpHeaders& headers) const { MemoryBuffer buffer; @@ -2095,7 +2096,7 @@ size_t index, const std::string& uri, const std::string& body, - const std::map<std::string, std::string>& headers) const + const HttpHeaders& headers) const { if (index >= index_.size()) { @@ -2132,7 +2133,7 @@ bool OrthancPeers::DoPut(size_t index, const std::string& uri, const std::string& body, - const std::map<std::string, std::string>& headers) const + const HttpHeaders& headers) const { if (index >= index_.size()) { @@ -2168,7 +2169,7 @@ bool OrthancPeers::DoPut(const std::string& name, const std::string& uri, const std::string& body, - const std::map<std::string, std::string>& headers) const + const HttpHeaders& headers) const { size_t index; return (LookupName(index, name) && @@ -2178,7 +2179,7 @@ bool OrthancPeers::DoDelete(size_t index, const std::string& uri, - const std::map<std::string, std::string>& headers) const + const HttpHeaders& headers) const { if (index >= index_.size()) { @@ -2207,7 +2208,7 @@ bool OrthancPeers::DoDelete(const std::string& name, const std::string& uri, - const std::map<std::string, std::string>& headers) const + const HttpHeaders& headers) const { size_t index; return (LookupName(index, name) && @@ -2922,12 +2923,12 @@ std::vector<const char*> headersValues_; public: - HeadersWrapper(const HttpClient::HttpHeaders& headers) + HeadersWrapper(const HttpHeaders& headers) { headersKeys_.reserve(headers.size()); headersValues_.reserve(headers.size()); - for (HttpClient::HttpHeaders::const_iterator it = headers.begin(); it != headers.end(); ++it) + for (HttpHeaders::const_iterator it = headers.begin(); it != headers.end(); ++it) { headersKeys_.push_back(it->first.c_str()); headersValues_.push_back(it->second.c_str()); @@ -3075,11 +3076,11 @@ class MemoryAnswer : public HttpClient::IAnswer { private: - HttpClient::HttpHeaders headers_; - ChunkedBuffer body_; + HttpHeaders headers_; + ChunkedBuffer body_; public: - const HttpClient::HttpHeaders& GetHeaders() const + const HttpHeaders& GetHeaders() const { return headers_; } @@ -3167,6 +3168,35 @@ #endif + static void DecodeHttpHeaders(HttpHeaders& target, + const MemoryBuffer& source) + { + Json::Value v; + source.ToJson(v); + + if (v.type() != Json::objectValue) + { + ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); + } + + Json::Value::Members members = v.getMemberNames(); + target.clear(); + + for (size_t i = 0; i < members.size(); i++) + { + const Json::Value& h = v[members[i]]; + if (h.type() != Json::stringValue) + { + ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); + } + else + { + target[members[i]] = h.asString(); + } + } + } + + void HttpClient::ExecuteWithoutStream(uint16_t& httpStatus, HttpHeaders& answerHeaders, std::string& answerBody, @@ -3207,30 +3237,7 @@ ORTHANC_PLUGINS_THROW_PLUGIN_ERROR_CODE(error); } - Json::Value v; - answerHeadersBuffer.ToJson(v); - - if (v.type() != Json::objectValue) - { - ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); - } - - Json::Value::Members members = v.getMemberNames(); - answerHeaders.clear(); - - for (size_t i = 0; i < members.size(); i++) - { - const Json::Value& h = v[members[i]]; - if (h.type() != Json::stringValue) - { - ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); - } - else - { - answerHeaders[members[i]] = h.asString(); - } - } - + DecodeHttpHeaders(answerHeaders, answerHeadersBuffer); answerBodyBuffer.ToString(answerBody); } @@ -4060,7 +4067,7 @@ } #endif - void GetHttpHeaders(std::map<std::string, std::string>& result, const OrthancPluginHttpRequest* request) + void GetHttpHeaders(HttpHeaders& result, const OrthancPluginHttpRequest* request) { result.clear(); @@ -4113,4 +4120,135 @@ SetPluginProperty(pluginIdentifier, _OrthancPluginProperty_OrthancExplorer, javascript); #endif } + + +#if HAS_ORTHANC_PLUGIN_GENERIC_CALL_REST_API == 1 + RestApiClient::RestApiClient() : + method_(OrthancPluginHttpMethod_Get), + path_("/"), + afterPlugins_(false), + httpStatus_(0) + { + } +#endif + + +#if HAS_ORTHANC_PLUGIN_GENERIC_CALL_REST_API == 1 + void RestApiClient::AddRequestHeader(const std::string& key, + const std::string& value) + { + if (requestHeaders_.find(key) == requestHeaders_.end()) + { + requestHeaders_[key] = value; + } + else + { + ORTHANC_PLUGINS_THROW_EXCEPTION(BadSequenceOfCalls); + } + } +#endif + + +#if HAS_ORTHANC_PLUGIN_GENERIC_CALL_REST_API == 1 + bool RestApiClient::Execute() + { + if (requestBody_.size() > 0xffffffffu) + { + ORTHANC_PLUGINS_LOG_ERROR("Cannot handle body size > 4GB"); + ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); + } + + PluginHttpHeaders converted(requestHeaders_); + + MemoryBuffer body; + MemoryBuffer headers; + + OrthancPluginErrorCode code = OrthancPluginCallRestApi(GetGlobalContext(), *body, *headers, &httpStatus_, method_, path_.c_str(), + requestHeaders_.size(), converted.GetKeys(), converted.GetValues(), + requestBody_.c_str(), requestBody_.size(), afterPlugins_ ? 1 : 0); + + answerHeaders_.clear(); + answerBody_.clear(); + + if (code == OrthancPluginErrorCode_Success) + { + if (httpStatus_ == 0) + { + ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); + } + + DecodeHttpHeaders(answerHeaders_, headers); + body.ToString(answerBody_); + return true; + } + else + { + if (code == OrthancPluginErrorCode_UnknownResource || + code == OrthancPluginErrorCode_InexistentItem) + { + httpStatus_ = 404; + return false; + } + else + { + ORTHANC_PLUGINS_THROW_PLUGIN_ERROR_CODE(code); + } + } + } +#endif + + +#if HAS_ORTHANC_PLUGIN_GENERIC_CALL_REST_API == 1 + uint16_t RestApiClient::GetHttpStatus() const + { + if (httpStatus_ == 0) + { + ORTHANC_PLUGINS_THROW_EXCEPTION(BadSequenceOfCalls); + } + else + { + return httpStatus_; + } + } +#endif + + +#if HAS_ORTHANC_PLUGIN_GENERIC_CALL_REST_API == 1 + bool RestApiClient::LookupAnswerHeader(std::string& value, + const std::string& key) const + { + if (httpStatus_ == 0) + { + ORTHANC_PLUGINS_THROW_EXCEPTION(BadSequenceOfCalls); + } + else + { + HttpHeaders::const_iterator found = answerHeaders_.find(key); + if (found == answerHeaders_.end()) + { + return false; + } + else + { + value = found->second; + return true; + } + } + } +#endif + + +#if HAS_ORTHANC_PLUGIN_GENERIC_CALL_REST_API == 1 + const std::string& RestApiClient::GetAnswerBody() const + { + if (httpStatus_ == 0) + { + ORTHANC_PLUGINS_THROW_EXCEPTION(BadSequenceOfCalls); + } + else + { + return answerBody_; + } + } +#endif } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h new/OrthancOHIF-1.6/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h --- old/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h 2025-04-29 10:59:02.000000000 +0200 @@ -2,8 +2,9 @@ * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics * Department, University Hospital of Liege, Belgium - * Copyright (C) 2017-2024 Osimis S.A., Belgium - * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium + * Copyright (C) 2017-2023 Osimis S.A., Belgium + * Copyright (C) 2024-2025 Orthanc Team SRL, Belgium + * Copyright (C) 2021-2025 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 @@ -169,6 +170,8 @@ namespace OrthancPlugins { + typedef std::map<std::string, std::string> HttpHeaders; + typedef void (*RestCallback) (OrthancPluginRestOutput* output, const char* url, const OrthancPluginHttpRequest* request); @@ -256,7 +259,7 @@ bool applyPlugins); bool RestApiGet(const std::string& uri, - const std::map<std::string, std::string>& httpHeaders, + const HttpHeaders& httpHeaders, bool applyPlugins); bool RestApiPost(const std::string& uri, @@ -276,13 +279,13 @@ #if HAS_ORTHANC_PLUGIN_GENERIC_CALL_REST_API == 1 bool RestApiPost(const std::string& uri, const Json::Value& body, - const std::map<std::string, std::string>& httpHeaders, + const HttpHeaders& httpHeaders, bool applyPlugins); bool RestApiPost(const std::string& uri, const void* body, size_t bodySize, - const std::map<std::string, std::string>& httpHeaders, + const HttpHeaders& httpHeaders, bool applyPlugins); #endif @@ -580,7 +583,7 @@ bool RestApiGet(Json::Value& result, const std::string& uri, - const std::map<std::string, std::string>& httpHeaders, + const HttpHeaders& httpHeaders, bool applyPlugins); bool RestApiGetString(std::string& result, @@ -589,7 +592,7 @@ bool RestApiGetString(std::string& result, const std::string& uri, - const std::map<std::string, std::string>& httpHeaders, + const HttpHeaders& httpHeaders, bool applyPlugins); bool RestApiPost(std::string& result, @@ -608,7 +611,7 @@ bool RestApiPost(Json::Value& result, const std::string& uri, const Json::Value& body, - const std::map<std::string, std::string>& httpHeaders, + const HttpHeaders& httpHeaders, bool applyPlugins); #endif @@ -828,64 +831,64 @@ bool DoGet(MemoryBuffer& target, size_t index, const std::string& uri, - const std::map<std::string, std::string>& headers) const; + const HttpHeaders& headers) const; bool DoGet(MemoryBuffer& target, const std::string& name, const std::string& uri, - const std::map<std::string, std::string>& headers) const; + const HttpHeaders& headers) const; bool DoGet(Json::Value& target, size_t index, const std::string& uri, - const std::map<std::string, std::string>& headers) const; + const HttpHeaders& headers) const; bool DoGet(Json::Value& target, const std::string& name, const std::string& uri, - const std::map<std::string, std::string>& headers) const; + const HttpHeaders& headers) const; bool DoPost(MemoryBuffer& target, size_t index, const std::string& uri, const std::string& body, - const std::map<std::string, std::string>& headers) const; + const HttpHeaders& headers) const; bool DoPost(MemoryBuffer& target, const std::string& name, const std::string& uri, const std::string& body, - const std::map<std::string, std::string>& headers) const; + const HttpHeaders& headers) const; bool DoPost(Json::Value& target, size_t index, const std::string& uri, const std::string& body, - const std::map<std::string, std::string>& headers) const; + const HttpHeaders& headers) const; bool DoPost(Json::Value& target, const std::string& name, const std::string& uri, const std::string& body, - const std::map<std::string, std::string>& headers) const; + const HttpHeaders& headers) const; bool DoPut(size_t index, const std::string& uri, const std::string& body, - const std::map<std::string, std::string>& headers) const; + const HttpHeaders& headers) const; bool DoPut(const std::string& name, const std::string& uri, const std::string& body, - const std::map<std::string, std::string>& headers) const; + const HttpHeaders& headers) const; bool DoDelete(size_t index, const std::string& uri, - const std::map<std::string, std::string>& headers) const; + const HttpHeaders& headers) const; bool DoDelete(const std::string& name, const std::string& uri, - const std::map<std::string, std::string>& headers) const; + const HttpHeaders& headers) const; }; #endif @@ -995,8 +998,6 @@ class HttpClient : public boost::noncopyable { public: - typedef std::map<std::string, std::string> HttpHeaders; - class IRequestBody : public boost::noncopyable { public: @@ -1396,7 +1397,7 @@ }; // helper method to convert Http headers from the plugin SDK to a std::map -void GetHttpHeaders(std::map<std::string, std::string>& result, const OrthancPluginHttpRequest* request); +void GetHttpHeaders(HttpHeaders& result, const OrthancPluginHttpRequest* request); #if HAS_ORTHANC_PLUGIN_WEBDAV == 1 class IWebDavCollection : public boost::noncopyable @@ -1507,4 +1508,88 @@ void ExtendOrthancExplorer(const std::string& pluginIdentifier, const std::string& javascript); + + +#if HAS_ORTHANC_PLUGIN_GENERIC_CALL_REST_API == 1 + class RestApiClient : public boost::noncopyable + { + private: + // Request + OrthancPluginHttpMethod method_; + std::string path_; + HttpHeaders requestHeaders_; + std::string requestBody_; + bool afterPlugins_; + + // Answer + uint16_t httpStatus_; + HttpHeaders answerHeaders_; + std::string answerBody_; + + public: + RestApiClient(); + + void SetMethod(OrthancPluginHttpMethod method) + { + method_ = method; + } + + OrthancPluginHttpMethod GetMethod() const + { + return method_; + } + + void SetPath(const std::string& path) + { + path_ = path; + } + + const std::string& GetPath() const + { + return path_; + } + + void AddRequestHeader(const std::string& key, + const std::string& value); + + const HttpHeaders& GetRequestHeaders() const + { + return requestHeaders_; + } + + void SetRequestBody(const std::string& body) + { + requestBody_ = body; + } + + void SwapRequestBody(std::string& body) + { + requestBody_.swap(body); + } + + void SetAfterPlugins(bool afterPlugins) + { + afterPlugins_ = afterPlugins; + } + + bool IsAfterPlugins() const + { + return afterPlugins_; + } + + const std::string& GetRequestBody() const + { + return requestBody_; + } + + bool Execute(); + + uint16_t GetHttpStatus() const; + + bool LookupAnswerHeader(std::string& value, + const std::string& key) const; + + const std::string& GetAnswerBody() const; + }; +#endif } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginException.h new/OrthancOHIF-1.6/Resources/Orthanc/Plugins/OrthancPluginException.h --- old/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginException.h 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/Orthanc/Plugins/OrthancPluginException.h 2025-04-29 10:59:02.000000000 +0200 @@ -2,8 +2,9 @@ * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics * Department, University Hospital of Liege, Belgium - * Copyright (C) 2017-2024 Osimis S.A., Belgium - * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium + * Copyright (C) 2017-2023 Osimis S.A., Belgium + * Copyright (C) 2024-2025 Orthanc Team SRL, Belgium + * Copyright (C) 2021-2025 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake new/OrthancOHIF-1.6/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake --- old/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake 2025-04-29 10:59:02.000000000 +0200 @@ -1,8 +1,9 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2024 Osimis S.A., Belgium -# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2023 Osimis S.A., Belgium +# Copyright (C) 2024-2025 Orthanc Team SRL, Belgium +# Copyright (C) 2021-2025 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake new/OrthancOHIF-1.6/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake --- old/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake 2025-04-29 10:59:02.000000000 +0200 @@ -1,8 +1,9 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2024 Osimis S.A., Belgium -# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2023 Osimis S.A., Belgium +# Copyright (C) 2024-2025 Orthanc Team SRL, Belgium +# Copyright (C) 2021-2025 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake new/OrthancOHIF-1.6/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake --- old/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake 2025-04-29 10:59:02.000000000 +0200 @@ -1,8 +1,9 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2024 Osimis S.A., Belgium -# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2023 Osimis S.A., Belgium +# Copyright (C) 2024-2025 Orthanc Team SRL, Belgium +# Copyright (C) 2021-2025 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake new/OrthancOHIF-1.6/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake --- old/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake 2025-04-29 10:59:02.000000000 +0200 @@ -1,8 +1,9 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2024 Osimis S.A., Belgium -# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2023 Osimis S.A., Belgium +# Copyright (C) 2024-2025 Orthanc Team SRL, Belgium +# Copyright (C) 2021-2025 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/MinGWToolchain.cmake new/OrthancOHIF-1.6/Resources/Orthanc/Toolchains/MinGWToolchain.cmake --- old/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/MinGWToolchain.cmake 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/Orthanc/Toolchains/MinGWToolchain.cmake 2025-04-29 10:59:02.000000000 +0200 @@ -1,8 +1,9 @@ # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2024 Osimis S.A., Belgium -# Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium +# Copyright (C) 2017-2023 Osimis S.A., Belgium +# Copyright (C) 2024-2025 Orthanc Team SRL, Belgium +# Copyright (C) 2021-2025 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Resources/SyncOrthancFolder.py new/OrthancOHIF-1.6/Resources/SyncOrthancFolder.py --- old/OrthancOHIF-1.3/Resources/SyncOrthancFolder.py 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Resources/SyncOrthancFolder.py 2025-04-29 10:59:02.000000000 +0200 @@ -1,10 +1,10 @@ #!/usr/bin/python3 -# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# SPDX-FileCopyrightText: 2023-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium # SPDX-License-Identifier: GPL-3.0-or-later # OHIF plugin for Orthanc -# Copyright (C) 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# Copyright (C) 2023-2025 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Sources/OrthancExplorer.js new/OrthancOHIF-1.6/Sources/OrthancExplorer.js --- old/OrthancOHIF-1.3/Sources/OrthancExplorer.js 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Sources/OrthancExplorer.js 2025-04-29 10:59:02.000000000 +0200 @@ -1,11 +1,11 @@ /** - * SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium + * SPDX-FileCopyrightText: 2023-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium * SPDX-License-Identifier: GPL-3.0-or-later */ /** * OHIF plugin for Orthanc - * Copyright (C) 2023-2024 Sebastien Jodogne, UCLouvain, Belgium + * Copyright (C) 2023-2025 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Sources/Plugin.cpp new/OrthancOHIF-1.6/Sources/Plugin.cpp --- old/OrthancOHIF-1.3/Sources/Plugin.cpp 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Sources/Plugin.cpp 2025-04-29 10:59:02.000000000 +0200 @@ -1,11 +1,11 @@ /** - * SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium + * SPDX-FileCopyrightText: 2023-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium * SPDX-License-Identifier: GPL-3.0-or-later */ /** * OHIF plugin for Orthanc - * Copyright (C) 2023-2024 Sebastien Jodogne, UCLouvain, Belgium + * Copyright (C) 2023-2025 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 @@ -751,13 +751,13 @@ } std::string jsonModalities; - for (std::set<std::string>::const_iterator it = modalities.begin(); it != modalities.end(); ++it) + for (std::set<std::string>::const_iterator it2 = modalities.begin(); it2 != modalities.end(); ++it2) { if (!jsonModalities.empty()) { jsonModalities += ","; } - jsonModalities += *it; + jsonModalities += *it2; } study["NumInstances"] = countInstances; @@ -944,15 +944,18 @@ } routerBasename_ = configuration.GetStringValue("RouterBasename", "/ohif/"); - std::string s = configuration.GetStringValue("DataSource", "dicom-json"); + std::string s = configuration.GetStringValue("DataSource", "dicom-web"); std::string userConfigurationPath = configuration.GetStringValue("UserConfiguration", ""); preload_ = configuration.GetBooleanValue("Preload", true); - if (s == "dicom-web") + static const std::string SOURCE_DICOM_WEB = "dicom-web"; + static const std::string SOURCE_DICOM_JSON = "dicom-json"; + + if (s == SOURCE_DICOM_WEB) { dataSource_ = DataSource_DicomWeb; } - else if (s == "dicom-json") + else if (s == SOURCE_DICOM_JSON) { dataSource_ = DataSource_DicomJson; } @@ -960,7 +963,7 @@ { throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange, "Configuration option \"OHIF.DataSource\" must be either " - "\"dicomweb\" or \"dicom-json\", but found: " + s); + "\"" + SOURCE_DICOM_WEB +"\" or \"" + SOURCE_DICOM_JSON + "\", but found: " + s); } if (userConfigurationPath.empty()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Sources/app-config-system.js new/OrthancOHIF-1.6/Sources/app-config-system.js --- old/OrthancOHIF-1.3/Sources/app-config-system.js 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Sources/app-config-system.js 2025-04-29 10:59:02.000000000 +0200 @@ -1,6 +1,6 @@ /** - * SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium, - * and 2018-2024 Open Health Imaging Foundation + * SPDX-FileCopyrightText: 2023-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium, + * and 2018-2025 Open Health Imaging Foundation * SPDX-License-Identifier: MIT */ @@ -27,8 +27,16 @@ supportsFuzzyMatching: false, supportsWildcard: true, staticWado: true, - singlepart: 'bulkdata,pdf,video', - acceptHeader: [ 'multipart/related; type=application/octet-stream; transfer-syntax=*'] + singlepart: 'bulkdata,video', + acceptHeader: [ 'multipart/related; type=application/octet-stream; transfer-syntax=*'], + // whether the data source should use retrieveBulkData to grab metadata, + // and in case of relative path, what would it be relative to, options + // are in the series level or study level (some servers like series some study) + bulkDataURI: { + enabled: true, + relativeResolution: 'studies', + } + } } ]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/Sources/app-config-user.js new/OrthancOHIF-1.6/Sources/app-config-user.js --- old/OrthancOHIF-1.3/Sources/app-config-user.js 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/Sources/app-config-user.js 2025-04-29 10:59:02.000000000 +0200 @@ -1,6 +1,6 @@ /** - * SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium, - * and 2018-2024 Open Health Imaging Foundation + * SPDX-FileCopyrightText: 2023-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium, + * and 2018-2025 Open Health Imaging Foundation * SPDX-License-Identifier: MIT */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancOHIF-1.3/TODO new/OrthancOHIF-1.6/TODO --- old/OrthancOHIF-1.3/TODO 2024-07-12 15:48:31.000000000 +0200 +++ new/OrthancOHIF-1.6/TODO 2025-04-29 10:59:02.000000000 +0200 @@ -1 +0,0 @@ -- PDF: apply these fixes in default config https://github.com/OHIF/Viewers/issues/4256 + https://github.com/orthanc-server/orthanc-setup-samples/commit/5af834d3d6e755e55d8d937547ace6fa39925626 once the commit has been merged and released \ No newline at end of file ++++++ dist.zip ++++++ /work/SRC/openSUSE:Leap:16.0/orthanc-ohif/dist.zip /work/SRC/openSUSE:Leap:16.0/.orthanc-ohif.new.7373/dist.zip differ: char 11, line 2