changeset 54:e94ccad8b2a3

updated OHIF to 3.9.1
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 26 Nov 2024 17:13:24 +0100 (7 months ago)
parents 0032e89777a9
children 9935c4bdbc69
files NEWS Resources/CreateOHIFDist.sh Sources/Plugin.cpp
diffstat 3 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Wed Nov 06 10:08:37 2024 +0100
+++ b/NEWS	Tue Nov 26 17:13:24 2024 +0100
@@ -1,7 +1,7 @@
 Pending changes in the mainline
 ===============================
 
-* Updated OHIF to 3.8.5
+* 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.
--- a/Resources/CreateOHIFDist.sh	Wed Nov 06 10:08:37 2024 +0100
+++ b/Resources/CreateOHIFDist.sh	Tue Nov 26 17:13:24 2024 +0100
@@ -28,7 +28,7 @@
 set -ex
 
 if [ "$1" = "" ]; then
-    PACKAGE=Viewers-3.8.5
+    PACKAGE=Viewers-3.9.1
 else
     PACKAGE=$1
 fi
--- a/Sources/Plugin.cpp	Wed Nov 06 10:08:37 2024 +0100
+++ b/Sources/Plugin.cpp	Tue Nov 26 17:13:24 2024 +0100
@@ -948,11 +948,14 @@
       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 "
-                                        "\"dicom-web\" or \"dicom-json\", but found: " + s);
+                                        "\"" + SOURCE_DICOM_WEB +"\" or \"" + SOURCE_DICOM_JSON + "\", but found: " + s);
       }
 
       if (userConfigurationPath.empty())