[med-svn] [Git][med-team/orthanc][upstream] New upstream version 1.7.1+dfsg

Sebastien Jodogne gitlab at salsa.debian.org
Wed May 27 14:18:34 BST 2020



Sebastien Jodogne pushed to branch upstream at Debian Med / orthanc


Commits:
f741147d by jodogne-guest at 2020-05-27T14:44:08+02:00
New upstream version 1.7.1+dfsg
- - - - -


26 changed files:

- .hg_archival.txt
- Core/DicomNetworking/IGetRequestHandler.h
- Core/DicomNetworking/IGetRequestHandlerFactory.h
- Core/DicomNetworking/Internals/GetScp.cpp
- Core/DicomNetworking/Internals/GetScp.h
- Core/DicomParsing/DcmtkTranscoder.cpp
- Core/HttpServer/IHttpHandler.h
- Core/Toolbox.cpp
- NEWS
- OrthancExplorer/libs/jquery-file-upload/js/jquery.fileupload-fp.js
- OrthancExplorer/libs/jquery-file-upload/js/jquery.fileupload-ui.js
- OrthancExplorer/libs/jquery-file-upload/js/jquery.fileupload.js
- OrthancExplorer/libs/slimbox2.js
- OrthancServer/OrthancGetRequestHandler.cpp
- OrthancServer/OrthancGetRequestHandler.h
- OrthancServer/OrthancRestApi/OrthancRestResources.cpp
- OrthancServer/ServerContext.cpp
- OrthancServer/ServerContext.h
- Plugins/Engine/OrthancPlugins.cpp
- Resources/CMake/DcmtkConfiguration.cmake
- Resources/CMake/OrthancFrameworkConfiguration.cmake
- Resources/CMake/OrthancFrameworkParameters.cmake
- Resources/Configuration.json
- Resources/DownloadOrthancFramework.cmake
- UnitTestsSources/FromDcmtkTests.cpp
- UnitTestsSources/ServerIndexTests.cpp


Changes:

=====================================
.hg_archival.txt
=====================================
@@ -1,6 +1,6 @@
 repo: 3959d33612ccaadc0d4d707227fbed09ac35e5fe
-node: 22eb9453b3f5df679edad13152e15d0cfb9da5d1
-branch: Orthanc-1.7.0
+node: adc6f1fa7417d10e7a2e7a1529a0f973a5d67de9
+branch: Orthanc-1.7.1
 latesttag: toa2020012703
-latesttagdistance: 226
-changessincelatesttag: 341
+latesttagdistance: 237
+changessincelatesttag: 354


=====================================
Core/DicomNetworking/IGetRequestHandler.h
=====================================
@@ -2,7 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2019 Osimis S.A., 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 General Public License as


=====================================
Core/DicomNetworking/IGetRequestHandlerFactory.h
=====================================
@@ -2,7 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2019 Osimis S.A., 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 General Public License as


=====================================
Core/DicomNetworking/Internals/GetScp.cpp
=====================================
@@ -2,7 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2019 Osimis S.A., 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 General Public License as


=====================================
Core/DicomNetworking/Internals/GetScp.h
=====================================
@@ -2,7 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2019 Osimis S.A., 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 General Public License as


=====================================
Core/DicomParsing/DcmtkTranscoder.cpp
=====================================
@@ -284,6 +284,28 @@ namespace Orthanc
       return false;
     }
 
+    {
+      std::string s;
+      for (std::set<DicomTransferSyntax>::const_iterator
+             it = allowedSyntaxes.begin(); it != allowedSyntaxes.end(); ++it)
+      {
+        if (!s.empty())
+        {
+          s += ", ";
+        }
+
+        s += GetTransferSyntaxUid(*it);
+      }
+
+      if (s.empty())
+      {
+        s = "<none>";
+      }
+      
+      LOG(INFO) << "DCMTK transcoding from " << GetTransferSyntaxUid(sourceSyntax)
+                << " to one of: " << s;
+    }
+
 #if !defined(NDEBUG)
     const std::string sourceSopInstanceUid = GetSopInstanceUid(source.GetParsed());
 #endif


=====================================
Core/HttpServer/IHttpHandler.h
=====================================
@@ -71,7 +71,7 @@ namespace Orthanc
     }
 
     /**
-     * This function allows to deal with chunked transfers (new in
+     * This function allows one to deal with chunked transfers (new in
      * Orthanc 1.5.7). It is only called if "method" is POST or PUT.
      **/
     virtual bool CreateChunkedRequestReader(std::unique_ptr<IChunkedRequestReader>& target,


=====================================
Core/Toolbox.cpp
=====================================
@@ -1998,7 +1998,7 @@ namespace Orthanc
      it removes the character set information from the byte stream.
 
      However, in the case where the encoding is unique, then suppressing
-     the escape sequences allows to provide us with a clean string after
+     the escape sequences allows one to provide us with a clean string after
      conversion to utf-8 with boost.
   **/
   void Toolbox::RemoveIso2022EscapeSequences(std::string& dest, const std::string& src)


=====================================
NEWS
=====================================
@@ -2,6 +2,12 @@ Pending changes in the mainline
 ===============================
 
 
+Version 1.7.1 (2020-05-27)
+==========================
+
+* Fix decoding of DICOM images for plugins (for compatibility with
+  Orthanc Web Viewer 2.6)
+
 
 Version 1.7.0 (2020-05-22)
 ==========================
@@ -9,7 +15,7 @@ Version 1.7.0 (2020-05-22)
 General
 -------
 
-* Support of DICOM C-GET SCP (contribution by Varian)
+* Support of DICOM C-GET SCP (contribution by Varian Medical Systems)
 * DICOM transcoding over the REST API
 * Transcoding from compressed to uncompressed transfer syntaxes over DICOM
   C-STORE SCU (if the remote modality doesn't support compressed syntaxes)
@@ -246,7 +252,7 @@ Orthanc Explorer
 ----------------
 
 * If performing a Query/Retrieve operation, the default value for the
-  tags is set to an empty string instead of '*', which allows to match
+  tags is set to an empty string instead of '*', which allows one to match
   even if the tag is not present. This allows malformed DICOM files to
   be matched, even though they lack required tags such as "PatientSex"
 
@@ -482,7 +488,7 @@ Version 1.4.2 (2018-09-20)
 General
 -------
 
-* "OrthancPeers" configuration option now allows to specify HTTP headers
+* "OrthancPeers" configuration option now allows one to specify HTTP headers
 * New main DICOM tag: "ImageOrientationPatient" at the instance level
 * New configuration options:
   - "HttpVerbose" to debug outgoing HTTP connections


=====================================
OrthancExplorer/libs/jquery-file-upload/js/jquery.fileupload-fp.js
=====================================
@@ -184,7 +184,7 @@
         },
 
         // Processes the files given as files property of the data parameter,
-        // returns a Promise object that allows to bind a done handler, which
+        // returns a Promise object that allows one to bind a done handler, which
         // will be invoked after processing all files (inplace) is done:
         process: function (data) {
             var that = this,


=====================================
OrthancExplorer/libs/jquery-file-upload/js/jquery.fileupload-ui.js
=====================================
@@ -295,7 +295,7 @@
             }
         },
 
-        // Link handler, that allows to download files
+        // Link handler, that allows one to download files
         // by drag & drop of the links to the desktop:
         _enableDragToDesktop: function () {
             var link = $(this),


=====================================
OrthancExplorer/libs/jquery-file-upload/js/jquery.fileupload.js
=====================================
@@ -126,14 +126,14 @@
             // The add callback is invoked as soon as files are added to the fileupload
             // widget (via file input selection, drag & drop, paste or add API call).
             // If the singleFileUploads option is enabled, this callback will be
-            // called once for each file in the selection for XHR file uplaods, else
+            // called once for each file in the selection for XHR file uploads, else
             // once for each file selection.
             // The upload starts when the submit method is invoked on the data parameter.
             // The data object contains a files property holding the added files
-            // and allows to override plugin options as well as define ajax settings.
+            // and allows one to override plugin options as well as define ajax settings.
             // Listeners for this callback can also be bound the following way:
             // .bind('fileuploadadd', func);
-            // data.submit() returns a Promise object and allows to attach additional
+            // data.submit() returns a Promise object and allows one to attach additional
             // handlers using jQuery's Deferred callbacks:
             // data.submit().done(func).fail(func).always(func);
             add: function (e, data) {
@@ -755,7 +755,7 @@
         _replaceFileInput: function (input) {
             var inputClone = input.clone(true);
             $('<form></form>').append(inputClone)[0].reset();
-            // Detaching allows to insert the fileInput on another form
+            // Detaching allows one to insert the fileInput on another form
             // without loosing the file input value:
             input.after(inputClone).detach();
             // Avoid memory leaks with the detached file input:


=====================================
OrthancExplorer/libs/slimbox2.js
=====================================
@@ -53,7 +53,7 @@
   // Open Slimbox with the specified parameters
   $.slimbox = function(_images, startImage, _options) {
     options = $.extend({
-      loop: false,				// Allows to navigate between first and last images
+      loop: false,				// Allows one to navigate between first and last images
       overlayOpacity: 0.8,			// 1 is opaque, 0 is completely transparent (change the color in the CSS file)
       overlayFadeDuration: 400,		// Duration of the overlay fade-in and fade-out animations (in milliseconds)
       resizeDuration: 400,			// Duration of each of the box resize animations (in milliseconds)
@@ -241,4 +241,4 @@
     return false;
   }
 
-})(jQuery);
\ No newline at end of file
+})(jQuery);


=====================================
OrthancServer/OrthancGetRequestHandler.cpp
=====================================
@@ -2,7 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2019 Osimis S.A., 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 General Public License as
@@ -254,7 +254,7 @@ namespace Orthanc
     bool allowTranscoding = (context_.IsTranscodeDicomProtocol() &&
                              remote_.IsTranscodingAllowed());
     
-    T_ASC_PresentationContextID presId;
+    T_ASC_PresentationContextID presId = 0;  // Unnecessary initialization, makes code clearer
     DicomTransferSyntax selectedSyntax;
     if (!SelectPresentationContext(presId, selectedSyntax, assoc, sopClassUid,
                                    sourceSyntax, allowTranscoding) ||


=====================================
OrthancServer/OrthancGetRequestHandler.h
=====================================
@@ -2,7 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2019 Osimis S.A., 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 General Public License as


=====================================
OrthancServer/OrthancRestApi/OrthancRestResources.cpp
=====================================
@@ -338,7 +338,7 @@ namespace Orthanc
     }
     else
     {
-      // This path allows to avoid the JSON decoding if no
+      // This path allows one to avoid the JSON decoding if no
       // simplification is asked, and if no "ignore-length" argument
       // is present
       std::string full;


=====================================
OrthancServer/ServerContext.cpp
=====================================
@@ -1296,6 +1296,16 @@ namespace Orthanc
   }
 
 
+  ImageAccessor* ServerContext::DecodeDicomFrame(const void* dicom,
+                                                 size_t size,
+                                                 unsigned int frameIndex)
+  {
+    DicomInstanceToStore instance;
+    instance.SetBuffer(dicom, size);
+    return DecodeDicomFrame(instance, frameIndex);
+  }
+  
+
   void ServerContext::StoreWithTranscoding(std::string& sopClassUid,
                                            std::string& sopInstanceUid,
                                            DicomStoreUserConnection& connection,


=====================================
OrthancServer/ServerContext.h
=====================================
@@ -469,6 +469,10 @@ namespace Orthanc
     ImageAccessor* DecodeDicomFrame(const DicomInstanceToStore& dicom,
                                     unsigned int frameIndex);
 
+    ImageAccessor* DecodeDicomFrame(const void* dicom,
+                                    size_t size,
+                                    unsigned int frameIndex);
+    
     void StoreWithTranscoding(std::string& sopClassUid,
                               std::string& sopInstanceUid,
                               DicomStoreUserConnection& connection,


=====================================
Plugins/Engine/OrthancPlugins.cpp
=====================================
@@ -2922,7 +2922,8 @@ namespace Orthanc
 
       case OrthancPluginImageFormat_Dicom:
       {
-        image.reset(Decode(p.data, p.size, 0));
+        PImpl::ServerContextLock lock(*pimpl_);
+        image.reset(lock.GetContext().DecodeDicomFrame(p.data, p.size, 0));
         break;
       }
 
@@ -3485,7 +3486,8 @@ namespace Orthanc
 
       case _OrthancPluginService_DecodeDicomImage:
       {
-        result.reset(Decode(p.constBuffer, p.bufferSize, p.frameIndex));
+        PImpl::ServerContextLock lock(*pimpl_);
+        result.reset(lock.GetContext().DecodeDicomFrame(p.constBuffer, p.bufferSize, p.frameIndex));
         break;
       }
 


=====================================
Resources/CMake/DcmtkConfiguration.cmake
=====================================
@@ -168,7 +168,7 @@ else()
     link_libraries(dcmdata dcmnet dcmjpeg oflog ofstd)
 
   else()
-    # The following line allows to manually add libraries at the
+    # The following line allows one to manually add libraries at the
     # command-line, which is necessary for Ubuntu/Debian packages
     set(tmp "${DCMTK_LIBRARIES}")
     include(FindDCMTK)


=====================================
Resources/CMake/OrthancFrameworkConfiguration.cmake
=====================================
@@ -44,6 +44,7 @@ if (NOT ENABLE_CRYPTO_OPTIONS)
   unset(ENABLE_SSL CACHE)
   unset(ENABLE_PKCS11 CACHE)
   unset(ENABLE_OPENSSL_ENGINES CACHE)
+  unset(OPENSSL_STATIC_VERSION CACHE)
   unset(USE_SYSTEM_OPENSSL CACHE)
   unset(USE_SYSTEM_LIBP11 CACHE)
   add_definitions(
@@ -115,6 +116,8 @@ if (NOT ENABLE_DCMTK)
   unset(USE_SYSTEM_DCMTK CACHE)
   unset(ENABLE_DCMTK_JPEG CACHE)
   unset(ENABLE_DCMTK_JPEG_LOSSLESS CACHE)
+  unset(DCMTK_STATIC_VERSION CACHE)
+  unset(ENABLE_DCMTK_LOG CACHE)
 endif()
 
 
@@ -426,7 +429,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/JsonCppConfiguration.cmake)
 include(${CMAKE_CURRENT_LIST_DIR}/UuidConfiguration.cmake)
 
 # We put Boost as the last dependency, as it is the heaviest to
-# configure, which allows to quickly spot problems when configuring
+# configure, which allows one to quickly spot problems when configuring
 # static builds in other dependencies
 include(${CMAKE_CURRENT_LIST_DIR}/BoostConfiguration.cmake)
 


=====================================
Resources/CMake/OrthancFrameworkParameters.cmake
=====================================
@@ -3,7 +3,7 @@
 #####################################################################
 
 # Version of the build, should always be "mainline" except in release branches
-set(ORTHANC_VERSION "1.7.0")
+set(ORTHANC_VERSION "1.7.1")
 
 # Version of the database schema. History:
 #   * Orthanc 0.1.0 -> Orthanc 0.3.0 = no versioning


=====================================
Resources/Configuration.json
=====================================
@@ -274,7 +274,7 @@
 
     /**
      * This is another, more advanced format to define Orthanc
-     * peers. It notably allows to specify HTTP headers, a HTTPS
+     * peers. It notably allows one to specify HTTP headers, a HTTPS
      * client certificate in the PEM format (as in the "--cert" option
      * of curl), or to enable PKCS#11 authentication for smart cards.
      **/


=====================================
Resources/DownloadOrthancFramework.cmake
=====================================
@@ -116,6 +116,8 @@ if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg" OR
         set(ORTHANC_FRAMEWORK_MD5 "eab428d6e53f61e847fa360bb17ebe25")
       elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.6.1")
         set(ORTHANC_FRAMEWORK_MD5 "3971f5de96ba71dc9d3f3690afeaa7c0")
+      elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.7.0")
+        set(ORTHANC_FRAMEWORK_MD5 "ce5f689e852b01d3672bd3d2f952a5ef")
 
       # Below this point are development snapshots that were used to
       # release some plugin, before an official release of the Orthanc


=====================================
UnitTestsSources/FromDcmtkTests.cpp
=====================================
@@ -514,7 +514,9 @@ TEST(ParsedDicomFile, InsertReplaceStrings)
 
   std::string s;
   ASSERT_TRUE(f.LookupTransferSyntax(s));
-  ASSERT_EQ(s, GetTransferSyntaxUid(DicomTransferSyntax_LittleEndianExplicit));
+  // The default transfer syntax depends on the OS endianness
+  ASSERT_TRUE(s == GetTransferSyntaxUid(DicomTransferSyntax_LittleEndianExplicit) ||
+              s == GetTransferSyntaxUid(DicomTransferSyntax_BigEndianExplicit));
 
   ASSERT_THROW(f.Replace(DICOM_TAG_ACCESSION_NUMBER, std::string("Accession"),
                          false, DicomReplaceMode_ThrowIfAbsent, ""), OrthancException);


=====================================
UnitTestsSources/ServerIndexTests.cpp
=====================================
@@ -734,8 +734,10 @@ TEST(ServerIndex, AttachmentRecycling)
     ASSERT_TRUE(instanceMetadata.find(MetadataType_Instance_TransferSyntax) != instanceMetadata.end());
     ASSERT_TRUE(instanceMetadata.find(MetadataType_Instance_SopClassUid) != instanceMetadata.end());
 
-    // By default, an Explicit VR Little Endian is used by Orthanc
-    ASSERT_EQ("1.2.840.10008.1.2.1", instanceMetadata[MetadataType_Instance_TransferSyntax]);
+    // The default transfer syntax depends on the OS endianness
+    std::string s = instanceMetadata[MetadataType_Instance_TransferSyntax];
+    ASSERT_TRUE(s == "1.2.840.10008.1.2.1" ||
+                s == "1.2.840.10008.1.2.2");
 
     ASSERT_EQ("1.2.840.10008.5.1.4.1.1.1", instanceMetadata[MetadataType_Instance_SopClassUid]);
 



View it on GitLab: https://salsa.debian.org/med-team/orthanc/-/commit/f741147d0f8958a433937c01bbe1e9714197ad11

-- 
View it on GitLab: https://salsa.debian.org/med-team/orthanc/-/commit/f741147d0f8958a433937c01bbe1e9714197ad11
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200527/5236e9bb/attachment-0001.html>


More information about the debian-med-commit mailing list