4 \page dcmscale Scale DICOM images
6 \page dcmscale dcmscale: Scale DICOM images
9 \section synopsis SYNOPSIS
12 dcmscale [options] dcmfile-in dcmfile-out
15 \section description DESCRIPTION
17 The \b dcmscale utility reads a DICOM image, scales it according to the
18 command line settings and writes back the DICOM image. This utility only
19 supports uncompressed and RLE compressed DICOM images.
21 \section parameters PARAMETERS
24 dcmfile-in DICOM input filename to be scaled
26 dcmfile-out DICOM output filename to be written
29 \section options OPTIONS
31 \subsection general_options general options
34 print this help text and exit
37 print version information and exit
40 print expanded command line arguments
43 quiet mode, print no warnings and errors
46 verbose mode, print processing details
49 debug mode, print debug information
51 -ll --log-level [l]evel: string constant
52 (fatal, error, warn, info, debug, trace)
53 use level l for the logger
55 -lc --log-config [f]ilename: string
56 use config file f for the logger
59 \subsection input_options input options
64 read file format or data set (default)
70 read data set without file meta information
72 input transfer syntax:
75 use TS recognition (default)
77 -td --read-xfer-detect
78 ignore TS specified in the file meta header
80 -te --read-xfer-little
81 read with explicit VR little endian TS
84 read with explicit VR big endian TS
86 -ti --read-xfer-implicit
87 read with implicit VR little endian TS
90 \subsection processing_options image processing and encoding options
95 recognize pixel aspect ratio (default)
98 ignore pixel aspect ratio when scaling
100 +i --interpolate [n]umber of algorithm: integer
101 use interpolation when scaling (1..4, default: 1)
103 -i --no-interpolation
104 no interpolation when scaling
107 no scaling, ignore pixel aspect ratio (default)
109 +Sxf --scale-x-factor [f]actor: float
110 scale x axis by factor, auto-compute y axis
112 +Syf --scale-y-factor [f]actor: float
113 scale y axis by factor, auto-compute x axis
115 +Sxv --scale-x-size [n]umber: integer
116 scale x axis to n pixels, auto-compute y axis
118 +Syv --scale-y-size [n]umber: integer
119 scale y axis to n pixels, auto-compute x axis
121 other transformations:
122 +C --clip-region [l]eft [t]op [w]idth [h]eight: integer
123 clip rectangular image region (l, t, w, h)
128 always assign new SOP Instance UID (default)
131 never assign new SOP Instance UID
134 \subsection output_options output options
139 write file format (default)
142 write data set without file meta information
144 output transfer syntax:
146 +t= --write-xfer-same
147 write with same TS as input (default)
149 +te --write-xfer-little
150 write with explicit VR little endian TS
153 write with explicit VR big endian TS
155 +ti --write-xfer-implicit
156 write with implicit VR little endian TS
158 post-1993 value representations:
161 enable support for new VRs (UN/UT) (default)
164 disable support for new VRs, convert to OB
166 group length encoding:
168 +g= --group-length-recalc
169 recalculate group lengths if present (default)
171 +g --group-length-create
172 always write with group length elements
174 -g --group-length-remove
175 always write without group length elements
177 length encoding in sequences and items:
180 write with explicit lengths (default)
182 -e --length-undefined
183 write with undefined lengths
185 data set trailing padding (not with --write-dataset):
188 do not change padding
189 (default if not --write-dataset)
192 no padding (implicit if --write-dataset)
194 +p --padding-create [f]ile-pad [i]tem-pad: integer
195 align file on multiple of f bytes and items on
201 The following preferred interpolation algorithms can be selected using the
202 \e --interpolate option:
204 \li 1 = free scaling algorithm with interpolation from pbmplus toolkit
205 \li 2 = free scaling algorithm with interpolation from c't magazine
206 \li 3 = magnification algorithm with bilinear interpolation from Eduard Stanescu
207 \li 4 = magnification algorithm with bicubic interpolation from Eduard Stanescu
209 \section logging LOGGING
211 The level of logging output of the various command line tools and underlying
212 libraries can be specified by the user. By default, only errors and warnings
213 are written to the standard error stream. Using option \e --verbose also
214 informational messages like processing details are reported. Option
215 \e --debug can be used to get more details on the internal activity, e.g. for
216 debugging purposes. Other logging levels can be selected using option
217 \e --log-level. In \e --quiet mode only fatal errors are reported. In such
218 very severe error events, the application will usually terminate. For more
219 details on the different logging levels, see documentation of module "oflog".
221 In case the logging output should be written to file (optionally with logfile
222 rotation), to syslog (Unix) or the event log (Windows) option \e --log-config
223 can be used. This configuration file also allows for directing only certain
224 messages to a particular output stream and for filtering certain messages
225 based on the module or application where they are generated. An example
226 configuration file is provided in <em><etcdir>/logger.cfg</em>).
228 \section command_line COMMAND LINE
230 All command line tools use the following notation for parameters: square
231 brackets enclose optional values (0-1), three trailing dots indicate that
232 multiple values are allowed (1-n), a combination of both means 0 to n values.
234 Command line options are distinguished from parameters by a leading '+' or '-'
235 sign, respectively. Usually, order and position of command line options are
236 arbitrary (i.e. they can appear anywhere). However, if options are mutually
237 exclusive the rightmost appearance is used. This behaviour conforms to the
238 standard evaluation rules of common Unix shells.
240 In addition, one or more command files can be specified using an '@' sign as a
241 prefix to the filename (e.g. <em>\@command.txt</em>). Such a command argument
242 is replaced by the content of the corresponding text file (multiple
243 whitespaces are treated as a single separator unless they appear between two
244 quotation marks) prior to any further evaluation. Please note that a command
245 file cannot contain another command file. This simple but effective approach
246 allows to summarize common combinations of options/parameters and avoids
247 longish and confusing command lines (an example is provided in file
248 <em><datadir>/dumppat.txt</em>).
250 \section environment ENVIRONMENT
252 The \b dcmscale utility will attempt to load DICOM data dictionaries specified
253 in the \e DCMDICTPATH environment variable. By default, i.e. if the
254 \e DCMDICTPATH environment variable is not set, the file
255 <em><datadir>/dicom.dic</em> will be loaded unless the dictionary is built
256 into the application (default for Windows).
258 The default behaviour should be preferred and the \e DCMDICTPATH environment
259 variable only used when alternative data dictionaries are required. The
260 \e DCMDICTPATH environment variable has the same format as the Unix shell
261 \e PATH variable in that a colon (":") separates entries. On Windows systems,
262 a semicolon (";") is used as a separator. The data dictionary code will
263 attempt to load each file specified in the \e DCMDICTPATH environment variable.
264 It is an error if no data dictionary can be loaded.
266 \section copyright COPYRIGHT
268 Copyright (C) 2002-2010 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.