Actions
Bug #1121
openDCMTK will store uncompressed images of unknown transfer syntax as "Little Endian Explicit" without any warning
Start date:
2024-04-18
Due date:
% Done:
0%
Estimated time:
Module:
dcmdata
Operating System:
Compiler:
Description
The test image attached to this issue (downloaded from https://github.com/chafey/DICOMHTJ2K/tree/main/test/fixtures/htj2k) is invalid: it specifies the new HTJ2K transfer syntax but the pixel data is not encapsulated.
Surprisingly, dcmconv from DCMTK 3.6.8 release (which does not know this transfer syntax UID) will read the file and store it as Explicit VR Little Endian without any warning:
> dcmconv CT1_JPH output.dcm I: open input file CT1_JPH I: load all data into memory I: set output transfer syntax to input transfer syntax I: check if new output transfer syntax is possible I: output transfer syntax Little Endian Explicit can be written I: create output file output.dcm I: conversion successfulThis probably happens because dcmdata sets the transfer syntax enum to "EXS_Unknown" while reading the file, which is the same value that is also used when a new dataset is created in memory. DCMTK will then happily write that in any uncompressed transfer syntax. This is undesirable. DCMTK should at least print a warning if the transfer syntax of a dataset is unknown after loading it from file, and preferrably storing that file in uncompressed transfer syntax should be refused unless some override flag is set.
Note that this problem does not occur if the pixel data is encapsulated. In that case DCMTK detects that it is unable to properly convert the file to an uncompressed transfer syntax and will refuse to write it.
Thanks to Peter Klotz <peter.klotz@siemens-healthineers.com> for the issue report (2024-04-16).
Files
Actions