4 \page xml2dsr Convert DICOM SR file and data set to XML
6 \page xml2dsr xml2dsr: Convert DICOM SR file and data set to XML
9 \section synopsis SYNOPSIS
12 xml2dsr [options] xmlfile-in dsrfile-out
15 \section description DESCRIPTION
17 The \b xml2dsr utility converts the contents of an XML (Extensible Markup
18 Language) document to DICOM Structured Reporting (SR) format (file format
19 or raw data set). The XML Schema <em>dsr2xml.xsd</em> does not yet follow
20 any standard format. However, the \b xml2dsr application might be enhanced
21 in this aspect in the future (e. g. by supporting HL7/CDA - Clinical
22 Document Architecture).
24 An appropriate XML file can be created using the \b dsr2xml tool (option
25 \e +Xn recommended to add XML namespace declaration to the root element).
27 \section parameters PARAMETERS
30 xmlfile-in XML input filename to be converted (stdin: "-")
32 dsrfile-out DICOM SR output filename
35 \section options OPTIONS
37 \subsection general_options general options
40 print this help text and exit
43 print version information and exit
46 print expanded command line arguments
49 quiet mode, print no warnings and errors
52 verbose mode, print processing details
55 debug mode, print debug information
57 -ll --log-level [l]evel: string constant
58 (fatal, error, warn, info, debug, trace)
59 use level l for the logger
61 -lc --log-config [f]ilename: string
62 use config file f for the logger
65 \subsection input_options input options
69 +Ee --template-envelope
70 template element encloses content items
73 \subsection processing_options processing options
78 validate XML document against Schema
79 (not with --template-envelope)
82 check XML namespace in document root
86 +Ug --generate-new-uids
87 generate new Study/Series/SOP Instance UID
89 -Uo --dont-overwrite-uids
90 do not overwrite existing UIDs (default)
93 overwrite existing UIDs
96 \subsection output_options output options
101 write file format (default)
104 write data set without file meta information
106 output transfer syntax:
108 +t= --write-xfer-same
109 write with same TS as input (default)
111 +te --write-xfer-little
112 write with explicit VR little endian TS
115 write with explicit VR big endian TS
117 +ti --write-xfer-implicit
118 write with implicit VR little endian TS
120 +td --write-xfer-deflated
121 write with deflated explicit VR little endian TS
123 post-1993 value representations:
126 enable support for new VRs (UN/UT) (default)
129 disable support for new VRs, convert to OB
131 group length encoding:
133 +g= --group-length-recalc
134 recalculate group lengths if present (default)
136 +g --group-length-create
137 always write with group length elements
139 -g --group-length-remove
140 always write without group length elements
142 length encoding in sequences and items:
145 write with explicit lengths (default)
147 -e --length-undefined
148 write with undefined lengths
150 data set trailing padding (not with --write-dataset):
153 do not change padding (default if not --write-dataset)
156 no padding (implicit if --write-dataset)
158 +p --padding-create [f]ile-pad [i]tem-pad: integer
159 align file on multiple of f bytes
160 and items on multiple of i bytes
162 deflate compression level (only with --write-xfer-deflated):
164 +cl --compression-level [l]evel: integer (default: 6)
165 0=uncompressed, 1=fastest, 9=best compression
170 \subsection dicom_conformance DICOM Conformance
172 The \b xml2dsr utility supports the following SOP Classes:
175 SpectaclePrescriptionReportStorage 1.2.840.10008.5.1.4.1.1.78.6
176 MacularGridThicknessAndVolumeReportStorage 1.2.840.10008.5.1.4.1.1.79.1
177 BasicTextSRStorage 1.2.840.10008.5.1.4.1.1.88.11
178 EnhancedSRStorage 1.2.840.10008.5.1.4.1.1.88.22
179 ComprehensiveSRStorage 1.2.840.10008.5.1.4.1.1.88.33
180 ProcedureLogStorage 1.2.840.10008.5.1.4.1.1.88.40
181 MammographyCADSRStorage 1.2.840.10008.5.1.4.1.1.88.50
182 KeyObjectSelectionDocumentStorage 1.2.840.10008.5.1.4.1.1.88.59
183 ChestCADSRStorage 1.2.840.10008.5.1.4.1.1.88.65
184 XRayRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.67
185 ColonCADSRStorage 1.2.840.10008.5.1.4.1.1.88.69
186 ImplantationPlanSRDocumentStorage 1.2.840.10008.5.1.4.1.1.88.70
189 Please note that currently only mandatory and some optional attributes are
192 \section logging LOGGING
194 The level of logging output of the various command line tools and underlying
195 libraries can be specified by the user. By default, only errors and warnings
196 are written to the standard error stream. Using option \e --verbose also
197 informational messages like processing details are reported. Option
198 \e --debug can be used to get more details on the internal activity, e.g. for
199 debugging purposes. Other logging levels can be selected using option
200 \e --log-level. In \e --quiet mode only fatal errors are reported. In such
201 very severe error events, the application will usually terminate. For more
202 details on the different logging levels, see documentation of module "oflog".
204 In case the logging output should be written to file (optionally with logfile
205 rotation), to syslog (Unix) or the event log (Windows) option \e --log-config
206 can be used. This configuration file also allows for directing only certain
207 messages to a particular output stream and for filtering certain messages
208 based on the module or application where they are generated. An example
209 configuration file is provided in <em><etcdir>/logger.cfg</em>).
211 \section command_line COMMAND LINE
213 All command line tools use the following notation for parameters: square
214 brackets enclose optional values (0-1), three trailing dots indicate that
215 multiple values are allowed (1-n), a combination of both means 0 to n values.
217 Command line options are distinguished from parameters by a leading '+' or '-'
218 sign, respectively. Usually, order and position of command line options are
219 arbitrary (i.e. they can appear anywhere). However, if options are mutually
220 exclusive the rightmost appearance is used. This behaviour conforms to the
221 standard evaluation rules of common Unix shells.
223 In addition, one or more command files can be specified using an '@' sign as a
224 prefix to the filename (e.g. <em>\@command.txt</em>). Such a command argument
225 is replaced by the content of the corresponding text file (multiple
226 whitespaces are treated as a single separator unless they appear between two
227 quotation marks) prior to any further evaluation. Please note that a command
228 file cannot contain another command file. This simple but effective approach
229 allows to summarize common combinations of options/parameters and avoids
230 longish and confusing command lines (an example is provided in file
231 <em><datadir>/dumppat.txt</em>).
233 \section environment ENVIRONMENT
235 The \b xml2dsr utility will attempt to load DICOM data dictionaries specified
236 in the \e DCMDICTPATH environment variable. By default, i.e. if the
237 \e DCMDICTPATH environment variable is not set, the file
238 <em><datadir>/dicom.dic</em> will be loaded unless the dictionary is built
239 into the application (default for Windows).
241 The default behaviour should be preferred and the \e DCMDICTPATH environment
242 variable only used when alternative data dictionaries are required. The
243 \e DCMDICTPATH environment variable has the same format as the Unix shell
244 \e PATH variable in that a colon (":") separates entries. On Windows systems,
245 a semicolon (";") is used as a separator. The data dictionary code will
246 attempt to load each file specified in the \e DCMDICTPATH environment variable.
247 It is an error if no data dictionary can be loaded.
251 <em><datadir>/dsr2xml.xsd</em> - XML Schema file
253 \section see_also SEE ALSO
257 \section copyright COPYRIGHT
259 Copyright (C) 2003-2010 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.