dcmmklut(1)
๐ NAME ๐
dcmmklut โ Create DICOM look-up tables
okay so this is dcmmklut(1), the OFFIS DCMTK utility that makes DICOM look-up tables and is literally built for creating test images ๐
.
โจ SYNOPSIS โจ
dcmmklut [options] dcmimg-out
๐ฆ DESCRIPTION ๐ฆ
okay bestie, here's the vibe: the dcmmklut utility lets you create a whole variety of DICOM Modality, Presentation and VOI look-up tables (LUT), and it's intended for the creation of test images. The utility is able to read an existing DICOM image file, create a look up table according to the command line options, and write the new object back to file. It is also possible to create a new object containing the specified LUT without reading an existing DICOM image file. This is e.g. useful to simply store different look-up tables in a DICOM-like structure. As a default the output file is encoded with the same transfer syntax used for the input file, but the transfer syntax can also be specified as a command line option. iconique โจ
The LUT data can be derived from the shape of a gamma curve (default for the gamma factor is 1) or imported from a file (currently the MAP format from Ulead's PhotoImpact and a simple text format are supported). The input and output width of the LUT can also be specified in the range allowed by the DICOM standard. The interpolation of the input range is done by a polynomial curve fitting algorithm. no cap, it's giving math but make it DICOM ๐งฎ๐
In addition to the DICOM output file the LUT data can also be exported to a tabbed text file which allows the easy visualization of the curves with a common spread sheet application (e.g. Microsoft Excel). spreadsheet girlies stay winning ๐๐
๐ฏ PARAMETERS ๐ฏ
dcmimg-outโ DICOM output filename ("-"for stdout)
๐ OPTIONS ๐
๐ ๏ธ general options ๐ ๏ธ
-h,--helpโ print this help text and exit--versionโ print version information and exit--argumentsโ print expanded command line arguments-q,--quietโ quiet mode, print no warnings and errors-v,--verboseโ verbose mode, print processing details-d,--debugโ debug mode, print debug information-ll,--log-levelโ[l]evel: string constant(fatal,error,warn,info,debug,trace) โ use level l for the logger-lc,--log-configโ[f]ilename: stringโ use config file f for the logger
๐ LUT creation options ๐
LUT type
+Tm,--modalityโ create as Modality LUT+Tp,--presentationโ create as Presentation LUT+Tv,--voiโ create as VOI LUT (default)
LUT placement
+Pa,--addโ add to existing transform (default for and only with--voi)+Pr,--replaceโ replace existing transform (default for--modalityand--presentation)
LUT content
+Cg,--gammaโ[g]amma: floatโ use gamma value (default:1.0)+Cm,--map-fileโ[f]ilename: stringโ read input data from MAP file+Ct,--text-fileโ[f]ilename: stringโ read input data from text file
LUT options
+Og,--inverse-gsdfโ apply inverse GSDF (print presentation LUT in OD)--min-densityโ[v]alue: integer (0..65535, default: 20)โ set min density to v (in hundreds of OD)--max-densityโ[v]alue: integer (0..65535, default: 300)โ set max density to v (in hundreds of OD)+Oi,--illuminationโ[v]alue: integer (0..65535, default: 2000)โ set illumination to v (incd/m^2)+Or,--reflectionโ[v]alue: integer (0..65535, default: 10)โ set reflected ambient light to v (incd/m^2)
LUT structure
-b,--bitsโ[n]umber: integerโ create LUT with n bit values (8..16, default:16)-e,--entriesโ[n]umber: integerโ create LUT with n entries (1..65536, default:256)-f,--first-mappedโ[n]umber: integerโ first input value mapped (-31768..65535, default:0)-r,--randomโ[n]umber: unsigned integerโ perform n randomly selected permutations on the LUT-rs,--random-seedโ[n]umber: unsigned integerโ initialize the random-number generator with n (default:0, for reproducible results)-o,--orderโ[n]umber: integerโ use polynomial curve fitting algorithm with order n (0..99, default:5)-E,--explanationโ[n]ame: stringโ LUT explanation (default: automatically created)
LUT data alignment
-a,--byte-alignโ create byte-aligned LUT (default for and only with 8 bit values)+a,--word-alignโ create word-aligned LUT (default for 9-16 bit values)
LUT data VR
+Dw,--data-owโ write LUT Data as OW (default)+Du,--data-usโ write LUT Data as US+Ds,--data-ssโ write LUT Data as SS (minimal support)
๐ file options ๐
+Fi,--dicom-inputโ[f]ilename: stringโ read dataset from DICOM file f+Fo,--text-outputโ[f]ilename: stringโ write LUT data to tabbed text file f
๐ธ NOTES ๐ธ
Please check the DICOM standard for further restrictions on the look-up table structure. Especially the number of bits per table entry might be restricted in particular IODs. bestie, read the standard before you get creative ๐ญ๐
๐ฅ LOGGING ๐ฅ
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. Using option --verbose also informational messages like processing details are reported. 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 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. logging config is lowkey main character energy ๐ซถ
๐ง 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.
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). command files are such a slay โจ
๐ ENVIRONMENT ๐
The dcmmklut 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. no dictionary? that's a no from me ๐
๐ FILES ๐
<datadir>/philips.lutโ sample LUT in text format
๐ COPYRIGHT ๐
Copyright (C) 1998-2026 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
Signed, sealed, delivered by OFFIS DCMTK: version 3.7.1, dated Sat Oct 17 2026 09:34:01 โ that's the dcmmklut(1) page, bestie ๐๐ฆโจ
๐ฆ 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