djdijg8.h

00001 /*
00002  *
00003  *  Copyright (C) 1997-2005, OFFIS
00004  *
00005  *  This software and supporting documentation were developed by
00006  *
00007  *    Kuratorium OFFIS e.V.
00008  *    Healthcare Information and Communication Systems
00009  *    Escherweg 2
00010  *    D-26121 Oldenburg, Germany
00011  *
00012  *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
00013  *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
00014  *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
00015  *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
00016  *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
00017  *
00018  *  Module:  dcmjpeg
00019  *
00020  *  Author:  Norbert Olges, Marco Eichelberg
00021  *
00022  *  Purpose: decompression routines of the IJG JPEG library configured for 8 bits/sample.
00023  *
00024  *  Last Update:      $Author: meichel $
00025  *  Update Date:      $Date: 2005/12/08 16:59:24 $
00026  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmjpeg/include/dcmtk/dcmjpeg/djdijg8.h,v $
00027  *  CVS/RCS Revision: $Revision: 1.4 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 #ifndef DJDIJG8_H
00035 #define DJDIJG8_H
00036 
00037 #include "dcmtk/config/osconfig.h"
00038 #include "dcmtk/dcmjpeg/djdecabs.h" /* for class DJDecoder */
00039 
00040 extern "C"
00041 {
00042   struct jpeg_decompress_struct;
00043 }
00044 
00045 class DJCodecParameter;
00046 
00050 class DJDecompressIJG8Bit : public DJDecoder
00051 {
00052 public:
00053 
00058   DJDecompressIJG8Bit(const DJCodecParameter& cp, OFBool isYBR);
00059 
00061   virtual ~DJDecompressIJG8Bit();
00062 
00067   virtual OFCondition init();
00068 
00081   virtual OFCondition decode(
00082     Uint8 *compressedFrameBuffer,
00083     Uint32 compressedFrameBufferSize,
00084     Uint8 *uncompressedFrameBuffer,
00085     Uint32 uncompressedFrameBufferSize,
00086     OFBool isSigned);
00087 
00090   virtual Uint16 bytesPerSample() const
00091   {
00092     return sizeof(Uint8);
00093   }
00094 
00098   virtual EP_Interpretation getDecompressedColorModel() const
00099   {
00100     return decompressedColorModel;
00101   }
00102 
00106   virtual void outputMessage() const;
00107 
00108 private:
00109 
00111   DJDecompressIJG8Bit(const DJDecompressIJG8Bit&);
00112 
00114   DJDecompressIJG8Bit& operator=(const DJDecompressIJG8Bit&);
00115 
00117   void cleanup();
00118 
00120   const DJCodecParameter *cparam;
00121 
00123   jpeg_decompress_struct *cinfo;
00124 
00126   int suspension;
00127 
00129   void *jsampBuffer;
00130 
00132   OFBool dicomPhotometricInterpretationIsYCbCr;
00133 
00135   EP_Interpretation decompressedColorModel;
00136 
00137 };
00138 
00139 #endif
00140 
00141 /*
00142  * CVS/RCS Log
00143  * $Log: djdijg8.h,v $
00144  * Revision 1.4  2005/12/08 16:59:24  meichel
00145  * Changed include path schema for all DCMTK header files
00146  *
00147  * Revision 1.3  2005/11/30 14:08:57  onken
00148  * Added check to decline automatic IJG color space conversion of signed pixel
00149  * data, because IJG lib only handles unsigned input for conversions.
00150  *
00151  * Revision 1.2  2001/11/19 15:13:28  meichel
00152  * Introduced verbose mode in module dcmjpeg. If enabled, warning
00153  *   messages from the IJG library are printed on ofConsole, otherwise
00154  *   the library remains quiet.
00155  *
00156  * Revision 1.1  2001/11/13 15:56:23  meichel
00157  * Initial release of module dcmjpeg
00158  *
00159  *
00160  */


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5