1dcmdjpeg(1)                       OFFIS DCMTK                      dcmdjpeg(1)
2
3
4

NAME

6       dcmdjpeg - Decode JPEG-compressed DICOM file
7
8

SYNOPSIS

10       dcmdjpeg [options] dcmfile-in dcmfile-out
11

DESCRIPTION

13       The  dcmdjpeg utility reads a JPEG-compressed DICOM image (dcmfile-in),
14       decompresses the JPEG data (i. e. conversion to a native DICOM transfer
15       syntax) and writes the converted image to an output file (dcmfile-out).
16

PARAMETERS

18       dcmfile-in   DICOM input filename to be converted
19
20       dcmfile-out  DICOM output filename
21

OPTIONS

23   general options
24         -h    --help
25                 print this help text and exit
26
27               --version
28                 print version information and exit
29
30               --arguments
31                 print expanded command line arguments
32
33         -q    --quiet
34                 quiet mode, print no warnings and errors
35
36         -v    --verbose
37                 verbose mode, print processing details
38
39         -d    --debug
40                 debug mode, print debug information
41
42         -ll   --log-level  [l]evel: string constant
43                 (fatal, error, warn, info, debug, trace)
44                 use level l for the logger
45
46         -lc   --log-config  [f]ilename: string
47                 use config file f for the logger
48
49   input options
50       input file format:
51
52         +f    --read-file
53                 read file format or data set (default)
54
55         +fo   --read-file-only
56                 read file format only
57
58         -f    --read-dataset
59                 read data set without file meta information
60
61         # This option allows one to decompress JPEG compressed DICOM objects that
62         # have been stored as dataset without meta-header. Such a thing should
63         # not exist since the transfer syntax cannot be reliably determined,
64         # without meta-header but unfortunately it does.
65
66   processing options
67       color space conversion:
68
69         +cp   --conv-photometric
70                 convert if YCbCr photometric interpretation (default)
71
72         # If the compressed image uses YBR_FULL or YBR_FULL_422 photometric
73         # interpretation, convert to RGB during decompression.
74
75         +cl   --conv-lossy
76                 convert YCbCr to RGB if lossy JPEG
77
78         # If the compressed image is encoded in lossy JPEG, assume YCbCr
79         # color model and convert to RGB.
80
81         +cg   --conv-guess
82                 convert to RGB if YCbCr is guessed by library
83
84         # If the underlying JPEG library "guesses" the color space of the
85         # compressed image to be YCbCr, convert to RGB.
86
87         +cgl  --conv-guess-lossy
88                 convert to RGB if lossy JPEG and YCbCr is
89                 guessed by the underlying JPEG library
90
91         # If the compressed image is encoded in lossy JPEG and the underlying
92         # JPEG library "guesses" the color space to be YCbCr, convert to RGB.
93
94         +ca   --conv-always
95                 always convert YCbCr to RGB
96
97         # If the compressed image is a color image, assume YCbCr color model
98         # and convert to RGB.
99
100         +cn   --conv-never
101                 never convert YCbCr to RGB
102
103         # Never convert color space from YCbCr to RGB during decompression.
104         # Note that a conversion from YBR_FULL_422 to YBR_FULL will still take
105         # place if the source images has been compressed with subsampling.
106
107       planar configuration:
108
109         +pa   --planar-auto
110                 automatically determine planar configuration
111                 from SOP class and color space (default)
112
113         # If the compressed image is a color image, store in color-by-plane
114         # planar configuration if required by the SOP class and photometric
115         # interpretation. Hardcopy Color images are always stored color-by-
116         # plane, and the revised Ultrasound image objects are stored color-by-
117         # plane if the color model is YBR_FULL.  Everything else is stored
118         # color-by-pixel.
119
120         +px   --color-by-pixel
121                 always store color-by-pixel
122
123         # If the compressed image is a color image, store in color-by-pixel
124         # planar configuration.
125
126         +pl   --color-by-plane
127                 always store color-by-plane
128
129         # If the compressed image is a color image, store in color-by-plane
130         # planar configuration.
131
132       SOP Instance UID:
133
134         +ud   --uid-default
135                 keep same SOP Instance UID (default)
136
137         #  Never assigns a new SOP instance UID.
138
139         +ua   --uid-always
140                 always assign new UID
141
142         # Always assigns a new SOP instance UID.
143
144       workaround options for incorrect JPEG encodings:
145
146         +w6   --workaround-pred6
147                 enable workaround for JPEG lossless images
148                 with overflow in predictor 6
149
150         # DICOM images with 16 bits/pixel have been observed "in the wild"
151         # that are compressed with lossless JPEG and need special handling
152         # because the encoder produced an 16-bit integer overflow in predictor
153         # 6, which needs to be compensated (reproduced) during decompression.
154         # This flag enables a correct decompression of such faulty images, but
155         # at the same time will cause an incorrect decompression of correctly
156         # compressed images. Use with care.
157
158         +wi   --workaround-incpl
159                 enable workaround for incomplete JPEG data
160
161         # This option causes dcmjpeg to ignore incomplete JPEG data
162         # at the end of a compressed fragment and to start decompressing
163         # the next frame from the next fragment (if any). This permits
164         # images with incomplete JPEG data to be decoded.
165
166         +wc   --workaround-cornell
167                 enable workaround for 16-bit JPEG lossless
168                 Cornell images with Huffman table overflow
169
170         # One of the first open-source implementations of lossless JPEG
171         # compression, the "Cornell" library, has a well-known bug that leads
172         # to invalid values in the Huffmann table when images with 16 bit/sample
173         # are compressed. This flag enables a workaround that permits such
174         # images to be decoded correctly..fi
175
176   output options
177       output file format:
178
179         +F    --write-file
180                 write file format (default)
181
182         -F    --write-dataset
183                 write data set without file meta information
184
185       output transfer syntax:
186
187         +te   --write-xfer-little
188                 write with explicit VR little endian (default)
189
190         +tb   --write-xfer-big
191                 write with explicit VR big endian TS
192
193         +ti   --write-xfer-implicit
194                 write with implicit VR little endian TS
195
196       post-1993 value representations:
197
198         +u    --enable-new-vr
199                 enable support for new VRs (UN/UT) (default)
200
201         -u    --disable-new-vr
202                 disable support for new VRs, convert to OB
203
204       group length encoding:
205
206         +g=   --group-length-recalc
207                 recalculate group lengths if present (default)
208
209         +g    --group-length-create
210                 always write with group length elements
211
212         -g    --group-length-remove
213                 always write without group length elements
214
215       length encoding in sequences and items:
216
217         +e    --length-explicit
218                 write with explicit lengths (default)
219
220         -e    --length-undefined
221                 write with undefined lengths
222
223       data set trailing padding (not with --write-dataset):
224
225         -p=   --padding-retain
226                 do not change padding (default if not --write-dataset)
227
228         -p    --padding-off
229                 no padding (implicit if --write-dataset)
230
231         +p    --padding-create  [f]ile-pad [i]tem-pad: integer
232                 align file on multiple of f bytes
233                 and items on multiple of i bytes
234

TRANSFER SYNTAXES

236       dcmdjpeg  supports  the following transfer syntaxes for input (dcmfile-
237       in):
238
239       LittleEndianImplicitTransferSyntax             1.2.840.10008.1.2
240       LittleEndianExplicitTransferSyntax             1.2.840.10008.1.2.1
241       DeflatedExplicitVRLittleEndianTransferSyntax   1.2.840.10008.1.2.1.99 (*)
242       BigEndianExplicitTransferSyntax                1.2.840.10008.1.2.2
243       JPEGProcess1TransferSyntax                     1.2.840.10008.1.2.4.50
244       JPEGProcess2_4TransferSyntax                   1.2.840.10008.1.2.4.51
245       JPEGProcess6_8TransferSyntax                   1.2.840.10008.1.2.4.53
246       JPEGProcess10_12TransferSyntax                 1.2.840.10008.1.2.4.55
247       JPEGProcess14TransferSyntax                    1.2.840.10008.1.2.4.57
248       JPEGProcess14SV1TransferSyntax                 1.2.840.10008.1.2.4.70
249
250       (*) if compiled with zlib support enabled
251
252       dcmdjpeg supports the following transfer syntaxes for output  (dcmfile-
253       out):
254
255       LittleEndianImplicitTransferSyntax             1.2.840.10008.1.2
256       LittleEndianExplicitTransferSyntax             1.2.840.10008.1.2.1
257       BigEndianExplicitTransferSyntax                1.2.840.10008.1.2.2
258

LOGGING

260       The  level  of  logging  output  of  the various command line tools and
261       underlying libraries can be specified by the  user.  By  default,  only
262       errors  and  warnings  are  written to the standard error stream. Using
263       option --verbose also informational messages  like  processing  details
264       are  reported.  Option  --debug  can be used to get more details on the
265       internal activity, e.g. for debugging purposes.  Other  logging  levels
266       can  be  selected  using option --log-level. In --quiet mode only fatal
267       errors are reported. In such very severe error events, the  application
268       will  usually  terminate.  For  more  details  on the different logging
269       levels, see documentation of module 'oflog'.
270
271       In case the logging output should be written to file  (optionally  with
272       logfile  rotation),  to syslog (Unix) or the event log (Windows) option
273       --log-config can be used.  This  configuration  file  also  allows  for
274       directing  only  certain messages to a particular output stream and for
275       filtering certain messages based on the  module  or  application  where
276       they  are  generated.  An  example  configuration  file  is provided in
277       <etcdir>/logger.cfg.
278

COMMAND LINE

280       All command line tools  use  the  following  notation  for  parameters:
281       square  brackets  enclose  optional  values  (0-1), three trailing dots
282       indicate that multiple values are allowed (1-n), a combination of  both
283       means 0 to n values.
284
285       Command line options are distinguished from parameters by a leading '+'
286       or '-' sign, respectively. Usually, order and position of command  line
287       options  are  arbitrary  (i.e.  they  can appear anywhere). However, if
288       options are mutually exclusive the rightmost appearance is  used.  This
289       behavior  conforms  to  the  standard  evaluation  rules of common Unix
290       shells.
291
292       In addition, one or more command files can be specified  using  an  '@'
293       sign  as  a  prefix to the filename (e.g. @command.txt). Such a command
294       argument is replaced by the content  of  the  corresponding  text  file
295       (multiple  whitespaces  are  treated  as a single separator unless they
296       appear between two quotation marks) prior to  any  further  evaluation.
297       Please  note  that  a command file cannot contain another command file.
298       This simple but effective  approach  allows  one  to  summarize  common
299       combinations  of  options/parameters  and  avoids longish and confusing
300       command lines (an example is provided in file <datadir>/dumppat.txt).
301

ENVIRONMENT

303       The dcmdjpeg utility will  attempt  to  load  DICOM  data  dictionaries
304       specified  in the DCMDICTPATH environment variable. By default, i.e. if
305       the  DCMDICTPATH  environment   variable   is   not   set,   the   file
306       <datadir>/dicom.dic  will be loaded unless the dictionary is built into
307       the application (default for Windows).
308
309       The  default  behavior  should  be  preferred   and   the   DCMDICTPATH
310       environment  variable  only used when alternative data dictionaries are
311       required. The DCMDICTPATH environment variable has the same  format  as
312       the  Unix  shell PATH variable in that a colon (':') separates entries.
313       On Windows systems, a semicolon (';') is used as a separator. The  data
314       dictionary  code  will  attempt  to  load  each  file  specified in the
315       DCMDICTPATH environment variable. It is an error if no data  dictionary
316       can be loaded.
317

SEE ALSO

319       dcmcjpeg(1)
320
322       Copyright  (C)  2001-2022  by OFFIS e.V., Escherweg 2, 26121 Oldenburg,
323       Germany.
324
325
326
327Version 3.6.7                   Fri Apr 22 2022                    dcmdjpeg(1)
Impressum