vega
vr_constants.h
Go to the documentation of this file.
1 #pragma once
2 
3 // AE: char, space padded, backslash delimited
4 // Application Entity
5 //
6 // AS: char (4 bytes), space padding, backslash delimiter
7 // Age String
8 //
9 // AT: two uint16_t, no padding, no delimiter
10 // Attribute Tag
11 //
12 // CS: char (leading/trailing spaces non-significant), space padding, backslash delimiter
13 // Code string
14 //
15 // DA: char (8 bytes), space padding, backslash delimiter
16 // Date (YYYYMMDD)
17 //
18 // DS: char (max 16 bytes), space padding, backslash delimiter
19 // Decimal string
20 //
21 // DT: char (max 26 bytes), space padding, backslash delimiter
22 // Datetime (YYYYMMDDHHMMSS.FFFFFF&ZZXX)
23 //
24 // FL: float32, no padding, no delimiter
25 // Floating point
26 //
27 // FD: double64, no padding, no delimiter
28 // Floating point double
29 //
30 // IS: char (max 12), space padding, backslash delimiter
31 // Integer string
32 //
33 // LO: char (max 64), space padding, backslash delimiter
34 // Long string
35 //
36 // LT: char (max 10240, allow backslash), space padding, no delimiter (VM == 1)
37 // Long text
38 //
39 // OB: bytes, null padding, no delimiter necessary
40 // Other byte string
41 //
42 // OD: double64, no padding, no delimiter
43 // Other double string
44 //
45 // OF: float32, no padding, no delimiter
46 // Other float string
47 //
48 // OL: 4 byte, no padding, no delimiter
49 // Other long
50 //
51 // OW: 16bit words, no padding, no delimiter
52 // Other word string
53 //
54 // PN: char (max 64), space padding, backslash delimiter
55 // Person name
56 //
57 // SH: char (max 16 leading/trailing space insignificant), space padding, backslash delimiter
58 // Short string
59 //
60 // SL: int32_t, no padding, no delimiter
61 // Signed long
62 //
63 // SQ: DataSets, no padding, no delimiter
64 // Sequence
65 //
66 // SS: int16_t, no padding, no delimiter
67 // Signed short
68 //
69 // ST: char (max 1024, allow backslash, trailing space insignificant), space padding, no delimiter (VM == 1)
70 // Short text
71 //
72 // TM: char (max 16), space padding, backslash delimiter
73 // Time (HHMMSS.FFFFFF)
74 //
75 // UC: char (max 2^32-2), space padding, backslash delimiter
76 // Unlimited Characters
77 //
78 // UI: char (max 64), null padding, backslash delimiter
79 // Unique Identifier
80 //
81 // UL: uint32_t, no padding, no delimiter
82 // Unsigned long
83 //
84 // UN: bytes, no padding, no delimiter
85 // Unknown
86 //
87 // UR: char (2^32-2), space padding, no delimiter (VM == 1)
88 // Universal Resource Identifier
89 //
90 // US: uint16_t, no padding, no delimiter
91 // Unsigned short
92 //
93 // UT: char (unlimited), space padding, no delimiter (VM == 1)
94 // Unlimited text
95 //
96 // ox: OB or OW
97 // xs: SS or US
98 // xw: SS or US or OW
99 // uw: US or OW
100 
101 namespace vega {
102  namespace vr {
103  VR parse_vr_string(std::string s);
104 
106 
110  const VR::Data AE_DATA = {.characters = {'A', 'E'}};
111  const VR::value_type AE_VALUE = AE_DATA.value;
112  const VR AE{AE_VALUE};
113 
115 
122  const VR::Data AS_DATA = {.characters = {'A', 'S'}};
123  const VR::value_type AS_VALUE = AS_DATA.value;
124  const VR AS{AS_VALUE};
125 
127 
130  const VR::Data AT_DATA = {.characters = {'A', 'T'}};
131  const VR::value_type AT_VALUE = AT_DATA.value;
132  const VR AT{AT_VALUE};
133 
135 
138  const VR::Data CS_DATA = {.characters = {'C', 'S'}};
139  const VR::value_type CS_VALUE = CS_DATA.value;
140  const VR CS{CS_VALUE};
141 
143 
148  const VR::Data DA_DATA = {.characters = {'D', 'A'}};
149  const VR::value_type DA_VALUE = DA_DATA.value;
150  const VR DA{DA_VALUE};
151 
153 
161  const VR::Data DS_DATA = {.characters = {'D', 'S'}};
162  const VR::value_type DS_VALUE = DS_DATA.value;
163  const VR DS{DS_VALUE};
164 
166  /* A concatenated date-time character string in the format: */
167  /* YYYYMMDDHHMMSS.FFFFFF&ZZXX */
168  /* The components of this string, from left to right, are YYYY = Year, MM = Month, DD = Day, HH = Hour (range "00" - "23"), MM = Minute (range "00" - "59"), SS = Second (range "00" - "60"). */
169  /* FFFFFF = Fractional Second contains a fractional part of a second as small as 1 millionth of a second (range "000000" - "999999"). */
170  /* &ZZXX is an optional suffix for offset from Coordinated Universal Time (UTC), where & = "+" or "-", and ZZ = Hours and XX = Minutes of offset. */
171  /* The year, month, and day shall be interpreted as a date of the Gregorian calendar system. */
172  /* A 24-hour clock is used. Midnight shall be represented by only "0000" since "2400" would violate the hour range. */
173  /* The Fractional Second component, if present, shall contain 1 to 6 digits. If Fractional Second is unspecified the preceding "." shall not be included. The offset suffix, if present, shall contain 4 digits. The string may be padded with trailing SPACE characters. Leading and embedded spaces are not allowed. */
174  /* A component that is omitted from the string is termed a null component. Trailing null components of Date Time indicate that the value is not precise to the precision of those components. The YYYY component shall not be null. Non-trailing null components are prohibited. The optional suffix is not considered as a component. */
175  /* A Date Time value without the optional suffix is interpreted to be in the local time zone of the application creating the Data Element, unless explicitly specified by the Timezone Offset From UTC (0008,0201). */
176  /* UTC offsets are calculated as "local time minus UTC". The offset for a Date Time value in UTC shall be +0000. */
177  /* Note */
178  /* The range of the offset is -1200 to +1400. The offset for United States Eastern Standard Time is -0500. The offset for Japan Standard Time is +0900. */
179  /* The RFC 2822 use of -0000 as an offset to indicate local time is not allowed. */
180  /* A Date Time value of 195308 means August 1953, not specific to particular day. A Date Time value of 19530827111300.0 means August 27, 1953, 11;13 a.m. accurate to 1/10th second. */
181  /* The Second component may have a value of 60 only for a leap second. */
182  /* The offset may be included regardless of null components; e.g., 2007-0500 is a legal value./ */
183 
194  const VR::Data DT_DATA = {.characters = {'D', 'T'}};
195  const VR::value_type DT_VALUE = DT_DATA.value;
196  const VR DT{DT_VALUE};
197 
199 
203  const VR::Data FD_DATA = {.characters = {'F', 'D'}};
204  const VR::value_type FD_VALUE = FD_DATA.value;
205  const VR FD{FD_VALUE};
206 
208 
212  const VR::Data FL_DATA = {.characters = {'F', 'L'}};
213  const VR::value_type FL_VALUE = FL_DATA.value;
214  const VR FL{FL_VALUE};
215 
217 
223  const VR::Data IS_DATA = {.characters = {'I', 'S'}};
224  const VR::value_type IS_VALUE = IS_DATA.value;
225  const VR IS{IS_VALUE};
226 
228 
234  const VR::Data LO_DATA = {.characters = {'L', 'O'}};
235  const VR::value_type LO_VALUE = LO_DATA.value;
236  const VR LO{LO_VALUE};
237 
239 
246  const VR::Data LT_DATA = {.characters = {'L', 'T'}};
247  const VR::value_type LT_VALUE = LT_DATA.value;
248  const VR LT{LT_VALUE};
249 
251 
256  const VR::Data OB_DATA = {.characters = {'O', 'B'}};
257  const VR::value_type OB_VALUE = OB_DATA.value;
258  const VR OB{OB_VALUE};
259 
261 
263  const VR::Data OD_DATA = {.characters = {'O', 'D'}};
264  const VR::value_type OD_VALUE = OD_DATA.value;
265  const VR OD{OD_VALUE};
266 
267  /* OL */
268 
269  /* Other Long */
270  /* A stream of 32-bit words where the encoding of the contents is specified by the negotiated Transfer Syntax. OL is a VR that requires byte swapping within each word when changing byte ordering (see Section 7.3). */
271  const VR::Data OL_DATA = {.characters = {'O', 'L'}};
272  const VR::value_type OL_VALUE = OL_DATA.value;
273  const VR OL{OL_VALUE};
274 
276 
279  const VR::Data OF_DATA = {.characters = {'O', 'F'}};
280  const VR::value_type OF_VALUE = OF_DATA.value;
281  const VR OF{OF_VALUE};
282 
284 
288  const VR::Data OW_DATA = {.characters = {'O', 'W'}};
289  const VR::value_type OW_VALUE = OW_DATA.value;
290  const VR OW{OW_VALUE};
291 
293 
296  const VR::Data PN_DATA = {.characters = {'P', 'N'}};
297  const VR::value_type PN_VALUE = PN_DATA.value;
298  const VR PN{PN_VALUE};
299 
301 
306  const VR::Data SH_DATA = {.characters = {'S', 'H'}};
307  const VR::value_type SH_VALUE = SH_DATA.value;
308  const VR SH{SH_VALUE};
309 
311 
315  const VR::Data SL_DATA = {.characters = {'S', 'L'}};
316  const VR::value_type SL_VALUE = SL_DATA.value;
317  const VR SL{SL_VALUE};
318 
320 
321  const VR::Data SQ_DATA = {.characters = {'S', 'Q'}};
322  const VR::value_type SQ_VALUE = SQ_DATA.value;
323  const VR SQ{SQ_VALUE};
324 
326 
330  const VR::Data SS_DATA = {.characters = {'S', 'S'}};
331  const VR::value_type SS_VALUE = SS_DATA.value;
332  const VR SS{SS_VALUE};
333 
335 
342  const VR::Data ST_DATA = {.characters = {'S', 'T'}};
343  const VR::value_type ST_VALUE = ST_DATA.value;
344  const VR ST{ST_VALUE};
345 
347 
358  const VR::Data TM_DATA = {.characters = {'T', 'M'}};
359  const VR::value_type TM_VALUE = TM_DATA.value;
360  const VR TM{TM_VALUE};
361 
362  // Unlimited Characters
363  // A character string that may be of unlimited length that may be padded with trailing spaces. The character code 5CH (the BACKSLASH "\" in ISO-IR 6) shall not be present, as it is used as the delimiter between values in multiple valued data elements. The string shall not have Control Characters except for ESC.
364  // Default Character Repertoire and/or as defined by (0008,0005) excluding character code 5CH (the BACKSLASH "\" in ISO-IR 6), and all Control Characters except ESC when used for ISO 2022 escape sequences.
365  const VR::Data UC_DATA = {.characters = {'U', 'C'}};
366  const VR::value_type UC_VALUE = UC_DATA.value;
367  const VR UC{UC_VALUE};
368 
370 
377  const VR::Data UI_DATA = {.characters = {'U', 'I'}};
378  const VR::value_type UI_VALUE = UI_DATA.value;
379  const VR UI{UI_VALUE};
380 
382 
386  const VR::Data UL_DATA = {.characters = {'U', 'L'}};
387  const VR::value_type UL_VALUE = UL_DATA.value;
388  const VR UL{UL_VALUE};
389 
391 
393  const VR::Data UN_DATA = {.characters = {'U', 'N'}};
394  const VR::value_type UN_VALUE = UN_DATA.value;
395  const VR UN{UN_VALUE};
396 
397  /* UR */
398 
399  /* Universal Resource Identifier or Universal Resource Locator (URI/URL) */
400  /* A string of characters that identifies a URI or a URL as defined in [RFC3986]. Leading spaces are not allowed. Trailing spaces shall be ignored. Data Elements with this VR shall not be multi-valued. */
401 
402  /* Note */
403  /* Both absolute and relative URIs are permitted. If the URI is relative, then it is relative to the base URI of the object within which it is contained. */
404  const VR::Data UR_DATA = {.characters = {'U', 'R'}};
405  const VR::value_type UR_VALUE = UR_DATA.value;
406  const VR UR{UR_VALUE};
407 
409 
413  const VR::Data US_DATA = {.characters = {'U', 'S'}};
414  const VR::value_type US_VALUE = US_DATA.value;
415  const VR US{US_VALUE};
416 
418 
426  const VR::Data UT_DATA = {.characters = {'U', 'T'}};
427  const VR::value_type UT_VALUE = UT_DATA.value;
428  const VR UT{UT_VALUE};
429 
430  // OB/OW => ox
431  const VR::Data OX_DATA = {.characters = {'o', 'x'}};
432  const VR::value_type OX_VALUE = OX_DATA.value;
433  const VR OX{OX_VALUE};
434 
435  // US/SS
436  const VR::Data XS_DATA = {.characters = {'x', 's'}};
437  const VR::value_type XS_VALUE = XS_DATA.value;
438  const VR XS{XS_VALUE};
439 
440  // US/SS/OW
441  const VR::Data XW_DATA = {.characters = {'x', 'w'}};
442  const VR::value_type XW_VALUE = XW_DATA.value;
443  const VR XW{XW_VALUE};
444 
445  // US/OW
446  const VR::Data UW_DATA = {.characters = {'u', 'w'}};
447  const VR::value_type UW_VALUE = UW_DATA.value;
448  const VR UW{UW_VALUE};
449  }
450 }
const VR UC
Definition: vr_constants.h:367
const VR::Data UR_DATA
Definition: vr_constants.h:404
const VR::Data AE_DATA
Application Entity.
Definition: vr_constants.h:110
const VR::Data ST_DATA
Short Text.
Definition: vr_constants.h:342
const VR::Data XW_DATA
Definition: vr_constants.h:441
const VR UT
Definition: vr_constants.h:428
const VR::value_type FD_VALUE
Definition: vr_constants.h:204
const VR DS
Definition: vr_constants.h:163
const VR AT
Definition: vr_constants.h:132
const VR OD
Definition: vr_constants.h:265
value_type value
Definition: vr.h:32
const VR::value_type CS_VALUE
Definition: vr_constants.h:139
const VR::Data DT_DATA
Date Time.
Definition: vr_constants.h:194
const VR::Data OF_DATA
Other Float String.
Definition: vr_constants.h:279
const VR::value_type TM_VALUE
Definition: vr_constants.h:359
const VR::value_type OL_VALUE
Definition: vr_constants.h:272
const VR::value_type IS_VALUE
Definition: vr_constants.h:224
const VR::value_type AE_VALUE
Definition: vr_constants.h:111
const VR::Data OB_DATA
Other Byte String.
Definition: vr_constants.h:256
const VR::value_type UN_VALUE
Definition: vr_constants.h:394
const VR UL
Definition: vr_constants.h:388
const VR::Data FD_DATA
Floating Point Double.
Definition: vr_constants.h:203
VR parse_vr_string(std::string s)
const VR::value_type FL_VALUE
Definition: vr_constants.h:213
const VR SH
Definition: vr_constants.h:308
const VR::value_type AS_VALUE
Definition: vr_constants.h:123
const VR::Data OD_DATA
Other Double String.
Definition: vr_constants.h:263
const VR::value_type XS_VALUE
Definition: vr_constants.h:437
const VR::Data LT_DATA
Long Text.
Definition: vr_constants.h:246
const VR::Data TM_DATA
Time.
Definition: vr_constants.h:358
const VR::value_type OD_VALUE
Definition: vr_constants.h:264
Definition: vr.h:13
const VR DT
Definition: vr_constants.h:196
const VR::Data XS_DATA
Definition: vr_constants.h:436
const VR::Data CS_DATA
Code String.
Definition: vr_constants.h:138
const VR::value_type SL_VALUE
Definition: vr_constants.h:316
const VR::value_type AT_VALUE
Definition: vr_constants.h:131
const VR CS
Definition: vr_constants.h:140
const VR LO
Definition: vr_constants.h:236
const VR AS
Definition: vr_constants.h:124
const VR::value_type UR_VALUE
Definition: vr_constants.h:405
const VR::Data UT_DATA
Unlimited Text.
Definition: vr_constants.h:426
const VR::Data DA_DATA
Date.
Definition: vr_constants.h:148
const VR UN
Definition: vr_constants.h:395
const VR SS
Definition: vr_constants.h:332
const VR::Data IS_DATA
Integer String.
Definition: vr_constants.h:223
const VR::value_type UL_VALUE
Definition: vr_constants.h:387
const VR::value_type OF_VALUE
Definition: vr_constants.h:280
const VR::Data DS_DATA
Decimal String.
Definition: vr_constants.h:161
char characters[2]
Definition: vr.h:33
const VR ST
Definition: vr_constants.h:344
const VR::value_type DT_VALUE
Definition: vr_constants.h:195
const VR XW
Definition: vr_constants.h:443
const VR::value_type DA_VALUE
Definition: vr_constants.h:149
const VR::Data PN_DATA
Person Name.
Definition: vr_constants.h:296
uint16_t value_type
Definition: vr.h:29
const VR::value_type SQ_VALUE
Definition: vr_constants.h:322
const VR UR
Definition: vr_constants.h:406
const VR::value_type UC_VALUE
Definition: vr_constants.h:366
const VR::Data SL_DATA
Signed Long.
Definition: vr_constants.h:315
const VR::value_type ST_VALUE
Definition: vr_constants.h:343
const VR::value_type UT_VALUE
Definition: vr_constants.h:427
Definition: vr.h:31
const VR::Data UI_DATA
Unique Identifier (UID)
Definition: vr_constants.h:377
const VR UI
Definition: vr_constants.h:379
const VR FD
Definition: vr_constants.h:205
const VR::Data OX_DATA
Definition: vr_constants.h:431
const VR OF
Definition: vr_constants.h:281
const VR::value_type OX_VALUE
Definition: vr_constants.h:432
const VR::value_type OW_VALUE
Definition: vr_constants.h:289
const VR::Data LO_DATA
Long String.
Definition: vr_constants.h:234
const VR XS
Definition: vr_constants.h:438
const VR::value_type LO_VALUE
Definition: vr_constants.h:235
const VR::value_type DS_VALUE
Definition: vr_constants.h:162
const VR::Data UN_DATA
Unknown.
Definition: vr_constants.h:393
const VR::value_type SS_VALUE
Definition: vr_constants.h:331
const VR AE
Definition: vr_constants.h:112
const VR::value_type SH_VALUE
Definition: vr_constants.h:307
const VR::Data UW_DATA
Definition: vr_constants.h:446
const VR::value_type UI_VALUE
Definition: vr_constants.h:378
const VR PN
Definition: vr_constants.h:298
const VR::Data SH_DATA
Short String.
Definition: vr_constants.h:306
const VR::value_type OB_VALUE
Definition: vr_constants.h:257
const VR::Data AT_DATA
Attribute Tag.
Definition: vr_constants.h:130
const VR OB
Definition: vr_constants.h:258
const VR::Data UC_DATA
Definition: vr_constants.h:365
Definition: age.h:6
const VR::Data SS_DATA
Signed Short.
Definition: vr_constants.h:330
const VR::value_type PN_VALUE
Definition: vr_constants.h:297
const VR FL
Definition: vr_constants.h:214
const VR DA
Definition: vr_constants.h:150
const VR LT
Definition: vr_constants.h:248
const VR::Data OW_DATA
Other Word String.
Definition: vr_constants.h:288
const VR::value_type LT_VALUE
Definition: vr_constants.h:247
const VR::Data AS_DATA
Age String.
Definition: vr_constants.h:122
const VR IS
Definition: vr_constants.h:225
const VR::value_type UW_VALUE
Definition: vr_constants.h:447
const VR SL
Definition: vr_constants.h:317
const VR OX
Definition: vr_constants.h:433
const VR::Data UL_DATA
Unsigned Long.
Definition: vr_constants.h:386
const VR::Data US_DATA
Unsigned Short.
Definition: vr_constants.h:413
const VR US
Definition: vr_constants.h:415
const VR::Data OL_DATA
Definition: vr_constants.h:271
const VR::Data FL_DATA
Floating Point Single.
Definition: vr_constants.h:212
const VR TM
Definition: vr_constants.h:360
const VR::value_type US_VALUE
Definition: vr_constants.h:414
const VR::Data SQ_DATA
Sequence of Items.
Definition: vr_constants.h:321
const VR UW
Definition: vr_constants.h:448
const VR OW
Definition: vr_constants.h:290
const VR OL
Definition: vr_constants.h:273
const VR::value_type XW_VALUE
Definition: vr_constants.h:442
const VR SQ
Definition: vr_constants.h:323