# HG changeset patch # User Sebastien Jodogne # Date 1608288520 -3600 # Node ID 92737070b30191cdd6390084c4f756bff8595eb2 # Parent 7e0d015ad109041488a7340eea5b6c4826196417 If meta-header is missing, best-effort to extract "TransferSyntax" in "/instances/{id}/metadata" diff -r 7e0d015ad109 -r 92737070b301 NEWS --- a/NEWS Fri Dec 18 11:13:00 2020 +0100 +++ b/NEWS Fri Dec 18 11:48:40 2020 +0100 @@ -28,6 +28,7 @@ * Allow concurrency on the OrthancPluginRegisterIncomingHttpRequestFilter() callbacks * Allow empty request body in "/modalities/{id}/echo" +* If meta-header is missing, best-effort to extract "TransferSyntax" in "/instances/{id}/metadata" Version 1.8.1 (2020-12-07) diff -r 7e0d015ad109 -r 92737070b301 OrthancServer/Sources/DicomInstanceToStore.cpp --- a/OrthancServer/Sources/DicomInstanceToStore.cpp Fri Dec 18 11:13:00 2020 +0100 +++ b/OrthancServer/Sources/DicomInstanceToStore.cpp Fri Dec 18 11:48:40 2020 +0100 @@ -373,6 +373,18 @@ return true; } } + else + { + // This is a DICOM file without a proper meta-header. Fallback + // to DCMTK, which will fully parse the dataset to retrieve + // the transfer syntax. Added in Orthanc 1.8.2. + std::string transferSyntax; + if (GetParsedDicomFile().LookupTransferSyntax(transferSyntax)) + { + result = Toolbox::StripSpaces(transferSyntax); + return true; + } + } return false; }