00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef DCXFER_H
00030 #define DCXFER_H
00031
00032 #include "dcmtk/config/osconfig.h"
00033 #include "dcmtk/dcmdata/dctypes.h"
00034 #include "dcmtk/dcmdata/dcvr.h"
00035
00038 typedef enum {
00040 EXS_Unknown = -1,
00042 EXS_LittleEndianImplicit = 0,
00044 EXS_BigEndianImplicit = 1,
00046 EXS_LittleEndianExplicit = 2,
00048 EXS_BigEndianExplicit = 3,
00050 EXS_JPEGProcess1TransferSyntax = 4,
00052 EXS_JPEGProcess2_4TransferSyntax = 5,
00054 EXS_JPEGProcess3_5TransferSyntax = 6,
00056 EXS_JPEGProcess6_8TransferSyntax = 7,
00058 EXS_JPEGProcess7_9TransferSyntax = 8,
00060 EXS_JPEGProcess10_12TransferSyntax = 9,
00062 EXS_JPEGProcess11_13TransferSyntax = 10,
00064 EXS_JPEGProcess14TransferSyntax = 11,
00066 EXS_JPEGProcess15TransferSyntax = 12,
00068 EXS_JPEGProcess16_18TransferSyntax = 13,
00070 EXS_JPEGProcess17_19TransferSyntax = 14,
00072 EXS_JPEGProcess20_22TransferSyntax = 15,
00074 EXS_JPEGProcess21_23TransferSyntax = 16,
00076 EXS_JPEGProcess24_26TransferSyntax = 17,
00078 EXS_JPEGProcess25_27TransferSyntax = 18,
00080 EXS_JPEGProcess28TransferSyntax = 19,
00082 EXS_JPEGProcess29TransferSyntax = 20,
00084 EXS_JPEGProcess14SV1TransferSyntax = 21,
00086 EXS_RLELossless = 22,
00088 EXS_JPEGLSLossless = 23,
00090 EXS_JPEGLSLossy = 24,
00092 EXS_DeflatedLittleEndianExplicit = 25,
00094 EXS_JPEG2000LosslessOnly = 26,
00096 EXS_JPEG2000 = 27,
00098 EXS_MPEG2MainProfileAtMainLevel = 28,
00100 EXS_MPEG2MainProfileAtHighLevel = 29,
00102 EXS_JPEG2000MulticomponentLosslessOnly = 30,
00104 EXS_JPEG2000Multicomponent = 31,
00106 EXS_JPIPReferenced = 32,
00108 EXS_JPIPReferencedDeflate = 33
00109 } E_TransferSyntax;
00110
00113 typedef enum {
00115 EBO_unknown = 0,
00116
00118 EBO_LittleEndian = 1,
00119
00121 EBO_BigEndian = 2
00122 } E_ByteOrder;
00123
00126 typedef enum {
00128 EVT_Implicit = 0,
00129
00131 EVT_Explicit = 1
00132 } E_VRType;
00133
00136 typedef enum {
00138 EJE_NotEncapsulated = 0,
00139
00141 EJE_Encapsulated = 1
00142 } E_JPEGEncapsulated;
00143
00146 typedef enum
00147 {
00149 ESC_none = 0
00151 , ESC_unsupported = 1
00152 #ifdef WITH_ZLIB
00154 , ESC_zlib = 2
00155 #endif
00156 } E_StreamCompression;
00157
00158
00161 class DcmXfer
00162 {
00163 public:
00167 DcmXfer( E_TransferSyntax xfer );
00168
00172 DcmXfer( const char *xferName_xferID );
00173
00175 DcmXfer( const DcmXfer &newXfer );
00176
00178 ~DcmXfer();
00179
00181 DcmXfer & operator = ( const E_TransferSyntax xfer );
00182
00184 DcmXfer & operator = ( const DcmXfer &newtag );
00185
00187 inline E_TransferSyntax getXfer() const { return xferSyn; }
00188
00190 inline E_ByteOrder getByteOrder() const { return byteOrder; }
00191
00193 inline const char* getXferName() const { return xferName; }
00194
00196 inline const char* getXferID() const { return xferID; }
00197
00199 inline OFBool isLittleEndian() const
00200 {
00201 return byteOrder == EBO_LittleEndian;
00202 }
00203
00205 inline OFBool isBigEndian() const { return byteOrder == EBO_BigEndian; }
00206
00208 inline OFBool isImplicitVR() const { return vrType == EVT_Implicit; }
00209
00211 inline OFBool isExplicitVR() const { return vrType == EVT_Explicit; }
00212
00214 inline OFBool isEncapsulated() const
00215 {
00216 return encapsulated == EJE_Encapsulated;
00217 }
00218
00220 inline OFBool isNotEncapsulated() const
00221 {
00222 return encapsulated == EJE_NotEncapsulated;
00223 }
00224
00230 inline Uint32 getJPEGProcess8Bit() const { return JPEGProcess8; }
00231
00237 inline Uint32 getJPEGProcess12Bit() const { return JPEGProcess12;}
00238
00240 inline OFBool isRetired() const
00241 {
00242 return retired;
00243 }
00244
00246 inline E_StreamCompression getStreamCompression() const { return streamCompression;}
00247
00254 Uint32 sizeofTagHeader(DcmEVR evr) const;
00255
00256 private:
00258 const char *xferID;
00259
00261 const char *xferName;
00262
00264 E_TransferSyntax xferSyn;
00265
00267 E_ByteOrder byteOrder;
00268
00270 E_VRType vrType;
00271
00273 E_JPEGEncapsulated encapsulated;
00274
00276 Uint32 JPEGProcess8;
00277
00279 Uint32 JPEGProcess12;
00280
00282 OFBool retired;
00283
00285 E_StreamCompression streamCompression;
00286
00287 };
00288
00293 extern const E_ByteOrder gLocalByteOrder;
00294
00295 #endif // DCXFER_H
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357