dcmquant(1)
π dcmquant β like, the OFFIS DCMTK tool for making your color images palette color π
okay so bestie, welcome to dcmquant(1) β yes that's the manual page name, iykyk β and honestly? this little icon is about to take your DICOM color image and give it a whole new palette-color vibe. π¨β¨
β¨ NAME β¨
dcmquant β converts DICOM color images into palette color, no cap π
πΈ SYNOPSIS πΈ
dcmquant [options] dcmfile-in dcmfile-out
π¦ DESCRIPTION π¦
so here's the tea, bestie: the dcmquant utility reads a DICOM color image, computes a palette color look-up table of whatever size you want for that image (it's based on the median cut algorithm published by Paul Heckbert, iconic behavior honestly), and then converts that color image into a DICOM palette color image. slay. π
π PARAMETERS π
dcmfile-inβ the DICOM input filename you want converted (literally just-if you want stdin, we love a flexible queen)dcmfile-outβ the DICOM output filename to be written (-for stdout, periodt)
π OPTIONS π
π general options
-h,--helpβ prints this help text and then dips, bye β¨--versionβ prints version info and exits, short and sweet--argumentsβ prints the expanded command line arguments, so you can see what actually went down-q,--quietβ quiet mode, prints no warnings and no errors, shhh π€«-v,--verboseβ verbose mode, prints processing details, she's chatty and we respect it-d,--debugβ debug mode, prints debug information, for when you need the full lore π-ll,--log-level[l]evel: string constant β uses level l for the logger. the levels are:fatal,error,warn,info,debug,trace-lc,--log-config[f]ilename: string β uses config file f for the logger ποΈ
π§ input options
input file format:
+f,--read-fileβ reads file format or data set (this is the default, bestie)+fo,--read-file-onlyβ reads file format only, strictly that-f,--read-datasetβ reads data set without file meta information
input transfer syntax:
-t=,--read-xfer-autoβ uses TS recognition (default, automatic queen)-td,--read-xfer-detectβ ignores the TS specified in the file meta header, rude but ok-te,--read-xfer-littleβ reads with explicit VR little endian TS-tb,--read-xfer-bigβ reads with explicit VR big endian TS-ti,--read-xfer-implicitβ reads with implicit VR little endian TS
π image processing and encoding options
frame selection:
+F,--frame[n]umber: integer β selects the specified frame+Fa,--all-framesβ selects all frames (default, she's an overachiever β¨)
compatibility:
+Mp,--accept-palettesβ accepts incorrect palette attribute tags(0028,111x)and(0028,121x). we're being nice about it π
median cut dimension selection:
+Dr,--mc-dimension-rgbβ max dimension from RGB range (default)+Dl,--mc-dimension-lumβ max dimension from luminance
median cut representative color selection:
+Cb,--mc-color-avgboxβ averages colors in the box (default)+Cp,--mc-color-avgpixelβ averages pixels in the box+Cc,--mc-color-centerβ selects the center of the box, main character energy π―
color palette value representation:
+pw,--write-owβ writes Palette LUT asOW(default)+pu,--write-usβ writes Palette LUT asUS(retired, she's a legacy icon, but retired)
color palette creation:
+pe,--lut-entries-wordβ writes Palette LUT with 16-bit entries+pf,--floyd-steinbergβ uses Floyd-Steinberg error diffusion, fancy π«+pc,--colorsnumber of colors: 2..65536 (default 256) β the number of colors to quantize to+pcβ number of colors to quantize to (same flag, same tea, listing it like the original does π«Ά)
SOP Class UID:
+cd,--class-defaultβ keeps the SOP Class UID (default)+cs,--class-scβ converts to Secondary Capture Image (this implies--uid-always)
SOP Instance UID:
+ua,--uid-alwaysβ always assigns a new UID (default)+un,--uid-neverβ never assigns a new UID, she said no thanks
π output options
output file format:
+F,--write-fileβ writes file format (default)-F,--write-datasetβ writes data set without file meta information
output transfer syntax:
+t=,--write-xfer-sameβ writes with the same TS as input (default)+te,--write-xfer-littleβ writes with explicit VR little endian TS+tb,--write-xfer-bigβ writes with explicit VR big endian TS+ti,--write-xfer-implicitβ writes with implicit VR little endian TS
post-1993 value representations:
+u,--enable-new-vrβ enables support for new VRs (UN/UT) (default)-u,--disable-new-vrβ disables support for new VRs and converts toOB
group length encoding:
+g=,--group-length-recalcβ recalculates group lengths if present (default)+g,--group-length-createβ always writes with group length elements-g,--group-length-removeβ always writes without group length elements
length encoding in sequences and items:
+e,--length-explicitβ writes with explicit lengths (default)-e,--length-undefinedβ writes with undefined lengths
data set trailing padding (not with --write-dataset):
-p=,--padding-retainβ does 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 β aligns the file on a multiple of f bytes and items on a multiple of i bytes π
heads up bestie: that trailing padding section is explicitly not for --write-dataset, so don't come for me if it doesn't apply π
π₯ LOGGING π₯
okay so the level of logging output of the various command line tools and underlying libraries can be specified by you, the user. by default, only errors and warnings are written to the standard error stream. using option --verbose also reports informational messages like processing details. option --debug can be used to get more details on the internal activity, e.g. for debugging purposes. 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 π. for more details on the different logging levels, see the documentation of module "oflog".
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 ποΈβ¨
β 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), and a combination of both means 0 to n values. iykyk π
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. 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 β no inception, bestie π. 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).
π ENVIRONMENT π
the dcmquant 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).
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 π¨
π COPYRIGHT π
Copyright (C) 2001-2026 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
aaaand that's the whole page, bestie π«Άβ¨ official vibes: Version 3.7.1, stamped Sat Oct 17 2026 09:34:01 β she's giving OFFIS DCMTK, she's giving iconic, she's giving palette color. go convert something gorgeous π π
π¦ 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