4 \page dsr2xml Convert DICOM SR file and data set to XML
6 \page dsr2xml dsr2xml: Convert DICOM SR file and data set to XML
9 \section synopsis SYNOPSIS
12 dsr2xml [options] dsrfile-in [xmlfile-out]
15 \section description DESCRIPTION
17 The \b dsr2xml utility converts the contents of a DICOM Structured Reporting
18 (SR) document (file format or raw data set) to XML (Extensible Markup
19 Language). The XML Schema <em>dsr2xml.xsd</em> does not yet follow any
20 standard format. However, the \b dsr2xml application might be enhanced in
21 this aspect in the future (e.g. by supporting HL7/CDA - Clinical Document
24 If \b dsr2xml reads a raw data set (DICOM data without a file format
25 meta-header) it will attempt to guess the transfer syntax by examining the
26 first few bytes of the file. It is not always possible to correctly guess the
27 transfer syntax and it is better to convert a data set to a file format
28 whenever possible (using the \b dcmconv utility). It is also possible to use
29 the \e -f and <em>-t[ieb]</em> options to force \b dsr2xml to read a dataset
30 with a particular transfer syntax.
32 \section parameters PARAMETERS
35 dsrfile-in DICOM SR input filename to be converted
37 xmlfile-out XML output filename (default: stdout)
40 \section options OPTIONS
42 \subsection general_options general options
45 print this help text and exit
48 print version information and exit
51 print expanded command line arguments
54 quiet mode, print no warnings and errors
57 verbose mode, print processing details
60 debug mode, print debug information
62 -ll --log-level [l]evel: string constant
63 (fatal, error, warn, info, debug, trace)
64 use level l for the logger
66 -lc --log-config [f]ilename: string
67 use config file f for the logger
70 \subsection processing_options processing options
75 require declaration of extended charset (default)
77 +Ca --charset-assume [c]harset: string constant
78 (latin-1 to -5, greek, cyrillic, arabic, hebrew)
79 assume charset c if no extended charset found
81 +Cc --charset-check-all
82 check all data elements with string values
83 (default: only PN, LO, LT, SH, ST and UT)
86 \subsection input_options input options
91 read file format or data set (default)
97 read data set without file meta information
99 input transfer syntax:
102 use TS recognition (default)
104 -td --read-xfer-detect
105 ignore TS specified in the file meta header
107 -te --read-xfer-little
108 read with explicit VR little endian TS
111 read with explicit VR big endian TS
113 -ti --read-xfer-implicit
114 read with implicit VR little endian TS
117 \subsection output_options output options
122 encode everything as XML attribute
123 (shortcut for +Ec, +Er, +Ev and +Et)
126 encode code value, coding scheme designator
127 and coding scheme version as XML attribute
129 +Er --attr-relationship
130 encode relationship type as XML attribute
132 +Ev --attr-value-type
133 encode value type as XML attribute
135 +Et --attr-template-id
136 encode template id as XML attribute
138 +Ee --template-envelope
139 template element encloses content items
140 (requires +Wt, implies +Et)
144 +Xs --add-schema-reference
145 add reference to XML Schema "dsr2xml.xsd"
146 (not with +Ea, +Ec, +Er, +Ev, +Et, +Ee, +We)
148 +Xn --use-xml-namespace
149 add XML namespace declaration to root element
153 +We --write-empty-tags
154 write all tags even if their value is empty
157 always write item identifier
159 +Wt --write-template-id
160 write template identification information
165 \subsection dicom_conformance DICOM Conformance
167 The \b dsr2xml utility supports the following SOP Classes:
170 SpectaclePrescriptionReportStorage 1.2.840.10008.5.1.4.1.1.78.6
171 MacularGridThicknessAndVolumeReportStorage 1.2.840.10008.5.1.4.1.1.79.1
172 BasicTextSRStorage 1.2.840.10008.5.1.4.1.1.88.11
173 EnhancedSRStorage 1.2.840.10008.5.1.4.1.1.88.22
174 ComprehensiveSRStorage 1.2.840.10008.5.1.4.1.1.88.33
175 ProcedureLogStorage 1.2.840.10008.5.1.4.1.1.88.40
176 MammographyCADSRStorage 1.2.840.10008.5.1.4.1.1.88.50
177 KeyObjectSelectionDocumentStorage 1.2.840.10008.5.1.4.1.1.88.59
178 ChestCADSRStorage 1.2.840.10008.5.1.4.1.1.88.65
179 XRayRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.67
180 ColonCADSRStorage 1.2.840.10008.5.1.4.1.1.88.69
181 ImplantationPlanSRDocumentStorage 1.2.840.10008.5.1.4.1.1.88.70
184 Please note that currently only mandatory and some optional attributes are
187 \section logging LOGGING
189 The level of logging output of the various command line tools and underlying
190 libraries can be specified by the user. By default, only errors and warnings
191 are written to the standard error stream. Using option \e --verbose also
192 informational messages like processing details are reported. Option
193 \e --debug can be used to get more details on the internal activity, e.g. for
194 debugging purposes. Other logging levels can be selected using option
195 \e --log-level. In \e --quiet mode only fatal errors are reported. In such
196 very severe error events, the application will usually terminate. For more
197 details on the different logging levels, see documentation of module "oflog".
199 In case the logging output should be written to file (optionally with logfile
200 rotation), to syslog (Unix) or the event log (Windows) option \e --log-config
201 can be used. This configuration file also allows for directing only certain
202 messages to a particular output stream and for filtering certain messages
203 based on the module or application where they are generated. An example
204 configuration file is provided in <em><etcdir>/logger.cfg</em>).
206 \section command_line COMMAND LINE
208 All command line tools use the following notation for parameters: square
209 brackets enclose optional values (0-1), three trailing dots indicate that
210 multiple values are allowed (1-n), a combination of both means 0 to n values.
212 Command line options are distinguished from parameters by a leading '+' or '-'
213 sign, respectively. Usually, order and position of command line options are
214 arbitrary (i.e. they can appear anywhere). However, if options are mutually
215 exclusive the rightmost appearance is used. This behaviour conforms to the
216 standard evaluation rules of common Unix shells.
218 In addition, one or more command files can be specified using an '@' sign as a
219 prefix to the filename (e.g. <em>\@command.txt</em>). Such a command argument
220 is replaced by the content of the corresponding text file (multiple
221 whitespaces are treated as a single separator unless they appear between two
222 quotation marks) prior to any further evaluation. Please note that a command
223 file cannot contain another command file. This simple but effective approach
224 allows to summarize common combinations of options/parameters and avoids
225 longish and confusing command lines (an example is provided in file
226 <em><datadir>/dumppat.txt</em>).
228 \section environment ENVIRONMENT
230 The \b dsr2xml utility will attempt to load DICOM data dictionaries specified
231 in the \e DCMDICTPATH environment variable. By default, i.e. if the
232 \e DCMDICTPATH environment variable is not set, the file
233 <em><datadir>/dicom.dic</em> will be loaded unless the dictionary is built
234 into the application (default for Windows).
236 The default behaviour should be preferred and the \e DCMDICTPATH environment
237 variable only used when alternative data dictionaries are required. The
238 \e DCMDICTPATH environment variable has the same format as the Unix shell
239 \e PATH variable in that a colon (":") separates entries. On Windows systems,
240 a semicolon (";") is used as a separator. The data dictionary code will
241 attempt to load each file specified in the \e DCMDICTPATH environment variable.
242 It is an error if no data dictionary can be loaded.
246 <em><datadir>/dsr2xml.xsd</em> - XML Schema file
248 \section see_also SEE ALSO
250 <b>xml2dsr</b>(1), <b>dcmconv</b>(1)
252 \section copyright COPYRIGHT
254 Copyright (C) 2000-2010 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.