1dcml2pnm(1) OFFIS DCMTK dcml2pnm(1)
2
3
4
6 dcml2pnm - Convert DICOM images to PGM/PPM, PNG, TIFF or BMP
7
9 dcml2pnm [options] dcmfile-in [bitmap-out]
10
12 The dcml2pnm utility reads a DICOM image, converts the pixel data
13 according to the selected image processing options and writes back an
14 image in the well-known PGM/PPM (portable gray map / portable pix map),
15 PNG, TIFF or Windows BMP format. This utility supports uncompressed as
16 well as JPEG-LS and RLE compressed DICOM images.
17
19 dcmfile-in DICOM input filename to be converted
20
21 bitmap-out output filename to be written (default: stdout)
22
24 general options
25 -h --help
26 print this help text and exit
27
28 --version
29 print version information and exit
30
31 --arguments
32 print expanded command line arguments
33
34 -q --quiet
35 quiet mode, print no warnings and errors
36
37 -v --verbose
38 verbose mode, print processing details
39
40 -d --debug
41 debug mode, print debug information
42
43 -ll --log-level [l]evel: string constant
44 (fatal, error, warn, info, debug, trace)
45 use level l for the logger
46
47 -lc --log-config [f]ilename: string
48 use config file f for the logger
49
50 input options
51 input file format:
52
53 +f --read-file
54 read file format or data set (default)
55
56 +fo --read-file-only
57 read file format only
58
59 -f --read-dataset
60 read data set without file meta information
61
62 input transfer syntax:
63
64 -t= --read-xfer-auto
65 use TS recognition (default)
66
67 -td --read-xfer-detect
68 ignore TS specified in the file meta header
69
70 -te --read-xfer-little
71 read with explicit VR little endian TS
72
73 -tb --read-xfer-big
74 read with explicit VR big endian TS
75
76 -ti --read-xfer-implicit
77 read with implicit VR little endian TS
78
79 image processing options
80 frame selection:
81
82 +F --frame [n]umber: integer
83 select specified frame (default: 1)
84
85 +Fr --frame-range [n]umber [c]ount: integer
86 select c frames beginning with frame n
87
88 +Fa --all-frames
89 select all frames
90
91 rotation:
92
93 +Rl --rotate-left
94 rotate image left (-90 degrees)
95
96 +Rr --rotate-right
97 rotate image right (+90 degrees)
98
99 +Rtd --rotate-top-down
100 rotate image top-down (180 degrees)
101
102 flipping:
103
104 +Lh --flip-horizontally
105 flip image horizontally
106
107 +Lv --flip-vertically
108 flip image vertically
109
110 +Lhv --flip-both-axes
111 flip image horizontally and vertically
112
113 scaling:
114
115 +a --recognize-aspect
116 recognize pixel aspect ratio (default)
117
118 -a --ignore-aspect
119 ignore pixel aspect ratio when scaling
120
121 +i --interpolate [n]umber of algorithm: integer
122 use interpolation when scaling (1..4, default: 1)
123
124 -i --no-interpolation
125 no interpolation when scaling
126
127 -S --no-scaling
128 no scaling, ignore pixel aspect ratio (default)
129
130 +Sxf --scale-x-factor [f]actor: float
131 scale x axis by factor, auto-compute y axis
132
133 +Syf --scale-y-factor [f]actor: float
134 scale y axis by factor, auto-compute x axis
135
136 +Sxv --scale-x-size [n]umber: integer
137 scale x axis to n pixels, auto-compute y axis
138
139 +Syv --scale-y-size [n]umber: integer
140 scale y axis to n pixels, auto-compute x axis
141
142 modality LUT transformation:
143
144 -M --no-modality
145 ignore stored modality LUT transformation
146
147 +M --use-modality
148 use modality LUT transformation (default)
149
150 VOI LUT transformation:
151
152 -W --no-windowing
153 no VOI windowing (default)
154
155 +Wi --use-window [n]umber: integer
156 use the n-th VOI window from image file
157
158 +Wl --use-voi-lut [n]umber: integer
159 use the n-th VOI look up table from image file
160
161 +Wm --min-max-window
162 compute VOI window using min-max algorithm
163
164 +Wn --min-max-window-n
165 compute VOI window using min-max algorithm,
166 ignoring extreme values
167
168 +Wr --roi-min-max-window [l]eft [t]op [w]idth [h]eight: integer
169 compute ROI window using min-max algorithm,
170 region of interest is specified by l,t,w,h
171
172 +Wh --histogram-window [n]umber: integer
173 compute VOI window using Histogram algorithm,
174 ignoring n percent
175
176 +Ww --set-window [c]enter [w]idth: float
177 compute VOI window using center c and width w
178
179 +Wfl --linear-function
180 set VOI LUT function to LINEAR
181
182 +Wfs --sigmoid-function
183 set VOI LUT function to SIGMOID
184
185 presentation LUT transformation:
186
187 +Pid --identity-shape
188 set presentation LUT shape to IDENTITY
189
190 +Piv --inverse-shape
191 set presentation LUT shape to INVERSE
192
193 +Pod --lin-od-shape
194 set presentation LUT shape to LIN OD
195
196 overlay:
197
198 -O --no-overlays
199 do not display overlays
200
201 +O --display-overlay [n]umber: integer
202 display overlay n (0..16, 0=all, default: +O 0)
203
204 +Omr --ovl-replace
205 use overlay mode "Replace"
206 (default for Graphic overlays)
207
208 +Omt --ovl-threshold
209 use overlay mode "Threshold Replace"
210
211 +Omc --ovl-complement
212 use overlay mode "Complement"
213
214 +Omv --ovl-invert
215 use overlay mode "Invert Bitmap"
216
217 +Omi --ovl-roi
218 use overlay mode "Region of Interest"
219 (default for ROI overlays)
220
221 +Osf --set-foreground [d]ensity: float
222 set overlay foreground density (0..1, default: 1)
223
224 +Ost --set-threshold [d]ensity: float
225 set overlay threshold density (0..1, default: 0.5)
226
227 display LUT transformation:
228
229 +Dm --monitor-file [f]ilename: string
230 calibrate output according to monitor characteristics
231 defined in f
232
233 +Dp --printer-file [f]ilename: string
234 calibrate output according to printer characteristics
235 defined in f
236
237 +Da --ambient-light [a]mbient light: float
238 ambient light value (cd/m^2, default: file f)
239
240 +Di --illumination [i]llumination: float
241 illumination value (cd/m^2, default: file f)
242
243 +Dn --min-density [m]inimum optical density: float
244 Dmin value (default: off, only with +Dp)
245
246 +Dx --max-density [m]aximum optical density: float
247 Dmax value (default: off, only with +Dp)
248
249 +Dg --gsd-function
250 use GSDF for calibration (default for +Dm/+Dp)
251
252 +Dc --cielab-function
253 use CIELAB function for calibration
254
255 compatibility:
256
257 +Ma --accept-acr-nema
258 accept ACR-NEMA images without photometric
259 interpretation
260
261 +Mp --accept-palettes
262 accept incorrect palette attribute tags
263 (0028,111x) and (0028,121x)
264
265 +Mc --check-lut-depth
266 check 3rd value of the LUT descriptor, compare
267 with expected bit depth based on LUT data
268
269 +Mm --ignore-mlut-depth
270 ignore 3rd value of the modality LUT descriptor,
271 determine bits per table entry automatically
272
273 +Mv --ignore-vlut-depth
274 ignore 3rd value of the VOI LUT descriptor,
275 determine bits per table entry automatically
276
277 TIFF format:
278
279 +Tl --compr-lzw
280 LZW compression (default)
281
282 +Tr --compr-rle
283 RLE compression
284
285 +Tn --compr-none
286 uncompressed
287
288 +Pd --predictor-default
289 no LZW predictor (default)
290
291 +Pn --predictor-none
292 LZW predictor 1 (no prediction)
293
294 +Ph --predictor-horz
295 LZW predictor 2 (horizontal differencing)
296
297 +Rs --rows-per-strip [r]ows: integer (default: 0)
298 rows per strip, default 8K per strip
299
300 PNG format:
301
302 +il --interlace
303 create interlaced file (default)
304
305 -il --nointerlace
306 create non-interlaced file
307
308 +mf --meta-file
309 create PNG file meta information (default)
310
311 -mf --meta-none
312 no PNG file meta information
313
314 other transformations:
315
316 +G --grayscale
317 convert to grayscale if necessary
318
319 +P --change-polarity
320 change polarity (invert pixel output)
321
322 +C --clip-region [l]eft [t]op [w]idth [h]eight: integer
323 clip image region (l, t, w, h)
324
325 output options
326 general:
327
328 -im --image-info
329 print image details (requires verbose mode)
330
331 -o --no-output
332 do not create any output (useful with -im)
333
334 image format:
335
336 +op --write-raw-pnm
337 write 8-bit binary PGM/PPM (default for files)
338
339 +opb --write-8-bit-pnm
340 write 8-bit ASCII PGM/PPM (default for stdout)
341
342 +opw --write-16-bit-pnm
343 write 16-bit ASCII PGM/PPM
344
345 +opn --write-n-bit-pnm [n]umber: integer
346 write n-bit ASCII PGM/PPM (1..32)
347
348 +ob --write-bmp
349 write 8-bit (monochrome) or 24-bit (color) BMP
350
351 +obp --write-8-bit-bmp
352 write 8-bit palette BMP (monochrome only)
353
354 +obt --write-24-bit-bmp
355 write 24-bit truecolor BMP
356
357 +obr --write-32-bit-bmp
358 write 32-bit truecolor BMP
359
360 +ot --write-tiff
361 write 8-bit (monochrome) or 24-bit (color) TIFF
362
363 +on --write-png
364 write 8-bit (monochrome) or 24-bit (color) PNG
365
367 The following preferred interpolation algorithms can be selected using
368 the --interpolate option:
369
370 · 1 = free scaling algorithm with interpolation from pbmplus toolkit
371 · 2 = free scaling algorithm with interpolation from c't magazine
372 · 3 = magnification algorithm with bilinear interpolation from Eduard
373 Stanescu
374 · 4 = magnification algorithm with bicubic interpolation from Eduard
375 Stanescu
376 The --write-tiff option is only available when DCMTK has been
377 configured and compiled with support for the external libtiff TIFF
378 library. The availability of the TIFF compression options depends on
379 the libtiff configuration. In particular, the patented LZW algorithm
380 may not be available.
381 The --write-png option is only available when DCMTK has been configured
382 and compiled with support for the external libpng PNG library. Option
383 --interlace enables progressive image view while loading the PNG file.
384 Only a few applications take care of the meta info (TEXT) in a PNG
385 file.
387 dcml2pnm supports the following transfer syntaxes for input (dcmfile-
388 in):
389 LittleEndianImplicitTransferSyntax 1.2.840.10008.1.2
390 LittleEndianExplicitTransferSyntax 1.2.840.10008.1.2.1
391 DeflatedExplicitVRLittleEndianTransferSyntax 1.2.840.10008.1.2.1.99 (*)
392 BigEndianExplicitTransferSyntax 1.2.840.10008.1.2.2
393 JPEGLSLosslessTransferSyntax 1.2.840.10008.1.2.4.80
394 JPEGLSLossyTransferSyntax 1.2.840.10008.1.2.4.81
395 RLELosslessTransferSyntax 1.2.840.10008.1.2.5
396 (*) if compiled with zlib support enabled
398 The level of logging output of the various command line tools and
399 underlying libraries can be specified by the user. By default, only
400 errors and warnings are written to the standard error stream. Using
401 option --verbose also informational messages like processing details
402 are reported. Option --debug can be used to get more details on the
403 internal activity, e.g. for debugging purposes. Other logging levels
404 can be selected using option --log-level. In --quiet mode only fatal
405 errors are reported. In such very severe error events, the application
406 will usually terminate. For more details on the different logging
407 levels, see documentation of module 'oflog'.
408 In case the logging output should be written to file (optionally with
409 logfile rotation), to syslog (Unix) or the event log (Windows) option
410 --log-config can be used. This configuration file also allows for
411 directing only certain messages to a particular output stream and for
412 filtering certain messages based on the module or application where
413 they are generated. An example configuration file is provided in
414 <etcdir>/logger.cfg).
416 All command line tools use the following notation for parameters:
417 square brackets enclose optional values (0-1), three trailing dots
418 indicate that multiple values are allowed (1-n), a combination of both
419 means 0 to n values.
420 Command line options are distinguished from parameters by a leading '+'
421 or '-' sign, respectively. Usually, order and position of command line
422 options are arbitrary (i.e. they can appear anywhere). However, if
423 options are mutually exclusive the rightmost appearance is used. This
424 behaviour conforms to the standard evaluation rules of common Unix
425 shells.
426 In addition, one or more command files can be specified using an '@'
427 sign as a prefix to the filename (e.g. @command.txt). Such a command
428 argument is replaced by the content of the corresponding text file
429 (multiple whitespaces are treated as a single separator unless they
430 appear between two quotation marks) prior to any further evaluation.
431 Please note that a command file cannot contain another command file.
432 This simple but effective approach allows to summarize common
433 combinations of options/parameters and avoids longish and confusing
434 command lines (an example is provided in file <datadir>/dumppat.txt).
436 The dcml2pnm utility will attempt to load DICOM data dictionaries
437 specified in the DCMDICTPATH environment variable. By default, i.e. if
438 the DCMDICTPATH environment variable is not set, the file
439 <datadir>/dicom.dic will be loaded unless the dictionary is built into
440 the application (default for Windows).
441 The default behaviour should be preferred and the DCMDICTPATH
442 environment variable only used when alternative data dictionaries are
443 required. The DCMDICTPATH environment variable has the same format as
444 the Unix shell PATH variable in that a colon (':') separates entries.
445 On Windows systems, a semicolon (';') is used as a separator. The data
446 dictionary code will attempt to load each file specified in the
447 DCMDICTPATH environment variable. It is an error if no data dictionary
448 can be loaded.
450 <datadir>/camera.lut - sample characteristics file of a camera
451 <datadir>/monitor.lut - sample characteristics file of a monitor
452 <datadir>/printer.lut - sample characteristics file of a printer
453 <datadir>/scanner.lut - sample characteristics file of a scanner
455 dcm2pnm(1), img2dcm(1)
457 Copyright (C) 2001-2010 by OFFIS e.V., Escherweg 2, 26121 Oldenburg,
458 Germany.
459
460
461
462Version 3.6.0 6 Jan 2011 dcml2pnm(1)