4 \page dcmquant Convert DICOM color images to palette color
6 \page dcmquant dcmquant: Convert DICOM color images to palette color
9 \section synopsis SYNOPSIS
12 dcmquant [options] dcmfile-in dcmfile-out
15 \section description DESCRIPTION
17 The \b dcmquant utility reads a DICOM color image, computes a palette color
18 look-up table of the desired size for this image (based on the median cut
19 algorithm published by Paul Heckbert) and converts the color image into a
20 DICOM palette color image.
22 \section parameters PARAMETERS
25 dcmfile-in DICOM input filename to be converted
27 dcmfile-out DICOM output filename to be written
30 \section options OPTIONS
32 \subsection general_options general options
35 print this help text and exit
38 print version information and exit
41 print expanded command line arguments
44 quiet mode, print no warnings and errors
47 verbose mode, print processing details
50 debug mode, print debug information
52 -ll --log-level [l]evel: string constant
53 (fatal, error, warn, info, debug, trace)
54 use level l for the logger
56 -lc --log-config [f]ilename: string
57 use config file f for the logger
60 \subsection input_options input options
65 read file format or data set (default)
71 read data set without file meta information
73 input transfer syntax:
76 use TS recognition (default)
78 -td --read-xfer-detect
79 ignore TS specified in the file meta header
81 -te --read-xfer-little
82 read with explicit VR little endian TS
85 read with explicit VR big endian TS
87 -ti --read-xfer-implicit
88 read with implicit VR little endian TS
91 \subsection processing_options image processing and encoding options
95 +F --frame [n]umber: integer
96 select specified frame
99 select all frames (default)
103 +Mp --accept-palettes
104 accept incorrect palette attribute tags
105 (0028,111x) and (0028,121x)
107 median cut dimension selection:
109 +Dr --mc-dimension-rgb
110 max dimension from RGB range (default)
112 +Dl --mc-dimension-lum
113 max dimension from luminance
115 median cut representative color selection:
117 +Cb --mc-color-avgbox
118 average colors in box (default)
120 +Cp --mc-color-avgpixel
121 average pixels in box
123 +Cc --mc-color-center
126 color palette creation:
129 write Palette LUT as OW instead of US
131 +pe --lut-entries-word
132 write Palette LUT with 16-bit entries
134 +pf --floyd-steinberg
135 use Floyd-Steinberg error diffusion
137 +pc --colors number of colors: 2..65536 (default 256)
138 number of colors to quantize to
143 keep SOP Class UID (default)
146 convert to Secondary Capture Image
147 (implies --uid-always)
152 always assign new UID (default)
158 \subsection output_options output options
164 write file format (default)
167 write data set without file meta information
169 output transfer syntax:
171 +t= --write-xfer-same
172 write with same TS as input (default)
174 +te --write-xfer-little
175 write with explicit VR little endian TS
178 write with explicit VR big endian TS
180 +ti --write-xfer-implicit
181 write with implicit VR little endian TS
183 post-1993 value representations:
186 enable support for new VRs (UN/UT) (default)
189 disable support for new VRs, convert to OB
191 group length encoding:
193 +g= --group-length-recalc
194 recalculate group lengths if present (default)
196 +g --group-length-create
197 always write with group length elements
199 -g --group-length-remove
200 always write without group length elements
202 length encoding in sequences and items:
205 write with explicit lengths (default)
207 -e --length-undefined
208 write with undefined lengths
210 data set trailing padding (not with --write-dataset):
213 do not change padding
214 (default if not --write-dataset)
217 no padding (implicit if --write-dataset)
219 +p --padding-create [f]ile-pad [i]tem-pad: integer
220 align file on multiple of f bytes and items on
224 \section logging LOGGING
226 The level of logging output of the various command line tools and underlying
227 libraries can be specified by the user. By default, only errors and warnings
228 are written to the standard error stream. Using option \e --verbose also
229 informational messages like processing details are reported. Option
230 \e --debug can be used to get more details on the internal activity, e.g. for
231 debugging purposes. Other logging levels can be selected using option
232 \e --log-level. In \e --quiet mode only fatal errors are reported. In such
233 very severe error events, the application will usually terminate. For more
234 details on the different logging levels, see documentation of module "oflog".
236 In case the logging output should be written to file (optionally with logfile
237 rotation), to syslog (Unix) or the event log (Windows) option \e --log-config
238 can be used. This configuration file also allows for directing only certain
239 messages to a particular output stream and for filtering certain messages
240 based on the module or application where they are generated. An example
241 configuration file is provided in <em><etcdir>/logger.cfg</em>).
243 \section command_line COMMAND LINE
245 All command line tools use the following notation for parameters: square
246 brackets enclose optional values (0-1), three trailing dots indicate that
247 multiple values are allowed (1-n), a combination of both means 0 to n values.
249 Command line options are distinguished from parameters by a leading '+' or '-'
250 sign, respectively. Usually, order and position of command line options are
251 arbitrary (i.e. they can appear anywhere). However, if options are mutually
252 exclusive the rightmost appearance is used. This behaviour conforms to the
253 standard evaluation rules of common Unix shells.
255 In addition, one or more command files can be specified using an '@' sign as a
256 prefix to the filename (e.g. <em>\@command.txt</em>). Such a command argument
257 is replaced by the content of the corresponding text file (multiple
258 whitespaces are treated as a single separator unless they appear between two
259 quotation marks) prior to any further evaluation. Please note that a command
260 file cannot contain another command file. This simple but effective approach
261 allows to summarize common combinations of options/parameters and avoids
262 longish and confusing command lines (an example is provided in file
263 <em><datadir>/dumppat.txt</em>).
265 \section environment ENVIRONMENT
267 The \b dcmquant utility will attempt to load DICOM data dictionaries specified
268 in the \e DCMDICTPATH environment variable. By default, i.e. if the
269 \e DCMDICTPATH environment variable is not set, the file
270 <em><datadir>/dicom.dic</em> will be loaded unless the dictionary is built
271 into the application (default for Windows).
273 The default behaviour should be preferred and the \e DCMDICTPATH environment
274 variable only used when alternative data dictionaries are required. The
275 \e DCMDICTPATH environment variable has the same format as the Unix shell
276 \e PATH variable in that a colon (":") separates entries. On Windows systems,
277 a semicolon (";") is used as a separator. The data dictionary code will
278 attempt to load each file specified in the \e DCMDICTPATH environment variable.
279 It is an error if no data dictionary can be loaded.
281 \section copyright COPYRIGHT
283 Copyright (C) 2001-2010 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.