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 are fatal, 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 toolkit
  • 2 = free scaling algorithm with interpolation from c't magazine
  • 3 = magnification algorithm with bilinear interpolation from Eduard Stanescu
  • 4 = 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 (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