# HG changeset patch # User Alain Mazy # Date 1779367525 -7200 # Node ID 4176eb41cf29c306d719800beca5d3b131653fd2 # Parent 13f0f6dda96d348770a3099b71151e24d5a05636 IngestTranscoding: Don't transcode to compressed TS if the DICOM file does not contain any pixel data diff -r 13f0f6dda96d -r 4176eb41cf29 NEWS --- a/NEWS Thu May 21 08:54:11 2026 +0200 +++ b/NEWS Thu May 21 14:45:25 2026 +0200 @@ -11,6 +11,9 @@ Compared to previous versions, in the "Never" and "IfChanged" mode, the number of disks and DB operations are reduced when uploading the same instance again. However, there is one additional DB operation when uploading a new instance. +* When the "IngestTranscoding" configuration is set to a compressed transfer syntax, Orthanc + no longer transcodes DICOM files that do not have any pixel data (e.g: SR, RTSTRUCT, + Encapsulated PDF, ...). These files were sometimes poorly handled by other softwares. REST API diff -r 13f0f6dda96d -r 4176eb41cf29 OrthancServer/Sources/ServerContext.cpp --- a/OrthancServer/Sources/ServerContext.cpp Thu May 21 08:54:11 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Thu May 21 14:45:25 2026 +0200 @@ -1032,6 +1032,15 @@ { // This is an uncompressed transfer syntax (new in Orthanc 1.8.2) transcode = ingestTranscodingOfUncompressed_; + + // If the DICOM does not have any pixel data (e.g. a DICOM SR, an ECG, a PDF, RTSTRUCT, ...), it makes no sense + // to transcode it to a compressed Transfer Syntax and it might actually be considered invalid or poorly handled + // by some softwares receiving the data. Therefore, we skip transcoding in this case unless + // the ingestTransferSyntax is uncompressed in which case, we might just want to change e.g. from Implicit to Explicit. + if (transcode && !dicom->HasPixelData() && !IsUncompressedTransferSyntax(ingestTransferSyntax_)) + { + transcode = false; + } } else {