dcmdrle(1)

πŸ’… dcmdrle(1) β€” the OFFIS DCMTK girlies' guide to un-squishing RLE files πŸŽ€

ok so real talk, bestie β€” you're looking at the dcmdrle page from the OFFIS DCMTK manual, and I'm gonna walk you through it like we're texting at 2am. no cap, every single flag is here. let's go ✨


🌸 NAME 🌸

dcmdrle β€” Decode RLE-compressed DICOM file

like, it takes the squished-up RLE DICOM and makes it un-squished. that's the whole vibe πŸ’–


✨ SYNOPSIS ✨

dcmdrle [options] dcmfile-in dcmfile-out

two filenames, some options, that's it. slay.


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea πŸ‘‘: the dcmdrle utility reads a RLE-compressed DICOM image (that's dcmfile-in), decompresses the image data (i.e. conversion to a native DICOM transfer syntax, literally just un-compressing it back to normal), and writes the converted image out to an output file (dcmfile-out).

in β†’ decompress β†’ out. iconic behavior honestly.


πŸŽ€ PARAMETERS πŸŽ€

  • dcmfile-in β€” the DICOM input filename to be converted (use "-" for stdin, yes really, pipe it in bestie 🫢)
  • dcmfile-out β€” the DICOM output filename (use "-" for stdout 🌈)

πŸ’… OPTIONS πŸ’…

general options

  • -h, --help β€” print this help text and exit (the "wait what does this do" button)
  • --version β€” print version information and exit
  • --arguments β€” print expanded command line arguments
  • -q, --quiet β€” quiet mode, print no warnings and errors (shhh 🀫)
  • -v, --verbose β€” verbose mode, print processing details (tell me everything πŸ’¬)
  • -d, --debug β€” debug mode, print debug information (maximum overthinking mode)
  • -ll, --log-level [l]evel: string constant β€” use level l for the logger. the valid levels are fatal, 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
  • -f, --read-dataset β€” read data set without file meta information
so about that last one: this option allows one to decompress RLE compressed DICOM objects that have been stored as a dataset without a meta-header. such a thing should not exist πŸ’€ since the transfer syntax cannot be reliably determined without a meta-header β€” but unfortunately it does. (yes, cursed. we deal with it.)

processing options

SOP Instance UID:

  • +ud, --uid-default β€” keep same SOP Instance UID (default)
  • +ua, --uid-always β€” always assign new UID

RLE byte segment order:

  • +bd, --byte-order-default β€” most significant byte first (default)
  • +br, --byte-order-reverse β€” least significant byte first
heads up 🫢: this option allows one to decompress RLE compressed DICOM files in which the order of byte segments is encoded in incorrect order. this only affects images with more than one byte per sample. (broken files exist, we fix 'em.)

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:

  • +te, --write-xfer-little β€” write with explicit VR little endian (default)
  • +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)
  • -u, --disable-new-vr β€” disable support for new VRs, convert to OB

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 (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 🎯

🌈 TRANSFER SYNTAXES 🌈

input (dcmfile-in)

dcmdrle supports these transfer syntaxes for input:

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
RLELosslessTransferSyntax                      1.2.840.10008.1.2.5

(*) if compiled with zlib support enabled 🧚

output (dcmfile-out)

dcmdrle supports these transfer syntaxes for output:

LittleEndianImplicitTransferSyntax             1.2.840.10008.1.2
LittleEndianExplicitTransferSyntax             1.2.840.10008.1.2.1
BigEndianExplicitTransferSyntax                1.2.840.10008.1.2.2

πŸ”₯ 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.

using option --verbose also gives you informational messages like processing details being 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 β€” and 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 ⭐


πŸ“ 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. 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.

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). obsessed, honestly.


🧚 ENVIRONMENT 🧚

the dcmdrle 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 πŸ’–

dcmcrle(1) β€” the other one, go say hi πŸ‘‹


Copyright (C) 2002-2026 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany


and that's the whole page bestie 🫢 this was Version 3.7.1, dated Sat Oct 17 2026 09:34:01 β€” go forth and decompress, you absolute icon πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from