Project

General

Profile

Actions

Bug #620

closed

DCMJPEG writes SOF0 JPEG marker when compressing 8-bit images in extended sequential mode (DICOM CP 1447)

Added by Marco Eichelberg over 10 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Library
Target version:
Start date:
2015-01-27
Due date:
% Done:

0%

Estimated time:
Module:
dcmjpeg
Operating System:
Compiler:

Description

The DICOM standard currently has two different transfer syntaxes that permit lossy JPEG compression of images with 8 bits/sample:
  • JPEG Baseline (8 bit only)
  • JPEG Extended Sequential (8 or 12 bit)

DICOM CP 1447 clarifies that an image with 8 bits/sample, when encoded with extended sequential transfer syntax, should always contain the SOF1 start of frame marker in the JPEG bitstream, which indicates the "extended sequential" mode, a true superset of the JPEG baseline mode. The IJG JPEG library, which is used in DCMJPEG, however, encodes the SOF0 marker (which indicated JPEG Baseline) both in JPEG Baseline and JPEG Extended Sequential mode. The reason is that the IJG library does not actually distinguish between these two modes and never uses the additional features permitted in "extended sequential" mode, other than supporting 12 bits/pixel.

In order to make the library DICOM compliant according to CP 1447, we would have to modify the 8-bit version of the IJG library such that the calling user can choose whether SOF0 or SOF1 be written during lossy compression. The calling JPEG encoder class would then have to pass the correct value depending on the DICOM transfer syntax, which is not "visible" on the IJG level. Note that it is valid to write a JPEG Baseline bitstream together with SOF1, since SOF1 only enables optional extensions.


Related issues 1 (0 open1 closed)

Related to DCMTK - Conformance #663: CP-1447: "Clarify 8 bit in Extended JPEG Transfer Syntax"ClosedMarco Eichelberg2015-09-18

Actions
Actions #1

Updated by Marco Eichelberg almost 9 years ago

  • Assignee set to Marco Eichelberg
Actions #2

Updated by Marco Eichelberg almost 9 years ago

  • Status changed from New to Closed

Fixed by commit ea56f13 220efcc.

Actions

Also available in: Atom PDF