# HG changeset patch # User Sebastien Jodogne # Date 1590474006 -7200 # Node ID 61a4b7fa86dcf0ade6a4a06ae9288207256b738d # Parent 40a433acf26a2c14c32f330371f92e3958cfc7e2# Parent 1d761296eb8de0fa75529e442ca66edf5a3e09a3 making "transcoding" branch the new mainline diff -r 40a433acf26a -r 61a4b7fa86dc CMakeLists.txt --- a/CMakeLists.txt Mon May 25 12:52:17 2020 +0200 +++ b/CMakeLists.txt Tue May 26 08:20:06 2020 +0200 @@ -24,11 +24,10 @@ set(ORTHANC_PLUGIN_VERSION "mainline") if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline") - # TODO - Switch to "mainline" after "transcoding" is made the new "default" - set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.6.1") + set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") else() - set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.6.1") + set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.7.0") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") endif() @@ -43,7 +42,6 @@ set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"") # Advanced parameters to fine-tune linking against system libraries -set(USE_SYSTEM_GDCM ON CACHE BOOL "Use the system version of Grassroot DICOM (GDCM)") set(USE_SYSTEM_ORTHANC_SDK ON CACHE BOOL "Use the system version of the Orthanc plugin SDK") @@ -61,7 +59,6 @@ include_directories(${ORTHANC_ROOT}) -include(${CMAKE_SOURCE_DIR}/Resources/CMake/GdcmConfiguration.cmake) include(${CMAKE_SOURCE_DIR}/Resources/CMake/JavaScriptLibraries.cmake) @@ -123,11 +120,6 @@ list(APPEND AUTOGENERATED_SOURCES ${AUTOGENERATED_DIR}/Version.rc) endif() -if (APPLE) - SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework CoreFoundation") - SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -framework CoreFoundation") -endif() - set(CORE_SOURCES ${CMAKE_SOURCE_DIR}/Plugin/Cache/CacheManager.cpp @@ -141,25 +133,14 @@ add_library(OrthancWebViewer SHARED + ${AUTOGENERATED_SOURCES} + ${CMAKE_SOURCE_DIR}/Plugin/DecodedImageAdapter.cpp + ${CMAKE_SOURCE_DIR}/Plugin/Plugin.cpp ${CORE_SOURCES} - ${AUTOGENERATED_SOURCES} - ${CMAKE_SOURCE_DIR}/Plugin/Plugin.cpp ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp - - # The following files depend on GDCM - ${CMAKE_SOURCE_DIR}/Plugin/DecodedImageAdapter.cpp - ${ORTHANC_ROOT}/Plugins/Samples/GdcmDecoder/GdcmImageDecoder.cpp - ${ORTHANC_ROOT}/Plugins/Samples/GdcmDecoder/GdcmDecoderCache.cpp - ${ORTHANC_ROOT}/Plugins/Samples/GdcmDecoder/OrthancImageWrapper.cpp ) -if (STATIC_BUILD OR NOT USE_SYSTEM_GDCM) - add_dependencies(OrthancWebViewer GDCM) -endif() - -target_link_libraries(OrthancWebViewer ${GDCM_LIBRARIES}) - message("Setting the version of the library to ${ORTHANC_PLUGIN_VERSION}") add_definitions(-DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}") diff -r 40a433acf26a -r 61a4b7fa86dc NEWS --- a/NEWS Mon May 25 12:52:17 2020 +0200 +++ b/NEWS Tue May 26 08:20:06 2020 +0200 @@ -1,18 +1,22 @@ Pending changes in the mainline =============================== -* Performance: Replaced "OrthancPluginRegisterRestCallback" by "OrthancPluginRegisterRestCallbackNoLock" -* Authorization tokens passed as url search params in Orthanc Explorer are now transmitted to the viewer - and included as headers in every HTTP request to the Rest API easing the usage of the Authorization plugin -* Upgrade to GDCM 3.0.4 for static builds -* Upgraded Orthanc framework to 1.6.1 +* Move the GDCM decoder out of the Orthanc Web viewer plugin as a + separate plugin: https://book.orthanc-server.com/plugins/gdcm.html +* Performance: Replaced "OrthancPluginRegisterRestCallback" by + "OrthancPluginRegisterRestCallbackNoLock" +* Authorization tokens passed as url search params in Orthanc Explorer + are now transmitted to the viewer and included as headers in every + HTTP request to the Rest API easing the usage of the Authorization + plugin +* Upgrade to Orthanc framework to 1.7.0 Version 2.5 (2019-02-27) ======================== * Upgrade to GDCM 2.8.8 for static builds -* Upgraded Orthanc framework to 1.5.5 +* Upgrade to Orthanc framework to 1.5.5 Version 2.4 (2018-04-23) diff -r 40a433acf26a -r 61a4b7fa86dc Plugin/DecodedImageAdapter.cpp --- a/Plugin/DecodedImageAdapter.cpp Mon May 25 12:52:17 2020 +0200 +++ b/Plugin/DecodedImageAdapter.cpp Tue May 26 08:20:06 2020 +0200 @@ -125,8 +125,7 @@ bool DecodedImageAdapter::Create(std::string& content, const std::string& uri) { - std::string message = "Decoding DICOM instance: " + uri; - OrthancPluginLogInfo(context_, message.c_str()); + LOG(INFO) << "Decoding DICOM instance: " << uri; CompressionType type; uint8_t level; @@ -138,7 +137,6 @@ return false; } - bool ok = false; Json::Value tags; @@ -180,9 +178,7 @@ } else { - char msg[1024]; - sprintf(msg, "Unable to decode the following instance: %s", uri.c_str()); - OrthancPluginLogWarning(context_, msg); + LOG(WARNING) << "Unable to decode the following instance: " << uri; return false; } } diff -r 40a433acf26a -r 61a4b7fa86dc Plugin/Plugin.cpp --- a/Plugin/Plugin.cpp Mon May 25 12:52:17 2020 +0200 +++ b/Plugin/Plugin.cpp Tue May 26 08:20:06 2020 +0200 @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -57,8 +56,6 @@ static OrthancPluginContext* context_ = NULL; -static bool restrictTransferSyntaxes_ = false; -static std::set enabledTransferSyntaxes_; class CacheContext @@ -89,7 +86,6 @@ Orthanc::SharedMessageQueue newInstances_; bool stop_; boost::thread newInstancesThread_; - OrthancPlugins::GdcmDecoderCache decoder_; static void NewInstancesThread(CacheContext* cache) { @@ -148,11 +144,6 @@ { newInstances_.Enqueue(new DynamicString(instanceId)); } - - OrthancPlugins::GdcmDecoderCache& GetDecoder() - { - return decoder_; - } }; @@ -349,128 +340,7 @@ -static bool ExtractTransferSyntax(std::string& transferSyntax, - const void* dicom, - const uint32_t size) -{ - Orthanc::DicomMap header; - if (!Orthanc::DicomMap::ParseDicomMetaInformation(header, reinterpret_cast(dicom), size)) - { - return false; - } - - const Orthanc::DicomValue* tag = header.TestAndGetValue(0x0002, 0x0010); - if (tag == NULL || - tag->IsNull() || - tag->IsBinary()) - { - return false; - } - else - { - // Stripping spaces should not be required, as this is a UI value - // representation whose stripping is supported by the Orthanc - // core, but let's be careful... - transferSyntax = Orthanc::Toolbox::StripSpaces(tag->GetContent()); - return true; - } -} - - -static bool IsTransferSyntaxEnabled(const void* dicom, - const uint32_t size) -{ - std::string formattedSize; - - { - char tmp[16]; - sprintf(tmp, "%0.1fMB", static_cast(size) / (1024.0f * 1024.0f)); - formattedSize.assign(tmp); - } - - if (!restrictTransferSyntaxes_) - { - std::string s = "Decoding one DICOM instance of " + formattedSize + " using GDCM"; - OrthancPluginLogInfo(context_, s.c_str()); - return true; - } - - std::string transferSyntax; - if (!ExtractTransferSyntax(transferSyntax, dicom, size)) - { - std::string s = ("Cannot extract the transfer syntax of this instance of " + - formattedSize + ", will use GDCM to decode it"); - OrthancPluginLogInfo(context_, s.c_str()); - return true; - } - - if (enabledTransferSyntaxes_.find(transferSyntax) != enabledTransferSyntaxes_.end()) - { - // Decoding for this transfer syntax is enabled - std::string s = ("Using GDCM to decode this instance of " + - formattedSize + " with transfer syntax " + transferSyntax); - OrthancPluginLogInfo(context_, s.c_str()); - return true; - } - else - { - std::string s = ("Won't use GDCM to decode this instance of " + - formattedSize + ", as its transfer syntax " + transferSyntax + " is disabled"); - OrthancPluginLogInfo(context_, s.c_str()); - return false; - } -} - - -static OrthancPluginErrorCode DecodeImageCallback(OrthancPluginImage** target, - const void* dicom, - const uint32_t size, - uint32_t frameIndex) -{ - try - { - if (!IsTransferSyntaxEnabled(dicom, size)) - { - *target = NULL; - return OrthancPluginErrorCode_Success; - } - - std::unique_ptr image; - -#if 0 - // Do not use the cache - OrthancPlugins::GdcmImageDecoder decoder(dicom, size); - image.reset(new OrthancPlugins::OrthancImageWrapper(context_, decoder, frameIndex)); -#else - using namespace OrthancPlugins; - image.reset(cache_->GetDecoder().Decode(context_, dicom, size, frameIndex)); -#endif - - *target = image->Release(); - - return OrthancPluginErrorCode_Success; - } - catch (Orthanc::OrthancException& e) - { - *target = NULL; - - std::string s = "Cannot decode image using GDCM: " + std::string(e.What()); - OrthancPluginLogWarning(context_, s.c_str()); - return OrthancPluginErrorCode_Plugin; - } - catch (std::runtime_error& e) - { - *target = NULL; - - std::string s = "Cannot decode image using GDCM: " + std::string(e.what()); - OrthancPluginLogWarning(context_, s.c_str()); - return OrthancPluginErrorCode_Plugin; - } -} - - -void ParseConfiguration(bool& enableGdcm, - int& decodingThreads, +void ParseConfiguration(int& decodingThreads, boost::filesystem::path& cachePath, int& cacheSize) { @@ -500,49 +370,6 @@ cachePath = OrthancPlugins::GetStringValue(configuration[CONFIG_WEB_VIEWER], key, cachePath.string()); cacheSize = OrthancPlugins::GetIntegerValue(configuration[CONFIG_WEB_VIEWER], "CacheSize", cacheSize); decodingThreads = OrthancPlugins::GetIntegerValue(configuration[CONFIG_WEB_VIEWER], "Threads", decodingThreads); - - static const char* CONFIG_ENABLE_GDCM = "EnableGdcm"; - if (configuration[CONFIG_WEB_VIEWER].isMember(CONFIG_ENABLE_GDCM)) - { - if (configuration[CONFIG_WEB_VIEWER][CONFIG_ENABLE_GDCM].type() != Json::booleanValue) - { - throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); - } - else - { - enableGdcm = configuration[CONFIG_WEB_VIEWER][CONFIG_ENABLE_GDCM].asBool(); - } - } - - if (enableGdcm) - { - static const char* CONFIG_RESTRICT_TRANSFER_SYNTAXES = "RestrictTransferSyntaxes"; - - if (configuration[CONFIG_WEB_VIEWER].isMember(CONFIG_RESTRICT_TRANSFER_SYNTAXES)) - { - const Json::Value& config = configuration[CONFIG_WEB_VIEWER][CONFIG_RESTRICT_TRANSFER_SYNTAXES]; - - if (config.type() != Json::arrayValue) - { - throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); - } - - restrictTransferSyntaxes_ = true; - for (Json::Value::ArrayIndex i = 0; i < config.size(); i++) - { - if (config[i].type() != Json::stringValue) - { - throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); - } - else - { - std::string s = "Web viewer will use GDCM to decode transfer syntax " + config[i].asString(); - enabledTransferSyntaxes_.insert(config[i].asString()); - OrthancPluginLogWarning(context_, s.c_str()); - } - } - } - } } if (decodingThreads <= 0 || @@ -570,6 +397,7 @@ using namespace OrthancPlugins; OrthancPlugins::SetGlobalContext(context); + Orthanc::Logging::Initialize(context); context_ = context; assert(DisplayPerformanceWarning()); OrthancPluginLogWarning(context_, "Initializing the Web viewer"); @@ -598,16 +426,13 @@ decodingThreads = 1; } - /* By default, use GDCM */ - bool enableGdcm = true; - try { /* By default, a cache of 100 MB is used */ int cacheSize = 100; boost::filesystem::path cachePath; - ParseConfiguration(enableGdcm, decodingThreads, cachePath, cacheSize); + ParseConfiguration(decodingThreads, cachePath, cacheSize); std::string message = ("Web viewer using " + boost::lexical_cast(decodingThreads) + " threads for the decoding of the DICOM images"); @@ -693,19 +518,6 @@ } - /* Configure the DICOM decoder */ - if (enableGdcm) - { - // Replace the default decoder of DICOM images that is built in Orthanc - OrthancPluginLogWarning(context_, "Using GDCM instead of the DICOM decoder that is built in Orthanc"); - OrthancPluginRegisterDecodeImageCallback(context_, DecodeImageCallback); - } - else - { - OrthancPluginLogWarning(context_, "Using the DICOM decoder that is built in Orthanc (not using GDCM)"); - } - - /* Install the callbacks */ OrthancPluginRegisterRestCallbackNoLock(context_, "/web-viewer/series/(.*)", ServeCache); OrthancPluginRegisterRestCallbackNoLock(context_, "/web-viewer/is-stable-series/(.*)", IsStableSeries); diff -r 40a433acf26a -r 61a4b7fa86dc README --- a/README Mon May 25 12:52:17 2020 +0200 +++ b/README Tue May 26 08:20:06 2020 +0200 @@ -12,16 +12,15 @@ Dependencies ------------ -The Web viewer is based upon the following projects: +The Web viewer is based upon the Cornerstone project, a client-side +JavaScript library to display medical images in Web browsers, by Chris +Hafey : +https://github.com/chafey/cornerstone -* Cornerstone, a client-side JavaScript library to display medical - images in Web browsers, by Chris Hafey : - https://github.com/chafey/cornerstone - -* GDCM, an open-source implementation of the DICOM standard with - advanced features for image decoding, by Mathieu Malaterre - : - http://sourceforge.net/projects/gdcm/ +In releases < 2.6, this plugin was also implementing primitives to +decode DICOM images using GDCM in Orthanc. Starting with release 2.6, +these primitives are available as part of the "orthanc-gdcm" plugin: +http://sourceforge.net/projects/gdcm/ Installation and usage diff -r 40a433acf26a -r 61a4b7fa86dc Resources/BuildInstructions.txt --- a/Resources/BuildInstructions.txt Mon May 25 12:52:17 2020 +0200 +++ b/Resources/BuildInstructions.txt Tue May 26 08:20:06 2020 +0200 @@ -10,7 +10,7 @@ Debian Sid (dynamic linking) ============================ -# sudo apt-get install build-essential unzip cmake libgdcm2-dev libjpeg-dev \ +# sudo apt-get install build-essential unzip cmake libjpeg-dev \ uuid-dev libgtest-dev libpng-dev libsqlite3-dev \ zlib1g-dev libboost-all-dev libjsoncpp-dev diff -r 40a433acf26a -r 61a4b7fa86dc Resources/CMake/GdcmConfiguration.cmake --- a/Resources/CMake/GdcmConfiguration.cmake Mon May 25 12:52:17 2020 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,141 +0,0 @@ -# Orthanc - A Lightweight, RESTful DICOM Store -# Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics -# Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2020 Osimis S.A., Belgium -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU Affero 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 -# Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - - -if (STATIC_BUILD OR NOT USE_SYSTEM_GDCM) - if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR - ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR - ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD") - # If using gcc, build GDCM with the "-fPIC" argument to allow its - # embedding into the shared library containing the Orthanc plugin - set(AdditionalCFlags "-fPIC") - set(AdditionalCxxFlags ${AdditionalCFlags}) - elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND - CMAKE_COMPILER_IS_GNUCXX) - # Prevents error: "jump to label ‘err’ crosses initialization" of some variable - # within "Source/Common/gdcmCAPICryptographicMessageSyntax.cxx" if using MinGW - set(AdditionalCxxFlags "-fpermissive") - elseif (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") - # This definition is necessary to compile - # "Source/MediaStorageAndFileFormat/gdcmFileStreamer.cxx" - set(AdditionalCFlags "-Doff64_t=off_t") - set(AdditionalCxxFlags ${AdditionalCFlags}) - endif() - - set(Flags - "-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} ${AdditionalCFlags}" - "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} ${AdditionalCxxFlags}" - -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} - -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} - -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} - -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} - -DCMAKE_C_FLAGS_MINSIZEREL=${CMAKE_C_FLAGS_MINSIZEREL} - -DCMAKE_CXX_FLAGS_MINSIZEREL=${CMAKE_CXX_FLAGS_MINSIZEREL} - -DCMAKE_C_FLAGS_RELWITHDEBINFO=${CMAKE_C_FLAGS_RELWITHDEBINFO} - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} - ) - - if (CMAKE_TOOLCHAIN_FILE) - # Take absolute path to the toolchain - get_filename_component(TMP ${CMAKE_TOOLCHAIN_FILE} REALPATH BASE ${CMAKE_SOURCE_DIR}) - list(APPEND Flags -DCMAKE_TOOLCHAIN_FILE=${TMP}) - endif() - - # Don't build manpages (since gdcm 2.8.4) - list(APPEND Flags -DGDCM_BUILD_DOCBOOK_MANPAGES=OFF) - - if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") - # Trick to disable the compilation of socket++ by gdcm, which is - # incompatible with LSB, but fortunately only required for DICOM - # Networking - list(APPEND Flags -DGDCM_USE_SYSTEM_SOCKETXX=ON) - - # Detect the number of CPU cores to run "make" with as much - # parallelism as possible - include(ProcessorCount) - ProcessorCount(N) - if (NOT N EQUAL 0) - set(MAKE_PARALLEL -j${N}) - endif() - - # For Linux Standard Base, avoid building incompatible target gdcmMEXD (*) - set(BUILD_COMMAND BUILD_COMMAND - ${CMAKE_MAKE_PROGRAM} ${MAKE_PARALLEL} - gdcmMSFF gdcmcharls gdcmDICT gdcmDSED gdcmIOD gdcmjpeg8 - gdcmjpeg12 gdcmjpeg16 gdcmopenjp2 gdcmzlib gdcmCommon gdcmexpat) - endif() - - include(ExternalProject) - externalproject_add(GDCM - URL "http://orthanc.osimis.io/ThirdPartyDownloads/gdcm-3.0.4.tar.gz" - URL_MD5 "f12dbded708356d5fa0b5ed37ccdb66e" - TIMEOUT 60 - CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} ${Flags} - ${BUILD_COMMAND} # Customize "make", only for Linux Standard Base (*) - INSTALL_COMMAND "" # Skip the install step - ) - - if(MSVC) - set(Suffix ".lib") - set(Prefix "") - else() - set(Suffix ".a") - list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix) - endif() - - set(GDCM_LIBRARIES - # WARNING: The order of the libraries below *is* important! - ${Prefix}gdcmMSFF${Suffix} - ${Prefix}gdcmcharls${Suffix} - ${Prefix}gdcmDICT${Suffix} - ${Prefix}gdcmDSED${Suffix} - ${Prefix}gdcmIOD${Suffix} - ${Prefix}gdcmjpeg8${Suffix} - ${Prefix}gdcmjpeg12${Suffix} - ${Prefix}gdcmjpeg16${Suffix} - ${Prefix}gdcmopenjp2${Suffix} - ${Prefix}gdcmzlib${Suffix} - ${Prefix}gdcmCommon${Suffix} - ${Prefix}gdcmexpat${Suffix} - - #${Prefix}socketxx${Suffix} - #${Prefix}gdcmMEXD${Suffix} # DICOM Networking, unneeded by Orthanc plugins - #${Prefix}gdcmgetopt${Suffix} - #${Prefix}gdcmuuid${Suffix} - ) - - ExternalProject_Get_Property(GDCM binary_dir) - include_directories(${binary_dir}/Source/Common) - link_directories(${binary_dir}/bin) - - ExternalProject_Get_Property(GDCM source_dir) - include_directories( - ${source_dir}/Source/Common - ${source_dir}/Source/MediaStorageAndFileFormat - ${source_dir}/Source/DataStructureAndEncodingDefinition - ) - -else() - find_package(GDCM REQUIRED) - if (GDCM_FOUND) - include(${GDCM_USE_FILE}) - set(GDCM_LIBRARIES gdcmCommon gdcmMSFF) - else(GDCM_FOUND) - message(FATAL_ERROR "Cannot find GDCM, did you set GDCM_DIR?") - endif(GDCM_FOUND) -endif() diff -r 40a433acf26a -r 61a4b7fa86dc Resources/holy-build-box-internal.sh --- a/Resources/holy-build-box-internal.sh Mon May 25 12:52:17 2020 +0200 +++ b/Resources/holy-build-box-internal.sh Tue May 26 08:20:06 2020 +0200 @@ -30,7 +30,7 @@ cmake /tmp/source-writeable \ -DCMAKE_BUILD_TYPE=$1 -DSTATIC_BUILD=ON \ -DORTHANC_FRAMEWORK_SOURCE=web \ - -DORTHANC_FRAMEWORK_VERSION=1.5.8 \ + -DORTHANC_FRAMEWORK_VERSION=1.6.1 \ -DCMAKE_INSTALL_PREFIX=/target make -j`nproc` diff -r 40a433acf26a -r 61a4b7fa86dc WebApplication/viewer.js --- a/WebApplication/viewer.js Mon May 25 12:52:17 2020 +0200 +++ b/WebApplication/viewer.js Tue May 26 08:20:06 2020 +0200 @@ -23,6 +23,7 @@ var compression = 'jpeg95'; var isFirst = true; //var compression = 'deflate'; +var unsupportedMessage = 'Error: The Orthanc core does not support the decoding of this image. Make sure that you have properly installed a suitable decoder plugin (e.g. the official GDCM decoder plugin).'; // Prevent the access to IE @@ -383,7 +384,7 @@ result = image; }, error: function() { - alert('Error: This image is not supported by the Web viewer.'); + alert(unsupportedMessage); return null; } }); @@ -430,7 +431,7 @@ } }, failure: function() { - alert('Error: This image is not supported by the Web viewer.'); + alert(unsupportedMessage); } });