Project

General

Profile

Actions

Feature #690

open

DCMJPEG and DCMJP2K should validate image dimensions and samples per pixel

Added by Marco Eichelberg about 9 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Library and Apps
Target version:
-
Start date:
2016-08-17
Due date:
% Done:

0%

Estimated time:
Module:
dcmjpeg, dcmjp2k
Operating System:
Compiler:

Description

Currently the JPEG and JPEG 2000 decoders "blindly" believe that the values for Rows, Columns, and SamplesPerPixel in the DICOM header are correct.
However, the DICOM standard states that in the case of inconsistencies the value encoded in the compressed bitstream should take preference.
Both decoders should be modified to check the consistency of Rows, Columns and SamplesPerPixel against the JPEG header, and in case of an inconsistency be configurable to
  • reject decompression with an error message (default)
  • adjust the DICOM header to be consistent with the compressed bitstream
  • keep the DICOM header unmodified (current behaviour)

Reported / suggested by Mathieu Malaterre.


Files

JPEGNote_bogus.dcm (44.9 KB) JPEGNote_bogus.dcm JPEG-compressed DICOM image where DICOM and JPEG values for Rows, Columns, SamplesPerPixel and PhotometricInterpretation are inconsistent Marco Eichelberg, 2016-08-17 09:45
Actions

Also available in: Atom PDF