changeset 348:d4a535ebd88c

default transfer syntax in DICOMweb is explicit VR Little Endian, not implicit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 22 Aug 2019 13:53:40 +0200
parents b9edca311245
children 8ea13bf99ff5
files Plugin/WadoRsRetrieveFrames.cpp
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Plugin/WadoRsRetrieveFrames.cpp	Thu Aug 22 13:35:02 2019 +0200
+++ b/Plugin/WadoRsRetrieveFrames.cpp	Thu Aug 22 13:53:40 2019 +0200
@@ -78,7 +78,7 @@
       if (tokens.size() == 0 ||
           tokens[0] == "*/*")
       {
-        return gdcm::TransferSyntax::ImplicitVRLittleEndian;
+        return gdcm::TransferSyntax::ExplicitVRLittleEndian;
       }
 
       if (tokens[0] != "multipart/related")
@@ -116,7 +116,7 @@
       {
         if (transferSyntax.empty())
         {
-          return gdcm::TransferSyntax(gdcm::TransferSyntax::ImplicitVRLittleEndian);
+          return gdcm::TransferSyntax(gdcm::TransferSyntax::ExplicitVRLittleEndian);
         }
         else if (transferSyntax == "*")
         {
@@ -251,7 +251,7 @@
   }
 
   // By default, DICOMweb expectes Little Endian uncompressed pixel data
-  return gdcm::TransferSyntax::ImplicitVRLittleEndian;
+  return gdcm::TransferSyntax::ExplicitVRLittleEndian;
 }
 
 
@@ -297,6 +297,9 @@
   {
     case gdcm::TransferSyntax::ImplicitVRLittleEndian:
       // The "transfer-syntax" info was added in version 1.1 of the plugin
+      return "application/octet-stream; transfer-syntax=1.2.840.10008.1.2";
+
+    case gdcm::TransferSyntax::ExplicitVRLittleEndian:
       return "application/octet-stream; transfer-syntax=1.2.840.10008.1.2.1";
 
     case gdcm::TransferSyntax::JPEGBaselineProcess1:
@@ -532,9 +535,7 @@
 
     gdcm::TransferSyntax targetSyntax(ParseTransferSyntax(request, sourceSyntax));
 
-    if (sourceSyntax == targetSyntax ||
-        (targetSyntax == gdcm::TransferSyntax::ImplicitVRLittleEndian &&
-         sourceSyntax == gdcm::TransferSyntax::ExplicitVRLittleEndian))
+    if (sourceSyntax == targetSyntax)
     {
       // No need to change the transfer syntax