Mercurial > hg > orthanc
changeset 6841:4176eb41cf29
IngestTranscoding: Don't transcode to compressed TS if the DICOM file does not contain any pixel data
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Thu, 21 May 2026 14:45:25 +0200 |
| parents | 13f0f6dda96d |
| children | 8d72870bbfa1 |
| files | NEWS OrthancServer/Sources/ServerContext.cpp |
| diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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 {
