djeijg16.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: compression routines of the IJG JPEG library configured for 16 bits/sample. 
00023  *
00024  *  Last Update:      $Author: meichel $
00025  *  Update Date:      $Date: 2005/12/08 16:59:26 $
00026  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmjpeg/include/dcmtk/dcmjpeg/djeijg16.h,v $
00027  *  CVS/RCS Revision: $Revision: 1.3 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 #ifndef DJEIJG16_H
00035 #define DJEIJG16_H
00036 
00037 #include "dcmtk/config/osconfig.h"
00038 #include "dcmtk/ofstd/oflist.h"
00039 #include "dcmtk/dcmjpeg/djencabs.h"
00040 
00041 extern "C"
00042 {
00043   struct jpeg_compress_struct;
00044   typedef struct jpeg_compress_struct * j_compress_ptr;
00045   struct jpeg_decompress_struct;
00046   typedef struct jpeg_decompress_struct * j_decompress_ptr;
00047 }
00048 
00049 class DJCodecParameter;
00050 
00051 
00055 class DJCompressIJG16Bit: public DJEncoder
00056 {
00057 public:
00058 
00064   DJCompressIJG16Bit(const DJCodecParameter& cp, EJ_Mode mode, int prediction, int ptrans);
00065 
00067   virtual ~DJCompressIJG16Bit();
00068 
00081   virtual OFCondition encode(
00082     Uint16 columns,
00083     Uint16 rows,
00084     EP_Interpretation interpr,
00085     Uint16 samplesPerPixel,
00086     Uint16 *image_buffer,
00087     Uint8 *&to,
00088     Uint32 &length);
00089 
00102   virtual OFCondition encode(
00103     Uint16 columns,
00104     Uint16 rows,
00105     EP_Interpretation interpr,
00106     Uint16 samplesPerPixel,
00107     Uint8 *image_buffer,
00108     Uint8 *&to,
00109     Uint32 &length);
00110 
00113   virtual Uint16 bytesPerSample() const { return 2; }
00114 
00117   virtual Uint16 bitsPerSample() const { return 16; }
00118 
00123   void initDestination(jpeg_compress_struct *cinfo);
00124 
00129   int emptyOutputBuffer(jpeg_compress_struct *cinfo);
00130 
00135   void termDestination(jpeg_compress_struct *cinfo);
00136     
00141   virtual void outputMessage(void *arg) const;
00142 
00143 private:
00144 
00146   DJCompressIJG16Bit(const DJCompressIJG16Bit&);
00147 
00149   DJCompressIJG16Bit& operator=(const DJCompressIJG16Bit&);
00150 
00152   void cleanup();
00153 
00155   const DJCodecParameter *cparam;
00156   
00158   int psv;
00159 
00161   int pt;
00162 
00164   EJ_Mode modeofOperation;
00165 
00167   OFList<unsigned char *> pixelDataList;
00168 
00170   size_t bytesInLastBlock;
00171 
00172 };
00173 
00174 #endif
00175 
00176 /*
00177  * CVS/RCS Log
00178  * $Log: djeijg16.h,v $
00179  * Revision 1.3  2005/12/08 16:59:26  meichel
00180  * Changed include path schema for all DCMTK header files
00181  *
00182  * Revision 1.2  2001/11/19 15:13:28  meichel
00183  * Introduced verbose mode in module dcmjpeg. If enabled, warning
00184  *   messages from the IJG library are printed on ofConsole, otherwise
00185  *   the library remains quiet.
00186  *
00187  * Revision 1.1  2001/11/13 15:56:24  meichel
00188  * Initial release of module dcmjpeg
00189  *
00190  *
00191  */


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