dcmjpeg/include/dcmtk/dcmjpeg/djeijg16.h

00001 /*
00002  *
00003  *  Copyright (C) 1997-2010, OFFIS e.V.
00004  *  All rights reserved.  See COPYRIGHT file for details.
00005  *
00006  *  This software and supporting documentation were developed by
00007  *
00008  *    OFFIS e.V.
00009  *    R&D Division Health
00010  *    Escherweg 2
00011  *    D-26121 Oldenburg, Germany
00012  *
00013  *
00014  *  Module:  dcmjpeg
00015  *
00016  *  Author:  Norbert Olges, Marco Eichelberg
00017  *
00018  *  Purpose: compression routines of the IJG JPEG library configured for 16 bits/sample. 
00019  *
00020  *  Last Update:      $Author: joergr $
00021  *  Update Date:      $Date: 2010-10-14 13:17:17 $
00022  *  CVS/RCS Revision: $Revision: 1.5 $
00023  *  Status:           $State: Exp $
00024  *
00025  *  CVS/RCS Log at end of file
00026  *
00027  */
00028 
00029 #ifndef DJEIJG16_H
00030 #define DJEIJG16_H
00031 
00032 #include "dcmtk/config/osconfig.h"
00033 #include "dcmtk/ofstd/oflist.h"
00034 #include "dcmtk/dcmjpeg/djencabs.h"
00035 
00036 extern "C"
00037 {
00038   struct jpeg_compress_struct;
00039   typedef struct jpeg_compress_struct * j_compress_ptr;
00040   struct jpeg_decompress_struct;
00041   typedef struct jpeg_decompress_struct * j_decompress_ptr;
00042 }
00043 
00044 class DJCodecParameter;
00045 
00046 
00050 class DJCompressIJG16Bit: public DJEncoder
00051 {
00052 public:
00053 
00059   DJCompressIJG16Bit(const DJCodecParameter& cp, EJ_Mode mode, int prediction, int ptrans);
00060 
00062   virtual ~DJCompressIJG16Bit();
00063 
00076   virtual OFCondition encode(
00077     Uint16 columns,
00078     Uint16 rows,
00079     EP_Interpretation interpr,
00080     Uint16 samplesPerPixel,
00081     Uint16 *image_buffer,
00082     Uint8 *&to,
00083     Uint32 &length);
00084 
00097   virtual OFCondition encode(
00098     Uint16 columns,
00099     Uint16 rows,
00100     EP_Interpretation interpr,
00101     Uint16 samplesPerPixel,
00102     Uint8 *image_buffer,
00103     Uint8 *&to,
00104     Uint32 &length);
00105 
00108   virtual Uint16 bytesPerSample() const { return 2; }
00109 
00112   virtual Uint16 bitsPerSample() const { return 16; }
00113 
00118   void initDestination(jpeg_compress_struct *cinfo);
00119 
00124   int emptyOutputBuffer(jpeg_compress_struct *cinfo);
00125 
00130   void termDestination(jpeg_compress_struct *cinfo);
00131 
00137   virtual void emitMessage(void *arg, int msg_level) const;
00138 
00139 private:
00140 
00142   DJCompressIJG16Bit(const DJCompressIJG16Bit&);
00143 
00145   DJCompressIJG16Bit& operator=(const DJCompressIJG16Bit&);
00146 
00148   void cleanup();
00149 
00151   const DJCodecParameter *cparam;
00152   
00154   int psv;
00155 
00157   int pt;
00158 
00160   EJ_Mode modeofOperation;
00161 
00163   OFList<unsigned char *> pixelDataList;
00164 
00166   size_t bytesInLastBlock;
00167 
00168 };
00169 
00170 #endif
00171 
00172 /*
00173  * CVS/RCS Log
00174  * $Log: djeijg16.h,v $
00175  * Revision 1.5  2010-10-14 13:17:17  joergr
00176  * Updated copyright header. Added reference to COPYRIGHT file.
00177  *
00178  * Revision 1.4  2009-11-18 16:17:54  uli
00179  * Use more than just the INFO log level.
00180  *
00181  * Revision 1.3  2005-12-08 16:59:26  meichel
00182  * Changed include path schema for all DCMTK header files
00183  *
00184  * Revision 1.2  2001/11/19 15:13:28  meichel
00185  * Introduced verbose mode in module dcmjpeg. If enabled, warning
00186  *   messages from the IJG library are printed on ofConsole, otherwise
00187  *   the library remains quiet.
00188  *
00189  * Revision 1.1  2001/11/13 15:56:24  meichel
00190  * Initial release of module dcmjpeg
00191  *
00192  *
00193  */


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1