1xml2dsr(1) OFFIS DCMTK xml2dsr(1)
2
3
4
6 xml2dsr - Convert DICOM SR file and data set to XML
7
8
10 xml2dsr [options] xmlfile-in dsrfile-out
11
13 The xml2dsr utility converts the contents of an XML (Extensible Markup
14 Language) document to DICOM Structured Reporting (SR) format (file
15 format or raw data set). The XML Schema dsr2xml.xsd does not yet follow
16 any standard format. However, the xml2dsr application might be enhanced
17 in this aspect in the future (e. g. by supporting HL7/CDA - Clinical
18 Document Architecture).
19
20 An appropriate XML file can be created using the dsr2xml tool (option
21 +Xn recommended to add XML namespace declaration to the root element).
22
24 xmlfile-in XML input filename to be converted (stdin: "-")
25
26 dsrfile-out DICOM SR output filename
27
29 general options
30 -h --help
31 print this help text and exit
32
33 --version
34 print version information and exit
35
36 --arguments
37 print expanded command line arguments
38
39 -q --quiet
40 quiet mode, print no warnings and errors
41
42 -v --verbose
43 verbose mode, print processing details
44
45 -d --debug
46 debug mode, print debug information
47
48 -ll --log-level [l]evel: string constant
49 (fatal, error, warn, info, debug, trace)
50 use level l for the logger
51
52 -lc --log-config [f]ilename: string
53 use config file f for the logger
54
55 input options
56 encoding:
57
58 +Ee --template-envelope
59 template element encloses content items
60
61 processing options
62 validation:
63
64 +Vs --validate-schema
65 validate XML document against Schema
66 (not with --template-envelope)
67
68 # requires libxml to be compiled with XML Schema support
69
70 +Vn --check-namespace
71 check XML namespace in document root
72
73 unique identifiers:
74
75 +Ug --generate-new-uids
76 generate new Study/Series/SOP Instance UID
77
78 -Uo --dont-overwrite-uids
79 do not overwrite existing UIDs (default)
80
81 +Uo --overwrite-uids
82 overwrite existing UIDs
83
84 output options
85 output file format:
86
87 +F --write-file
88 write file format (default)
89
90 -F --write-dataset
91 write data set without file meta information
92
93 output transfer syntax:
94
95 +t= --write-xfer-same
96 write with same TS as input (default)
97
98 +te --write-xfer-little
99 write with explicit VR little endian TS
100
101 +tb --write-xfer-big
102 write with explicit VR big endian TS
103
104 +ti --write-xfer-implicit
105 write with implicit VR little endian TS
106
107 +td --write-xfer-deflated
108 write with deflated explicit VR little endian TS
109
110 post-1993 value representations:
111
112 +u --enable-new-vr
113 enable support for new VRs (UN/UT) (default)
114
115 -u --disable-new-vr
116 disable support for new VRs, convert to OB
117
118 group length encoding:
119
120 +g= --group-length-recalc
121 recalculate group lengths if present (default)
122
123 +g --group-length-create
124 always write with group length elements
125
126 -g --group-length-remove
127 always write without group length elements
128
129 length encoding in sequences and items:
130
131 +e --length-explicit
132 write with explicit lengths (default)
133
134 -e --length-undefined
135 write with undefined lengths
136
137 data set trailing padding (not with --write-dataset):
138
139 -p= --padding-retain
140 do not change padding (default if not --write-dataset)
141
142 -p --padding-off
143 no padding (implicit if --write-dataset)
144
145 +p --padding-create [f]ile-pad [i]tem-pad: integer
146 align file on multiple of f bytes
147 and items on multiple of i bytes
148
149 deflate compression level (only with --write-xfer-deflated):
150
151 +cl --compression-level [l]evel: integer (default: 6)
152 0=uncompressed, 1=fastest, 9=best compression
153
155 DICOM Conformance
156 The xml2dsr utility supports the following SOP Classes:
157
158 SpectaclePrescriptionReportStorage 1.2.840.10008.5.1.4.1.1.78.6
159 MacularGridThicknessAndVolumeReportStorage 1.2.840.10008.5.1.4.1.1.79.1
160 BasicTextSRStorage 1.2.840.10008.5.1.4.1.1.88.11
161 EnhancedSRStorage 1.2.840.10008.5.1.4.1.1.88.22
162 ComprehensiveSRStorage 1.2.840.10008.5.1.4.1.1.88.33
163 Comprehensive3DSRStorage 1.2.840.10008.5.1.4.1.1.88.34
164 ProcedureLogStorage 1.2.840.10008.5.1.4.1.1.88.40
165 MammographyCADSRStorage 1.2.840.10008.5.1.4.1.1.88.50
166 KeyObjectSelectionDocumentStorage 1.2.840.10008.5.1.4.1.1.88.59
167 ChestCADSRStorage 1.2.840.10008.5.1.4.1.1.88.65
168 XRayRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.67
169 RadiopharmaceuticalRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.68
170 ColonCADSRStorage 1.2.840.10008.5.1.4.1.1.88.69
171 ImplantationPlanSRDocumentStorage 1.2.840.10008.5.1.4.1.1.88.70
172 AcquisitionContextSRStorage 1.2.840.10008.5.1.4.1.1.88.71
173 SimplifiedAdultEchoSRStorage 1.2.840.10008.5.1.4.1.1.88.72
174
175 Please note that currently only mandatory and some optional attributes
176 are supported.
177
178 Character Encoding
179 The DICOM character encoding is determined automatically from the
180 element with tag '0008,0005' (Specific Character Set) - if present. The
181 following character sets are currently supported (requires libxml to
182 include iconv support, see --version output):
183
184 ASCII (ISO_IR 6) (UTF-8)
185 UTF-8 "ISO_IR 192" (UTF-8)
186 ISO Latin 1 "ISO_IR 100" (ISO-8859-1)
187 ISO Latin 2 "ISO_IR 101" (ISO-8859-2)
188 ISO Latin 3 "ISO_IR 109" (ISO-8859-3)
189 ISO Latin 4 "ISO_IR 110" (ISO-8859-4)
190 ISO Latin 5 "ISO_IR 148" (ISO-8859-9)
191 Cyrillic "ISO_IR 144" (ISO-8859-5)
192 Arabic "ISO_IR 127" (ISO-8859-6)
193 Greek "ISO_IR 126" (ISO-8859-7)
194 Hebrew "ISO_IR 138" (ISO-8859-8)
195 Thai "ISO_IR 166" (TIS-620)
196 Japanese "ISO 2022 IR 13ISO 2022 IR 87" (ISO-2022-JP)
197 Korean "ISO 2022 IR 6ISO 2022 IR 149" (ISO-2022-KR)
198 Chinese "ISO 2022 IR 6ISO 2022 IR 58" (ISO-2022-CN)
199 Chinese "GB18030" (GB18030)
200 Chinese "GBK" (GBK)
201
202 Compression
203 If libxml is compiled with zlib support, the input file (xmlfile-in)
204 can also be compressed with ZIP, which usually results in much smaller
205 files. See output of option --version in order to check whether zlib
206 support is available.
207
208 Limitations
209 The XML Schema dsr2xml.xsd does not support all variations of the
210 dsr2xml output format. However, the default output format (plus option
211 --use-xml-namespace) should work.
212
213 Different versions of libxml seem to have different limits for the
214 maximum length of an XML element value. Therefore, it should be avoided
215 to use very long element values. A typical limit for libxml version
216 2.7.3 (and above) is 10 MB for a single element value.
217
219 The level of logging output of the various command line tools and
220 underlying libraries can be specified by the user. By default, only
221 errors and warnings are written to the standard error stream. Using
222 option --verbose also informational messages like processing details
223 are reported. Option --debug can be used to get more details on the
224 internal activity, e.g. for debugging purposes. Other logging levels
225 can be selected using option --log-level. In --quiet mode only fatal
226 errors are reported. In such very severe error events, the application
227 will usually terminate. For more details on the different logging
228 levels, see documentation of module 'oflog'.
229
230 In case the logging output should be written to file (optionally with
231 logfile rotation), to syslog (Unix) or the event log (Windows) option
232 --log-config can be used. This configuration file also allows for
233 directing only certain messages to a particular output stream and for
234 filtering certain messages based on the module or application where
235 they are generated. An example configuration file is provided in
236 <etcdir>/logger.cfg.
237
239 All command line tools use the following notation for parameters:
240 square brackets enclose optional values (0-1), three trailing dots
241 indicate that multiple values are allowed (1-n), a combination of both
242 means 0 to n values.
243
244 Command line options are distinguished from parameters by a leading '+'
245 or '-' sign, respectively. Usually, order and position of command line
246 options are arbitrary (i.e. they can appear anywhere). However, if
247 options are mutually exclusive the rightmost appearance is used. This
248 behavior conforms to the standard evaluation rules of common Unix
249 shells.
250
251 In addition, one or more command files can be specified using an '@'
252 sign as a prefix to the filename (e.g. @command.txt). Such a command
253 argument is replaced by the content of the corresponding text file
254 (multiple whitespaces are treated as a single separator unless they
255 appear between two quotation marks) prior to any further evaluation.
256 Please note that a command file cannot contain another command file.
257 This simple but effective approach allows one to summarize common
258 combinations of options/parameters and avoids longish and confusing
259 command lines (an example is provided in file <datadir>/dumppat.txt).
260
262 The xml2dsr utility will attempt to load DICOM data dictionaries
263 specified in the DCMDICTPATH environment variable. By default, i.e. if
264 the DCMDICTPATH environment variable is not set, the file
265 <datadir>/dicom.dic will be loaded unless the dictionary is built into
266 the application (default for Windows).
267
268 The default behavior should be preferred and the DCMDICTPATH
269 environment variable only used when alternative data dictionaries are
270 required. The DCMDICTPATH environment variable has the same format as
271 the Unix shell PATH variable in that a colon (':') separates entries.
272 On Windows systems, a semicolon (';') is used as a separator. The data
273 dictionary code will attempt to load each file specified in the
274 DCMDICTPATH environment variable. It is an error if no data dictionary
275 can be loaded.
276
278 <datadir>/dsr2xml.xsd - XML Schema file
279
281 dsr2xml(1)
282
284 Copyright (C) 2003-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg,
285 Germany.
286
287
288
289Version 3.6.2 Fri Jul 14 2017 xml2dsr(1)