Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package orthanc-ohif for openSUSE:Factory 
checked in at 2024-07-15 19:49:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/orthanc-ohif (Old)
 and      /work/SRC/openSUSE:Factory/.orthanc-ohif.new.17339 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "orthanc-ohif"

Mon Jul 15 19:49:53 2024 rev:4 rq:1187507 version:1.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/orthanc-ohif/orthanc-ohif.changes        
2024-03-20 21:17:08.824222464 +0100
+++ /work/SRC/openSUSE:Factory/.orthanc-ohif.new.17339/orthanc-ohif.changes     
2024-07-15 19:50:33.170500825 +0200
@@ -1,0 +2,10 @@
+Fri Jul 12 19:27:33 UTC 2024 - Axel Braun <[email protected]>
+
+- version 1.3
+  * Updated OHIF to 3.8.3
+  * Enabled support for segmentation and microscopy modes
+    Note that the microscopy mode is not stable yet in OHIF!
+  * Fixed wrong MIME type for app-config.js that prevents the OHIF
+    viewer from loading with Orthanc 1.12.2
+
+-------------------------------------------------------------------

Old:
----
  OrthancOHIF-1.1.tar.gz

New:
----
  OrthancOHIF-1.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ orthanc-ohif.spec ++++++
--- /var/tmp/diff_new_pack.QwPuIU/_old  2024-07-15 19:50:33.630517777 +0200
+++ /var/tmp/diff_new_pack.QwPuIU/_new  2024-07-15 19:50:33.634517925 +0200
@@ -22,7 +22,7 @@
 Summary:        OHIF plugin for Orthanc
 License:        AGPL-3.0-or-later
 Group:          Productivity/Graphics/Viewers
-Version:        1.1
+Version:        1.3
 Release:        0
 URL:            https://orthanc-server.com
 Source0:        
https://orthanc.uclouvain.be/downloads/sources/%{name}/OrthancOHIF-%{version}.tar.gz

++++++ OrthancOHIF-1.1.tar.gz -> OrthancOHIF-1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancOHIF-1.1/.hg_archival.txt 
new/OrthancOHIF-1.3/.hg_archival.txt
--- old/OrthancOHIF-1.1/.hg_archival.txt        2023-11-24 14:19:16.000000000 
+0100
+++ new/OrthancOHIF-1.3/.hg_archival.txt        2024-07-12 15:48:31.000000000 
+0200
@@ -1,6 +1,6 @@
 repo: 39585ba26f209c4a9d12ece8e4eda1c466775a94
-node: 020716fe2ac8942a80fa4d2d6789fafb1e280502
-branch: OrthancOHIF-1.1
+node: 7a0d9fab6ae8abf83ca259b1453837d1378705cc
+branch: OrthancOHIF-1.3
 latesttag: null
-latesttagdistance: 25
-changessincelatesttag: 25
+latesttagdistance: 51
+changessincelatesttag: 51
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancOHIF-1.1/.hgignore 
new/OrthancOHIF-1.3/.hgignore
--- old/OrthancOHIF-1.1/.hgignore       2023-11-24 14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/.hgignore       2024-07-12 15:48:31.000000000 +0200
@@ -1,4 +1,4 @@
-# SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
+# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium
 # SPDX-License-Identifier: CC0-1.0
 
 syntax: glob
@@ -8,3 +8,4 @@
 OHIF/dist
 i/
 .vscode/
+*.orig
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancOHIF-1.1/.reuse/dep5 
new/OrthancOHIF-1.3/.reuse/dep5
--- old/OrthancOHIF-1.1/.reuse/dep5     2023-11-24 14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/.reuse/dep5     2024-07-12 15:48:31.000000000 +0200
@@ -4,15 +4,15 @@
 Source: https://orthanc.uclouvain.be/
 
 Files: NEWS README
-Copyright: 2023 Sebastien Jodogne, UCLouvain, Belgium, and 2018-2023 Open 
Health Imaging Foundation
+Copyright: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium, and 2018-2024 Open 
Health Imaging Foundation
 License: GPL-3.0-or-later
 
 Files: Resources/Orthanc/CMake/* Resources/Orthanc/Toolchains/*
-Copyright: 2012-2016 Sebastien Jodogne <[email protected]>, University 
Hospital of Liege (Belgium), and 2017-2023 Osimis S.A. (Belgium), and 2021-2023 
UCLouvain (Belgium)
+Copyright: 2012-2016 Sebastien Jodogne <[email protected]>, University 
Hospital of Liege (Belgium), and 2017-2024 Osimis S.A. (Belgium), and 2021-2024 
UCLouvain (Belgium)
 License: LGPL-3.0-or-later
 
 Files: Resources/Orthanc/Plugins/*
-Copyright: 2012-2016 Sebastien Jodogne <[email protected]>, University 
Hospital of Liege (Belgium), and 2017-2023 Osimis S.A. (Belgium), and 2021-2023 
UCLouvain (Belgium)
+Copyright: 2012-2016 Sebastien Jodogne <[email protected]>, University 
Hospital of Liege (Belgium), and 2017-2024 Osimis S.A. (Belgium), and 2021-2024 
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.1/CITATION.cff 
new/OrthancOHIF-1.3/CITATION.cff
--- old/OrthancOHIF-1.1/CITATION.cff    1970-01-01 01:00:00.000000000 +0100
+++ new/OrthancOHIF-1.3/CITATION.cff    2024-07-12 15:48:31.000000000 +0200
@@ -0,0 +1,14 @@
+cff-version: "1.1.0"
+message: "If you use this software, please cite it using these metadata."
+title: Orthanc
+abstract: "Orthanc is a lightweight open-source DICOM server for medical 
imaging supporting representational state transfer (REST)."
+authors:
+  -
+    affiliation: UCLouvain
+    family-names: Jodogne
+    given-names: "Sébastien"
+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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancOHIF-1.1/CMakeLists.txt 
new/OrthancOHIF-1.3/CMakeLists.txt
--- old/OrthancOHIF-1.1/CMakeLists.txt  2023-11-24 14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/CMakeLists.txt  2024-07-12 15:48:31.000000000 +0200
@@ -1,9 +1,9 @@
-# SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
+# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 
 # OHIF plugin for Orthanc
-# Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium
+# Copyright (C) 2023-2024 Sebastien Jodogne, 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,13 +22,13 @@
 cmake_minimum_required(VERSION 2.8)
 project(OrthancOHIF)
 
-set(ORTHANC_OHIF_VERSION "1.1")
+set(ORTHANC_OHIF_VERSION "1.3")
 
 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.1")
+  set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.12.2")
   set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
 endif()
 
@@ -108,7 +108,6 @@
 
 add_definitions(
   -DHAS_ORTHANC_EXCEPTION=1
-  -DORTHANC_ENABLE_LOGGING_PLUGIN=1
   -DORTHANC_FRAMEWORK_BUILDING_PLUGIN=1
   -DORTHANC_OHIF_VERSION="${ORTHANC_OHIF_VERSION}"
   -DMETADATA_VERSION=${METADATA_VERSION}
@@ -196,7 +195,7 @@
   VERSION ${ORTHANC_OHIF_VERSION} 
   SOVERSION ${ORTHANC_OHIF_VERSION})
 
-if (DEFINED DefineSourceBasenameForTarget)
+if (COMMAND DefineSourceBasenameForTarget)
   DefineSourceBasenameForTarget(OrthancOHIF)
 endif()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancOHIF-1.1/NEWS new/OrthancOHIF-1.3/NEWS
--- old/OrthancOHIF-1.1/NEWS    2023-11-24 14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/NEWS    2024-07-12 15:48:31.000000000 +0200
@@ -1,5 +1,16 @@
-Pending changes in the mainline
-===============================
+Version 1.3 (2024-07-12)
+========================
+
+* Updated OHIF to 3.8.3
+* Enabled support for segmentation and microscopy modes
+  Note that the microscopy mode is not stable yet in OHIF!
+
+
+Version 1.2 (2024-01-04)
+========================
+
+* Fixed wrong MIME type for app-config.js that prevents the OHIF
+  viewer from loading with Orthanc 1.12.2
 
 
 Version 1.1 (2023-11-24)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancOHIF-1.1/Resources/ClearMetadataCache.py 
new/OrthancOHIF-1.3/Resources/ClearMetadataCache.py
--- old/OrthancOHIF-1.1/Resources/ClearMetadataCache.py 1970-01-01 
01:00:00.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/ClearMetadataCache.py 2024-07-12 
15:48:31.000000000 +0200
@@ -0,0 +1,25 @@
+#!/usr/bin/env python3
+
+import argparse
+import requests
+
+parser = argparse.ArgumentParser(description = 'Clear the cache of the OHIF 
plugin (for "dicom-json" data source).')
+parser.add_argument('--url',
+                    default = 'http://localhost:8042',
+                    help = 'URL to the REST API of the Orthanc server')
+parser.add_argument('--username',
+                    default = 'orthanc',
+                    help = 'Username to the REST API')
+parser.add_argument('--password',
+                    default = 'orthanc',
+                    help = 'Password to the REST API')
+
+args = parser.parse_args()
+
+auth = requests.auth.HTTPBasicAuth(args.username, args.password)
+
+METADATA = '4202'
+
+for instance in requests.get('%s/instances' % args.url, auth=auth).json():
+    if METADATA in requests.get('%s/instances/%s/metadata' % (args.url, 
instance), auth=auth).json():
+        requests.delete('%s/instances/%s/metadata/%s' % (args.url, instance, 
METADATA), auth=auth)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancOHIF-1.1/Resources/CreateOHIFDist/Dockerfile 
new/OrthancOHIF-1.3/Resources/CreateOHIFDist/Dockerfile
--- old/OrthancOHIF-1.1/Resources/CreateOHIFDist/Dockerfile     2023-11-24 
14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/CreateOHIFDist/Dockerfile     2024-07-12 
15:48:31.000000000 +0200
@@ -1,8 +1,8 @@
-# SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
+# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 # OHIF plugin for Orthanc
-# Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium
+# Copyright (C) 2023-2024 Sebastien Jodogne, 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.1/Resources/CreateOHIFDist/build.sh 
new/OrthancOHIF-1.3/Resources/CreateOHIFDist/build.sh
--- old/OrthancOHIF-1.1/Resources/CreateOHIFDist/build.sh       2023-11-24 
14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/CreateOHIFDist/build.sh       2024-07-12 
15:48:31.000000000 +0200
@@ -1,10 +1,10 @@
 #!/bin/bash
 
-# SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
+# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 # OHIF plugin for Orthanc
-# Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium
+# Copyright (C) 2023-2024 Sebastien Jodogne, 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.1/Resources/CreateOHIFDist.sh 
new/OrthancOHIF-1.3/Resources/CreateOHIFDist.sh
--- old/OrthancOHIF-1.1/Resources/CreateOHIFDist.sh     2023-11-24 
14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/CreateOHIFDist.sh     2024-07-12 
15:48:31.000000000 +0200
@@ -1,10 +1,10 @@
 #!/bin/bash
 
-# SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
+# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 # OHIF plugin for Orthanc
-# Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium
+# Copyright (C) 2023-2024 Sebastien Jodogne, 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
@@ -28,7 +28,7 @@
 set -ex
 
 if [ "$1" = "" ]; then
-    PACKAGE=Viewers-3.7.0
+    PACKAGE=Viewers-3.8.3
 else
     PACKAGE=$1
 fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancOHIF-1.1/Resources/EmbedStaticAssets.py 
new/OrthancOHIF-1.3/Resources/EmbedStaticAssets.py
--- old/OrthancOHIF-1.1/Resources/EmbedStaticAssets.py  2023-11-24 
14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/EmbedStaticAssets.py  2024-07-12 
15:48:31.000000000 +0200
@@ -1,10 +1,10 @@
 #!/usr/bin/python3
 
-# SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
+# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 # OHIF plugin for Orthanc
-# Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium
+# Copyright (C) 2023-2024 Sebastien Jodogne, 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.1/Resources/Orthanc/CMake/AutoGeneratedCode.cmake 
new/OrthancOHIF-1.3/Resources/Orthanc/CMake/AutoGeneratedCode.cmake
--- old/OrthancOHIF-1.1/Resources/Orthanc/CMake/AutoGeneratedCode.cmake 
2023-11-24 14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/Orthanc/CMake/AutoGeneratedCode.cmake 
2024-07-12 15:48:31.000000000 +0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancOHIF-1.1/Resources/Orthanc/CMake/Compiler.cmake 
new/OrthancOHIF-1.3/Resources/Orthanc/CMake/Compiler.cmake
--- old/OrthancOHIF-1.1/Resources/Orthanc/CMake/Compiler.cmake  2023-11-24 
14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/Orthanc/CMake/Compiler.cmake  2024-07-12 
15:48:31.000000000 +0200
@@ -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()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancOHIF-1.1/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake 
new/OrthancOHIF-1.3/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake
--- old/OrthancOHIF-1.1/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake  
2023-11-24 14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake  
2024-07-12 15:48:31.000000000 +0200
@@ -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
@@ -153,11 +153,15 @@
       elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.11.2")
         set(ORTHANC_FRAMEWORK_MD5 "ede3de356493a8868545f8cb4b8bc8b5")
       elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.11.3")
-        set(ORTHANC_FRAMEWORK_MD5 "f941c0f5771db7616e7b7961026a60e2")
+        set(ORTHANC_FRAMEWORK_MD5 "e48fc0cb09c4856803791a1be28c07dc")
       elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.12.0")
         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()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancOHIF-1.1/Resources/Orthanc/CMake/DownloadPackage.cmake 
new/OrthancOHIF-1.3/Resources/Orthanc/CMake/DownloadPackage.cmake
--- old/OrthancOHIF-1.1/Resources/Orthanc/CMake/DownloadPackage.cmake   
2023-11-24 14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/Orthanc/CMake/DownloadPackage.cmake   
2024-07-12 15:48:31.000000000 +0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancOHIF-1.1/Resources/Orthanc/CMake/EmbedResources.py 
new/OrthancOHIF-1.3/Resources/Orthanc/CMake/EmbedResources.py
--- old/OrthancOHIF-1.1/Resources/Orthanc/CMake/EmbedResources.py       
2023-11-24 14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/Orthanc/CMake/EmbedResources.py       
2024-07-12 15:48:31.000000000 +0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancOHIF-1.1/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp 
new/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp
--- old/OrthancOHIF-1.1/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp   
2023-11-24 14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp   
2024-07-12 15:48:31.000000000 +0200
@@ -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
@@ -61,6 +61,7 @@
 namespace OrthancPlugins
 {
   static OrthancPluginContext* globalContext_ = NULL;
+  static std::string pluginName_;
 
 
   void SetGlobalContext(OrthancPluginContext* context)
@@ -79,9 +80,19 @@
     }
   }
 
+
+  void SetGlobalContext(OrthancPluginContext* context,
+                        const char* pluginName)
+  {
+    SetGlobalContext(context);
+    pluginName_ = pluginName;
+  }
+
+
   void ResetGlobalContext()
   {
     globalContext_ = NULL;
+    pluginName_.clear();
   }
 
   bool HasGlobalContext()
@@ -103,6 +114,66 @@
   }
 
 
+#if HAS_ORTHANC_PLUGIN_LOG_MESSAGE == 1
+  void LogMessage(OrthancPluginLogLevel level,
+                  const char* file,
+                  uint32_t line,
+                  const std::string& message)
+  {
+    if (HasGlobalContext())
+    {
+#if HAS_ORTHANC_PLUGIN_LOG_MESSAGE == 1
+      const char* pluginName = (pluginName_.empty() ? NULL : 
pluginName_.c_str());
+      OrthancPluginLogMessage(GetGlobalContext(), message.c_str(), pluginName, 
file, line, OrthancPluginLogCategory_Generic, level);
+#else
+      switch (level)
+      {
+        case OrthancPluginLogLevel_Error:
+          OrthancPluginLogError(GetGlobalContext(), message.c_str());
+          break;
+
+        case OrthancPluginLogLevel_Warning:
+          OrthancPluginLogWarning(GetGlobalContext(), message.c_str());
+          break;
+
+        case OrthancPluginLogLevel_Info:
+          OrthancPluginLogInfo(GetGlobalContext(), message.c_str());
+          break;
+
+        default:
+          ORTHANC_PLUGINS_THROW_EXCEPTION(ParameterOutOfRange);
+      }
+#endif
+    }
+  }
+#endif
+
+
+  void LogError(const std::string& message)
+  {
+    if (HasGlobalContext())
+    {
+      OrthancPluginLogError(GetGlobalContext(), message.c_str());
+    }
+  }
+
+  void LogWarning(const std::string& message)
+  {
+    if (HasGlobalContext())
+    {
+      OrthancPluginLogWarning(GetGlobalContext(), message.c_str());
+    }
+  }
+
+  void LogInfo(const std::string& message)
+  {
+    if (HasGlobalContext())
+    {
+      OrthancPluginLogInfo(GetGlobalContext(), message.c_str());
+    }
+  }
+
+
   void MemoryBuffer::Check(OrthancPluginErrorCode code)
   {
     if (code != OrthancPluginErrorCode_Success)
@@ -233,7 +304,7 @@
 
     if (!ReadJson(target, buffer_.data, buffer_.size))
     {
-      LogError("Cannot convert some memory buffer to JSON");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot convert some memory buffer to JSON");
       ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
     }
   }
@@ -265,7 +336,7 @@
     explicit PluginHttpHeaders(const std::map<std::string, std::string>& 
httpHeaders)
     {
       for (std::map<std::string, std::string>::const_iterator
-           it = httpHeaders.begin(); it != httpHeaders.end(); ++it)
+             it = httpHeaders.begin(); it != httpHeaders.end(); ++it)
       {
         headersKeys_.push_back(it->first.c_str());
         headersValues_.push_back(it->second.c_str());
@@ -404,7 +475,7 @@
     }
     else
     {
-      LogError("Cannot parse JSON: " + std::string(err));
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot parse JSON: " + std::string(err));
       return false;
     }
 #endif
@@ -565,13 +636,13 @@
   {
     if (str_ == NULL)
     {
-      LogError("Cannot convert an empty memory buffer to JSON");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot convert an empty memory buffer to 
JSON");
       ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
     }
 
     if (!ReadJson(target, str_))
     {
-      LogError("Cannot convert some memory buffer to JSON");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot convert some memory buffer to JSON");
       ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
     }
   }
@@ -581,13 +652,13 @@
   {
     if (str_ == NULL)
     {
-      LogError("Cannot convert an empty memory buffer to JSON");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot convert an empty memory buffer to 
JSON");
       ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
     }
 
     if (!ReadJsonWithoutComments(target, str_))
     {
-      LogError("Cannot convert some memory buffer to JSON");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot convert some memory buffer to JSON");
       ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
     }
   }
@@ -625,7 +696,7 @@
 
     if (body.size() > 0xffffffffu)
     {
-      LogError("Cannot handle body size > 4GB");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot handle body size > 4GB");
       ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
     }
 
@@ -645,7 +716,7 @@
 
     if (body.size() > 0xffffffffu)
     {
-      LogError("Cannot handle body size > 4GB");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot handle body size > 4GB");
       ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
     }
 
@@ -688,34 +759,6 @@
     }
   }
 
-
-  void LogError(const std::string& message)
-  {
-    if (HasGlobalContext())
-    {
-      OrthancPluginLogError(GetGlobalContext(), message.c_str());
-    }
-  }
-
-
-  void LogWarning(const std::string& message)
-  {
-    if (HasGlobalContext())
-    {
-      OrthancPluginLogWarning(GetGlobalContext(), message.c_str());
-    }
-  }
-
-
-  void LogInfo(const std::string& message)
-  {
-    if (HasGlobalContext())
-    {
-      OrthancPluginLogInfo(GetGlobalContext(), message.c_str());
-    }
-  }
-
-
   void OrthancConfiguration::LoadConfiguration()
   {
     OrthancString str;
@@ -723,7 +766,7 @@
 
     if (str.GetContent() == NULL)
     {
-      LogError("Cannot access the Orthanc configuration");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot access the Orthanc configuration");
       ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
     }
 
@@ -731,7 +774,7 @@
 
     if (configuration_.type() != Json::objectValue)
     {
-      LogError("Unable to read the Orthanc configuration");
+      ORTHANC_PLUGINS_LOG_ERROR("Unable to read the Orthanc configuration");
       ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
     }
   }
@@ -799,8 +842,8 @@
     {
       if (configuration_[key].type() != Json::objectValue)
       {
-        LogError("The configuration section \"" + target.path_ +
-                 "\" is not an associative array as expected");
+        ORTHANC_PLUGINS_LOG_ERROR("The configuration section \"" + 
target.path_ +
+                                  "\" is not an associative array as 
expected");
 
         ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
       }
@@ -822,8 +865,8 @@
 
     if (configuration_[key].type() != Json::stringValue)
     {
-      LogError("The configuration option \"" + GetPath(key) +
-               "\" is not a string as expected");
+      ORTHANC_PLUGINS_LOG_ERROR("The configuration option \"" + GetPath(key) +
+                                "\" is not a string as expected");
 
       ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
     }
@@ -854,8 +897,8 @@
         return true;
 
       default:
-        LogError("The configuration option \"" + GetPath(key) +
-                 "\" is not an integer as expected");
+        ORTHANC_PLUGINS_LOG_ERROR("The configuration option \"" + GetPath(key) 
+
+                                  "\" is not an integer as expected");
 
         ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
     }
@@ -873,8 +916,8 @@
 
     if (tmp < 0)
     {
-      LogError("The configuration option \"" + GetPath(key) +
-               "\" is not a positive integer as expected");
+      ORTHANC_PLUGINS_LOG_ERROR("The configuration option \"" + GetPath(key) +
+                                "\" is not a positive integer as expected");
 
       ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
     }
@@ -898,8 +941,8 @@
 
     if (configuration_[key].type() != Json::booleanValue)
     {
-      LogError("The configuration option \"" + GetPath(key) +
-               "\" is not a Boolean as expected");
+      ORTHANC_PLUGINS_LOG_ERROR("The configuration option \"" + GetPath(key) +
+                                "\" is not a Boolean as expected");
 
       ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
     }
@@ -934,8 +977,8 @@
         return true;
 
       default:
-        LogError("The configuration option \"" + GetPath(key) +
-                 "\" is not an integer as expected");
+        ORTHANC_PLUGINS_LOG_ERROR("The configuration option \"" + GetPath(key) 
+
+                                  "\" is not an integer as expected");
 
         ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
     }
@@ -994,8 +1037,8 @@
         break;
     }
 
-    LogError("The configuration option \"" + GetPath(key) +
-             "\" is not a list of strings as expected");
+    ORTHANC_PLUGINS_LOG_ERROR("The configuration option \"" + GetPath(key) +
+                              "\" is not a list of strings as expected");
 
     ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
   }
@@ -1115,8 +1158,8 @@
 
     if (configuration_[key].type() != Json::objectValue)
     {
-      LogError("The configuration option \"" + GetPath(key) +
-               "\" is not an object as expected");
+      ORTHANC_PLUGINS_LOG_ERROR("The configuration option \"" + GetPath(key) +
+                                "\" is not an object as expected");
 
       ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
     }
@@ -1133,8 +1176,8 @@
       }
       else
       {
-        LogError("The configuration option \"" + GetPath(key) +
-                 "\" is not a dictionary mapping strings to strings");
+        ORTHANC_PLUGINS_LOG_ERROR("The configuration option \"" + GetPath(key) 
+
+                                  "\" is not a dictionary mapping strings to 
strings");
 
         ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
       }
@@ -1156,7 +1199,7 @@
   {
     if (image_ == NULL)
     {
-      LogError("Trying to access a NULL image");
+      ORTHANC_PLUGINS_LOG_ERROR("Trying to access a NULL image");
       ORTHANC_PLUGINS_THROW_EXCEPTION(ParameterOutOfRange);
     }
   }
@@ -1182,7 +1225,7 @@
 
     if (image_ == NULL)
     {
-      LogError("Cannot create an image");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot create an image");
       ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
     }
   }
@@ -1199,7 +1242,7 @@
 
     if (image_ == NULL)
     {
-      LogError("Cannot create an image accessor");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot create an image accessor");
       ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
     }
   }
@@ -1213,7 +1256,7 @@
 
     if (image_ == NULL)
     {
-      LogError("Cannot uncompress a PNG image");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot uncompress a PNG image");
       ORTHANC_PLUGINS_THROW_EXCEPTION(ParameterOutOfRange);
     }
   }
@@ -1226,7 +1269,7 @@
     image_ = OrthancPluginUncompressImage(GetGlobalContext(), data, size, 
OrthancPluginImageFormat_Jpeg);
     if (image_ == NULL)
     {
-      LogError("Cannot uncompress a JPEG image");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot uncompress a JPEG image");
       ORTHANC_PLUGINS_THROW_EXCEPTION(ParameterOutOfRange);
     }
   }
@@ -1240,7 +1283,7 @@
     image_ = OrthancPluginDecodeDicomImage(GetGlobalContext(), data, size, 
frame);
     if (image_ == NULL)
     {
-      LogError("Cannot uncompress a DICOM image");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot uncompress a DICOM image");
       ORTHANC_PLUGINS_THROW_EXCEPTION(ParameterOutOfRange);
     }
   }
@@ -1654,13 +1697,13 @@
                                    unsigned int minor,
                                    unsigned int revision)
   {
-    LogError("Your version of the Orthanc core (" +
-             std::string(GetGlobalContext()->orthancVersion) +
-             ") is too old to run this plugin (version " +
-             boost::lexical_cast<std::string>(major) + "." +
-             boost::lexical_cast<std::string>(minor) + "." +
-             boost::lexical_cast<std::string>(revision) +
-             " is required)");
+    ORTHANC_PLUGINS_LOG_ERROR("Your version of the Orthanc core (" +
+                              std::string(GetGlobalContext()->orthancVersion) +
+                              ") is too old to run this plugin (version " +
+                              boost::lexical_cast<std::string>(major) + "." +
+                              boost::lexical_cast<std::string>(minor) + "." +
+                              boost::lexical_cast<std::string>(revision) +
+                              " is required)");
   }
 
   bool CheckMinimalVersion(const char* version,
@@ -1684,9 +1727,9 @@
     int aa, bb, cc = 0;
     if ((ORTHANC_SCANF(version, "%4d.%4d.%4d", &aa, &bb, &cc) != 3 &&
          ORTHANC_SCANF(version, "%4d.%4d", &aa, &bb) != 2) ||
-      aa < 0 ||
-      bb < 0 ||
-      cc < 0)
+        aa < 0 ||
+        bb < 0 ||
+        cc < 0)
     {
       return false;
     }
@@ -1740,7 +1783,7 @@
   {
     if (!HasGlobalContext())
     {
-      LogError("Bad Orthanc context in the plugin");
+      ORTHANC_PLUGINS_LOG_ERROR("Bad Orthanc context in the plugin");
       return false;
     }
 
@@ -1777,7 +1820,7 @@
     }
     else
     {
-      LogError("Inexistent peer: " + name);
+      ORTHANC_PLUGINS_LOG_ERROR("Inexistent peer: " + name);
       ORTHANC_PLUGINS_THROW_EXCEPTION(UnknownResource);
     }
   }
@@ -2061,7 +2104,7 @@
 
     if (body.size() > 0xffffffffu)
     {
-      LogError("Cannot handle body size > 4GB");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot handle body size > 4GB");
       ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
     }
 
@@ -2098,7 +2141,7 @@
 
     if (body.size() > 0xffffffffu)
     {
-      LogError("Cannot handle body size > 4GB");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot handle body size > 4GB");
       ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
     }
 
@@ -2464,7 +2507,7 @@
 
     if (id == NULL)
     {
-      LogError("Plugin cannot submit job");
+      ORTHANC_PLUGINS_LOG_ERROR("Plugin cannot submit job");
       OrthancPluginFreeJob(GetGlobalContext(), orthanc);
       ORTHANC_PLUGINS_THROW_PLUGIN_ERROR_CODE(OrthancPluginErrorCode_Plugin);
     }
@@ -2533,7 +2576,7 @@
           throw 
Orthanc::OrthancException(static_cast<Orthanc::ErrorCode>(status["ErrorCode"].asInt()),
                                           
status["ErrorDescription"].asString());
 #else
-          LogError("Exception while executing the job: " + 
status["ErrorDescription"].asString());
+          ORTHANC_PLUGINS_LOG_ERROR("Exception while executing the job: " + 
status["ErrorDescription"].asString());
           
ORTHANC_PLUGINS_THROW_PLUGIN_ERROR_CODE(status["ErrorCode"].asInt());          
 #endif
         }
@@ -2558,7 +2601,7 @@
       throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat,
                                       "Expected a JSON object in the body");
 #else
-      LogError("Expected a JSON object in the body");
+      ORTHANC_PLUGINS_LOG_ERROR("Expected a JSON object in the body");
       ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
 #endif
     }
@@ -2574,7 +2617,7 @@
                                         "Option \"" + 
std::string(KEY_SYNCHRONOUS) +
                                         "\" must be Boolean");
 #else
-        LogError("Option \"" + std::string(KEY_SYNCHRONOUS) + "\" must be 
Boolean");
+        ORTHANC_PLUGINS_LOG_ERROR("Option \"" + std::string(KEY_SYNCHRONOUS) + 
"\" must be Boolean");
         ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
 #endif
       }
@@ -2593,7 +2636,7 @@
                                         "Option \"" + 
std::string(KEY_ASYNCHRONOUS) +
                                         "\" must be Boolean");
 #else
-        LogError("Option \"" + std::string(KEY_ASYNCHRONOUS) + "\" must be 
Boolean");
+        ORTHANC_PLUGINS_LOG_ERROR("Option \"" + std::string(KEY_ASYNCHRONOUS) 
+ "\" must be Boolean");
         ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
 #endif
       }
@@ -2614,7 +2657,7 @@
                                         "Option \"" + 
std::string(KEY_PRIORITY) +
                                         "\" must be an integer");
 #else
-        LogError("Option \"" + std::string(KEY_PRIORITY) + "\" must be an 
integer");
+        ORTHANC_PLUGINS_LOG_ERROR("Option \"" + std::string(KEY_PRIORITY) + 
"\" must be an integer");
         ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
 #endif
       }
@@ -3135,7 +3178,7 @@
 
     if (body.size() > 0xffffffffu)
     {
-      LogError("Cannot handle body size > 4GB");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot handle body size > 4GB");
       ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
     }
 
@@ -3280,7 +3323,7 @@
     
     if (!ReadJson(answerBody, body))
     {
-      LogError("Cannot convert HTTP answer body to JSON");
+      ORTHANC_PLUGINS_LOG_ERROR("Cannot convert HTTP answer body to JSON");
       ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat);
     }
   }
@@ -4026,4 +4069,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, &params);
+  }
+#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
+  }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancOHIF-1.1/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h 
new/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h
--- old/OrthancOHIF-1.1/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h     
2023-11-24 14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h     
2024-07-12 15:48:31.000000000 +0200
@@ -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
@@ -127,6 +127,44 @@
 #  define HAS_ORTHANC_PLUGIN_WEBDAV  0
 #endif
 
+#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 4)
+#  define HAS_ORTHANC_PLUGIN_LOG_MESSAGE  1
+#else
+#  define HAS_ORTHANC_PLUGIN_LOG_MESSAGE  0
+#endif
+
+
+// Macro to tag a function as having been deprecated
+#if (__cplusplus >= 201402L)  // C++14
+#  define ORTHANC_PLUGIN_CPP_WRAPPER_DEPRECATED(f) [[deprecated]] f
+#elif defined(__GNUC__) || defined(__clang__)
+#  define ORTHANC_PLUGIN_CPP_WRAPPER_DEPRECATED(f) f 
__attribute__((deprecated))
+#elif defined(_MSC_VER)
+#  define ORTHANC_PLUGIN_CPP_WRAPPER_DEPRECATED(f) __declspec(deprecated) f
+#else
+#  define ORTHANC_PLUGIN_CPP_WRAPPER_DEPRECATED
+#endif
+
+
+#if !defined(__ORTHANC_FILE__)
+#  if defined(_MSC_VER)
+#    pragma message("Warning: Macro __ORTHANC_FILE__ is not defined, this will 
leak the full path of the source files in the binaries")
+#  else
+#    warning Warning: Macro __ORTHANC_FILE__ is not defined, this will leak 
the full path of the source files in the binaries
+#  endif
+#  define __ORTHANC_FILE__ __FILE__
+#endif
+
+
+#if HAS_ORTHANC_PLUGIN_LOG_MESSAGE == 1
+#  define ORTHANC_PLUGINS_LOG_ERROR(msg)   
::OrthancPlugins::LogMessage(OrthancPluginLogLevel_Error, __ORTHANC_FILE__, 
__LINE__, msg)
+#  define ORTHANC_PLUGINS_LOG_WARNING(msg) 
::OrthancPlugins::LogMessage(OrthancPluginLogLevel_Warning, __ORTHANC_FILE__, 
__LINE__, msg)
+#  define ORTHANC_PLUGINS_LOG_INFO(msg)    
::OrthancPlugins::LogMessage(OrthancPluginLogLevel_Info, __ORTHANC_FILE__, 
__LINE__, msg)
+#else
+#  define ORTHANC_PLUGINS_LOG_ERROR(msg)   ::OrthancPlugins::LogError(msg)
+#  define ORTHANC_PLUGINS_LOG_WARNING(msg) ::OrthancPlugins::LogWarning(msg)
+#  define ORTHANC_PLUGINS_LOG_INFO(msg)    ::OrthancPlugins::LogInfo(msg)
+#endif
 
 
 namespace OrthancPlugins
@@ -137,6 +175,9 @@
 
   void SetGlobalContext(OrthancPluginContext* context);
 
+  void SetGlobalContext(OrthancPluginContext* context,
+                        const char* pluginName);
+
   void ResetGlobalContext();
 
   bool HasGlobalContext();
@@ -637,11 +678,33 @@
   const char* AutodetectMimeType(const std::string& path);
 #endif
 
+#if HAS_ORTHANC_PLUGIN_LOG_MESSAGE == 1
+  void LogMessage(OrthancPluginLogLevel level,
+                  const char* file,
+                  uint32_t line,
+                  const std::string& message);
+#endif
+
+#if HAS_ORTHANC_PLUGIN_LOG_MESSAGE == 1
+  // Use macro ORTHANC_PLUGINS_LOG_ERROR() instead
+  ORTHANC_PLUGIN_CPP_WRAPPER_DEPRECATED(void LogError(const std::string& 
message));
+#else
   void LogError(const std::string& message);
+#endif
 
+#if HAS_ORTHANC_PLUGIN_LOG_MESSAGE == 1
+  // Use macro ORTHANC_PLUGINS_LOG_WARNING() instead
+  ORTHANC_PLUGIN_CPP_WRAPPER_DEPRECATED(void LogWarning(const std::string& 
message));
+#else
   void LogWarning(const std::string& message);
+#endif
 
+#if HAS_ORTHANC_PLUGIN_LOG_MESSAGE == 1
+  // Use macro ORTHANC_PLUGINS_LOG_INFO() instead
+  ORTHANC_PLUGIN_CPP_WRAPPER_DEPRECATED(void LogInfo(const std::string& 
message));
+#else
   void LogInfo(const std::string& message);
+#endif
 
   void ReportMinimalOrthancVersion(unsigned int major,
                                    unsigned int minor,
@@ -1435,4 +1498,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);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancOHIF-1.1/Resources/Orthanc/Plugins/OrthancPluginException.h 
new/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginException.h
--- old/OrthancOHIF-1.1/Resources/Orthanc/Plugins/OrthancPluginException.h      
2023-11-24 14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginException.h      
2024-07-12 15:48:31.000000000 +0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancOHIF-1.1/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake 
new/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake
--- old/OrthancOHIF-1.1/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake   
2023-11-24 14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake   
2024-07-12 15:48:31.000000000 +0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancOHIF-1.1/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake
 
new/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake
--- 
old/OrthancOHIF-1.1/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake
   2023-11-24 14:19:16.000000000 +0100
+++ 
new/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake
   2024-07-12 15:48:31.000000000 +0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancOHIF-1.1/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake 
new/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake
--- 
old/OrthancOHIF-1.1/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake    
    2023-11-24 14:19:16.000000000 +0100
+++ 
new/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake    
    2024-07-12 15:48:31.000000000 +0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancOHIF-1.1/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake 
new/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake
--- 
old/OrthancOHIF-1.1/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake    
    2023-11-24 14:19:16.000000000 +0100
+++ 
new/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake    
    2024-07-12 15:48:31.000000000 +0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancOHIF-1.1/Resources/Orthanc/Toolchains/MinGWToolchain.cmake 
new/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/MinGWToolchain.cmake
--- old/OrthancOHIF-1.1/Resources/Orthanc/Toolchains/MinGWToolchain.cmake       
2023-11-24 14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/Orthanc/Toolchains/MinGWToolchain.cmake       
2024-07-12 15:48:31.000000000 +0200
@@ -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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancOHIF-1.1/Resources/SyncOrthancFolder.py 
new/OrthancOHIF-1.3/Resources/SyncOrthancFolder.py
--- old/OrthancOHIF-1.1/Resources/SyncOrthancFolder.py  2023-11-24 
14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Resources/SyncOrthancFolder.py  2024-07-12 
15:48:31.000000000 +0200
@@ -1,10 +1,10 @@
 #!/usr/bin/python3
 
-# SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
+# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 # OHIF plugin for Orthanc
-# Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium
+# Copyright (C) 2023-2024 Sebastien Jodogne, 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.1/Sources/OrthancExplorer.js 
new/OrthancOHIF-1.3/Sources/OrthancExplorer.js
--- old/OrthancOHIF-1.1/Sources/OrthancExplorer.js      2023-11-24 
14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Sources/OrthancExplorer.js      2024-07-12 
15:48:31.000000000 +0200
@@ -1,11 +1,11 @@
 /**
- * SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
+ * SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
 /**
  * OHIF plugin for Orthanc
- * Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium
+ * Copyright (C) 2023-2024 Sebastien Jodogne, 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
@@ -90,6 +90,22 @@
           }
         });
 
+        AddOhifViewer(viewers, 'Segmentation', function() {
+          if (${USE_DICOM_WEB}) {
+            window.open('../ohif/segmentation?StudyInstanceUIDs=' + 
studyInstanceUid);
+          } else  {
+            window.open('../ohif/segmentation?url=../studies/' + studyId + 
'/ohif-dicom-json');
+          }
+        });
+
+        AddOhifViewer(viewers, 'Microscopy', function() {
+          if (${USE_DICOM_WEB}) {
+            window.open('../ohif/microscopy?StudyInstanceUIDs=' + 
studyInstanceUid);
+          } else  {
+            window.open('../ohif/microscopy?url=../studies/' + studyId + 
'/ohif-dicom-json');
+          }
+        });
+
         // Launch the dialog
         $('#dialog').simpledialog2({
           mode: 'blank',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancOHIF-1.1/Sources/Plugin.cpp 
new/OrthancOHIF-1.3/Sources/Plugin.cpp
--- old/OrthancOHIF-1.1/Sources/Plugin.cpp      2023-11-24 14:19:16.000000000 
+0100
+++ new/OrthancOHIF-1.3/Sources/Plugin.cpp      2024-07-12 15:48:31.000000000 
+0200
@@ -1,11 +1,11 @@
 /**
- * SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
+ * SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
 /**
  * OHIF plugin for Orthanc
- * Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium
+ * Copyright (C) 2023-2024 Sebastien Jodogne, 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
@@ -38,6 +38,8 @@
 #include <boost/thread.hpp>
 #include <boost/thread/shared_mutex.hpp>
 
+#define ORTHANC_PLUGIN_NAME  "ohif"
+
 
 static const std::string  METADATA_OHIF = "4202";
 static const char* const  KEY_VERSION = "Version";
@@ -112,6 +114,12 @@
    * Those are the tags that are found in the documentation of the
    * "DICOM JSON" data source:
    * https://docs.ohif.org/configuration/dataSources/dicom-json
+   *
+   * Official list of tags:
+   * 
https://github.com/OHIF/Viewers/blob/master/platform/docs/docs/faq.md#what-are-the-list-of-required-metadata-for-the-ohif-viewer-to-work
+   *
+   * Official example:
+   * https://ohif-dicom-json-example.s3.amazonaws.com/LIDC-IDRI-0001.json
    **/
   ohifStudyTags_[Orthanc::DICOM_TAG_STUDY_INSTANCE_UID] = 
TagInformation(DataType_String, "StudyInstanceUID");
   ohifStudyTags_[Orthanc::DICOM_TAG_STUDY_DATE]         = 
TagInformation(DataType_String, "StudyDate");
@@ -169,6 +177,14 @@
   ohifInstanceTags_[Orthanc::DicomTag(0x0054, 0x1300)]        = 
TagInformation(DataType_Float, "FrameReferenceTime");
   ohifInstanceTags_[RADIOPHARMACEUTICAL_INFORMATION_SEQUENCE] = 
TagInformation(DataType_None, "RadiopharmaceuticalInformationSequence");
 
+  /**
+   * Added in version 1.3
+   **/
+  ohifInstanceTags_[Orthanc::DICOM_TAG_RESCALE_INTERCEPT] = 
TagInformation(DataType_Float, "RescaleIntercept");
+  ohifInstanceTags_[Orthanc::DICOM_TAG_RESCALE_SLOPE]     = 
TagInformation(DataType_Float, "RescaleSlope");
+  ohifInstanceTags_[Orthanc::DICOM_TAG_NUMBER_OF_FRAMES]  = 
TagInformation(DataType_Integer, "NumberOfFrames");
+
+
   // UNTESTED
   ohifInstanceTags_[Orthanc::DicomTag(0x7053, 0x1000)] = 
TagInformation(DataType_Float, "70531000");  // Philips SUVScaleFactor
   ohifInstanceTags_[Orthanc::DicomTag(0x7053, 0x1009)] = 
TagInformation(DataType_Float, "70531009");  // Philips 
ActivityConcentrationScaleFactor
@@ -249,6 +265,7 @@
 
     std::unique_ptr<std::string> item(new std::string);
     ReadStaticAsset(*item, path);
+
     OrthancPluginAnswerBuffer(context, output, item->c_str(), item->size(), 
mime.c_str());
 
     {
@@ -301,22 +318,42 @@
 
           case DataType_Integer:
           {
-            int32_t v;
-            if (Orthanc::SerializationToolbox::ParseInteger32(v, 
value.asString()))
+            std::vector<std::string> tokens;
+            Orthanc::Toolbox::TokenizeString(tokens, value.asString(), '\\');
+
+            if (!tokens.empty())
             {
-              target[name] = v;
+              int32_t v;
+              if (Orthanc::SerializationToolbox::ParseInteger32(v, tokens[0]))
+              {
+                target[name] = v;
+              }
+              return true;
+            }
+            else
+            {
+              return false;
             }
-            return true;
           }
 
           case DataType_Float:
           {
-            float v;
-            if (Orthanc::SerializationToolbox::ParseFloat(v, value.asString()))
+            std::vector<std::string> tokens;
+            Orthanc::Toolbox::TokenizeString(tokens, value.asString(), '\\');
+
+            if (!tokens.empty())
             {
-              target[name] = v;
+              float v;
+              if (Orthanc::SerializationToolbox::ParseFloat(v, tokens[0]))
+              {
+                target[name] = v;
+              }
+              return true;
+            }
+            else
+            {
+              return false;
             }
-            return true;
           }
 
           case DataType_ListOfStrings:
@@ -448,6 +485,10 @@
 static bool GetOhifInstance(Json::Value& target,
                             const std::string& instanceId)
 {
+#if 0
+  // This disables all the caching (for debugging)
+  return EncodeOhifInstance(target, instanceId);
+#else
   const std::string uri = GetCacheUri(instanceId);
   
   std::string metadata;
@@ -489,6 +530,7 @@
   {
     return false;
   }
+#endif
 }
 
 
@@ -531,11 +573,14 @@
     system = Orthanc::Toolbox::SubstituteVariables(system, dictionary);
 
     std::string s = (userConfiguration_ + "\n" + system);
-    OrthancPluginAnswerBuffer(context, output, s.c_str(), s.size(), 
"application/json");
+    OrthancPluginAnswerBuffer(context, output, s.c_str(), s.size(), 
"text/javascript");
   }
-  else if (uri == "" ||      // Study list
-           uri == "tmtv" ||  // Total metabolic tumor volume
-           uri == "viewer")  // Default viewer (including MPR)
+  else if (uri == "" ||             // Study list
+           uri == "tmtv" ||         // Total metabolic tumor volume
+           uri == "viewer" ||       // Default viewer (including MPR)
+           uri == "segmentation" || // Segmentation mode
+           uri == "microscopy"      // Microscopy mode
+           )  
   {
     // Those correspond to the different modes of the OHIF platform:
     // https://v3-docs.ohif.org/platform/modes/
@@ -648,6 +693,9 @@
 
       study["series"] = Json::arrayValue;
 
+      std::set<std::string> modalities;
+      unsigned int countInstances = 0;
+
       for (MapOfResources::const_iterator it3 = seriesInStudy.begin(); it3 != 
seriesInStudy.end(); ++it3)
       {
         if (!it3->second.empty())
@@ -655,6 +703,11 @@
           assert(it3->second.front() != NULL);
           const Json::Value& firstInstanceInSeries = *it3->second.front();
 
+          if 
(firstInstanceInSeries.isMember(Orthanc::DICOM_TAG_MODALITY.Format()))
+          {
+            
modalities.insert(firstInstanceInSeries[Orthanc::DICOM_TAG_MODALITY.Format()].asString());
+          }
+
           Json::Value series = Json::objectValue;
           for (TagsDictionary::const_iterator tag = ohifSeriesTags_.begin(); 
tag != ohifSeriesTags_.end(); ++tag)
           {
@@ -690,12 +743,26 @@
             instance["url"] = "dicomweb:../instances/" + hasher.HashInstance() 
+ "/file";
 
             series["instances"].append(instance);
+            countInstances++;
           }
 
           study["series"].append(series);
         }
       }
 
+      std::string jsonModalities;
+      for (std::set<std::string>::const_iterator it = modalities.begin(); it 
!= modalities.end(); ++it)
+      {
+        if (!jsonModalities.empty())
+        {
+          jsonModalities += ",";
+        }
+        jsonModalities += *it;
+      }
+
+      study["NumInstances"] = countInstances;
+      study["Modalities"] = jsonModalities;
+
       target["studies"].append(study);
     }
   }  
@@ -785,11 +852,11 @@
             if (preload_)
             {
               metadataThread_ = boost::thread(MetadataThread);
-              LOG(INFO) << "Started the OHIF preload thread";
+              ORTHANC_PLUGINS_LOG_INFO("Started the OHIF preload thread");
             }
             else
             {
-              LOG(INFO) << "The OHIF preload thread was not started, as 
indicated in the configuration file";
+              ORTHANC_PLUGINS_LOG_INFO("The OHIF preload thread was not 
started, as indicated in the configuration file");
             }
             break;
           }
@@ -807,7 +874,7 @@
 
         if (metadataThread_.joinable())
         {
-          LOG(INFO) << "Stopping the OHIF preload thread";
+          ORTHANC_PLUGINS_LOG_INFO("Stopping the OHIF preload thread");
           metadataThread_.join();
         }
         break;
@@ -830,7 +897,7 @@
   }
   catch (Orthanc::OrthancException& e)
   {
-    LOG(ERROR) << "Exception: " << e.What();
+    ORTHANC_PLUGINS_LOG_ERROR("Exception: " + std::string(e.What()));
     return static_cast<OrthancPluginErrorCode>(e.GetErrorCode());
   }
 
@@ -842,7 +909,15 @@
 {
   ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* 
context)
   {
-    OrthancPlugins::SetGlobalContext(context);
+    OrthancPlugins::SetGlobalContext(context, ORTHANC_PLUGIN_NAME);
+
+#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 4)
+    Orthanc::Logging::InitializePluginContext(context, ORTHANC_PLUGIN_NAME);
+#elif ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 7, 2)
+    Orthanc::Logging::InitializePluginContext(context);
+#else
+    Orthanc::Logging::Initialize(context);
+#endif
 
     /* Check the version of the Orthanc core */
     if (OrthancPluginCheckVersion(context) == 0)
@@ -857,12 +932,6 @@
       return -1;
     }
 
-#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 7, 2)
-    Orthanc::Logging::InitializePluginContext(context);
-#else
-    Orthanc::Logging::Initialize(context);
-#endif
-
     try
     {
       InitializeOhifTags();
@@ -910,7 +979,7 @@
         routerBasename_ += "/";
       }
 
-      OrthancPluginSetDescription(context, "OHIF plugin for Orthanc.");
+      OrthancPlugins::SetDescription(ORTHANC_PLUGIN_NAME, "OHIF plugin for 
Orthanc.");
 
       OrthancPlugins::RegisterRestCallback<ServeFile>("/ohif", true);
       OrthancPlugins::RegisterRestCallback<ServeFile>("/ohif/(.*)", true);
@@ -927,7 +996,7 @@
         dictionary["USE_DICOM_WEB"] = (dataSource_ == DataSource_DicomWeb ? 
"true" : "false");
         explorer = Orthanc::Toolbox::SubstituteVariables(explorer, dictionary);
       
-        OrthancPluginExtendOrthancExplorer(context, explorer.c_str());
+        OrthancPlugins::ExtendOrthancExplorer(ORTHANC_PLUGIN_NAME, explorer);
       }
     }
     catch (Orthanc::OrthancException& e)
@@ -946,7 +1015,7 @@
 
   ORTHANC_PLUGINS_API const char* OrthancPluginGetName()
   {
-    return "ohif";
+    return ORTHANC_PLUGIN_NAME;
   }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancOHIF-1.1/Sources/app-config-system.js 
new/OrthancOHIF-1.3/Sources/app-config-system.js
--- old/OrthancOHIF-1.1/Sources/app-config-system.js    2023-11-24 
14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Sources/app-config-system.js    2024-07-12 
15:48:31.000000000 +0200
@@ -1,6 +1,6 @@
 /**
- * SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium,
- * and 2018-2023 Open Health Imaging Foundation
+ * SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium,
+ * and 2018-2024 Open Health Imaging Foundation
  * SPDX-License-Identifier: MIT
  */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancOHIF-1.1/Sources/app-config-user.js 
new/OrthancOHIF-1.3/Sources/app-config-user.js
--- old/OrthancOHIF-1.1/Sources/app-config-user.js      2023-11-24 
14:19:16.000000000 +0100
+++ new/OrthancOHIF-1.3/Sources/app-config-user.js      2024-07-12 
15:48:31.000000000 +0200
@@ -1,6 +1,6 @@
 /**
- * SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium,
- * and 2018-2023 Open Health Imaging Foundation
+ * SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium,
+ * and 2018-2024 Open Health Imaging Foundation
  * SPDX-License-Identifier: MIT
  */
 
@@ -31,7 +31,11 @@
   // filterQueryParam: false,
   httpErrorHandler: error => {
     // This is 429 when rejected from the public idc sandbox too often.
-    console.warn(error.status);
+    if (error.status) {
+      console.warn(error.status);
+    } else {
+      console.warn(error);
+    }
   },
   hotkeys: [
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancOHIF-1.1/TODO new/OrthancOHIF-1.3/TODO
--- old/OrthancOHIF-1.1/TODO    1970-01-01 01:00:00.000000000 +0100
+++ new/OrthancOHIF-1.3/TODO    2024-07-12 15:48:31.000000000 +0200
@@ -0,0 +1 @@
+- 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

Reply via email to