00001 // 00002 // (C) Jan de Vaan 2007-2010, all rights reserved. See the accompanying "License.txt" for licensed use. 00003 // 00004 00005 00006 #ifndef CHARLS_HEADER 00007 #define CHARLS_HEADER 00008 00009 #include "dcmtk/ofstd/ofaptr.h" 00010 #include "streams.h" 00011 00012 #define JPEG_SOI 0xD8 00013 #define JPEG_EOI 0xD9 00014 #define JPEG_SOS 0xDA 00015 00016 #define JPEG_SOF 0xF7 00017 #define JPEG_LSE 0xF8 00018 #define JPEG_DNL 0xDC 00019 #define JPEG_DRI 0xDD 00020 #define JPEG_RSTm 0xD0 00021 #define JPEG_COM 0xFE 00022 #define JPEG_APP0 0xE0 // JFIF 00023 #define JPEG_APP7 0xE7 // colorspace 00024 #define JPEG_APP8 0xE8 // colorXForm 00025 00026 00027 class JLSOutputStream; 00028 00029 00030 template<class STRATEGY> 00031 class JlsCodecFactory 00032 { 00033 public: 00034 OFauto_ptr<STRATEGY> GetCodec(const JlsParameters& info, const JlsCustomParameters&); 00035 private: 00036 STRATEGY* GetCodecImpl(const JlsParameters& info); 00037 }; 00038 00039 JLS_ERROR CheckParameterCoherent(const JlsParameters* pparams); 00040 00041 00042 // 00043 // JpegSegment 00044 // 00045 class JpegSegment 00046 { 00047 protected: 00048 JpegSegment() {} 00049 public: 00050 virtual ~JpegSegment() {} 00051 virtual void Write(JLSOutputStream* pstream) = 0; 00052 }; 00053 00054 #endif