OFFIS DCMTK
Version 3.6.0
Main Page
Related Pages
Classes
Files
File List
File Members
dcmdata
include
dcmtk
dcmdata
dcvr.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, Andreas Barth, Andrew Hewett
17
*
18
* Purpose: Definition of the DcmVR class for Value Representation
19
*
20
* Last Update: $Author: joergr $
21
* Update Date: $Date: 2010-10-14 13:15:42 $
22
* CVS/RCS Revision: $Revision: 1.28 $
23
* Status: $State: Exp $
24
*
25
* CVS/RCS Log at end of file
26
*
27
*/
28
29
#ifndef DCMVR_H
30
#define DCMVR_H 1
31
32
#include "dcmtk/config/osconfig.h"
/* make sure OS specific configuration is included first */
33
#include "dcmtk/ofstd/ofglobal.h"
34
37
extern
OFGlobal<OFBool>
dcmEnableUnknownVRGeneration;
/* default OFTrue */
38
41
extern
OFGlobal<OFBool>
dcmEnableUnlimitedTextVRGeneration;
/* default OFTrue */
42
47
extern
OFGlobal<OFBool>
dcmEnableUnknownVRConversion;
/* default OFFalse */
48
49
/*
50
** VR Enumerations.
51
** NB: The order of entries has to conform to the order in DcmVRDict (see dcmvr.cc)!
52
** If not an error message is reported and the program aborts (only in DEBUG mode).
53
*/
54
enum
DcmEVR
55
{
56
58
EVR_AE,
59
61
EVR_AS,
62
64
EVR_AT,
65
67
EVR_CS,
68
70
EVR_DA,
71
73
EVR_DS,
74
76
EVR_DT,
77
79
EVR_FL,
80
82
EVR_FD,
83
85
EVR_IS,
86
88
EVR_LO,
89
91
EVR_LT,
92
94
EVR_OB,
95
97
EVR_OF,
98
100
EVR_OW,
101
103
EVR_PN,
104
106
EVR_SH,
107
109
EVR_SL,
110
112
EVR_SQ,
113
115
EVR_SS,
116
118
EVR_ST,
119
121
EVR_TM,
122
124
EVR_UI,
125
127
EVR_UL,
128
130
EVR_US,
131
133
EVR_UT,
134
136
EVR_ox,
137
139
EVR_xs,
140
142
EVR_lt,
143
145
EVR_na,
146
148
EVR_up,
149
151
EVR_item,
152
154
EVR_metainfo,
155
157
EVR_dataset,
158
160
EVR_fileFormat,
161
163
EVR_dicomDir,
164
166
EVR_dirRecord,
167
169
EVR_pixelSQ,
170
172
EVR_pixelItem,
173
175
EVR_UNKNOWN,
176
178
EVR_UN,
179
181
EVR_PixelData,
182
184
EVR_OverlayData,
185
187
EVR_UNKNOWN2B
188
};
189
190
193
class
DcmVR
194
{
195
public
:
196
198
DcmVR
()
199
:
vr
(EVR_UNKNOWN)
200
{
201
}
202
206
DcmVR
(DcmEVR evr)
207
:
vr
(EVR_UNKNOWN)
208
{
209
// the set method is safeguarded against incorrect passing of integer values
210
setVR
(evr);
211
}
212
216
DcmVR
(
const
char
* vrName)
217
:
vr
(EVR_UNKNOWN)
218
{
219
setVR
(vrName);
220
}
221
225
DcmVR
(
const
DcmVR
& avr)
226
:
vr
(avr.
vr
)
227
{
228
}
229
233
void
setVR
(DcmEVR evr);
234
238
void
setVR
(
const
char
* vrName);
239
243
void
setVR
(
const
DcmVR
& avr) {
vr
= avr.
vr
; }
244
248
DcmVR
&
operator=
(
const
DcmVR
& arg)
249
{
250
vr
= arg.
vr
;
251
return
*
this
;
252
}
253
257
DcmEVR
getEVR
()
const
{
return
vr
; }
258
265
DcmEVR
getValidEVR
()
const
;
266
270
const
char
*
getVRName
()
const
;
271
278
const
char
*
getValidVRName
()
const
;
279
286
size_t
getValueWidth
()
const
;
287
291
OFBool
isStandard
()
const
;
292
296
OFBool
isForInternalUseOnly
()
const
;
297
301
OFBool
isaString
()
const
;
302
306
OFBool
usesExtendedLengthEncoding
()
const
;
307
314
OFBool
isEquivalent
(
const
DcmVR
& avr)
const
;
315
316
/* minimum and maximum length of a value with this VR
317
** (in bytes assuming single byte characters)
318
*/
319
323
Uint32
getMinValueLength
()
const
;
324
328
Uint32
getMaxValueLength
()
const
;
329
330
private
:
332
DcmEVR
vr
;
333
};
334
335
336
#endif
/* !DCMVR_H */
337
338
339
/*
340
* CVS/RCS Log:
341
* $Log: dcvr.h,v $
342
* Revision 1.28 2010-10-14 13:15:42 joergr
343
* Updated copyright header. Added reference to COPYRIGHT file.
344
*
345
* Revision 1.27 2010-03-01 09:08:45 uli
346
* Removed some unnecessary include directives in the headers.
347
*
348
* Revision 1.26 2008-06-23 12:09:13 joergr
349
* Fixed inconsistencies in Doxygen API documentation.
350
*
351
* Revision 1.25 2007/11/29 14:30:35 meichel
352
* Updated doxygen API documentation
353
*
354
* Revision 1.24 2005/12/08 16:28:50 meichel
355
* Changed include path schema for all DCMTK header files
356
*
357
* Revision 1.23 2005/11/15 18:28:02 meichel
358
* Added new global flag dcmEnableUnknownVRConversion that enables the automatic
359
* re-conversion of defined length UN elements read in an explicit VR transfer
360
* syntax, if the real VR is defined in the data dictionary. Default is OFFalse,
361
* i.e. to retain the previous behavior.
362
*
363
* Revision 1.22 2005/11/15 16:59:24 meichel
364
* Added new pseudo VR type EVR_lt that is used for LUT Data when read in
365
* implicit VR, which may be US, SS or OW. DCMTK always treats EVR_lt like OW.
366
*
367
* Revision 1.21 2003/06/12 13:31:46 joergr
368
* Fixed inconsistent API documentation reported by Doxygen.
369
*
370
* Revision 1.20 2003/03/21 13:06:46 meichel
371
* Minor code purifications for warnings reported by MSVC in Level 4
372
*
373
* Revision 1.19 2002/12/06 12:20:19 joergr
374
* Added support for new value representation Other Float String (OF).
375
*
376
* Revision 1.18 2002/11/27 12:07:24 meichel
377
* Adapted module dcmdata to use of new header file ofstdinc.h
378
*
379
* Revision 1.17 2001/06/01 15:48:47 meichel
380
* Updated copyright header
381
*
382
* Revision 1.16 2000/04/14 15:42:56 meichel
383
* Global VR generation flags are now derived from OFGlobal and, thus,
384
* safe for use in multi-thread applications.
385
*
386
* Revision 1.15 2000/03/08 16:26:21 meichel
387
* Updated copyright header.
388
*
389
* Revision 1.14 2000/02/29 11:48:38 meichel
390
* Removed support for VS value representation. This was proposed in CP 101
391
* but never became part of the standard.
392
*
393
* Revision 1.13 2000/02/23 15:11:42 meichel
394
* Corrected macro for Borland C++ Builder 4 workaround.
395
*
396
* Revision 1.12 2000/02/01 10:12:03 meichel
397
* Avoiding to include <stdlib.h> as extern "C" on Borland C++ Builder 4,
398
* workaround for bug in compiler header files.
399
*
400
* Revision 1.11 1999/06/10 10:44:51 meichel
401
* Replaced some #if statements by more robust #ifdef
402
*
403
* Revision 1.10 1999/03/31 09:24:54 meichel
404
* Updated copyright header in module dcmdata
405
*
406
*
407
*/
Generated on Thu Dec 20 2012 for
OFFIS DCMTK
Version 3.6.0 by
Doxygen
1.8.2