OFFIS DCMTK  Version 3.6.0
djutils.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: enumerations, error constants and helper functions for dcmjpeg
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:17:17 $
22  * CVS/RCS Revision: $Revision: 1.6 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 #ifndef DJUTILS_H
30 #define DJUTILS_H
31 
32 #include "dcmtk/config/osconfig.h"
33 #include "dcmtk/ofstd/ofcond.h" /* for class OFCondition */
34 #include "dcmtk/dcmimgle/diutils.h" /* for EP_Interpretation */
35 #include "dcmtk/oflog/oflog.h"
36 
37 
38 // global definitions for logging mechanism provided by the oflog module
39 
40 OFLogger DCM_dcmjpegGetLogger();
41 
42 #define DCMJPEG_TRACE(msg) OFLOG_TRACE(DCM_dcmjpegGetLogger(), msg)
43 #define DCMJPEG_DEBUG(msg) OFLOG_DEBUG(DCM_dcmjpegGetLogger(), msg)
44 #define DCMJPEG_INFO(msg) OFLOG_INFO(DCM_dcmjpegGetLogger(), msg)
45 #define DCMJPEG_WARN(msg) OFLOG_WARN(DCM_dcmjpegGetLogger(), msg)
46 #define DCMJPEG_ERROR(msg) OFLOG_ERROR(DCM_dcmjpegGetLogger(), msg)
47 #define DCMJPEG_FATAL(msg) OFLOG_FATAL(DCM_dcmjpegGetLogger(), msg)
48 
49 
50 class DcmItem;
51 
54 enum EJ_Mode
55 {
57  EJM_baseline,
58 
60  EJM_sequential,
61 
63  EJM_spectralSelection,
64 
66  EJM_progressive,
67 
69  EJM_lossless
70 };
71 
75 enum E_SubSampling
76 {
78  ESS_444,
80  ESS_422,
82  ESS_411
83 };
84 
88 enum E_UIDCreation
89 {
93  EUC_default,
94 
96  EUC_always,
97 
99  EUC_never
100 };
101 
105 enum E_PlanarConfiguration
106 {
110  EPC_default,
111 
113  EPC_colorByPixel,
114 
116  EPC_colorByPlane
117 };
118 
123 enum E_CompressionColorSpaceConversion
124 {
129  ECC_lossyYCbCr,
130 
134  ECC_lossyRGB,
135 
138  ECC_monochrome
139 };
140 
145 enum E_DecompressionColorSpaceConversion
146 {
150  EDC_photometricInterpretation,
151 
155  EDC_lossyOnly,
156 
160  EDC_always,
161 
164  EDC_never,
165 
171  EDC_guessLossyOnly,
172 
177  EDC_guess
178 };
179 
180 
181 // CONDITION CONSTANTS
182 
184 extern const OFCondition EJ_Suspension;
186 extern const OFCondition EJ_IJG8_FrameBufferTooSmall;
188 extern const OFCondition EJ_IJG12_FrameBufferTooSmall;
190 extern const OFCondition EJ_IJG16_FrameBufferTooSmall;
192 extern const OFCondition EJ_UnsupportedPhotometricInterpretation;
194 extern const OFCondition EJ_UnsupportedColorConversion;
195 
196 // reserved condition codes for IJG error messages
197 const unsigned short EJCode_IJG8_Compression = 0x0100;
198 const unsigned short EJCode_IJG8_Decompression = 0x0101;
199 const unsigned short EJCode_IJG12_Compression = 0x0102;
200 const unsigned short EJCode_IJG12_Decompression = 0x0103;
201 const unsigned short EJCode_IJG16_Compression = 0x0104;
202 const unsigned short EJCode_IJG16_Decompression = 0x0105;
203 
208 {
209 public:
210 
216  static EP_Interpretation getPhotometricInterpretation(DcmItem *item);
217 };
218 
219 #endif
220 
221 /*
222  * CVS/RCS Log
223  * $Log: djutils.h,v $
224  * Revision 1.6 2010-10-14 13:17:17 joergr
225  * Updated copyright header. Added reference to COPYRIGHT file.
226  *
227  * Revision 1.5 2010-03-24 14:58:48 joergr
228  * Added new options for the color space conversion during decompression based
229  * on the color model that is "guessed" by the underlying JPEG library (IJG).
230  *
231  * Revision 1.4 2009-10-07 12:44:33 uli
232  * Switched to logging mechanism provided by the "new" oflog module.
233  *
234  * Revision 1.3 2005-12-08 16:59:38 meichel
235  * Changed include path schema for all DCMTK header files
236  *
237  * Revision 1.2 2005/11/30 14:13:13 onken
238  * Added OFCondition constant for "unsupported color space conversions"
239  *
240  * Revision 1.1 2001/11/13 15:56:30 meichel
241  * Initial release of module dcmjpeg
242  *
243  *
244  */


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2