DCMTK  Version 3.6.5
OFFIS DICOM Toolkit
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DJDecompressIJG8Bit Class Reference

this class encapsulates the decompression routines of the IJG JPEG library configured for 8 bits/sample. More...

+ Inheritance diagram for DJDecompressIJG8Bit:

Public Member Functions

 DJDecompressIJG8Bit (const DJCodecParameter &cp, OFBool isYBR)
 constructor More...
 
virtual ~DJDecompressIJG8Bit ()
 destructor
 
virtual OFCondition init ()
 initializes internal object structures. More...
 
virtual OFCondition decode (Uint8 *compressedFrameBuffer, Uint32 compressedFrameBufferSize, Uint8 *uncompressedFrameBuffer, Uint32 uncompressedFrameBufferSize, OFBool isSigned)
 suspended decompression routine. More...
 
virtual Uint16 bytesPerSample () const
 returns the number of bytes per sample that will be written when decoding.
 
virtual EP_Interpretation getDecompressedColorModel () const
 after successful compression, returns the color model of the decompressed image
 
virtual void emitMessage (int msg_level) const
 callback function used to report warning messages and the like. More...
 
- Public Member Functions inherited from DJDecoder
 DJDecoder ()
 default constructor
 
virtual ~DJDecoder ()
 destructor
 

Private Member Functions

 DJDecompressIJG8Bit (const DJDecompressIJG8Bit &)
 private undefined copy constructor
 
DJDecompressIJG8Bitoperator= (const DJDecompressIJG8Bit &)
 private undefined copy assignment operator
 
void cleanup ()
 cleans up cinfo structure, called from destructor and error handlers
 

Private Attributes

const DJCodecParametercparam
 codec parameters
 
jpeg_decompress_structcinfo
 decompression structure
 
int suspension
 position of last suspend
 
void * jsampBuffer
 temporary storage for row buffer during suspension
 
OFBool dicomPhotometricInterpretationIsYCbCr
 Flag indicating if DICOM photometric interpretation is YCbCr.
 
EP_Interpretation decompressedColorModel
 color model after decompression
 

Detailed Description

this class encapsulates the decompression routines of the IJG JPEG library configured for 8 bits/sample.

Constructor & Destructor Documentation

◆ DJDecompressIJG8Bit()

DJDecompressIJG8Bit::DJDecompressIJG8Bit ( const DJCodecParameter cp,
OFBool  isYBR 
)

constructor

Parameters
cpcodec parameters
isYBRflag indicating if DICOM photometric interpretation is YCbCr

Member Function Documentation

◆ decode()

virtual OFCondition DJDecompressIJG8Bit::decode ( Uint8 *  compressedFrameBuffer,
Uint32  compressedFrameBufferSize,
Uint8 *  uncompressedFrameBuffer,
Uint32  uncompressedFrameBufferSize,
OFBool  isSigned 
)
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
compressedFrameBufferpointer to compressed input data, must not be NULL
compressedFrameBufferSizesize of buffer, in bytes
uncompressedFrameBufferpointer to uncompressed output data, must not be NULL. This buffer must not change between multiple decode() calls for a single frame.
uncompressedFrameBufferSizesize of buffer, in bytes (!) Buffer must be large enough to contain a complete frame.
isSignedOFTrue, if uncompressed pixel data is signed, OFFalse otherwise
Returns
EC_Normal if successful, EC_Suspend if more data is needed, an error code otherwise.

Implements DJDecoder.

◆ emitMessage()

virtual void DJDecompressIJG8Bit::emitMessage ( int  msg_level) const
virtual

callback function used to report warning messages and the like.

Should not be called by user code directly.

Parameters
msg_level-1 for warnings, 0 and above for trace messages

◆ init()

virtual OFCondition DJDecompressIJG8Bit::init ( )
virtual

initializes internal object structures.

Must be called before a new frame is decompressed.

Returns
EC_Normal if successful, an error code otherwise

Implements DJDecoder.


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


Generated on Mon Oct 28 2019 for DCMTK Version 3.6.5 by Doxygen 1.8.15