8.2.2 Run Length Encoding Compression

DICOM provides a mechanism for supporting the use of Run Length Encoding (RLE) Compression which is a byte oriented lossless compression scheme through the encapsulated Format (see PS 3.3 of this Standard). Annex G defines RLE Compression and its Transfer Syntax.

Note: The RLE Compression algorithm described in Annex G is the compression used in the TIFF 6.0 specification known as the “PackBits” scheme.

The use of the DICOM Encapsulated Format to support RLE Compressed Pixel Data requires that the Data Elements which are related to the Pixel Data encoding (e.g. Photometric Interpretation, Samples per Pixel, Planar Configuration, Bits Allocated, Bits Stored, High Bit, Pixel Representation, Rows, Columns, etc.) shall contain values that are consistent with the compressed data.

Note: These requirements were formerly specified in terms of the "uncompressed pixel data from which the compressed data was derived". However, since the form of the "original" uncompressed data stream could vary between different implementations, this requirement is now specified in terms of consistency with what is encapsulated.

Note: Those characteristics not implied by the definition of the compression scheme (e.g. always color-by- plane in RLE), can therefore be determined from the DICOM Data Element in the enclosing data set. For example a Photometric Intepretation of "YBR FULL" would describe the color space that is commonly used to losslessly compress images using RLE. It is unusual to use an RGB color space for RLE compression, since no advantage is taken of correlation between the red, green and blue components (e.g. of luminance), and poor compression is achieved (note however that the conversion from RGB to YBR FULL is itself lossy. A new photometric interpretation may be proposed in the future which allows lossless conversion from RGB and also results in better RLE compression ratios).

Note: DICOM Data Elements should not describe characteristics that are beyond the capability of the compression scheme used. For example, RLE compressed data streams (using the algorithm mandated in the DICOM Standard) are always color-by-plane.