dcmscale(1)
π dcmscale β like, the OFFIS DCMTK one, bestie
okay so you found dcmscale(1) and you're like "what is this girlypop doing" β don't worry, I got you. It's the OFFIS DCMTK tool for scaling DICOM images, and honestly? She's iconic. β¨
πΈ NAME πΈ
dcmscale β literally scales DICOM images. that's the whole vibe. π
π¦ SYNOPSIS π¦
dcmscale [options] dcmfile-in dcmfile-out
π DESCRIPTION π
So dcmscale reads a DICOM image, scales it however you told it to on the command line, and writes the DICOM image right back out. main character energy fr fr π
heads up bestie: this utility only supports uncompressed and RLE compressed DICOM images. no cap. that's the limit and we respect it. π«Ά
π PARAMETERS π
dcmfile-inβ the DICOM input filename you want scaled. and yes,"-"means stdin, she reads from the void πdcmfile-outβ the DICOM output filename to be written. and"-"means stdout, she speaks into the void π
β¨ OPTIONS β¨
π general options
-h,--helpβ print this help text and exit. the classic "wait what does this do again" move π--versionβ print version information and exit. slay, now you know what era you're in β--argumentsβ print expanded command line arguments. for the nosy girlies (me) π₯-q,--quietβ quiet mode, print no warnings and errors. shhhh π€«-v,--verboseβ verbose mode, print processing details. tell me EVERYTHING π-d,--debugβ debug mode, print debug information. for when it's giving bug π-ll,--log-level[l]evel: string constant β use level l for the logger. the levels arefatal,error,warn,info,debug,trace. pick your fighter π-lc,--log-config[f]ilename: string β use config file f for the logger. fancy π
π§ input options
input file format:
+f,--read-fileβ read file format or data set (default). she's flexible π+fo,--read-file-onlyβ read file format only. strict queen πΈ-f,--read-datasetβ read data set without file meta information. raw and unfiltered π
input transfer syntax:
-t=,--read-xfer-autoβ use TS recognition (default). let her figure it out β¨-td,--read-xfer-detectβ ignore TS specified in the file meta header. not me ignoring the meta header π-te,--read-xfer-littleβ read with explicit VR little endian TS-tb,--read-xfer-bigβ read with explicit VR big endian TS-ti,--read-xfer-implicitβ read with implicit VR little endian TS
π image processing and encoding options
scaling:
+a,--recognize-aspectβ recognize pixel aspect ratio when scaling (default). respect the proportions bestie π«Ά-a,--ignore-aspectβ ignore pixel aspect ratio when scaling. chaos mode, we love her π+i,--interpolate[n]umber of algorithm: integer β use interpolation when scaling (1..4, default:1). the deets on each algorithm are down in NOTES π-i,--no-interpolationβ no interpolation when scaling. keep it simple π-S,--no-scalingβ no scaling, ignore pixel aspect ratio (default). literally doing nothing, and honestly? valid π+Sxf,--scale-x-factor[f]actor: float β scale x axis by factor, auto-compute y axis+Syf,--scale-y-factor[f]actor: float β scale y axis by factor, auto-compute x axis+Sxv,--scale-x-size[n]umber: integer β scale x axis to n pixels, auto-compute y axis+Syv,--scale-y-size[n]umber: integer β scale y axis to n pixels, auto-compute x axis
other transformations:
+C,--clip-region[l]eft [t]op [w]idth [h]eight: integer β clip rectangular image region (l,t,w,h). crop her, she'll survive βοΈ
SOP Instance UID:
+ua,--uid-alwaysβ always assign new SOP Instance UID (default). new identity, new me π¦+un,--uid-neverβ never assign new SOP Instance UID. keep the old one, she's nostalgic π
π₯ output options
output file format:
+F,--write-fileβ write file format (default)-F,--write-datasetβ write data set without file meta information
output transfer syntax:
+t=,--write-xfer-sameβ write with same TS as input (default). consistency is key β+te,--write-xfer-littleβ write with explicit VR little endian TS+tb,--write-xfer-bigβ write with explicit VR big endian TS+ti,--write-xfer-implicitβ write with implicit VR little endian TS
post-1993 value representations:
+u,--enable-new-vrβ enable support for new VRs (UN/UT) (default). she's modern π-u,--disable-new-vrβ disable support for new VRs, convert to OB. throwback era π
group length encoding:
+g=,--group-length-recalcβ recalculate group lengths if present (default)+g,--group-length-createβ always write with group length elements-g,--group-length-removeβ always write without group length elements
length encoding in sequences and items:
+e,--length-explicitβ write with explicit lengths (default)-e,--length-undefinedβ write with undefined lengths. mysterious π
data set trailing padding (not with --write-dataset):
-p=,--padding-retainβ do not change padding (default if not--write-dataset)-p,--padding-offβ no padding (implicit if--write-dataset)+p,--padding-create[f]ile-pad [i]tem-pad: integer β align file on multiple of f bytes and items on multiple of i bytes
π§ NOTES π§
okay so the following preferred interpolation algorithms can be selected using the --interpolate option. take notes bestie, this is the good stuff:
1= free scaling algorithm with interpolation from pbmplus toolkit2= free scaling algorithm with interpolation from c't magazine3= magnification algorithm with bilinear interpolation from Eduard Stanescu4= magnification algorithm with bicubic interpolation from Eduard Stanescu
like, each one is a whole different lewk. π
π LOGGING π
So the level of logging output of the various command line tools and underlying libraries can be specified by the user. by default, only errors and warnings are written to the standard error stream. that's the baseline, no notes.
Using option --verbose also informational messages like processing details are reported. she's chatty now π£οΈ
Option --debug can be used to get more details on the internal activity, e.g. for debugging purposes. full transparency, we stan π
Other logging levels can be selected using option --log-level. In --quiet mode only fatal errors are reported. In such very severe error events, the application will usually terminate. like, it's over-over π
For more details on the different logging levels, see documentation of module "oflog". iykyk π
In case the logging output should be written to file (optionally with logfile rotation), to syslog (Unix) or the event log (Windows) option --log-config can be used. This configuration file also allows for directing only certain messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in <etcdir>/logger.cfg. iconic, honestly π
π COMMAND LINE π
All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that multiple values are allowed (1-n), a combination of both means 0 to n values. yes bestie, [0-1] and ... and [...]..., we love a notation system πΈ
Command line options are distinguished from parameters by a leading '+' or '-' sign, respectively. Usually, order and position of command line options are arbitrary (i.e. they can appear anywhere). However, if options are mutually exclusive the rightmost appearance is used. This behavior conforms to the standard evaluation rules of common Unix shells. rightmost wins, periodt π
In addition, one or more command files can be specified using an '@' sign as a prefix to the filename (e.g. @command.txt). Such a command argument is replaced by the content of the corresponding text file (multiple whitespaces are treated as a single separator unless they appear between two quotation marks) prior to any further evaluation. Please note that a command file cannot contain another command file. This simple but effective approach allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file <datadir>/dumppat.txt). nesting command files is NOT the vibe π
ββοΈ
π¦ ENVIRONMENT π¦
The dcmscale utility will attempt to load DICOM data dictionaries specified in the DCMDICTPATH environment variable. By default, i.e. if the DCMDICTPATH environment variable is not set, the file <datadir>/dicom.dic will be loaded unless the dictionary is built into the application (default for Windows). she's got a fallback plan π
The default behavior should be preferred and the DCMDICTPATH environment variable only used when alternative data dictionaries are required. The DCMDICTPATH environment variable has the same format as the Unix shell PATH variable in that a colon (":") separates entries. On Windows systems, a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. do not skip the separators, i'm begging π
π COPYRIGHT π
Copyright (C) 2002-2026 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
okay that's the whole page bestie, you're officially a dcmscale girlie now π β¨
~ with love, from Version 3.7.1, dated Sat Oct 17 2026 09:34:01, your girl dcmscale(1) π«Άπ
π¦ where this page comes from
- arch rolling: dcmtk 3.7.1-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms