DCMTK: DJDecoder Class Reference

DCMTK Version 3.6.9 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
Public Member Functions | List of all members
DJDecoder Class Referenceabstract

abstract base class for decompression classes. More...

Inheritance diagram for DJDecoder:

## Public Member Functions
| DJDecoder ()
| default constructor
virtual | ~DJDecoder ()
| destructor
virtual OFCondition | init ()=0
| initializes internal object structures.
virtual OFCondition | decode (Uint8 *compressedFrameBuffer, Uint32 compressedFrameBufferSize, Uint8 *uncompressedFrameBuffer, Uint32 uncompressedFrameBufferSize, OFBool isSigned)=0
| suspended decompression routine.
virtual Uint16 | bytesPerSample () const =0
| returns the number of bytes per sample that will be written when decoding.
virtual EP_Interpretation | getDecompressedColorModel () const =0
| after successful compression, returns the color model of the decompressed image

## Detailed Description

abstract base class for decompression classes.

Implementations of this class must support suspended decompression in which compressed data for one frame is fed block by block into the decompression routine, see description below.

## Member Function Documentation

## ◆ decode()

virtual OFCondition DJDecoder::decode | ( | Uint8 * | compressedFrameBuffer,
|  | Uint32 | compressedFrameBufferSize,
|  | Uint8 * | uncompressedFrameBuffer,
|  | Uint32 | uncompressedFrameBufferSize,
|  | OFBool | isSigned )
| pure virtual

suspended decompression routine.

Decompresses a JPEG frame until finished or out of data. Can be called with new data until a frame is complete.

Parameters

  compressedFrameBuffer | pointer to compressed input data, must not be NULL
  compressedFrameBufferSize | size of buffer, in bytes
  uncompressedFrameBuffer | pointer to uncompressed output data, must not be NULL. This buffer must not change between multiple decode() calls for a single frame.
  uncompressedFrameBufferSize | size of buffer, in words??? Buffer must be large enough to contain a complete frame.
  isSigned | OFTrue, if uncompressed pixel data is signed, OFFalse otherwise

Returns
  EC_Normal if successful, EC_Suspend if more data is needed, an error code otherwise.

Implemented in DJDecompressIJG12Bit, DJDecompressIJG16Bit, and DJDecompressIJG8Bit.

## ◆ init()

virtual OFCondition DJDecoder::init | ( |  | ) |
| pure virtual

initializes internal object structures.

Must be called before a new frame is decompressed.

Returns
  EC_Normal if successful, an error code otherwise

Implemented in DJDecompressIJG12Bit, DJDecompressIJG16Bit, and DJDecompressIJG8Bit.

The documentation for this class was generated from the following file:

- dcmjpeg/include/dcmtk/dcmjpeg/djdecabs.h

Generated on Sat Mar 1 2025 for DCMTK Version 3.6.9 by Doxygen 1.13.2