OFFIS DCMTK  Version 3.6.0
dcxfer.h
1 /*
2  *
3  * Copyright (C) 1994-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: dcmdata
15  *
16  * Author: Gerd Ehlers
17  *
18  * Purpose: Handling of transfer syntaxes
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:15:43 $
22  * CVS/RCS Revision: $Revision: 1.24 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 #ifndef DCXFER_H
30 #define DCXFER_H
31 
32 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
33 #include "dcmtk/dcmdata/dctypes.h"
34 #include "dcmtk/dcmdata/dcvr.h"
35 
38 typedef enum {
40  EXS_Unknown = -1,
42  EXS_LittleEndianImplicit = 0,
44  EXS_BigEndianImplicit = 1,
46  EXS_LittleEndianExplicit = 2,
48  EXS_BigEndianExplicit = 3,
50  EXS_JPEGProcess1TransferSyntax = 4,
52  EXS_JPEGProcess2_4TransferSyntax = 5,
54  EXS_JPEGProcess3_5TransferSyntax = 6,
56  EXS_JPEGProcess6_8TransferSyntax = 7,
58  EXS_JPEGProcess7_9TransferSyntax = 8,
60  EXS_JPEGProcess10_12TransferSyntax = 9,
62  EXS_JPEGProcess11_13TransferSyntax = 10,
64  EXS_JPEGProcess14TransferSyntax = 11,
66  EXS_JPEGProcess15TransferSyntax = 12,
68  EXS_JPEGProcess16_18TransferSyntax = 13,
70  EXS_JPEGProcess17_19TransferSyntax = 14,
72  EXS_JPEGProcess20_22TransferSyntax = 15,
74  EXS_JPEGProcess21_23TransferSyntax = 16,
76  EXS_JPEGProcess24_26TransferSyntax = 17,
78  EXS_JPEGProcess25_27TransferSyntax = 18,
80  EXS_JPEGProcess28TransferSyntax = 19,
82  EXS_JPEGProcess29TransferSyntax = 20,
84  EXS_JPEGProcess14SV1TransferSyntax = 21,
86  EXS_RLELossless = 22,
88  EXS_JPEGLSLossless = 23,
90  EXS_JPEGLSLossy = 24,
92  EXS_DeflatedLittleEndianExplicit = 25,
94  EXS_JPEG2000LosslessOnly = 26,
96  EXS_JPEG2000 = 27,
98  EXS_MPEG2MainProfileAtMainLevel = 28,
100  EXS_MPEG2MainProfileAtHighLevel = 29,
102  EXS_JPEG2000MulticomponentLosslessOnly = 30,
104  EXS_JPEG2000Multicomponent = 31,
106  EXS_JPIPReferenced = 32,
108  EXS_JPIPReferencedDeflate = 33
109 } E_TransferSyntax;
110 
113 typedef enum {
115  EBO_unknown = 0,
116 
118  EBO_LittleEndian = 1,
119 
121  EBO_BigEndian = 2
122 } E_ByteOrder;
123 
126 typedef enum {
128  EVT_Implicit = 0,
129 
131  EVT_Explicit = 1
132 } E_VRType;
133 
136 typedef enum {
138  EJE_NotEncapsulated = 0,
139 
141  EJE_Encapsulated = 1
142 } E_JPEGEncapsulated;
143 
146 typedef enum
147 {
149  ESC_none = 0
151  , ESC_unsupported = 1
152 #ifdef WITH_ZLIB
153 
154  , ESC_zlib = 2
155 #endif
156 } E_StreamCompression;
157 
158 
161 class DcmXfer
162 {
163 public:
167  DcmXfer( E_TransferSyntax xfer );
168 
172  DcmXfer( const char *xferName_xferID );
173 
175  DcmXfer( const DcmXfer &newXfer );
176 
178  ~DcmXfer();
179 
181  DcmXfer & operator = ( const E_TransferSyntax xfer );
182 
184  DcmXfer & operator = ( const DcmXfer &newtag );
185 
187  inline E_TransferSyntax getXfer() const { return xferSyn; }
188 
190  inline E_ByteOrder getByteOrder() const { return byteOrder; }
191 
193  inline const char* getXferName() const { return xferName; }
194 
196  inline const char* getXferID() const { return xferID; }
197 
199  inline OFBool isLittleEndian() const
200  {
201  return byteOrder == EBO_LittleEndian;
202  }
203 
205  inline OFBool isBigEndian() const { return byteOrder == EBO_BigEndian; }
206 
208  inline OFBool isImplicitVR() const { return vrType == EVT_Implicit; }
209 
211  inline OFBool isExplicitVR() const { return vrType == EVT_Explicit; }
212 
214  inline OFBool isEncapsulated() const
215  {
216  return encapsulated == EJE_Encapsulated;
217  }
218 
220  inline OFBool isNotEncapsulated() const
221  {
222  return encapsulated == EJE_NotEncapsulated;
223  }
224 
230  inline Uint32 getJPEGProcess8Bit() const { return JPEGProcess8; }
231 
237  inline Uint32 getJPEGProcess12Bit() const { return JPEGProcess12;}
238 
240  inline OFBool isRetired() const
241  {
242  return retired;
243  }
244 
246  inline E_StreamCompression getStreamCompression() const { return streamCompression;}
247 
254  Uint32 sizeofTagHeader(DcmEVR evr) const;
255 
256 private:
258  const char *xferID;
259 
261  const char *xferName;
262 
264  E_TransferSyntax xferSyn;
265 
267  E_ByteOrder byteOrder;
268 
270  E_VRType vrType;
271 
273  E_JPEGEncapsulated encapsulated;
274 
276  Uint32 JPEGProcess8;
277 
280 
282  OFBool retired;
283 
285  E_StreamCompression streamCompression;
286 
287 };
288 
293 extern const E_ByteOrder gLocalByteOrder;
294 
295 #endif // DCXFER_H
296 
297 /*
298  * CVS/RCS Log:
299  * $Log: dcxfer.h,v $
300  * Revision 1.24 2010-10-14 13:15:43 joergr
301  * Updated copyright header. Added reference to COPYRIGHT file.
302  *
303  * Revision 1.23 2010-09-15 08:46:16 joergr
304  * Added definition of XML encoding transfer syntax (Supplement 114) and JPIP
305  * referenced transfer syntaxes (Supplement 106).
306  *
307  * Revision 1.22 2010-09-02 12:12:43 joergr
308  * Added support for "MPEG2 Main Profile @ High Level" transfer syntax.
309  *
310  * Revision 1.21 2008-06-23 12:09:13 joergr
311  * Fixed inconsistencies in Doxygen API documentation.
312  *
313  * Revision 1.20 2008-04-23 06:39:37 meichel
314  * Added new method DcmXfer::isRetired that returns true for
315  * retired transfer syntaxes.
316  *
317  * Revision 1.19 2007/11/29 14:30:19 meichel
318  * Write methods now handle large raw data elements (such as pixel data)
319  * without loading everything into memory. This allows very large images to
320  * be sent over a network connection, or to be copied without ever being
321  * fully in memory.
322  *
323  * Revision 1.18 2005/12/08 16:29:17 meichel
324  * Changed include path schema for all DCMTK header files
325  *
326  * Revision 1.17 2005/10/25 08:55:32 meichel
327  * Updated list of UIDs and added support for new transfer syntaxes
328  * and storage SOP classes.
329  *
330  * Revision 1.16 2004/04/06 18:01:50 joergr
331  * Updated data dictionary, UIDs and transfer syntaxes for the latest Final Text
332  * Supplements (42 and 47) and Correction Proposals (CP 25).
333  *
334  * Revision 1.15 2002/08/27 16:55:41 meichel
335  * Initial release of new DICOM I/O stream classes that add support for stream
336  * compression (deflated little endian explicit VR transfer syntax)
337  *
338  * Revision 1.14 2001/11/08 16:17:30 meichel
339  * Updated data dictionary, UIDs and transfer syntaxes for DICOM 2001 edition.
340  *
341  * Revision 1.13 2001/06/01 15:48:55 meichel
342  * Updated copyright header
343  *
344  * Revision 1.12 2001/01/17 10:20:36 meichel
345  * Added toolkit support for JPEG-LS transfer syntaxes
346  *
347  * Revision 1.11 2000/04/14 16:01:23 meichel
348  * Minor changes for thread safety.
349  *
350  * Revision 1.10 2000/03/08 16:26:28 meichel
351  * Updated copyright header.
352  *
353  * Revision 1.9 1999/03/31 09:25:13 meichel
354  * Updated copyright header in module dcmdata
355  *
356  *
357  */


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