OFFIS DCMTK  Version 3.6.0
djeijg16.h
1 /*
2  *
3  * Copyright (C) 1997-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmjpeg
15  *
16  * Author: Norbert Olges, Marco Eichelberg
17  *
18  * Purpose: compression routines of the IJG JPEG library configured for 16 bits/sample.
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:17:17 $
22  * CVS/RCS Revision: $Revision: 1.5 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 #ifndef DJEIJG16_H
30 #define DJEIJG16_H
31 
32 #include "dcmtk/config/osconfig.h"
33 #include "dcmtk/ofstd/oflist.h"
34 #include "dcmtk/dcmjpeg/djencabs.h"
35 
36 extern "C"
37 {
38  struct jpeg_compress_struct;
39  typedef struct jpeg_compress_struct * j_compress_ptr;
42 }
43 
44 class DJCodecParameter;
45 
46 
51 {
52 public:
53 
59  DJCompressIJG16Bit(const DJCodecParameter& cp, EJ_Mode mode, int prediction, int ptrans);
60 
62  virtual ~DJCompressIJG16Bit();
63 
76  virtual OFCondition encode(
77  Uint16 columns,
78  Uint16 rows,
79  EP_Interpretation interpr,
80  Uint16 samplesPerPixel,
81  Uint16 *image_buffer,
82  Uint8 *&to,
83  Uint32 &length);
84 
97  virtual OFCondition encode(
98  Uint16 columns,
99  Uint16 rows,
100  EP_Interpretation interpr,
101  Uint16 samplesPerPixel,
102  Uint8 *image_buffer,
103  Uint8 *&to,
104  Uint32 &length);
105 
108  virtual Uint16 bytesPerSample() const { return 2; }
109 
112  virtual Uint16 bitsPerSample() const { return 16; }
113 
119 
125 
131 
137  virtual void emitMessage(void *arg, int msg_level) const;
138 
139 private:
140 
143 
146 
148  void cleanup();
149 
152 
154  int psv;
155 
157  int pt;
158 
161 
164 
167 
168 };
169 
170 #endif
171 
172 /*
173  * CVS/RCS Log
174  * $Log: djeijg16.h,v $
175  * Revision 1.5 2010-10-14 13:17:17 joergr
176  * Updated copyright header. Added reference to COPYRIGHT file.
177  *
178  * Revision 1.4 2009-11-18 16:17:54 uli
179  * Use more than just the INFO log level.
180  *
181  * Revision 1.3 2005-12-08 16:59:26 meichel
182  * Changed include path schema for all DCMTK header files
183  *
184  * Revision 1.2 2001/11/19 15:13:28 meichel
185  * Introduced verbose mode in module dcmjpeg. If enabled, warning
186  * messages from the IJG library are printed on ofConsole, otherwise
187  * the library remains quiet.
188  *
189  * Revision 1.1 2001/11/13 15:56:24 meichel
190  * Initial release of module dcmjpeg
191  *
192  *
193  */
abstract base class for compression classes.
Definition: djencabs.h:39
virtual Uint16 bitsPerSample() const
returns the number of bits per sample that will be expected when encoding.
Definition: djeijg16.h:112
size_t bytesInLastBlock
filled number of bytes in last block in pixelDataList
Definition: djeijg16.h:166
int psv
for lossless compression, defines selection value
Definition: djeijg16.h:154
this class encapsulates the compression routines of the IJG JPEG library configured for 16 bits/sampl...
Definition: djeijg16.h:50
OFList< unsigned char * > pixelDataList
list of compressed pixel data blocks
Definition: djeijg16.h:163
virtual void emitMessage(void *arg, int msg_level) const
callback function used to report warning messages and the like.
const DJCodecParameter * cparam
codec parameters
Definition: djeijg16.h:151
void initDestination(jpeg_compress_struct *cinfo)
callback for IJG compress destination manager.
void termDestination(jpeg_compress_struct *cinfo)
callback for IJG compress destination manager.
DJCompressIJG16Bit(const DJCodecParameter &cp, EJ_Mode mode, int prediction, int ptrans)
constructor for lossless JPEG
void cleanup()
cleans up pixelDataList, called from destructor and error handlers
int emptyOutputBuffer(jpeg_compress_struct *cinfo)
callback for IJG compress destination manager.
virtual ~DJCompressIJG16Bit()
destructor
virtual OFCondition encode(Uint16 columns, Uint16 rows, EP_Interpretation interpr, Uint16 samplesPerPixel, Uint16 *image_buffer, Uint8 *&to, Uint32 &length)
single frame compression routine for 16-bit raw pixel data.
codec parameter for IJG codecs
Definition: djcparam.h:38
int pt
for lossless compression, defines point transform
Definition: djeijg16.h:157
EJ_Mode modeofOperation
enum for mode of operation (baseline, sequential, progressive etc.)
Definition: djeijg16.h:160
virtual Uint16 bytesPerSample() const
returns the number of bytes per sample that will be expected when encoding.
Definition: djeijg16.h:108
DJCompressIJG16Bit & operator=(const DJCompressIJG16Bit &)
private undefined copy assignment operator
General purpose class for condition codes.
Definition: ofcond.h:305


Generated on Sun Aug 23 2015 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.9.1