1dsr2xml(1) OFFIS DCMTK dsr2xml(1)
2
3
4
6 dsr2xml - Convert DICOM SR file and data set to XML
7
8
10 dsr2xml [options] dsrfile-in [xmlfile-out]
11
13 The dsr2xml utility converts the contents of a DICOM Structured
14 Reporting (SR) document (file format or raw data set) to XML
15 (Extensible Markup Language). The XML Schema dsr2xml.xsd does not yet
16 follow any standard format. However, the dsr2xml application might be
17 enhanced in this aspect in the future (e.g. by supporting HL7/CDA -
18 Clinical Document Architecture).
19
20 If dsr2xml reads a raw data set (DICOM data without a file format meta-
21 header) it will attempt to guess the transfer syntax by examining the
22 first few bytes of the file. It is not always possible to correctly
23 guess the transfer syntax and it is better to convert a data set to a
24 file format whenever possible (using the dcmconv utility). It is also
25 possible to use the -f and -t[ieb] options to force dsr2xml to read a
26 dataset with a particular transfer syntax.
27
29 dsrfile-in DICOM SR input filename to be converted
30
31 xmlfile-out XML output filename (default: stdout)
32
34 general options
35 -h --help
36 print this help text and exit
37
38 --version
39 print version information and exit
40
41 --arguments
42 print expanded command line arguments
43
44 -q --quiet
45 quiet mode, print no warnings and errors
46
47 -v --verbose
48 verbose mode, print processing details
49
50 -d --debug
51 debug mode, print debug information
52
53 -ll --log-level [l]evel: string constant
54 (fatal, error, warn, info, debug, trace)
55 use level l for the logger
56
57 -lc --log-config [f]ilename: string
58 use config file f for the logger
59
60 input options
61 input file format:
62
63 +f --read-file
64 read file format or data set (default)
65
66 +fo --read-file-only
67 read file format only
68
69 -f --read-dataset
70 read data set without file meta information
71
72 input transfer syntax:
73
74 -t= --read-xfer-auto
75 use TS recognition (default)
76
77 -td --read-xfer-detect
78 ignore TS specified in the file meta header
79
80 -te --read-xfer-little
81 read with explicit VR little endian TS
82
83 -tb --read-xfer-big
84 read with explicit VR big endian TS
85
86 -ti --read-xfer-implicit
87 read with implicit VR little endian TS
88
89 processing options
90 error handling:
91
92 -Er --unknown-relationship
93 accept unknown/missing relationship type
94
95 -Ev --invalid-item-value
96 accept invalid content item value
97 (e.g. violation of VR or VM definition)
98
99 -Ec --ignore-constraints
100 ignore relationship content constraints
101
102 -Ee --ignore-item-errors
103 do not abort on content item errors, just warn
104 (e.g. missing value type specific attributes)
105
106 -Ei --skip-invalid-items
107 skip invalid content items (including sub-tree)
108
109 -Dv --disable-vr-checker
110 disable check for VR-conformant string values
111
112 specific character set:
113
114 +Cr --charset-require
115 require declaration of extended charset (default)
116
117 +Ca --charset-assume [c]harset: string
118 assume charset c if no extended charset declared
119
120 +Cc --charset-check-all
121 check all data elements with string values
122 (default: only PN, LO, LT, SH, ST, UC and UT)
123
124 # this option is only used for the mapping to an appropriate
125 # XML character encoding, but not for the conversion to UTF-8
126
127 +U8 --convert-to-utf8
128 convert all element values that are affected
129 by Specific Character Set (0008,0005) to UTF-8
130
131 # requires support from an underlying character encoding library
132 # (see output of --version on which one is available)
133
134 output options
135 encoding:
136
137 +Ea --attr-all
138 encode everything as XML attribute
139 (shortcut for +Ec, +Er, +Ev and +Et)
140
141 +Ec --attr-code
142 encode code value, coding scheme designator
143 and coding scheme version as XML attribute
144
145 +Er --attr-relationship
146 encode relationship type as XML attribute
147
148 +Ev --attr-value-type
149 encode value type as XML attribute
150
151 +Et --attr-template-id
152 encode template id as XML attribute
153
154 +Ee --template-envelope
155 template element encloses content items
156 (requires +Wt, implies +Et)
157
158 XML structure:
159
160 +Xs --add-schema-reference
161 add reference to XML Schema "dsr2xml.xsd"
162 (not with +Ea, +Ec, +Er, +Ev, +Et, +Ee, +We)
163
164 +Xn --use-xml-namespace
165 add XML namespace declaration to root element
166
167 writing:
168
169 +We --write-empty-tags
170 write all tags even if their value is empty
171
172 +Wi --write-item-id
173 always write item identifier
174
175 +Wt --write-template-id
176 write template identification information
177
179 DICOM Conformance
180 The dsr2xml utility supports the following SOP Classes:
181
182 SpectaclePrescriptionReportStorage 1.2.840.10008.5.1.4.1.1.78.6
183 MacularGridThicknessAndVolumeReportStorage 1.2.840.10008.5.1.4.1.1.79.1
184 BasicTextSRStorage 1.2.840.10008.5.1.4.1.1.88.11
185 EnhancedSRStorage 1.2.840.10008.5.1.4.1.1.88.22
186 ComprehensiveSRStorage 1.2.840.10008.5.1.4.1.1.88.33
187 Comprehensive3DSRStorage 1.2.840.10008.5.1.4.1.1.88.34
188 ProcedureLogStorage 1.2.840.10008.5.1.4.1.1.88.40
189 MammographyCADSRStorage 1.2.840.10008.5.1.4.1.1.88.50
190 KeyObjectSelectionDocumentStorage 1.2.840.10008.5.1.4.1.1.88.59
191 ChestCADSRStorage 1.2.840.10008.5.1.4.1.1.88.65
192 XRayRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.67
193 RadiopharmaceuticalRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.68
194 ColonCADSRStorage 1.2.840.10008.5.1.4.1.1.88.69
195 ImplantationPlanSRDocumentStorage 1.2.840.10008.5.1.4.1.1.88.70
196 AcquisitionContextSRStorage 1.2.840.10008.5.1.4.1.1.88.71
197 SimplifiedAdultEchoSRStorage 1.2.840.10008.5.1.4.1.1.88.72
198
199 Please note that currently only mandatory and some optional attributes
200 are supported.
201
202 Character Encoding
203 The XML encoding is determined automatically from the DICOM attribute
204 (0008,0005) 'Specific Character Set' using the following mapping:
205
206 ASCII (ISO_IR 6) => "UTF-8"
207 UTF-8 "ISO_IR 192" => "UTF-8"
208 ISO Latin 1 "ISO_IR 100" => "ISO-8859-1"
209 ISO Latin 2 "ISO_IR 101" => "ISO-8859-2"
210 ISO Latin 3 "ISO_IR 109" => "ISO-8859-3"
211 ISO Latin 4 "ISO_IR 110" => "ISO-8859-4"
212 ISO Latin 5 "ISO_IR 148" => "ISO-8859-9"
213 Cyrillic "ISO_IR 144" => "ISO-8859-5"
214 Arabic "ISO_IR 127" => "ISO-8859-6"
215 Greek "ISO_IR 126" => "ISO-8859-7"
216 Hebrew "ISO_IR 138" => "ISO-8859-8"
217 Thai "ISO_IR 166" => "TIS-620"
218 Japanese "ISO 2022 IR 13ISO 2022 IR 87" => "ISO-2022-JP"
219 Korean "ISO 2022 IR 6ISO 2022 IR 149" => "ISO-2022-KR"
220 Chinese "ISO 2022 IR 6ISO 2022 IR 58" => "ISO-2022-CN"
221 Chinese "GB18030" => "GB18030"
222 Chinese "GBK" => "GBK"
223
224 If this DICOM attribute is missing in the input file, although needed,
225 option --charset-assume can be used to specify an appropriate character
226 set manually (using one of the DICOM defined terms). For reasons of
227 backward compatibility with previous versions of this tool, the
228 following terms are also supported and mapped automatically to the
229 associated DICOM defined terms: latin-1, latin-2, latin-3, latin-4,
230 latin-5, cyrillic, arabic, greek, hebrew.
231
232 Option --convert-to-utf8 can be used to convert the DICOM file or data
233 set to UTF-8 encoding prior to the conversion to XML format.
234
235 Error Handling
236 Please be careful with the processing options --unknown-relationship,
237 --invalid-item-value, --ignore-constraints, --ignore-item-errors and
238 --skip-invalid-items since they disable certain validation checks on
239 the DICOM SR input file and, therefore, might result in non-standard
240 conformant output. However, there might be reasons for using one or
241 more of these options, e.g. in order to read and process an incorrectly
242 encoded SR document.
243
244 Limitations
245 The XML Schema dsr2xml.xsd does not support all variations of the
246 dsr2xml output format. However, the default output format (plus option
247 --use-xml-namespace) should work.
248
250 The level of logging output of the various command line tools and
251 underlying libraries can be specified by the user. By default, only
252 errors and warnings are written to the standard error stream. Using
253 option --verbose also informational messages like processing details
254 are reported. Option --debug can be used to get more details on the
255 internal activity, e.g. for debugging purposes. Other logging levels
256 can be selected using option --log-level. In --quiet mode only fatal
257 errors are reported. In such very severe error events, the application
258 will usually terminate. For more details on the different logging
259 levels, see documentation of module 'oflog'.
260
261 In case the logging output should be written to file (optionally with
262 logfile rotation), to syslog (Unix) or the event log (Windows) option
263 --log-config can be used. This configuration file also allows for
264 directing only certain messages to a particular output stream and for
265 filtering certain messages based on the module or application where
266 they are generated. An example configuration file is provided in
267 <etcdir>/logger.cfg.
268
270 All command line tools use the following notation for parameters:
271 square brackets enclose optional values (0-1), three trailing dots
272 indicate that multiple values are allowed (1-n), a combination of both
273 means 0 to n values.
274
275 Command line options are distinguished from parameters by a leading '+'
276 or '-' sign, respectively. Usually, order and position of command line
277 options are arbitrary (i.e. they can appear anywhere). However, if
278 options are mutually exclusive the rightmost appearance is used. This
279 behavior conforms to the standard evaluation rules of common Unix
280 shells.
281
282 In addition, one or more command files can be specified using an '@'
283 sign as a prefix to the filename (e.g. @command.txt). Such a command
284 argument is replaced by the content of the corresponding text file
285 (multiple whitespaces are treated as a single separator unless they
286 appear between two quotation marks) prior to any further evaluation.
287 Please note that a command file cannot contain another command file.
288 This simple but effective approach allows one to summarize common
289 combinations of options/parameters and avoids longish and confusing
290 command lines (an example is provided in file <datadir>/dumppat.txt).
291
293 The dsr2xml utility will attempt to load DICOM data dictionaries
294 specified in the DCMDICTPATH environment variable. By default, i.e. if
295 the DCMDICTPATH environment variable is not set, the file
296 <datadir>/dicom.dic will be loaded unless the dictionary is built into
297 the application (default for Windows).
298
299 The default behavior should be preferred and the DCMDICTPATH
300 environment variable only used when alternative data dictionaries are
301 required. The DCMDICTPATH environment variable has the same format as
302 the Unix shell PATH variable in that a colon (':') separates entries.
303 On Windows systems, a semicolon (';') is used as a separator. The data
304 dictionary code will attempt to load each file specified in the
305 DCMDICTPATH environment variable. It is an error if no data dictionary
306 can be loaded.
307
309 <datadir>/dsr2xml.xsd - XML Schema file
310
312 xml2dsr(1), dcmconv(1)
313
315 Copyright (C) 2000-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg,
316 Germany.
317
318
319
320Version 3.6.2 Fri Jul 14 2017 dsr2xml(1)