4 \page dcmp2pgm Read DICOM image and presentation state and render bitmap
6 \page dcmp2pgm dcmp2pgm: Read DICOM image and presentation state and render bitmap
9 \section synopsis SYNOPSIS
12 dcmp2pgm [options] dcmimage-in [bitmap-out]
15 \section description DESCRIPTION
17 The \b dcmp2pgm utility renders a monochrome DICOM image under the control of
18 a grayscale softcopy presentation state object into a monochrome bitmap
19 with 8 bits/pixel. The bitmap is stored either as "Portable Gray Map" (PGM)
20 or as a DICOM secondary capture image object. If no presentation state is
21 read from file, a default presentation state is created. The utility allows
22 to read a configuration file of the Softcopy Presentation State Viewer upon
23 startup. In this case, the settings from the configuration file affecting
24 the rendering of the presentation state are used, e.g. a correction of the
25 gray scale range according to Barten's model (DICOM part 14) can be
26 performed if the characteristic curve of the display system is available
27 and defined in the configuration file.
29 \section parameters PARAMETERS
32 dcmimage-in input DICOM image
34 bitmap-out output DICOM image or PGM bitmap
37 \section options OPTIONS
39 \subsection general_options general options
42 print this help text and exit
45 print version information and exit
48 print expanded command line arguments
51 quiet mode, print no warnings and errors
54 verbose mode, print processing details
57 debug mode, print debug information
59 -ll --log-level [l]evel: string constant
60 (fatal, error, warn, info, debug, trace)
61 use level l for the logger
63 -lc --log-config [f]ilename: string
64 use config file f for the logger
67 \subsection processing_options processing options
69 -p --pstate [f]ilename: string
70 process using presentation state file
72 -c --config [f]ilename: string
73 process using settings from configuration file
75 -f --frame [f]rame: integer
76 process using image frame f (default: 1)
79 \subsection output_format output format
82 save image as PGM (default)
85 save image as DICOM secondary capture
88 \subsection output_options output options
90 +S --save-pstate [f]ilename: string
91 save presentation state to file
94 \section logging LOGGING
96 The level of logging output of the various command line tools and underlying
97 libraries can be specified by the user. By default, only errors and warnings
98 are written to the standard error stream. Using option \e --verbose also
99 informational messages like processing details are reported. Option
100 \e --debug can be used to get more details on the internal activity, e.g. for
101 debugging purposes. Other logging levels can be selected using option
102 \e --log-level. In \e --quiet mode only fatal errors are reported. In such
103 very severe error events, the application will usually terminate. For more
104 details on the different logging levels, see documentation of module "oflog".
106 In case the logging output should be written to file (optionally with logfile
107 rotation), to syslog (Unix) or the event log (Windows) option \e --log-config
108 can be used. This configuration file also allows for directing only certain
109 messages to a particular output stream and for filtering certain messages
110 based on the module or application where they are generated. An example
111 configuration file is provided in <em><etcdir>/logger.cfg</em>).
113 \section command_line COMMAND LINE
115 All command line tools use the following notation for parameters: square
116 brackets enclose optional values (0-1), three trailing dots indicate that
117 multiple values are allowed (1-n), a combination of both means 0 to n values.
119 Command line options are distinguished from parameters by a leading '+' or '-'
120 sign, respectively. Usually, order and position of command line options are
121 arbitrary (i.e. they can appear anywhere). However, if options are mutually
122 exclusive the rightmost appearance is used. This behaviour conforms to the
123 standard evaluation rules of common Unix shells.
125 In addition, one or more command files can be specified using an '@' sign as a
126 prefix to the filename (e.g. <em>\@command.txt</em>). Such a command argument
127 is replaced by the content of the corresponding text file (multiple
128 whitespaces are treated as a single separator unless they appear between two
129 quotation marks) prior to any further evaluation. Please note that a command
130 file cannot contain another command file. This simple but effective approach
131 allows to summarize common combinations of options/parameters and avoids
132 longish and confusing command lines (an example is provided in file
133 <em><datadir>/dumppat.txt</em>).
135 \section environment ENVIRONMENT
137 The \b dcmp2pgm utility will attempt to load DICOM data dictionaries specified
138 in the \e DCMDICTPATH environment variable. By default, i.e. if the
139 \e DCMDICTPATH environment variable is not set, the file
140 <em><datadir>/dicom.dic</em> will be loaded unless the dictionary is built
141 into the application (default for Windows).
143 The default behaviour should be preferred and the \e DCMDICTPATH environment
144 variable only used when alternative data dictionaries are required. The
145 \e DCMDICTPATH environment variable has the same format as the Unix shell
146 \e PATH variable in that a colon (":") separates entries. On Windows systems,
147 a semicolon (";") is used as a separator. The data dictionary code will
148 attempt to load each file specified in the \e DCMDICTPATH environment variable.
149 It is an error if no data dictionary can be loaded.
153 <em><etcdir>/dcmpstat.cfg</em> - sample configuration file
155 \section copyright COPYRIGHT
157 Copyright (C) 1998-2010 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.