# HG changeset patch # User Sebastien Jodogne # Date 1566474820 -7200 # Node ID d4a535ebd88cbe0ee0eeac5d1f46a3f1064f0345 # Parent b9edca31124502473f0b0192a3e3c2330bf18a59 default transfer syntax in DICOMweb is explicit VR Little Endian, not implicit diff -r b9edca311245 -r d4a535ebd88c Plugin/WadoRsRetrieveFrames.cpp --- 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