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 PatientRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.73
199
200 Please note that currently only mandatory and some optional attributes
201 are supported.
202
203 Character Encoding
204 The XML encoding is determined automatically from the DICOM attribute
205 (0008,0005) 'Specific Character Set' using the following mapping:
206
207 ASCII (ISO_IR 6) => "UTF-8"
208 UTF-8 "ISO_IR 192" => "UTF-8"
209 ISO Latin 1 "ISO_IR 100" => "ISO-8859-1"
210 ISO Latin 2 "ISO_IR 101" => "ISO-8859-2"
211 ISO Latin 3 "ISO_IR 109" => "ISO-8859-3"
212 ISO Latin 4 "ISO_IR 110" => "ISO-8859-4"
213 ISO Latin 5 "ISO_IR 148" => "ISO-8859-9"
214 Cyrillic "ISO_IR 144" => "ISO-8859-5"
215 Arabic "ISO_IR 127" => "ISO-8859-6"
216 Greek "ISO_IR 126" => "ISO-8859-7"
217 Hebrew "ISO_IR 138" => "ISO-8859-8"
218 Thai "ISO_IR 166" => "TIS-620"
219 Japanese "ISO 2022 IR 13ISO 2022 IR 87" => "ISO-2022-JP"
220 Korean "ISO 2022 IR 6ISO 2022 IR 149" => "ISO-2022-KR"
221 Chinese "ISO 2022 IR 6ISO 2022 IR 58" => "ISO-2022-CN"
222 Chinese "GB18030" => "GB18030"
223 Chinese "GBK" => "GBK"
224
225 If this DICOM attribute is missing in the input file, although needed,
226 option --charset-assume can be used to specify an appropriate character
227 set manually (using one of the DICOM defined terms). For reasons of
228 backward compatibility with previous versions of this tool, the
229 following terms are also supported and mapped automatically to the
230 associated DICOM defined terms: latin-1, latin-2, latin-3, latin-4,
231 latin-5, cyrillic, arabic, greek, hebrew.
232
233 Option --convert-to-utf8 can be used to convert the DICOM file or data
234 set to UTF-8 encoding prior to the conversion to XML format.
235
236 Error Handling
237 Please be careful with the processing options --unknown-relationship,
238 --invalid-item-value, --ignore-constraints, --ignore-item-errors and
239 --skip-invalid-items since they disable certain validation checks on
240 the DICOM SR input file and, therefore, might result in non-standard
241 conformant output. However, there might be reasons for using one or
242 more of these options, e.g. in order to read and process an incorrectly
243 encoded SR document.
244
245 Limitations
246 The XML Schema dsr2xml.xsd does not support all variations of the
247 dsr2xml output format. However, the default output format (plus option
248 --use-xml-namespace) should work.
249
251 The level of logging output of the various command line tools and
252 underlying libraries can be specified by the user. By default, only
253 errors and warnings are written to the standard error stream. Using
254 option --verbose also informational messages like processing details
255 are reported. Option --debug can be used to get more details on the
256 internal activity, e.g. for debugging purposes. Other logging levels
257 can be selected using option --log-level. In --quiet mode only fatal
258 errors are reported. In such very severe error events, the application
259 will usually terminate. For more details on the different logging
260 levels, see documentation of module 'oflog'.
261
262 In case the logging output should be written to file (optionally with
263 logfile rotation), to syslog (Unix) or the event log (Windows) option
264 --log-config can be used. This configuration file also allows for
265 directing only certain messages to a particular output stream and for
266 filtering certain messages based on the module or application where
267 they are generated. An example configuration file is provided in
268 <etcdir>/logger.cfg.
269
271 All command line tools use the following notation for parameters:
272 square brackets enclose optional values (0-1), three trailing dots
273 indicate that multiple values are allowed (1-n), a combination of both
274 means 0 to n values.
275
276 Command line options are distinguished from parameters by a leading '+'
277 or '-' sign, respectively. Usually, order and position of command line
278 options are arbitrary (i.e. they can appear anywhere). However, if
279 options are mutually exclusive the rightmost appearance is used. This
280 behavior conforms to the standard evaluation rules of common Unix
281 shells.
282
283 In addition, one or more command files can be specified using an '@'
284 sign as a prefix to the filename (e.g. @command.txt). Such a command
285 argument is replaced by the content of the corresponding text file
286 (multiple whitespaces are treated as a single separator unless they
287 appear between two quotation marks) prior to any further evaluation.
288 Please note that a command file cannot contain another command file.
289 This simple but effective approach allows one to summarize common
290 combinations of options/parameters and avoids longish and confusing
291 command lines (an example is provided in file <datadir>/dumppat.txt).
292
294 The dsr2xml utility will attempt to load DICOM data dictionaries
295 specified in the DCMDICTPATH environment variable. By default, i.e. if
296 the DCMDICTPATH environment variable is not set, the file
297 <datadir>/dicom.dic will be loaded unless the dictionary is built into
298 the application (default for Windows).
299
300 The default behavior should be preferred and the DCMDICTPATH
301 environment variable only used when alternative data dictionaries are
302 required. The DCMDICTPATH environment variable has the same format as
303 the Unix shell PATH variable in that a colon (':') separates entries.
304 On Windows systems, a semicolon (';') is used as a separator. The data
305 dictionary code will attempt to load each file specified in the
306 DCMDICTPATH environment variable. It is an error if no data dictionary
307 can be loaded.
308
310 <datadir>/dsr2xml.xsd - XML Schema file
311
313 xml2dsr(1), dcmconv(1)
314
316 Copyright (C) 2000-2018 by OFFIS e.V., Escherweg 2, 26121 Oldenburg,
317 Germany.
318
319
320
321Version 3.6.4 Thu Nov 29 2018 dsr2xml(1)