===================================
DCMTK COMPILE TIME FLAGS AND MACROS
===================================
The behavior of several DCMTK tools and libraries can be modified by
a number of compile time flags (macros), which are explained below.
Most of these macros enable experimental or rarely needed features
in DCMTK, others disable certain functions. So please, use with care!
ALLOW_ILLUMINATION_OVERRIDE
Affected: dcmprscu
Type of modification: Activates experimental or rarely used feature
Explanation: Allows the settings for Illumination and Reflected
Ambient Light, which are stored in a Stored Print object, to be
overridden from the print job command file.
BUGGY_IMPLEMENTATION_CLASS_UID_PREFIX
Affected: storescp
Type of modification: Activates workaround for known bug in other product
Explanation: The dcmnet module contains a workaround that allows to
communicate with some buggy Storage SCUs. If the global flag
dcmPeerRequiresExactUIDCopy is enabled, an illegal space padding in
the Affected SOP Instance UID field of the C-STORE-RQ message is
retained in the corresponding C-STORE-RSP message. When this
preprocessor macro is defined, it should contain the prefix of an
implementation class UID of an implementation known to exhibit the
buggy behavior. The workaround is then activated in storescp
whenever a Storage SCU with the given implementation class UID root
connects.
DCMTK_BUILD_DATE
Affected: dcmdata
Type of modification: Toolkit customization
Explanation: When this macro is defined (typically in config/Makefile.def),
the given date is used instead of the official DCMTK release data. This
allows for example to specify the date of a current development snapshot.
DCMTK_BUILD_IN_PROGRESS
Affected: all modules
Type of modification: Toolkit customization
Explanation: When building DLLs, exported symbols must be marked differently
if the DLL itself is built or when the DLL shall be used. This macro is
defined when the DCMTK gets built and should not be defined when user code
that just uses the DCMTK is built. Based on this, the correct annotation
gets selected and is used in the code. There should be no valid reasons to
define this macro yourself since this is done automatically by the build
system.
DCMTK_GUI
Affected: all modules
Type of modification: Activates experimental or rarely used feature
Explanation: When this macro is defined, DCMTK re-assigns the standard
output and error streams maintained by ofConsole to string streams.
This will allow a GUI based application to extract the messages and
either present them to the user or store them in a log file. See
comments in ofstd/include/dcmtk/ofstd/ofconsol.h.
DCMTK_USE_CXX11_STL
Affected: ofstd
Type of modification: Activates feature
Explanation: DCMTK_USE_CXX11_STL is defined when the appropriate options are
passed to the configuration system. DCMTK will then use the native C++11
STL classes and functions instead of it's own (legacy) implementations.
DICOMDIR_WITHOUT_BACKUP
Affected: dcmdata
Type of modification: Disables feature
Explanation: By default DCMTK creates a backup of an existing DICOMDIR
(using the name DICOMDIR.$$$) when a DcmDicomDir object is written
to file. The creation of the backup can be disabled with this macro.
DISABLE_COMPRESSION_EXTENSION
Affected: dcmqrdb
Type of modification: Disables feature
Explanation: Disables the support of compression (various transfer
syntaxes) in dcmqrdb, a feature which is still experimental.
DISABLE_OFSTD_ATOF
Affected: all modules
Type of modification: Disables feature
Explanation: By default, DCMTK uses its own implementation of atof()
to convert strings to double numbers in a locale-independent manner.
This flag forces DCMTK to use the standard sscanf() function
instead, which is normally much faster and gives a higher precision
than DCMTK's built in code, but is locale dependent, i.e. cannot be
used with locales such as German since DICOM decimal strings always
use the Posix locale.
DISABLE_OFSTD_FTOA
Affected: all modules
Type of modification: Disables feature
Explanation: By default, DCMTK uses its own implementation to convert
double numbers to strings to in a locale-independent manner.
This flag forces DCMTK to use the standard sprintf() function
instead, which is locale dependent, i.e. cannot be used with locales
such as German since DICOM decimal strings always use the Posix
locale.
DISABLE_PORT_PERMISSION_CHECK
Affected: most/all network server tools
Type of modification: Disables feature
Explanation: By default, most network server tools (e.g. storescp) check
for sufficient privileges to listen on the specified port (if geteuid()
is available on the particular system). For examples, on Unix systems
listening on port < 1024 usually requires root privileges. However,
the port permission check might prevent the tool from being run on such
ports on systems with fine-grained permission control (e.g. Linux).
Therefore, this check can be disabled using this flag.
DISABLE_RECV_TIMEOUT
Affected: dcmnet
Type of modification: Disables feature
Explanation: By default, DCMTK specifies a timeout of 60 seconds for
the recv() function. This is especially useful in cases where the
receiver (e.g. storescp) looses the connection to the sender because
the network cable is pulled (e.g. for a mobile device). This flag
disables the call to the setsockopt() function so that no timeout is
specified.
DISABLE_SEND_TIMEOUT
Affected: dcmnet
Type of modification: Disables feature
Explanation: By default, DCMTK specifies a timeout of 60 seconds for
the send() function. This is especially useful in cases where the
sender (e.g. storescu) looses the connection to the receiver because
the network cable is pulled (e.g. for a mobile device). This flag
disables the call to the setsockopt() function so that no timeout is
specified.
DONT_DISABLE_NAGLE_ALGORITHM
Affected: dcmnet
Type of modification: Disables feature
Explanation: By default, DCMTK disables the so-called Nagle algorithm
for each DICOM transport connection. This provides a 2-4 times
performance improvement (WinNT4/SP4, 100Mbit/s Ethernet). Effects on
other environments are unknown. When compiled with this macro, the
code affecting the Nagle algorithm is disabled. See documentation
for environment variable TCP_NODELAY in config/docs/envvars.txt.
DONT_LOAD_EXTERNAL_DICTIONARIES
Affected: dcmdata
Type of modification: Disables feature
Explanation: By default, DCMTK loads data dictionaries from files at
application start (before the main function is called). These files
are either specified by the DCMDICTPATH environment variable or the
default files are used. This flag disables the loading of external
dictionaries from file at application start, which might be useful
when only the builtin dictionary should be used. However, if no
dictionary gets loaded, this is likely to cause unexpected behavior.
Even if this flag is defined, the reloadDictionaries() method can be
used to load the external dictionaries after application start.
DOXYGEN
Affected: everything
Type of modification: Hides complexity from Doxygen
Explanation: Doxygen is unable to parse some complex statements correctly
and it is sometimes sufficient to provide documentation for the basic
functionality instead of documenting every detail.
This macro is defined when creating the documentation with Doxygen and
should NEVER be defined when compiling DCMTK with a C/C++ compiler.
NOTE: Doxygen is still unable to expand some macros correctly
(e.g. HAVE_WINDOWS_H). Using this macro at the appropriate locations
could be a soluti