4 \page dcmdjpeg Decode JPEG-compressed DICOM file
6 \page dcmdjpeg dcmdjpeg: Decode JPEG-compressed DICOM file
9 \section synopsis SYNOPSIS
12 dcmdjpeg [options] dcmfile-in dcmfile-out
15 \section description DESCRIPTION
17 The \b dcmdjpeg utility reads a JPEG-compressed DICOM image (\e dcmfile-in),
18 decompresses the JPEG data (i. e. conversion to a native DICOM transfer syntax)
19 and writes the converted image to an output file (\e dcmfile-out).
21 \section parameters PARAMETERS
24 dcmfile-in DICOM input filename to be converted
26 dcmfile-out DICOM output filename
29 \section options OPTIONS
31 \subsection general_options general options
34 print this help text and exit
37 print version information and exit
40 print expanded command line arguments
43 quiet mode, print no warnings and errors
46 verbose mode, print processing details
49 debug mode, print debug information
51 -ll --log-level [l]evel: string constant
52 (fatal, error, warn, info, debug, trace)
53 use level l for the logger
55 -lc --log-config [f]ilename: string
56 use config file f for the logger
59 \subsection input_options input options
65 read file format or data set (default)
71 read data set without file meta information
73 # This option allows to decompress JPEG compressed DICOM objects that
74 # have been stored as dataset without meta-header. Such a thing should
75 # not exist since the transfer syntax cannot be reliably determined,
76 # without meta-header but unfortunately it does.
79 \subsection processing_options processing options
82 color space conversion:
84 +cp --conv-photometric
85 convert if YCbCr photometric interpretation (default)
87 # If the compressed image uses YBR_FULL or YBR_FULL_422 photometric
88 # interpretation, convert to RGB during decompression.
91 convert YCbCr to RGB if lossy JPEG
93 # If the compressed image is encoded in lossy JPEG, assume YCbCr
94 # color model and convert to RGB.
97 convert to RGB if YCbCr is guessed by library
99 # If the underlying JPEG library "guesses" the color space of the
100 # compressed image to be YCbCr, convert to RGB.
102 +cgl --conv-guess-lossy
103 convert to RGB if lossy JPEG and YCbCr is
104 guessed by the underlying JPEG library
106 # If the compressed image is encoded in lossy JPEG and the underlying
107 # JPEG library "guesses" the color space to be YCbCr, convert to RGB.
110 always convert YCbCr to RGB
112 # If the compressed image is a color image, assume YCbCr color model
113 # and convert to RGB.
116 never convert color space
118 # Never convert color space during decompression.
120 planar configuration:
123 automatically determine planar configuration
124 from SOP class and color space (default)
126 # If the compressed image is a color image, store in color-by-plane
127 # planar configuration if required by the SOP class and photometric
128 # interpretation. Hardcopy Color images are always stored color-by-
129 # plane, and the revised Ultrasound image objects are stored color-by-
130 # plane if the color model is YBR_FULL. Everything else is stored
134 always store color-by-pixel
136 # If the compressed image is a color image, store in color-by-pixel
137 # planar configuration.
140 always store color-by-plane
142 # If the compressed image is a color image, store in color-by-plane
143 # planar configuration.
148 keep same SOP Instance UID (default)
150 # Never assigns a new SOP instance UID.
153 always assign new UID
155 # Always assigns a new SOP instance UID.
157 workaround options for incorrect JPEG encodings:
159 +w6 --workaround-pred6
160 enable workaround for JPEG lossless images
161 with overflow in predictor 6
163 # DICOM images with 16 bits/pixel have been observed "in the wild"
164 # that are compressed with lossless JPEG and need special handling
165 # because the encoder produced an 16-bit integer overflow in predictor
166 # 6, which needs to be compensated (reproduced) during decompression.
167 # This flag enables a correct decompression of such faulty images, but
168 # at the same time will cause an incorrect decompression of correctly
169 # compressed images. Use with care.
172 \subsection output_options output options
178 write file format (default)
181 write data set without file meta information
183 output transfer syntax:
185 +te --write-xfer-little
186 write with explicit VR little endian (default)
189 write with explicit VR big endian TS
191 +ti --write-xfer-implicit
192 write with implicit VR little endian TS
194 post-1993 value representations:
197 enable support for new VRs (UN/UT) (default)
200 disable support for new VRs, convert to OB
202 group length encoding:
204 +g= --group-length-recalc
205 recalculate group lengths if present (default)
207 +g --group-length-create
208 always write with group length elements
210 -g --group-length-remove
211 always write without group length elements
213 length encoding in sequences and items:
216 write with explicit lengths (default)
218 -e --length-undefined
219 write with undefined lengths
221 data set trailing padding (not with --write-dataset):
224 do not change padding (default if not --write-dataset)
227 no padding (implicit if --write-dataset)
229 +p --padding-create [f]ile-pad [i]tem-pad: integer
230 align file on multiple of f bytes
231 and items on multiple of i bytes
234 \section transfer_syntaxes TRANSFER SYNTAXES
236 \b dcmdjpeg supports the following transfer syntaxes for input
240 LittleEndianImplicitTransferSyntax 1.2.840.10008.1.2
241 LittleEndianExplicitTransferSyntax 1.2.840.10008.1.2.1
242 DeflatedExplicitVRLittleEndianTransferSyntax 1.2.840.10008.1.2.1.99 (*)
243 BigEndianExplicitTransferSyntax 1.2.840.10008.1.2.2
244 JPEGProcess1TransferSyntax 1.2.840.10008.1.2.4.50
245 JPEGProcess2_4TransferSyntax 1.2.840.10008.1.2.4.51
246 JPEGProcess6_8TransferSyntax 1.2.840.10008.1.2.4.53
247 JPEGProcess10_12TransferSyntax 1.2.840.10008.1.2.4.55
248 JPEGProcess14TransferSyntax 1.2.840.10008.1.2.4.57
249 JPEGProcess14SV1TransferSyntax 1.2.840.10008.1.2.4.70
252 (*) if compiled with zlib support enabled
254 \b dcmdjpeg supports the following transfer syntaxes for output
258 LittleEndianImplicitTransferSyntax 1.2.840.10008.1.2
259 LittleEndianExplicitTransferSyntax 1.2.840.10008.1.2.1
260 BigEndianExplicitTransferSyntax 1.2.840.10008.1.2.2
263 \section logging LOGGING
265 The level of logging output of the various command line tools and underlying
266 libraries can be specified by the user. By default, only errors and warnings
267 are written to the standard error stream. Using option \e --verbose also
268 informational messages like processing details are reported. Option
269 \e --debug can be used to get more details on the internal activity, e.g. for
270 debugging purposes. Other logging levels can be selected using option
271 \e --log-level. In \e --quiet mode only fatal errors are reported. In such
272 very severe error events, the application will usually terminate. For more
273 details on the different logging levels, see documentation of module "oflog".
275 In case the logging output should be written to file (optionally with logfile
276 rotation), to syslog (Unix) or the event log (Windows) option \e --log-config
277 can be used. This configuration file also allows for directing only certain
278 messages to a particular output stream and for filtering certain messages
279 based on the module or application where they are generated. An example
280 configuration file is provided in <em><etcdir>/logger.cfg</em>).
282 \section command_line COMMAND LINE
284 All command line tools use the following notation for parameters: square
285 brackets enclose optional values (0-1), three trailing dots indicate that
286 multiple values are allowed (1-n), a combination of both means 0 to n values.
288 Command line options are distinguished from parameters by a leading '+' or '-'
289 sign, respectively. Usually, order and position of command line options are
290 arbitrary (i.e. they can appear anywhere). However, if options are mutually
291 exclusive the rightmost appearance is used. This behaviour conforms to the
292 standard evaluation rules of common Unix shells.
294 In addition, one or more command files can be specified using an '@' sign as a
295 prefix to the filename (e.g. <em>\@command.txt</em>). Such a command argument
296 is replaced by the content of the corresponding text file (multiple
297 whitespaces are treated as a single separator unless they appear between two
298 quotation marks) prior to any further evaluation. Please note that a command
299 file cannot contain another command file. This simple but effective approach
300 allows to summarize common combinations of options/parameters and avoids
301 longish and confusing command lines (an example is provided in file
302 <em><datadir>/dumppat.txt</em>).
304 \section environment ENVIRONMENT
306 The \b dcmdjpeg utility will attempt to load DICOM data dictionaries specified
307 in the \e DCMDICTPATH environment variable. By default, i.e. if the
308 \e DCMDICTPATH environment variable is not set, the file
309 <em><datadir>/dicom.dic</em> will be loaded unless the dictionary is built
310 into the application (default for Windows).
312 The default behaviour should be preferred and the \e DCMDICTPATH environment
313 variable only used when alternative data dictionaries are required. The
314 \e DCMDICTPATH environment variable has the same format as the Unix shell
315 \e PATH variable in that a colon (":") separates entries. On Windows systems,
316 a semicolon (";") is used as a separator. The data dictionary code will
317 attempt to load each file specified in the \e DCMDICTPATH environment variable.
318 It is an error if no data dictionary can be loaded.
320 \section see_also SEE ALSO
324 \section copyright COPYRIGHT
326 Copyright (C) 2001-2010 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.