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


Generated on Wed Dec 28 2016 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.8