dcmjpeg/include/dcmtk/dcmjpeg/djutils.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: enumerations, error constants and helper functions for dcmjpeg
00019  *
00020  *  Last Update:      $Author: joergr $
00021  *  Update Date:      $Date: 2010-10-14 13:17:17 $
00022  *  CVS/RCS Revision: $Revision: 1.6 $
00023  *  Status:           $State: Exp $
00024  *
00025  *  CVS/RCS Log at end of file
00026  *
00027  */
00028 
00029 #ifndef DJUTILS_H
00030 #define DJUTILS_H
00031 
00032 #include "dcmtk/config/osconfig.h"
00033 #include "dcmtk/ofstd/ofcond.h"      /* for class OFCondition */
00034 #include "dcmtk/dcmimgle/diutils.h"  /* for EP_Interpretation */
00035 #include "dcmtk/oflog/oflog.h"
00036 
00037 
00038 // global definitions for logging mechanism provided by the oflog module
00039 
00040 OFLogger DCM_dcmjpegGetLogger();
00041 
00042 #define DCMJPEG_TRACE(msg) OFLOG_TRACE(DCM_dcmjpegGetLogger(), msg)
00043 #define DCMJPEG_DEBUG(msg) OFLOG_DEBUG(DCM_dcmjpegGetLogger(), msg)
00044 #define DCMJPEG_INFO(msg)  OFLOG_INFO(DCM_dcmjpegGetLogger(), msg)
00045 #define DCMJPEG_WARN(msg)  OFLOG_WARN(DCM_dcmjpegGetLogger(), msg)
00046 #define DCMJPEG_ERROR(msg) OFLOG_ERROR(DCM_dcmjpegGetLogger(), msg)
00047 #define DCMJPEG_FATAL(msg) OFLOG_FATAL(DCM_dcmjpegGetLogger(), msg)
00048 
00049 
00050 class DcmItem;
00051 
00054 enum EJ_Mode
00055 {
00057   EJM_baseline,
00058 
00060   EJM_sequential,
00061 
00063   EJM_spectralSelection,
00064 
00066   EJM_progressive,
00067 
00069   EJM_lossless
00070 };
00071 
00075 enum E_SubSampling
00076 {
00078   ESS_444,
00080   ESS_422,
00082   ESS_411
00083 };
00084 
00088 enum E_UIDCreation
00089 {
00093   EUC_default,
00094 
00096   EUC_always,
00097 
00099   EUC_never
00100 };
00101 
00105 enum E_PlanarConfiguration
00106 {
00110   EPC_default,
00111 
00113   EPC_colorByPixel,
00114 
00116   EPC_colorByPlane
00117 };
00118 
00123 enum E_CompressionColorSpaceConversion
00124 {
00129   ECC_lossyYCbCr,
00130 
00134   ECC_lossyRGB,
00135 
00138   ECC_monochrome
00139 };
00140 
00145 enum E_DecompressionColorSpaceConversion
00146 {
00150   EDC_photometricInterpretation,
00151 
00155   EDC_lossyOnly,
00156 
00160   EDC_always,
00161 
00164   EDC_never,
00165 
00171   EDC_guessLossyOnly,
00172 
00177   EDC_guess
00178 };
00179 
00180 
00181 // CONDITION CONSTANTS
00182 
00184 extern const OFCondition EJ_Suspension;
00186 extern const OFCondition EJ_IJG8_FrameBufferTooSmall;
00188 extern const OFCondition EJ_IJG12_FrameBufferTooSmall;
00190 extern const OFCondition EJ_IJG16_FrameBufferTooSmall;
00192 extern const OFCondition EJ_UnsupportedPhotometricInterpretation;
00194 extern const OFCondition EJ_UnsupportedColorConversion;
00195 
00196 // reserved condition codes for IJG error messages
00197 const unsigned short EJCode_IJG8_Compression    = 0x0100;
00198 const unsigned short EJCode_IJG8_Decompression  = 0x0101;
00199 const unsigned short EJCode_IJG12_Compression   = 0x0102;
00200 const unsigned short EJCode_IJG12_Decompression = 0x0103;
00201 const unsigned short EJCode_IJG16_Compression   = 0x0104;
00202 const unsigned short EJCode_IJG16_Decompression = 0x0105;
00203 
00207 class DcmJpegHelper
00208 {
00209 public:
00210 
00216   static EP_Interpretation getPhotometricInterpretation(DcmItem *item);
00217 };
00218 
00219 #endif
00220 
00221 /*
00222  * CVS/RCS Log
00223  * $Log: djutils.h,v $
00224  * Revision 1.6  2010-10-14 13:17:17  joergr
00225  * Updated copyright header. Added reference to COPYRIGHT file.
00226  *
00227  * Revision 1.5  2010-03-24 14:58:48  joergr
00228  * Added new options for the color space conversion during decompression based
00229  * on the color model that is "guessed" by the underlying JPEG library (IJG).
00230  *
00231  * Revision 1.4  2009-10-07 12:44:33  uli
00232  * Switched to logging mechanism provided by the "new" oflog module.
00233  *
00234  * Revision 1.3  2005-12-08 16:59:38  meichel
00235  * Changed include path schema for all DCMTK header files
00236  *
00237  * Revision 1.2  2005/11/30 14:13:13  onken
00238  * Added OFCondition constant for "unsupported color space conversions"
00239  *
00240  * Revision 1.1  2001/11/13 15:56:30  meichel
00241  * Initial release of module dcmjpeg
00242  *
00243  *
00244  */


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