GDCM
2.4.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
Source
MediaStorageAndFileFormat
gdcmXMLPrinter.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: GDCM (Grassroots DICOM). A DICOM library
4
5
Copyright (c) 2006-2011 Mathieu Malaterre
6
All rights reserved.
7
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9
This software is distributed WITHOUT ANY WARRANTY; without even
10
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11
PURPOSE. See the above copyright notice for more information.
12
13
=========================================================================*/
14
#ifndef GDCMXMLPRINTER_H
15
#define GDCMXMLPRINTER_H
16
17
/*
18
19
The Normative version of the XML Schema for the Native DICOM Model follows:
20
21
22
23
start = element NativeDicomModel { DicomDataSet }
24
25
# A DICOM Data Set is as defined in PS3.5. It does not appear
26
# as an XML Element, since it does not appear in the binary encoded
27
# DICOM objects. It exists here merely as a documentation aid.
28
29
DicomDataSet = DicomAttribute*
30
DicomAttribute = element DicomAttribute {
31
Tag, VR, Keyword?, PrivateCreator?,
32
( BulkData | Value+ | Item+ | PersonName+ )?
33
}
34
35
BulkData = element BulkData{ UUID }
36
Value = element Value { Number, xsd:string }
37
Item = element Item { Number, DicomDataSet }
38
PersonName = element PersonName {
39
Number,
40
element SingleByte { NameComponents }?,
41
element Ideographic { NameComponents }?,
42
element Phonetic
43
{ NameComponents }?
44
}
45
46
NameComponents =
47
element FamilyName {xsd:string}?,
48
element GivenName {xsd:string}?,
49
element MiddleName {xsd:string}?,
50
element NamePrefix {xsd:string}?,
51
element NameSuffix {xsd:string}?
52
53
# keyword is the attribute tag from PS3.6
54
# (derived from the DICOM Attribute's name)
55
Keyword = attribute keyword { xsd:token }
56
# canonical XML definition of Hex, with lowercase letters disallowed
57
Tag = attribute tag { xsd:string{ minLength="8" maxLength="8" pattern="[0-9A-F]{8}" } }
58
VR = attribute vr { "AE" | "AS" | "AT"| "CS" | "DA" | "DS" | "DT" | "FL" | "FD"
59
| "IS" | "LO" | "LT" | "OB" | "OF" | "OW" | "PN" | "SH" | "SL"
60
| "SQ" | "SS" | "ST" | "TM" | "UI" | "UL" | "UN" | "US" | "UT" }
61
PrivateCreator = attribute privateCreator{ xsd:string }
62
UUID = attribute uuid { xsd:string }
63
Number = attribute number { xsd:positiveInteger }
64
65
66
*/
67
68
#include "
gdcmFile.h
"
69
#include "
gdcmDataElement.h
"
70
71
namespace
gdcm
72
{
73
74
class
DataSet;
75
class
DictEntry;
76
class
Dicts;
77
78
class
GDCM_EXPORT
XMLPrinter
79
{
80
public
:
81
XMLPrinter
();
82
virtual
~
XMLPrinter
();
83
84
// Set file
85
void
SetFile
(
File
const
&f) { F = &f; }
86
87
88
89
typedef
enum
{
90
91
OnlyUUID = 0 ,
92
LOADBULKDATA = 1
93
94
} PrintStyles;
95
96
// Set PrintStyle value
97
void
SetStyle
(
PrintStyles
ps)
98
{
99
PrintStyle = ps;
100
}
101
102
// Get PrintStyle value
103
PrintStyles
GetPrintStyle
()
const
104
{
105
return
PrintStyle;
106
}
107
108
// Print
109
void
Print(std::ostream& os);
110
111
// Print an individual dataset
112
void
PrintDataSet(
const
DataSet
&ds,
const
TransferSyntax
& ts, std::ostream& os);
113
114
//void PrintUID(std::ostream &os);
115
119
virtual
void
HandleBulkData(
const
char
*uuid,
const
TransferSyntax
&ts,
120
const
char
*bulkdata,
size_t
bulklen);
121
122
protected
:
123
124
VR
PrintDataElement(std::ostream &os,
const
Dicts
&dicts,
const
DataSet
& ds,
const
DataElement
&de,
const
TransferSyntax
& ts);
125
126
void
PrintSQ(
const
SequenceOfItems
*sqi,
const
TransferSyntax
& ts, std::ostream &os);
127
128
PrintStyles
PrintStyle
;
129
130
const
File
*
F
;
131
132
};
133
134
}
// end namespace gdcm
135
136
#endif //GDCMXMLPRINTER_H
Generated on Thu Oct 17 2013 10:05:56 for GDCM by
1.8.4