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: Marco Eichelberg 00017 * 00018 * Purpose: singleton class that registers encoders for all supported JPEG processes. 00019 * 00020 * Last Update: $Author: joergr $ 00021 * Update Date: $Date: 2010-10-14 13:17:17 $ 00022 * CVS/RCS Revision: $Revision: 1.9 $ 00023 * Status: $State: Exp $ 00024 * 00025 * CVS/RCS Log at end of file 00026 * 00027 */ 00028 00029 #ifndef DJENCODE_H 00030 #define DJENCODE_H 00031 00032 #include "dcmtk/config/osconfig.h" 00033 #include "dcmtk/ofstd/oftypes.h" /* for OFBool */ 00034 #include "dcmtk/dcmjpeg/djutils.h" 00035 #include "dcmtk/dcmdata/dctypes.h" /* for Uint32 */ 00036 00037 class DJCodecParameter; 00038 class DJEncoderBaseline; 00039 class DJEncoderExtended; 00040 class DJEncoderLossless; 00041 class DJEncoderP14SV1; 00042 class DJEncoderProgressive; 00043 class DJEncoderSpectralSelection; 00044 00047 class DJEncoderRegistration 00048 { 00049 public: 00050 00081 static void registerCodecs( 00082 E_CompressionColorSpaceConversion pCompressionCSConversion = ECC_lossyYCbCr, 00083 E_UIDCreation pCreateSOPInstanceUID = EUC_default, 00084 OFBool pOptimizeHuffman = OFFalse, 00085 int pSmoothingFactor = 0, 00086 int pForcedBitDepth = 0, 00087 Uint32 pFragmentSize = 0, 00088 OFBool pCreateOffsetTable = OFTrue, 00089 E_SubSampling pSampleFactors = ESS_444, 00090 OFBool pWriteYBR422 = OFFalse, 00091 OFBool pConvertToSC = OFFalse, 00092 unsigned long pWindowType = 0, 00093 unsigned long pWindowParameter = 0, 00094 double pVoiCenter = 0.0, 00095 double pVoiWidth = 0.0, 00096 unsigned long pRoiLeft = 0, 00097 unsigned long pRoiTop = 0, 00098 unsigned long pRoiWidth = 0, 00099 unsigned long pRoiHeight = 0, 00100 OFBool pUsePixelValues = OFTrue, 00101 OFBool pUseModalityRescale = OFFalse, 00102 OFBool pAcceptWrongPaletteTags = OFFalse, 00103 OFBool pAcrNemaCompatibility = OFFalse, 00104 OFBool pRealLossless = OFTrue); 00105 00111 static void cleanup(); 00112 00113 private: 00114 00116 static OFBool registered; 00117 00119 static DJCodecParameter *cp; 00120 00122 static DJEncoderBaseline *encbas; 00123 00125 static DJEncoderExtended *encext; 00126 00128 static DJEncoderSpectralSelection *encsps; 00129 00131 static DJEncoderProgressive *encpro; 00132 00134 static DJEncoderP14SV1 *encsv1; 00135 00137 static DJEncoderLossless *enclol; 00138 00139 }; 00140 00141 #endif 00142 00143 /* 00144 * CVS/RCS Log 00145 * $Log: djencode.h,v $ 00146 * Revision 1.9 2010-10-14 13:17:17 joergr 00147 * Updated copyright header. Added reference to COPYRIGHT file. 00148 * 00149 * Revision 1.8 2009-10-07 12:44:33 uli 00150 * Switched to logging mechanism provided by the "new" oflog module. 00151 * 00152 * Revision 1.7 2008-04-30 12:45:52 meichel 00153 * DJEncoderRegistration::registerCodecs now by default enables the 00154 * true lossless codec instead of pseudo-lossless. 00155 * 00156 * Revision 1.6 2005/12/08 16:59:32 meichel 00157 * Changed include path schema for all DCMTK header files 00158 * 00159 * Revision 1.5 2005/11/29 15:57:05 onken 00160 * Added commandline options --accept-acr-nema and --accept-palettes 00161 * (same as in dcm2pnm) to dcmcjpeg and extended dcmjpeg to support 00162 * these options. Thanks to Gilles Mevel for suggestion. 00163 * 00164 * Revision 1.3 2005/11/29 08:50:34 onken 00165 * Added support for "true" lossless compression in dcmjpeg, that doesn't 00166 * use dcmimage classes, but compresses raw pixel data (8 and 16 bit) to 00167 * avoid losses in quality caused by color space conversions or modality 00168 * transformations etc. 00169 * Corresponding commandline option in dcmcjpeg (new default) 00170 * 00171 * Revision 1.2 2001/11/19 15:13:29 meichel 00172 * Introduced verbose mode in module dcmjpeg. If enabled, warning 00173 * messages from the IJG library are printed on ofConsole, otherwise 00174 * the library remains quiet. 00175 * 00176 * Revision 1.1 2001/11/13 15:56:27 meichel 00177 * Initial release of module dcmjpeg 00178 * 00179 * 00180 */