dcmcrle(1)
π dcmcrle β the OFFIS DCMTK icon herself
okay so bestie, welcome to dcmcrle(1), brought to you by the lovely people at OFFIS DCMTK π this is the manual page for the dcmcrle utility and she is literally here to make your DICOM files smol.
β¨ NAME β¨
dcmcrle β Encode DICOM file to RLE transfer syntax π
π¦ SYNOPSIS π¦
dcmcrle [options] dcmfile-in dcmfile-out
πΈ DESCRIPTION πΈ
okay so here's the vibe: the dcmcrle utility reads an uncompressed DICOM image (dcmfile-in), does RLE compression on it (that's the conversion to an encapsulated DICOM transfer syntax, iykyk), and writes the converted image out to dcmfile-out. that's it. that's the whole job. she's focused. main character energy. π
π PARAMETERS π
dcmfile-inβ the DICOM input filename you want converted (use"-"for stdin, no cap)dcmfile-outβ the DICOM output filename (use"-"for stdout, iconic)
π OPTIONS π
general options
-h,--helpβ print this help text and dip. bye bestie π«Ά--versionβ print version information and exit--argumentsβ print expanded command line arguments (yes, the expanded ones, she's thorough)-q,--quietβ quiet mode: print no warnings and errors. silence is golden β¨-v,--verboseβ verbose mode: print processing details, she'll tell you everything-d,--debugβ debug mode: print debug information, for when you gotta know-ll,--log-level[l]evel: string constant β use level l for the logger. valid levels arefatal,error,warn,info,debug,trace-lc,--log-config[f]ilename: string β use config file f for the logger
input options
input file format:
+f,--read-fileβ read file format or data set (default)+fo,--read-file-onlyβ read file format only, no data set shenanigans-f,--read-datasetβ read data set without file meta information
input transfer syntax:
-t=,--read-xfer-autoβ use TS recognition (default)-td,--read-xfer-detectβ ignore the TS specified in the file 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
encapsulated pixel data encoding options π
pixel data fragmentation:
+ff,--fragment-per-frameβ encode each frame as one fragment (default)+fs,--fragment-size[s]ize: integer β limit fragment size to s kbytes (non-standard, we'll get to that, don't worry)
basic offset table encoding:
+ot,--offset-table-createβ create offset table (default)-ot,--offset-table-emptyβ leave offset table empty
icon image encoding:
+ic,--icon-compressedβ compress icon images (default)+iu,--icon-uncompressedβ keep icon images uncompressed
SOP Class UID:
+cd,--class-defaultβ keep SOP Class UID (default)+cs,--class-scβ convert to Secondary Capture Image (this one implies--uid-always, heads up)
SOP Instance UID:
+un,--uid-neverβ never assign new UID (default)+ua,--uid-alwaysβ always assign new UID
output options
post-1993 value representations:
+u,--enable-new-vrβ enable support for new VRs (UN/UT) (default)-u,--disable-new-vrβ disable support for new VRs, convert toOB
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
data set trailing padding:
-p=,--padding-retainβ do not change padding (default)-p,--padding-offβ no padding, we're raw-dogging it+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 π
so like, the dcmcrle utility compresses DICOM images of all SOP classes. she processes all Pixel Data (7fe0,0010) elements in the dataset β meaning compression is also performed on an icon image. she does not skip. she does not play. π
β οΈ but bestie, listen β the DICOM standard does not allow for storing the pixel data with multiple fragments per frame (when RLE compression is used). so if you go limiting the fragment size with option--fragment-size(or+fs), you may end up with a non-standard compliant DICOM image. like, she'll still make it, but the vibes are off. π
π TRANSFER SYNTAXES π
dcmcrle supports the following transfer syntaxes for input (dcmfile-in):
LittleEndianImplicitTransferSyntax 1.2.840.10008.1.2
LittleEndianExplicitTransferSyntax 1.2.840.10008.1.2.1
DeflatedExplicitVRLittleEndianTransferSyntax 1.2.840.10008.1.2.1.99 (*)
BigEndianExplicitTransferSyntax 1.2.840.10008.1.2.2
(*) only if compiled with zlib support enabled, iykyk π§
and dcmcrle supports the following transfer syntaxes for output (dcmfile-out):
RLELosslessTransferSyntax 1.2.840.10008.1.2.5
just the one. she knows what she's about. π
π₯ 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 gets you informational messages like processing details β she'll narrate. 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 β and in such very severe error events, the application will usually terminate. like, she's done. 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. slay.
β 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. math. β¨
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 β rightmost wins, periodt. this behavior conforms to the standard evaluation rules of common Unix shells.
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 dcmcrle 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. π
π«Ά SEE ALSO π«Ά
dcmdrle(1)β her sister, go say hi
π COPYRIGHT π
Copyright (C) 2002-2026 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
okay that's the whole page bestie, go forth and compress πΈ
Version 3.7.1 β Sat Oct 17 2026 09:34:01 π¦ mwah, xoxo, the manual π
π¦ 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