[med-svn] [dcmtk] 01/10: New upstream version 3.6.2

Gert Wollny gewo at moszumanska.debian.org
Sun Aug 6 14:31:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

gewo pushed a commit to branch master
in repository dcmtk.

commit 65c00235cc70e73f7d1773b3c78f0f6b5550bfc7
Author: Gert Wollny <gewo at debian.org>
Date:   Wed Aug 2 15:13:10 2017 +0000

    New upstream version 3.6.2
---
 ANNOUNCE                                           |  343 +-
 CHANGES                                            |    8 +-
 CMake/3rdparty.cmake                               |   62 +-
 CMake/CTest/CTestCustom.cmake                      |   79 -
 CMake/CTest/CTestCustomAndroid.cmake.in            |   98 +
 CMake/CTest/CTestCustomWine.cmake.in               |   17 +
 CMake/CTest/dcmtkCTestConfig.cmake.in              |   36 -
 CMake/CTest/dcmtkCTestRun.cmake.in                 |   18 +
 CMake/CTest/dcmtkCTestRunAndroid.cmake.in          |   23 +-
 CMake/CTest/dcmtkCTestRunExhaustive.cmake          |    6 +
 CMake/CTest/dcmtkCTestRunWine.cmake.in             |   23 +
 CMake/CheckFunctionWithHeaderExists.cmake          |    9 +-
 CMake/DCMTKConfig.cmake.in                         |   18 +-
 ...KConfig.cmake26.in => DCMTKConfig.old_cmake.in} |   20 +-
 CMake/GenerateCMakeExports.cmake                   |   20 +-
 CMake/GenerateDCMTKConfigure.cmake                 |  577 +++-
 CMake/android.toolchain.cmake                      | 1812 -----------
 CMake/dcmtkAfterModules.cmake                      |    6 +-
 CMake/dcmtkMacros.cmake                            |   92 +-
 CMake/dcmtkPrepare.cmake                           |  187 +-
 CMake/dcmtkTryCompile.cmake                        |    8 +-
 CMake/dcmtkTryRun.cmake                            |   45 +-
 CMake/dcmtkUseAndroidSDK.cmake                     |  155 +-
 CMake/dcmtkUseWine.cmake                           |   68 +-
 CMake/dcmtkWinePath.reg.in                         |    4 +
 CMake/osconfig.h.in                                |  130 +-
 CMakeLists.txt                                     |  105 +-
 COPYRIGHT                                          |  473 ++-
 CREDITS                                            |    5 +-
 INSTALL                                            |  773 +++--
 VERSION                                            |    2 +-
 config/Makefile.def.in                             |    3 +-
 config/Makefile.in                                 |    4 +-
 config/aclocal.m4                                  |   44 +-
 config/configure                                   | 1666 +++++++++-
 config/configure.in                                |  356 ++-
 config/docs/CMakeLists.txt                         |    2 +-
 config/docs/cxx11.dox                              |  105 +-
 config/docs/macros.txt                             |   88 +-
 config/include/dcmtk/config/osconfig.h.in          |   71 +-
 config/stdcxx.m4                                   |  980 ++++++
 config/tests/algo.cc                               |   58 +
 config/{ => tests}/arith.cc                        |   46 +-
 config/tests/cxx11.cc                              |  303 ++
 config/tests/lfs.c                                 |   30 +
 config/tests/lfs64.cc                              |   29 +
 config/tests/limits.cc                             |   44 +
 config/tests/list.cc                               |   69 +
 config/tests/map.cc                                |   59 +
 config/tests/memory.cc                             |   55 +
 config/tests/stack.cc                              |   44 +
 config/tests/string.cc                             |   49 +
 config/tests/syserr.cc                             |   58 +
 config/tests/ttraits.cc                            |   65 +
 config/tests/tuple.cc                              |   47 +
 config/tests/vector.cc                             |   96 +
 dcmdata/CMakeLists.txt                             |    2 +-
 dcmdata/apps/Makefile.dep                          |  144 +-
 dcmdata/apps/Makefile.in                           |   30 +-
 dcmdata/apps/dcm2json.cc                           |   27 +-
 dcmdata/apps/dcmconv.cc                            |   12 +-
 dcmdata/apps/dcmcrle.cc                            |   11 +-
 dcmdata/apps/dcmdrle.cc                            |   11 +-
 dcmdata/apps/dcmdump.cc                            |   49 +-
 dcmdata/apps/dump2dcm.cc                           |   12 +-
 dcmdata/apps/pdf2dcm.cc                            |   12 +-
 dcmdata/apps/xml2dcm.cc                            |    7 +-
 dcmdata/data/CMakeLists.txt                        |    9 +-
 dcmdata/data/dicom.dic                             |   85 +-
 dcmdata/docs/CMakeLists.txt                        |    2 +-
 dcmdata/docs/dcm2json.man                          |   58 +-
 dcmdata/docs/dcm2pdf.man                           |   26 +-
 dcmdata/docs/dcm2xml.man                           |   42 +-
 dcmdata/docs/dcmconv.man                           |   30 +-
 dcmdata/docs/dcmcrle.man                           |   30 +-
 dcmdata/docs/dcmdata.dox                           |    2 +-
 dcmdata/docs/dcmdrle.man                           |   28 +-
 dcmdata/docs/dcmdump.man                           |   34 +-
 dcmdata/docs/dcmftest.man                          |   14 +-
 dcmdata/docs/dcmgpdir.man                          |   30 +-
 dcmdata/docs/dcmodify.man                          |   44 +-
 dcmdata/docs/dump2dcm.man                          |   34 +-
 dcmdata/docs/img2dcm.man                           |   46 +-
 dcmdata/docs/pdf2dcm.man                           |   22 +-
 dcmdata/docs/xml2dcm.man                           |   38 +-
 dcmdata/include/CMakeLists.txt                     |    2 +-
 dcmdata/include/dcmtk/dcmdata/dcbytstr.h           |   38 +-
 dcmdata/include/dcmtk/dcmdata/dcchrstr.h           |   10 +-
 dcmdata/include/dcmtk/dcmdata/dcdatset.h           |   45 +
 dcmdata/include/dcmtk/dcmdata/dcdeftag.h           |   67 +-
 dcmdata/include/dcmtk/dcmdata/dcelem.h             |   52 +-
 dcmdata/include/dcmtk/dcmdata/dcfilefo.h           |   42 +
 dcmdata/include/dcmtk/dcmdata/dchashdi.h           |    4 +-
 dcmdata/include/dcmtk/dcmdata/dcitem.h             |   73 +-
 dcmdata/include/dcmtk/dcmdata/dcjson.h             |   22 +-
 dcmdata/include/dcmtk/dcmdata/dcmatch.h            |    2 +-
 dcmdata/include/dcmtk/dcmdata/dcpixel.h            |   20 +-
 dcmdata/include/dcmtk/dcmdata/dcpixseq.h           |    4 +-
 dcmdata/include/dcmtk/dcmdata/dcsequen.h           |   16 +-
 dcmdata/include/dcmtk/dcmdata/dcspchrs.h           |    2 +-
 dcmdata/include/dcmtk/dcmdata/dcuid.h              |   12 +
 dcmdata/include/dcmtk/dcmdata/dcvr.h               |   20 +-
 dcmdata/include/dcmtk/dcmdata/dcvrae.h             |   10 +-
 dcmdata/include/dcmtk/dcmdata/dcvrat.h             |   16 +-
 dcmdata/include/dcmtk/dcmdata/dcvrcs.h             |   10 +-
 dcmdata/include/dcmtk/dcmdata/dcvrda.h             |   13 +
 dcmdata/include/dcmtk/dcmdata/dcvrdt.h             |    8 +
 dcmdata/include/dcmtk/dcmdata/dcvrfd.h             |    4 +
 dcmdata/include/dcmtk/dcmdata/dcvrfl.h             |   20 +-
 dcmdata/include/dcmtk/dcmdata/dcvrlo.h             |    6 +-
 dcmdata/include/dcmtk/dcmdata/dcvrlt.h             |    6 +-
 dcmdata/include/dcmtk/dcmdata/dcvrobow.h           |   19 +-
 dcmdata/include/dcmtk/dcmdata/dcvrpn.h             |    6 +-
 dcmdata/include/dcmtk/dcmdata/dcvrpobw.h           |   23 +-
 dcmdata/include/dcmtk/dcmdata/dcvrsh.h             |    6 +-
 dcmdata/include/dcmtk/dcmdata/dcvrsl.h             |   20 +-
 dcmdata/include/dcmtk/dcmdata/dcvrss.h             |   20 +-
 dcmdata/include/dcmtk/dcmdata/dcvrst.h             |    6 +-
 dcmdata/include/dcmtk/dcmdata/dcvrtm.h             |   11 +
 dcmdata/include/dcmtk/dcmdata/dcvruc.h             |    6 +-
 dcmdata/include/dcmtk/dcmdata/dcvrui.h             |    2 +-
 dcmdata/include/dcmtk/dcmdata/dcvrul.h             |   20 +-
 dcmdata/include/dcmtk/dcmdata/dcvrur.h             |   10 +-
 dcmdata/include/dcmtk/dcmdata/dcvrus.h             |   19 +-
 dcmdata/include/dcmtk/dcmdata/dcvrut.h             |    6 +-
 dcmdata/include/dcmtk/dcmdata/dcxfer.h             |   12 +-
 dcmdata/libi2d/Makefile.dep                        |   40 +-
 dcmdata/libi2d/i2d.cc                              |   40 +-
 dcmdata/libi2d/i2djpgs.cc                          |    6 +-
 dcmdata/libsrc/CMakeLists.txt                      |    4 +-
 dcmdata/libsrc/Makefile.dep                        |  521 ++-
 dcmdata/libsrc/cmdlnarg.cc                         |   16 +-
 dcmdata/libsrc/dcbytstr.cc                         |   61 +-
 dcmdata/libsrc/dcchrstr.cc                         |   14 +-
 dcmdata/libsrc/dcdatset.cc                         |   22 +-
 dcmdata/libsrc/dcddirif.cc                         |   19 +-
 dcmdata/libsrc/dcdicdir.cc                         |   19 +-
 dcmdata/libsrc/dcdictbi.cc                         |  232 +-
 dcmdata/libsrc/dcdirrec.cc                         |    9 +-
 dcmdata/libsrc/dcelem.cc                           |  126 +-
 dcmdata/libsrc/dcfilefo.cc                         |   29 +-
 dcmdata/libsrc/dcitem.cc                           |  122 +-
 dcmdata/libsrc/dcjson.cc                           |   12 +-
 dcmdata/libsrc/dcmatch.cc                          |    8 +-
 dcmdata/libsrc/dcobject.cc                         |   23 +-
 dcmdata/libsrc/dcostrmf.cc                         |    9 +-
 dcmdata/libsrc/dcpixel.cc                          |  134 +-
 dcmdata/libsrc/dcsequen.cc                         |   36 +-
 dcmdata/libsrc/dcuid.cc                            |  302 +-
 dcmdata/libsrc/dcvr.cc                             |   34 +-
 dcmdata/libsrc/dcvrae.cc                           |   14 +-
 dcmdata/libsrc/dcvrat.cc                           |   28 +-
 dcmdata/libsrc/dcvrcs.cc                           |   14 +-
 dcmdata/libsrc/dcvrda.cc                           |   35 +-
 dcmdata/libsrc/dcvrdt.cc                           |   12 +-
 dcmdata/libsrc/dcvrfd.cc                           |   48 +-
 dcmdata/libsrc/dcvrfl.cc                           |   48 +-
 dcmdata/libsrc/dcvrlo.cc                           |    5 +-
 dcmdata/libsrc/dcvrlt.cc                           |    5 +-
 dcmdata/libsrc/dcvrobow.cc                         |   31 +-
 dcmdata/libsrc/dcvrpn.cc                           |    5 +-
 dcmdata/libsrc/dcvrpobw.cc                         |  107 +-
 dcmdata/libsrc/dcvrsh.cc                           |    5 +-
 dcmdata/libsrc/dcvrsl.cc                           |   48 +-
 dcmdata/libsrc/dcvrss.cc                           |   48 +-
 dcmdata/libsrc/dcvrst.cc                           |    5 +-
 dcmdata/libsrc/dcvrtm.cc                           |   12 +-
 dcmdata/libsrc/dcvruc.cc                           |    5 +-
 dcmdata/libsrc/dcvrul.cc                           |   48 +-
 dcmdata/libsrc/dcvrur.cc                           |   12 +
 dcmdata/libsrc/dcvrus.cc                           |   48 +-
 dcmdata/libsrc/dcvrut.cc                           |    5 +-
 dcmdata/libsrc/dcxfer.cc                           |  197 +-
 dcmdata/libsrc/mkdeftag.cc                         |   25 +-
 dcmdata/libsrc/mkdictbi.cc                         |   26 +-
 dcmdata/libsrc/vrscan.cc                           |    5 +-
 dcmdata/tests/CMakeLists.txt                       |    2 +-
 dcmdata/tests/Makefile.dep                         |  227 +-
 dcmdata/tests/Makefile.in                          |    4 +-
 dcmdata/tests/tests.cc                             |    4 +-
 dcmdata/tests/tgenuid.cc                           |   56 +
 dcmdata/tests/tnewdcme.cc                          |  101 +
 dcmdata/tests/tparent.cc                           |    8 +-
 dcmdata/tests/tpath.cc                             |    7 +-
 dcmdata/tests/tpread.cc                            |   11 +-
 dcmdata/tests/tvrcomp.cc                           |  305 +-
 dcmfg/CMakeLists.txt                               |    2 +-
 dcmfg/include/CMakeLists.txt                       |    2 +-
 .../include/dcmtk/dcmfg/fgrealworldvaluemapping.h  |   10 +-
 dcmfg/libsrc/Makefile.dep                          |  156 +-
 dcmfg/libsrc/fginterface.cc                        |   14 +-
 dcmfg/libsrc/fgrealworldvaluemapping.cc            |   10 +-
 dcmfg/libsrc/stackinterface.cc                     |   10 +-
 dcmfg/tests/Makefile.in                            |    1 -
 dcmimage/CMakeLists.txt                            |    2 +-
 dcmimage/apps/Makefile.dep                         |   27 +-
 dcmimage/apps/Makefile.in                          |    8 +-
 dcmimage/apps/dcm2pnm.cc                           |    6 +-
 dcmimage/apps/dcmquant.cc                          |   17 +-
 dcmimage/apps/dcmscale.cc                          |    6 +-
 dcmimage/docs/dcm2pnm.man                          |   32 +-
 dcmimage/docs/dcmquant.man                         |   36 +-
 dcmimage/docs/dcmscale.man                         |   26 +-
 dcmimage/include/CMakeLists.txt                    |    2 +-
 dcmimage/libsrc/Makefile.dep                       |  129 +-
 dcmimage/libsrc/diqthash.cc                        |    4 +-
 dcmimgle/CMakeLists.txt                            |    2 +-
 dcmimgle/apps/Makefile.dep                         |   10 +-
 dcmimgle/apps/Makefile.in                          |    8 +-
 dcmimgle/apps/dcmdspfn.cc                          |    6 +-
 dcmimgle/data/CMakeLists.txt                       |    2 +-
 dcmimgle/docs/dcmdspfn.man                         |   28 +-
 dcmimgle/docs/dcod2lum.man                         |   14 +-
 dcmimgle/docs/dconvlum.man                         |   14 +-
 dcmimgle/include/CMakeLists.txt                    |    2 +-
 dcmimgle/libsrc/Makefile.dep                       |  182 +-
 dcmiod/CMakeLists.txt                              |    2 +-
 dcmiod/include/CMakeLists.txt                      |    2 +-
 dcmiod/include/dcmtk/dcmiod/iodcommn.h             |   28 +-
 dcmiod/include/dcmtk/dcmiod/iodimage.h             |   18 +-
 dcmiod/include/dcmtk/dcmiod/iodutil.h              |   25 +-
 dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h |   16 +-
 dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h |    4 +-
 dcmiod/libsrc/Makefile.dep                         |  129 +-
 dcmiod/libsrc/cielabutil.cc                        |    5 +
 dcmiod/libsrc/iodcommn.cc                          |   48 +-
 dcmiod/libsrc/iodreferences.cc                     |    8 +-
 dcmiod/libsrc/iodutil.cc                           |   77 +-
 dcmiod/libsrc/modbase.cc                           |    4 +-
 dcmiod/libsrc/modhelp.cc                           |    4 +-
 dcmiod/libsrc/modimagepixel.cc                     |    4 +-
 dcmiod/libsrc/modmultiframedimension.cc            |    2 +-
 dcmiod/libsrc/modusfor.cc                          |    4 +-
 dcmiod/tests/Makefile.dep                          |   18 +-
 dcmiod/tests/Makefile.in                           |    8 +-
 dcmjpeg/apps/CMakeLists.txt                        |    2 +-
 dcmjpeg/apps/Makefile.dep                          |   36 +-
 dcmjpeg/apps/Makefile.in                           |   10 +-
 dcmjpeg/apps/dcmcjpeg.cc                           |   11 +-
 dcmjpeg/apps/dcmdjpeg.cc                           |   11 +-
 dcmjpeg/docs/dcmcjpeg.man                          |   32 +-
 dcmjpeg/docs/dcmdjpeg.man                          |   28 +-
 dcmjpeg/docs/dcmj2pnm.man                          |   32 +-
 dcmjpeg/docs/dcmmkdir.man                          |   30 +-
 dcmjpeg/include/CMakeLists.txt                     |    2 +-
 dcmjpeg/include/dcmtk/dcmjpeg/djcodecd.h           |    8 +-
 dcmjpeg/include/dcmtk/dcmjpeg/djdecbas.h           |    8 +-
 dcmjpeg/include/dcmtk/dcmjpeg/djdecext.h           |    8 +-
 dcmjpeg/include/dcmtk/dcmjpeg/djdeclol.h           |    8 +-
 dcmjpeg/include/dcmtk/dcmjpeg/djdecpro.h           |    8 +-
 dcmjpeg/include/dcmtk/dcmjpeg/djdecsps.h           |    8 +-
 dcmjpeg/include/dcmtk/dcmjpeg/djdecsv1.h           |    8 +-
 dcmjpeg/include/dcmtk/dcmjpeg/djutils.h            |   12 +-
 dcmjpeg/libijg12/jerror.c                          |    1 +
 dcmjpeg/libijg16/jerror.c                          |    1 +
 dcmjpeg/libijg8/jerror.c                           |    1 +
 dcmjpeg/libsrc/CMakeLists.txt                      |    2 +-
 dcmjpeg/libsrc/Makefile.dep                        |  192 +-
 dcmjpeg/libsrc/djcodecd.cc                         |    7 +-
 dcmjpeg/libsrc/djcodece.cc                         |   17 +-
 dcmjpeg/libsrc/djdecbas.cc                         |    6 +-
 dcmjpeg/libsrc/djdecext.cc                         |    6 +-
 dcmjpeg/libsrc/djdeclol.cc                         |    6 +-
 dcmjpeg/libsrc/djdecpro.cc                         |    6 +-
 dcmjpeg/libsrc/djdecsps.cc                         |    8 +-
 dcmjpeg/libsrc/djdecsv1.cc                         |    6 +-
 dcmjpeg/libsrc/djeijg12.cc                         |   41 +-
 dcmjpeg/libsrc/djeijg16.cc                         |   25 +-
 dcmjpeg/libsrc/djeijg8.cc                          |   41 +-
 dcmjpeg/libsrc/djutils.cc                          |   28 +-
 dcmjpls/apps/CMakeLists.txt                        |    2 +-
 dcmjpls/apps/Makefile.dep                          |   27 +-
 dcmjpls/apps/Makefile.in                           |    9 +-
 dcmjpls/apps/dcmcjpls.cc                           |   11 +-
 dcmjpls/apps/dcmdjpls.cc                           |   12 +-
 dcmjpls/docs/dcmcjpls.man                          |   32 +-
 dcmjpls/docs/dcmdjpls.man                          |   28 +-
 dcmjpls/docs/dcml2pnm.man                          |   32 +-
 dcmjpls/include/CMakeLists.txt                     |    2 +-
 dcmjpls/include/dcmtk/dcmjpls/djcodecd.h           |    8 +-
 dcmjpls/include/dcmtk/dcmjpls/djcodece.h           |   14 +-
 dcmjpls/libcharls/CMakeLists.txt                   |    4 +-
 dcmjpls/libcharls/Makefile.dep                     |   22 +-
 dcmjpls/libcharls/decodstr.h                       |    4 +-
 dcmjpls/libcharls/encodstr.h                       |   10 +-
 dcmjpls/libcharls/header.cc                        |    4 +-
 dcmjpls/libcharls/header.h                         |    5 +-
 dcmjpls/libcharls/jpegls.cc                        |    4 +-
 dcmjpls/libcharls/scan.h                           |    6 +-
 dcmjpls/libsrc/CMakeLists.txt                      |    2 +-
 dcmjpls/libsrc/Makefile.dep                        |   49 +-
 dcmjpls/libsrc/djcodecd.cc                         |   17 +-
 dcmjpls/libsrc/djcodece.cc                         |   37 +-
 dcmnet/CMakeLists.txt                              |    2 +-
 dcmnet/apps/CMakeLists.txt                         |    4 +-
 dcmnet/apps/Makefile.dep                           |  107 +-
 dcmnet/apps/Makefile.in                            |   20 +-
 dcmnet/apps/echoscu.cc                             |   23 +-
 dcmnet/apps/findscu.cc                             |   19 +-
 dcmnet/apps/getscu.cc                              |   14 +-
 dcmnet/apps/movescu.cc                             |   77 +-
 dcmnet/apps/storescp.cc                            |   90 +-
 dcmnet/apps/storescu.cc                            |   38 +-
 dcmnet/apps/termscu.cc                             |   23 +-
 dcmnet/docs/CMakeLists.txt                         |    2 +-
 dcmnet/docs/getscu.man                             |   12 +-
 dcmnet/docs/movescu.man                            |   22 +-
 dcmnet/docs/storescp.man                           |   35 +-
 dcmnet/docs/storescu.man                           |    8 +
 dcmnet/etc/CMakeLists.txt                          |    2 +-
 dcmnet/etc/storescp.cfg                            |   18 +-
 dcmnet/etc/storescu.cfg                            |    9 +-
 dcmnet/include/CMakeLists.txt                      |    2 +-
 dcmnet/include/dcmtk/dcmnet/assoc.h                |   12 +-
 dcmnet/include/dcmtk/dcmnet/cond.h                 |    2 +
 dcmnet/include/dcmtk/dcmnet/dcasccfg.h             |   33 +-
 dcmnet/include/dcmtk/dcmnet/dccfrsmp.h             |   11 +-
 dcmnet/include/dcmtk/dcmnet/dcmlayer.h             |    6 +-
 dcmnet/include/dcmtk/dcmnet/dcmtrans.h             |   13 +-
 dcmnet/include/dcmtk/dcmnet/dcompat.h              |   28 +-
 dcmnet/include/dcmtk/dcmnet/dntypes.h              |   40 +
 dcmnet/include/dcmtk/dcmnet/dul.h                  |   68 +-
 dcmnet/include/dcmtk/dcmnet/scp.h                  |   28 +-
 dcmnet/include/dcmtk/dcmnet/scpcfg.h               |   13 +
 dcmnet/include/dcmtk/dcmnet/scu.h                  |    8 +-
 dcmnet/libsrc/Makefile.dep                         |  399 ++-
 dcmnet/libsrc/assoc.cc                             |  116 +-
 dcmnet/libsrc/cond.cc                              |    1 +
 dcmnet/libsrc/dcasccfg.cc                          |   18 +-
 dcmnet/libsrc/dccfrsmp.cc                          |   17 +-
 dcmnet/libsrc/dcmlayer.cc                          |    4 +-
 dcmnet/libsrc/dcmtrans.cc                          |  137 +-
 dcmnet/libsrc/dcompat.cc                           |   76 +-
 dcmnet/libsrc/dfindscu.cc                          |    8 +-
 dcmnet/libsrc/dimse.cc                             |   11 +-
 dcmnet/libsrc/dimstore.cc                          |    6 +-
 dcmnet/libsrc/diutil.cc                            |    8 +-
 dcmnet/libsrc/dstorscp.cc                          |    5 +-
 dcmnet/libsrc/dstorscu.cc                          |    2 -
 dcmnet/libsrc/dul.cc                               |  226 +-
 dcmnet/libsrc/dulconst.cc                          |    3 +
 dcmnet/libsrc/dulextra.cc                          |   26 +-
 dcmnet/libsrc/dulfsm.cc                            |  192 +-
 dcmnet/libsrc/dulparse.cc                          |   10 +-
 dcmnet/libsrc/dulstruc.h                           |    8 +-
 dcmnet/libsrc/dwrap.c                              |    6 +-
 dcmnet/libsrc/scp.cc                               |   30 +-
 dcmnet/libsrc/scpcfg.cc                            |   21 +-
 dcmnet/libsrc/scu.cc                               |   34 +-
 dcmnet/tests/Makefile.dep                          |   57 +-
 dcmnet/tests/Makefile.in                           |    2 +-
 dcmnet/tests/tests.cc                              |    1 +
 dcmnet/tests/tscuscp.cc                            |  148 +-
 dcmpmap/CMakeLists.txt                             |    2 +-
 dcmpmap/include/CMakeLists.txt                     |    2 +-
 dcmpmap/libsrc/Makefile.dep                        |   40 +-
 dcmpmap/libsrc/dpmparametricmapiod.cc              |   16 +-
 dcmpmap/tests/Makefile.dep                         |  548 ----
 dcmpstat/CMakeLists.txt                            |    4 +-
 dcmpstat/apps/CMakeLists.txt                       |    6 +-
 dcmpstat/apps/Makefile.dep                         |   94 +-
 dcmpstat/apps/Makefile.in                          |   29 +-
 dcmpstat/apps/dcmmkcrv.cc                          |   28 +-
 dcmpstat/apps/dcmmklut.cc                          |    6 +-
 dcmpstat/apps/dcmp2pgm.cc                          |    6 +-
 dcmpstat/apps/dcmprscp.cc                          |   27 +-
 dcmpstat/apps/dcmprscu.cc                          |   24 +-
 dcmpstat/apps/dcmpschk.cc                          |   28 +-
 dcmpstat/apps/dcmpsmk.cc                           |    9 -
 dcmpstat/apps/dcmpsprt.cc                          |    6 +-
 dcmpstat/apps/dcmpsrcv.cc                          |   34 +-
 dcmpstat/apps/dcmpssnd.cc                          |   27 +-
 dcmpstat/data/CMakeLists.txt                       |    2 +-
 dcmpstat/docs/dcmmkcrv.man                         |   24 +-
 dcmpstat/docs/dcmmklut.man                         |   26 +-
 dcmpstat/docs/dcmp2pgm.man                         |   30 +-
 dcmpstat/docs/dcmprscp.man                         |   22 +-
 dcmpstat/docs/dcmprscu.man                         |   32 +-
 dcmpstat/docs/dcmpschk.man                         |   18 +-
 dcmpstat/docs/dcmpsmk.man                          |   26 +-
 dcmpstat/docs/dcmpsprt.man                         |   42 +-
 dcmpstat/docs/dcmpsrcv.man                         |   22 +-
 dcmpstat/docs/dcmpssnd.man                         |   22 +-
 dcmpstat/etc/CMakeLists.txt                        |    2 +-
 dcmpstat/include/CMakeLists.txt                    |    2 +-
 dcmpstat/include/dcmtk/dcmpstat/dvcache.h          |   14 +-
 dcmpstat/libsrc/Makefile.dep                       |  342 +-
 dcmpstat/libsrc/dcmpstat.cc                        |    6 +-
 dcmpstat/libsrc/dviface.cc                         |   48 +-
 dcmpstat/libsrc/dvpscu.cc                          |  100 +-
 dcmpstat/libsrc/dvpsgll.cc                         |   10 +-
 dcmpstat/libsrc/dvpsgr.cc                          |   62 +-
 dcmpstat/libsrc/dvpsmsg.cc                         |   44 +-
 dcmpstat/libsrc/dvpspr.cc                          |    7 +-
 dcmpstat/libsrc/dvpssp.cc                          |   10 +-
 dcmpstat/libsrc/dvpstat.cc                         |    2 +-
 dcmpstat/libsrc/dvpsvw.cc                          |    8 +-
 dcmpstat/tests/CMakeLists.txt                      |    5 +
 dcmpstat/tests/Makefile.dep                        |    8 +-
 dcmpstat/tests/Makefile.in                         |    4 +-
 dcmpstat/tests/msgserv.cc                          |   63 +-
 dcmqrdb/CMakeLists.txt                             |    2 +-
 dcmqrdb/apps/Makefile.dep                          |   34 +-
 dcmqrdb/apps/Makefile.in                           |    8 +-
 dcmqrdb/apps/dcmqridx.cc                           |    8 +-
 dcmqrdb/apps/dcmqrscp.cc                           |  150 +-
 dcmqrdb/apps/dcmqrti.cc                            |   19 +-
 dcmqrdb/docs/CMakeLists.txt                        |    2 +-
 dcmqrdb/docs/dcmqridx.man                          |   20 +-
 dcmqrdb/docs/dcmqrscp.man                          |  120 +-
 dcmqrdb/docs/dcmqrti.man                           |   54 +-
 dcmqrdb/etc/CMakeLists.txt                         |    2 +-
 dcmqrdb/etc/dcmqrprf.cfg                           | 1071 +++++++
 dcmqrdb/include/CMakeLists.txt                     |    2 +-
 dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbm.h           |    8 +-
 dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h           |    2 +-
 dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h           |   74 +-
 dcmqrdb/include/dcmtk/dcmqrdb/dcmqropt.h           |   10 +-
 dcmqrdb/include/dcmtk/dcmqrdb/dcmqrsrv.h           |    9 +-
 dcmqrdb/libsrc/Makefile.dep                        |  104 +-
 dcmqrdb/libsrc/dcmqrcbg.cc                         |    7 +-
 dcmqrdb/libsrc/dcmqrcbm.cc                         |   26 +-
 dcmqrdb/libsrc/dcmqrcbs.cc                         |    5 +-
 dcmqrdb/libsrc/dcmqrdbi.cc                         |   82 +-
 dcmqrdb/libsrc/dcmqropt.cc                         |    5 +-
 dcmqrdb/libsrc/dcmqrsrv.cc                         |  137 +-
 dcmqrdb/libsrc/dcmqrtis.cc                         |    5 +-
 dcmrt/CMakeLists.txt                               |    2 +-
 dcmrt/apps/Makefile.dep                            |    8 +-
 dcmrt/apps/Makefile.in                             |    4 +-
 dcmrt/docs/drtdump.man                             |   28 +-
 dcmrt/include/CMakeLists.txt                       |    2 +-
 dcmrt/include/dcmtk/dcmrt/drtdose.h                |   21 +-
 dcmrt/include/dcmtk/dcmrt/drtimage.h               |   21 +-
 dcmrt/include/dcmtk/dcmrt/drtionpl.h               |   21 +-
 dcmrt/include/dcmtk/dcmrt/drtiontr.h               |   21 +-
 dcmrt/include/dcmtk/dcmrt/drtplan.h                |   21 +-
 dcmrt/include/dcmtk/dcmrt/drtstrct.h               |   21 +-
 dcmrt/include/dcmtk/dcmrt/drttreat.h               |   21 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtaadcs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtadcs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtads.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtafs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtags.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtajcs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtas1.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtas5.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtas6.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtas7.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtass.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbads.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbas.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbcps.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbl2.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbl5.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbldls.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbldps.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtblds1.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtblds5.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtblds6.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbldts.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbrcss.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbrdrs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbrs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbs.h              |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbss.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtbvcps.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcbars.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtccs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcctus.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcdrs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtces.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcgis.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtchs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcims.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcis.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcncs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcos.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcpas.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcpis.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcps.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcs.h              |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcsas.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcshs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcsis.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtcss.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtdcs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtdddps.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtddps.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtdias.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtdimcs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtdimrs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtdirs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtdrs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtds.h              |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtdspcs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtdss.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtdvhs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtdvrrs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drteas.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtecs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtes.h              |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtfds.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtfes.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtfgs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtfgss.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtfms.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtfsss.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtgas.h             |    4 +-
 .../dcmtk/dcmrt/seq/{drtpics.h => drtgmcs.h}       |   22 +-
 .../include/dcmtk/dcmrt/seq/{drtsss.h => drtgms.h} |   66 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtgpis.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drthsdrs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtiais.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtians.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtiblds.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtibls.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtibs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drticpds.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drticps.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtics.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtiis.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtipiqs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtircs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtiseis.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtitts.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtiwps.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtiws.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtlsds.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtlsds6.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtlsds7.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtmacds.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtmas.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtmdrs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtmls.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtmps.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtmris.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtmss.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtmucs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtoas.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtois.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtopis.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtos.h              |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtpbcs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtpcs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtpcxs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtpdecs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtpdeds.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtpfms.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtpics.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtporcs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtporis.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtppcs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtprsis.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtpscs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtpsics.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtpss.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtpsss.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtpvis.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtqds.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtras.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrbas2.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrbas8.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrbls.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrbos1.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrbos6.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrbos7.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrbs2.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrbs4.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrbs8.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrcdrs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrcos.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrcps.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrcs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrdros.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrdrs1.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrdrs6.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrdrs8.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrds.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrecs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrfgs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrfors.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrics.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrims.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtris.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrlsds.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrmdrs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrms.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrmss6.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrmss7.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrpcs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrpis.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrppcs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrpphs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrpps.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrppss.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrps.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrris1.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrris6.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrris9.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrrms.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrros.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrrpcs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrrros.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrrs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrrshs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrrtps.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrrtps3.h          |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrrtps4.h          |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrrtps5.h          |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrscs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrsers.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrses.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrshs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrshs6.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrshs7.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrsis.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrsns.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrsos.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrsrs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrss.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrsss.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrsts.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrtrs2.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrtrs4.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrvis.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrws.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtrwvms.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtscris.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtscs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtsdcs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtsds.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtshds.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtsins.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtsis.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtsns.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtspccs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtspcs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtspgis.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtsptcs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtss.h              |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtssrcs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtssrs.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtsss.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drttms0.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drttms9.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drttscds.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drttsibs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drttsmds.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drttts.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtudis.h            |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtvls.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtwps.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtwrs.h             |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtwrsrs.h           |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtws.h              |    4 +-
 dcmrt/include/dcmtk/dcmrt/seq/drtxrs.h             |    4 +-
 dcmrt/libsrc/CMakeLists.txt                        |    2 +-
 dcmrt/libsrc/Makefile.dep                          | 2346 ++++++++------
 dcmrt/libsrc/Makefile.in                           |   18 +-
 dcmrt/libsrc/drtaadcs.cc                           |    4 +-
 dcmrt/libsrc/drtadcs.cc                            |    4 +-
 dcmrt/libsrc/drtads.cc                             |    4 +-
 dcmrt/libsrc/drtafs.cc                             |    4 +-
 dcmrt/libsrc/drtags.cc                             |    4 +-
 dcmrt/libsrc/drtajcs.cc                            |    4 +-
 dcmrt/libsrc/drtas1.cc                             |    4 +-
 dcmrt/libsrc/drtas5.cc                             |    4 +-
 dcmrt/libsrc/drtas6.cc                             |    4 +-
 dcmrt/libsrc/drtas7.cc                             |    4 +-
 dcmrt/libsrc/drtass.cc                             |    4 +-
 dcmrt/libsrc/drtbads.cc                            |    4 +-
 dcmrt/libsrc/drtbas.cc                             |    4 +-
 dcmrt/libsrc/drtbcps.cc                            |    4 +-
 dcmrt/libsrc/drtbl2.cc                             |    4 +-
 dcmrt/libsrc/drtbl5.cc                             |    4 +-
 dcmrt/libsrc/drtbldls.cc                           |    4 +-
 dcmrt/libsrc/drtbldps.cc                           |    4 +-
 dcmrt/libsrc/drtblds1.cc                           |    4 +-
 dcmrt/libsrc/drtblds5.cc                           |    4 +-
 dcmrt/libsrc/drtblds6.cc                           |    4 +-
 dcmrt/libsrc/drtbldts.cc                           |    4 +-
 dcmrt/libsrc/drtbrcss.cc                           |    4 +-
 dcmrt/libsrc/drtbrdrs.cc                           |    4 +-
 dcmrt/libsrc/drtbrs.cc                             |    4 +-
 dcmrt/libsrc/drtbs.cc                              |    4 +-
 dcmrt/libsrc/drtbss.cc                             |    4 +-
 dcmrt/libsrc/drtbvcps.cc                           |    4 +-
 dcmrt/libsrc/drtcbars.cc                           |    4 +-
 dcmrt/libsrc/drtccs.cc                             |    4 +-
 dcmrt/libsrc/drtcctus.cc                           |    4 +-
 dcmrt/libsrc/drtcdrs.cc                            |    4 +-
 dcmrt/libsrc/drtces.cc                             |    4 +-
 dcmrt/libsrc/drtcgis.cc                            |    4 +-
 dcmrt/libsrc/drtchs.cc                             |    4 +-
 dcmrt/libsrc/drtcims.cc                            |    4 +-
 dcmrt/libsrc/drtcis.cc                             |    4 +-
 dcmrt/libsrc/drtcncs.cc                            |    4 +-
 dcmrt/libsrc/drtcos.cc                             |    4 +-
 dcmrt/libsrc/drtcpas.cc                            |    4 +-
 dcmrt/libsrc/drtcpis.cc                            |    4 +-
 dcmrt/libsrc/drtcps.cc                             |    4 +-
 dcmrt/libsrc/drtcs.cc                              |    4 +-
 dcmrt/libsrc/drtcsas.cc                            |    4 +-
 dcmrt/libsrc/drtcshs.cc                            |    4 +-
 dcmrt/libsrc/drtcsis.cc                            |    4 +-
 dcmrt/libsrc/drtcss.cc                             |    4 +-
 dcmrt/libsrc/drtdcs.cc                             |    4 +-
 dcmrt/libsrc/drtdddps.cc                           |    4 +-
 dcmrt/libsrc/drtddps.cc                            |    4 +-
 dcmrt/libsrc/drtdias.cc                            |    4 +-
 dcmrt/libsrc/drtdimcs.cc                           |    4 +-
 dcmrt/libsrc/drtdimrs.cc                           |    4 +-
 dcmrt/libsrc/drtdirs.cc                            |    4 +-
 dcmrt/libsrc/drtdose.cc                            |   13 +-
 dcmrt/libsrc/drtdrs.cc                             |    4 +-
 dcmrt/libsrc/drtds.cc                              |    4 +-
 dcmrt/libsrc/drtdspcs.cc                           |    4 +-
 dcmrt/libsrc/drtdss.cc                             |    4 +-
 dcmrt/libsrc/drtdvhs.cc                            |    4 +-
 dcmrt/libsrc/drtdvrrs.cc                           |    4 +-
 dcmrt/libsrc/drteas.cc                             |    4 +-
 dcmrt/libsrc/drtecs.cc                             |    4 +-
 dcmrt/libsrc/drtes.cc                              |    4 +-
 dcmrt/libsrc/drtfds.cc                             |    4 +-
 dcmrt/libsrc/drtfes.cc                             |    4 +-
 dcmrt/libsrc/drtfgs.cc                             |    4 +-
 dcmrt/libsrc/drtfgss.cc                            |    4 +-
 dcmrt/libsrc/drtfms.cc                             |    4 +-
 dcmrt/libsrc/drtfsss.cc                            |    4 +-
 dcmrt/libsrc/drtgas.cc                             |    4 +-
 dcmrt/libsrc/{drtpics.cc => drtgmcs.cc}            |  208 +-
 dcmrt/libsrc/{drtrrshs.cc => drtgms.cc}            |  177 +-
 dcmrt/libsrc/drtgpis.cc                            |    4 +-
 dcmrt/libsrc/drthsdrs.cc                           |    4 +-
 dcmrt/libsrc/drtiais.cc                            |    4 +-
 dcmrt/libsrc/drtians.cc                            |    4 +-
 dcmrt/libsrc/drtiblds.cc                           |    4 +-
 dcmrt/libsrc/drtibls.cc                            |    4 +-
 dcmrt/libsrc/drtibs.cc                             |    4 +-
 dcmrt/libsrc/drticpds.cc                           |    4 +-
 dcmrt/libsrc/drticps.cc                            |    4 +-
 dcmrt/libsrc/drtics.cc                             |    4 +-
 dcmrt/libsrc/drtiis.cc                             |    4 +-
 dcmrt/libsrc/drtimage.cc                           |   13 +-
 dcmrt/libsrc/drtionpl.cc                           |   13 +-
 dcmrt/libsrc/drtiontr.cc                           |   13 +-
 dcmrt/libsrc/drtipiqs.cc                           |    4 +-
 dcmrt/libsrc/drtircs.cc                            |    4 +-
 dcmrt/libsrc/drtiseis.cc                           |    4 +-
 dcmrt/libsrc/drtitts.cc                            |    4 +-
 dcmrt/libsrc/drtiwps.cc                            |    4 +-
 dcmrt/libsrc/drtiws.cc                             |    4 +-
 dcmrt/libsrc/drtlsds.cc                            |    4 +-
 dcmrt/libsrc/drtlsds6.cc                           |    4 +-
 dcmrt/libsrc/drtlsds7.cc                           |    4 +-
 dcmrt/libsrc/drtmacds.cc                           |    4 +-
 dcmrt/libsrc/drtmas.cc                             |    4 +-
 dcmrt/libsrc/drtmdrs.cc                            |    4 +-
 dcmrt/libsrc/drtmls.cc                             |    4 +-
 dcmrt/libsrc/drtmps.cc                             |    4 +-
 dcmrt/libsrc/drtmris.cc                            |    4 +-
 dcmrt/libsrc/drtmss.cc                             |    4 +-
 dcmrt/libsrc/drtmucs.cc                            |    4 +-
 dcmrt/libsrc/drtoas.cc                             |    4 +-
 dcmrt/libsrc/drtois.cc                             |    4 +-
 dcmrt/libsrc/drtopis.cc                            |    4 +-
 dcmrt/libsrc/drtos.cc                              |    4 +-
 dcmrt/libsrc/drtpbcs.cc                            |    4 +-
 dcmrt/libsrc/drtpcs.cc                             |    4 +-
 dcmrt/libsrc/drtpcxs.cc                            |    4 +-
 dcmrt/libsrc/drtpdecs.cc                           |    4 +-
 dcmrt/libsrc/drtpdeds.cc                           |    4 +-
 dcmrt/libsrc/drtpfms.cc                            |    4 +-
 dcmrt/libsrc/drtpics.cc                            |    4 +-
 dcmrt/libsrc/drtplan.cc                            |   13 +-
 dcmrt/libsrc/drtporcs.cc                           |    4 +-
 dcmrt/libsrc/drtporis.cc                           |    4 +-
 dcmrt/libsrc/drtppcs.cc                            |    4 +-
 dcmrt/libsrc/drtprsis.cc                           |    4 +-
 dcmrt/libsrc/drtpscs.cc                            |    4 +-
 dcmrt/libsrc/drtpsics.cc                           |    4 +-
 dcmrt/libsrc/drtpss.cc                             |    4 +-
 dcmrt/libsrc/drtpsss.cc                            |    4 +-
 dcmrt/libsrc/drtpvis.cc                            |    4 +-
 dcmrt/libsrc/drtqds.cc                             |    4 +-
 dcmrt/libsrc/drtras.cc                             |    4 +-
 dcmrt/libsrc/drtrbas2.cc                           |    4 +-
 dcmrt/libsrc/drtrbas8.cc                           |    4 +-
 dcmrt/libsrc/drtrbls.cc                            |    4 +-
 dcmrt/libsrc/drtrbos1.cc                           |    4 +-
 dcmrt/libsrc/drtrbos6.cc                           |    4 +-
 dcmrt/libsrc/drtrbos7.cc                           |    4 +-
 dcmrt/libsrc/drtrbs2.cc                            |    4 +-
 dcmrt/libsrc/drtrbs4.cc                            |    4 +-
 dcmrt/libsrc/drtrbs8.cc                            |    4 +-
 dcmrt/libsrc/drtrcdrs.cc                           |    4 +-
 dcmrt/libsrc/drtrcos.cc                            |    4 +-
 dcmrt/libsrc/drtrcps.cc                            |    4 +-
 dcmrt/libsrc/drtrcs.cc                             |    4 +-
 dcmrt/libsrc/drtrdros.cc                           |    4 +-
 dcmrt/libsrc/drtrdrs1.cc                           |    4 +-
 dcmrt/libsrc/drtrdrs6.cc                           |    4 +-
 dcmrt/libsrc/drtrdrs8.cc                           |    4 +-
 dcmrt/libsrc/drtrds.cc                             |    4 +-
 dcmrt/libsrc/drtrecs.cc                            |    4 +-
 dcmrt/libsrc/drtrfgs.cc                            |    4 +-
 dcmrt/libsrc/drtrfors.cc                           |    4 +-
 dcmrt/libsrc/drtrics.cc                            |    4 +-
 dcmrt/libsrc/drtrims.cc                            |    4 +-
 dcmrt/libsrc/drtris.cc                             |    4 +-
 dcmrt/libsrc/drtrlsds.cc                           |    4 +-
 dcmrt/libsrc/drtrmdrs.cc                           |    4 +-
 dcmrt/libsrc/drtrms.cc                             |    4 +-
 dcmrt/libsrc/drtrmss6.cc                           |    4 +-
 dcmrt/libsrc/drtrmss7.cc                           |    4 +-
 dcmrt/libsrc/drtrpcs.cc                            |    4 +-
 dcmrt/libsrc/drtrpis.cc                            |    4 +-
 dcmrt/libsrc/drtrppcs.cc                           |    4 +-
 dcmrt/libsrc/drtrpphs.cc                           |    4 +-
 dcmrt/libsrc/drtrpps.cc                            |    4 +-
 dcmrt/libsrc/drtrppss.cc                           |    4 +-
 dcmrt/libsrc/drtrps.cc                             |    4 +-
 dcmrt/libsrc/drtrris1.cc                           |    4 +-
 dcmrt/libsrc/drtrris6.cc                           |    4 +-
 dcmrt/libsrc/drtrris9.cc                           |    4 +-
 dcmrt/libsrc/drtrrms.cc                            |    4 +-
 dcmrt/libsrc/drtrros.cc                            |    4 +-
 dcmrt/libsrc/drtrrpcs.cc                           |    4 +-
 dcmrt/libsrc/drtrrros.cc                           |    4 +-
 dcmrt/libsrc/drtrrs.cc                             |    4 +-
 dcmrt/libsrc/drtrrshs.cc                           |    4 +-
 dcmrt/libsrc/drtrrtps.cc                           |    4 +-
 dcmrt/libsrc/drtrrtps3.cc                          |    4 +-
 dcmrt/libsrc/drtrrtps4.cc                          |    4 +-
 dcmrt/libsrc/drtrrtps5.cc                          |    4 +-
 dcmrt/libsrc/drtrscs.cc                            |    4 +-
 dcmrt/libsrc/drtrsers.cc                           |    4 +-
 dcmrt/libsrc/drtrses.cc                            |    4 +-
 dcmrt/libsrc/drtrshs.cc                            |    4 +-
 dcmrt/libsrc/drtrshs6.cc                           |    4 +-
 dcmrt/libsrc/drtrshs7.cc                           |    4 +-
 dcmrt/libsrc/drtrsis.cc                            |    4 +-
 dcmrt/libsrc/drtrsns.cc                            |    4 +-
 dcmrt/libsrc/drtrsos.cc                            |    4 +-
 dcmrt/libsrc/drtrsrs.cc                            |    4 +-
 dcmrt/libsrc/drtrss.cc                             |    4 +-
 dcmrt/libsrc/drtrsss.cc                            |    4 +-
 dcmrt/libsrc/drtrsts.cc                            |    4 +-
 dcmrt/libsrc/drtrtrs2.cc                           |    4 +-
 dcmrt/libsrc/drtrtrs4.cc                           |    4 +-
 dcmrt/libsrc/drtrvis.cc                            |    4 +-
 dcmrt/libsrc/drtrws.cc                             |    4 +-
 dcmrt/libsrc/drtrwvms.cc                           |    4 +-
 dcmrt/libsrc/drtscris.cc                           |    4 +-
 dcmrt/libsrc/drtscs.cc                             |    4 +-
 dcmrt/libsrc/drtsdcs.cc                            |    4 +-
 dcmrt/libsrc/drtsds.cc                             |    4 +-
 dcmrt/libsrc/drtshds.cc                            |    4 +-
 dcmrt/libsrc/drtsins.cc                            |    4 +-
 dcmrt/libsrc/drtsis.cc                             |    4 +-
 dcmrt/libsrc/drtsns.cc                             |    4 +-
 dcmrt/libsrc/drtspccs.cc                           |    4 +-
 dcmrt/libsrc/drtspcs.cc                            |    4 +-
 dcmrt/libsrc/drtspgis.cc                           |    4 +-
 dcmrt/libsrc/drtsptcs.cc                           |    4 +-
 dcmrt/libsrc/drtss.cc                              |    4 +-
 dcmrt/libsrc/drtssrcs.cc                           |    4 +-
 dcmrt/libsrc/drtssrs.cc                            |    4 +-
 dcmrt/libsrc/drtsss.cc                             |    4 +-
 dcmrt/libsrc/drtstrct.cc                           |   13 +-
 dcmrt/libsrc/drttms0.cc                            |    4 +-
 dcmrt/libsrc/drttms9.cc                            |    4 +-
 dcmrt/libsrc/drttreat.cc                           |   13 +-
 dcmrt/libsrc/drttscds.cc                           |    4 +-
 dcmrt/libsrc/drttsibs.cc                           |    4 +-
 dcmrt/libsrc/drttsmds.cc                           |    4 +-
 dcmrt/libsrc/drttts.cc                             |    4 +-
 dcmrt/libsrc/drtudis.cc                            |    4 +-
 dcmrt/libsrc/drtvls.cc                             |    4 +-
 dcmrt/libsrc/drtwps.cc                             |    4 +-
 dcmrt/libsrc/drtwrs.cc                             |    4 +-
 dcmrt/libsrc/drtwrsrs.cc                           |    4 +-
 dcmrt/libsrc/drtws.cc                              |    4 +-
 dcmrt/libsrc/drtxrs.cc                             |    4 +-
 dcmrt/tests/Makefile.dep                           |   23 +-
 dcmrt/tests/Makefile.in                            |    4 +-
 dcmseg/CMakeLists.txt                              |    2 +-
 dcmseg/include/CMakeLists.txt                      |    2 +-
 dcmseg/include/dcmtk/dcmseg/segdoc.h               |    8 +-
 dcmseg/include/dcmtk/dcmseg/segment.h              |   32 +-
 dcmseg/libsrc/Makefile.dep                         |   32 +-
 dcmseg/libsrc/segdoc.cc                            |   45 +-
 dcmseg/libsrc/segment.cc                           |   30 +-
 dcmseg/tests/Makefile.dep                          |   15 +-
 dcmseg/tests/Makefile.in                           |    9 +-
 dcmsign/CMakeLists.txt                             |    2 +-
 dcmsign/apps/Makefile.dep                          |    9 +-
 dcmsign/apps/Makefile.in                           |    8 +-
 dcmsign/apps/dcmsign.cc                            |   12 +-
 dcmsign/docs/dcmsign.man                           |   32 +-
 dcmsign/include/CMakeLists.txt                     |    2 +-
 dcmsign/libsrc/Makefile.dep                        |   54 +-
 dcmsign/libsrc/sicertvf.cc                         |   18 +-
 dcmsr/CMakeLists.txt                               |    2 +-
 dcmsr/apps/Makefile.dep                            |   48 +-
 dcmsr/apps/Makefile.in                             |   10 +-
 dcmsr/data/CMakeLists.txt                          |    2 +-
 dcmsr/data/dsr2xml.xsd                             |   11 +-
 dcmsr/docs/dsr2html.man                            |   34 +-
 dcmsr/docs/dsr2xml.man                             |   38 +-
 dcmsr/docs/dsrdump.man                             |   30 +-
 dcmsr/docs/xml2dsr.man                             |   38 +-
 dcmsr/include/CMakeLists.txt                       |    2 +-
 dcmsr/include/dcmtk/dcmsr/codes/dcm.h              |   13 +-
 dcmsr/include/dcmtk/dcmsr/codes/ncit.h             |    9 +-
 dcmsr/include/dcmtk/dcmsr/codes/srt.h              |   10 +-
 dcmsr/include/dcmtk/dcmsr/codes/ucum.h             |    6 +-
 dcmsr/include/dcmtk/dcmsr/codes/umls.h             |    6 +-
 dcmsr/include/dcmtk/dcmsr/dsrdncsr.h               |    2 +-
 dcmsr/include/dcmtk/dcmsr/dsrdoc.h                 |   10 +-
 dcmsr/include/dcmtk/dcmsr/dsrdocst.h               |   28 +-
 dcmsr/include/dcmtk/dcmsr/dsrtlist.h               |   18 +-
 dcmsr/include/dcmtk/dcmsr/dsrtncsr.h               |   15 +
 dcmsr/include/dcmtk/dcmsr/dsrtypes.h               |   20 +-
 dcmsr/libcmr/Makefile.dep                          |  360 ++-
 dcmsr/libcmr/tid1600.cc                            |   10 +-
 dcmsr/libsrc/Makefile.dep                          |  616 ++--
 dcmsr/libsrc/dsrdoc.cc                             |   24 +-
 dcmsr/libsrc/dsrdocst.cc                           |   33 +-
 dcmsr/libsrc/dsrimgfr.cc                           |   21 +-
 dcmsr/libsrc/dsrimgse.cc                           |   21 +-
 dcmsr/libsrc/dsrsc3gr.cc                           |   22 +-
 dcmsr/libsrc/dsrscogr.cc                           |   22 +-
 dcmsr/libsrc/dsrtcodt.cc                           |   22 +-
 dcmsr/libsrc/dsrtcosp.cc                           |   21 +-
 dcmsr/libsrc/dsrtcoto.cc                           |   21 +-
 dcmsr/libsrc/dsrtypes.cc                           |   66 +-
 dcmsr/libsrc/dsrwavch.cc                           |   22 +-
 dcmsr/tests/Makefile.dep                           |   87 +-
 dcmsr/tests/Makefile.in                            |    6 +-
 dcmsr/tests/tests.cc                               |    4 +-
 dcmsr/tests/tsrdoctr.cc                            |   81 +-
 dcmsr/tests/tsrlist.cc                             |   52 +-
 dcmtls/CMakeLists.txt                              |    2 +-
 dcmtls/docs/CMakeLists.txt                         |    2 +-
 dcmtls/include/CMakeLists.txt                      |    2 +-
 dcmtls/include/dcmtk/dcmtls/tlslayer.h             |    4 +-
 dcmtls/include/dcmtk/dcmtls/tlstrans.h             |    4 +-
 dcmtls/libsrc/Makefile.dep                         |   26 +-
 dcmtls/libsrc/tlslayer.cc                          |    3 +-
 dcmtls/libsrc/tlstrans.cc                          |   20 +-
 dcmtract/CMakeLists.txt                            |    2 +-
 dcmtract/include/CMakeLists.txt                    |    2 +-
 dcmtract/libsrc/Makefile.dep                       |   51 +-
 dcmtract/libsrc/trcstatistic.cc                    |    4 +-
 dcmtract/libsrc/trctrack.cc                        |    8 +-
 dcmtract/libsrc/trctractographyresults.cc          |    4 +-
 dcmwlm/CMakeLists.txt                              |    4 +-
 dcmwlm/apps/CMakeLists.txt                         |    2 +-
 dcmwlm/apps/Makefile.dep                           |   16 +-
 dcmwlm/apps/Makefile.in                            |    4 +-
 dcmwlm/apps/wlcefs.cc                              |    4 +-
 dcmwlm/data/CMakeLists.txt                         |    2 +-
 dcmwlm/docs/wlmscpfs.man                           |   42 +-
 dcmwlm/include/CMakeLists.txt                      |    2 +-
 dcmwlm/include/dcmtk/dcmwlm/wlds.h                 |    8 +-
 dcmwlm/include/dcmtk/dcmwlm/wldsfs.h               |    4 +-
 dcmwlm/include/dcmtk/dcmwlm/wlfsim.h               |  288 +-
 dcmwlm/libsrc/Makefile.dep                         |   32 +-
 dcmwlm/libsrc/wlds.cc                              |   12 +-
 dcmwlm/libsrc/wldsfs.cc                            |    7 +-
 dcmwlm/libsrc/wlfsim.cc                            | 1476 +--------
 dcmwlm/libsrc/wlmactmg.cc                          |   40 +-
 dcmwlm/tests/CMakeLists.txt                        |    5 +
 dcmwlm/tests/Makefile.dep                          |    8 +-
 dcmwlm/tests/Makefile.in                           |    4 +-
 dcmwlm/tests/wltest.cc                             |   11 +-
 docs/{CHANGES.361 => CHANGES.362}                  | 3344 +++++++++++++++++++-
 doxygen/CMakeLists.txt                             |   33 +-
 doxygen/htmldocs.cfg                               |    2 +-
 doxygen/manpages.cfg                               |    2 +-
 doxygen/manpages/man1/dcm2json.1                   |   28 +-
 doxygen/manpages/man1/dcm2pdf.1                    |    2 +-
 doxygen/manpages/man1/dcm2pnm.1                    |    2 +-
 doxygen/manpages/man1/dcm2xml.1                    |    2 +-
 doxygen/manpages/man1/dcmcjpeg.1                   |    4 +-
 doxygen/manpages/man1/dcmcjpls.1                   |    2 +-
 doxygen/manpages/man1/dcmconv.1                    |    6 +-
 doxygen/manpages/man1/dcmcrle.1                    |    2 +-
 doxygen/manpages/man1/dcmdjpeg.1                   |    2 +-
 doxygen/manpages/man1/dcmdjpls.1                   |    2 +-
 doxygen/manpages/man1/dcmdrle.1                    |    2 +-
 doxygen/manpages/man1/dcmdspfn.1                   |    4 +-
 doxygen/manpages/man1/dcmdump.1                    |    8 +-
 doxygen/manpages/man1/dcmftest.1                   |    2 +-
 doxygen/manpages/man1/dcmgpdir.1                   |    2 +-
 doxygen/manpages/man1/dcmj2pnm.1                   |    2 +-
 doxygen/manpages/man1/dcml2pnm.1                   |    2 +-
 doxygen/manpages/man1/dcmmkcrv.1                   |    2 +-
 doxygen/manpages/man1/dcmmkdir.1                   |    2 +-
 doxygen/manpages/man1/dcmmklut.1                   |    2 +-
 doxygen/manpages/man1/dcmodify.1                   |    2 +-
 doxygen/manpages/man1/dcmp2pgm.1                   |    2 +-
 doxygen/manpages/man1/dcmprscp.1                   |    2 +-
 doxygen/manpages/man1/dcmprscu.1                   |    2 +-
 doxygen/manpages/man1/dcmpschk.1                   |    2 +-
 doxygen/manpages/man1/dcmpsmk.1                    |    4 +-
 doxygen/manpages/man1/dcmpsprt.1                   |    2 +-
 doxygen/manpages/man1/dcmpsrcv.1                   |    2 +-
 doxygen/manpages/man1/dcmpssnd.1                   |    2 +-
 doxygen/manpages/man1/dcmqridx.1                   |    2 +-
 doxygen/manpages/man1/dcmqrscp.1                   |   66 +-
 doxygen/manpages/man1/dcmqrti.1                    |    4 +-
 doxygen/manpages/man1/dcmquant.1                   |   15 +-
 doxygen/manpages/man1/dcmrecv.1                    |    2 +-
 doxygen/manpages/man1/dcmscale.1                   |    4 +-
 doxygen/manpages/man1/dcmsend.1                    |    2 +-
 doxygen/manpages/man1/dcmsign.1                    |    2 +-
 doxygen/manpages/man1/dcod2lum.1                   |    2 +-
 doxygen/manpages/man1/dconvlum.1                   |    2 +-
 doxygen/manpages/man1/drtdump.1                    |    2 +-
 doxygen/manpages/man1/dsr2html.1                   |    2 +-
 doxygen/manpages/man1/dsr2xml.1                    |    4 +-
 doxygen/manpages/man1/dsrdump.1                    |    2 +-
 doxygen/manpages/man1/dump2dcm.1                   |    2 +-
 doxygen/manpages/man1/echoscu.1                    |    2 +-
 doxygen/manpages/man1/findscu.1                    |    2 +-
 doxygen/manpages/man1/getscu.1                     |   10 +-
 doxygen/manpages/man1/img2dcm.1                    |    2 +-
 doxygen/manpages/man1/movescu.1                    |   22 +-
 doxygen/manpages/man1/pdf2dcm.1                    |    2 +-
 doxygen/manpages/man1/storescp.1                   |   22 +-
 doxygen/manpages/man1/storescu.1                   |   10 +-
 doxygen/manpages/man1/termscu.1                    |    2 +-
 doxygen/manpages/man1/wlmscpfs.1                   |   12 +-
 doxygen/manpages/man1/xml2dcm.1                    |    2 +-
 doxygen/manpages/man1/xml2dsr.1                    |    2 +-
 oflog/CMakeLists.txt                               |    2 +-
 oflog/etc/CMakeLists.txt                           |    2 +-
 oflog/include/CMakeLists.txt                       |    2 +-
 oflog/include/dcmtk/oflog/appender.h               |   12 +-
 oflog/include/dcmtk/oflog/hierarchy.h              |    4 +-
 oflog/include/dcmtk/oflog/oflog.h                  |    6 +-
 oflog/include/dcmtk/oflog/spi/factory.h            |   10 +-
 oflog/include/dcmtk/oflog/spi/logevent.h           |    4 +-
 oflog/libsrc/Makefile.dep                          |  270 +-
 oflog/libsrc/appender.cc                           |   14 +-
 oflog/libsrc/hierarchy.cc                          |    4 +-
 oflog/libsrc/logevent.cc                           |    5 +-
 oflog/libsrc/oflog.cc                              |    8 +-
 oflog/libsrc/strcloc.cc                            |    6 +
 oflog/libsrc/striconv.cc                           |    6 +
 ofstd/CMakeLists.txt                               |    2 +-
 ofstd/include/CMakeLists.txt                       |    2 +-
 ofstd/include/dcmtk/ofstd/diag/overflow.def        |    6 +-
 ofstd/include/dcmtk/ofstd/ofalgo.h                 |    4 +-
 ofstd/include/dcmtk/ofstd/ofalign.h                |   48 +-
 ofstd/include/dcmtk/ofstd/ofaptr.h                 |  175 -
 ofstd/include/dcmtk/ofstd/ofchrenc.h               |    4 +-
 ofstd/include/dcmtk/ofstd/ofdefine.h               |    4 +-
 ofstd/include/dcmtk/ofstd/oferror.h                |  245 ++
 ofstd/include/dcmtk/ofstd/offile.h                 |   44 +-
 ofstd/include/dcmtk/ofstd/oflimits.h               |   40 +-
 ofstd/include/dcmtk/ofstd/oflist.h                 |    2 +-
 ofstd/include/dcmtk/ofstd/ofmap.h                  |    4 +-
 ofstd/include/dcmtk/ofstd/ofmem.h                  |    4 +-
 ofstd/include/dcmtk/ofstd/ofoption.h               |   18 +-
 ofstd/include/dcmtk/ofstd/ofstack.h                |    4 +-
 ofstd/include/dcmtk/ofstd/ofstd.h                  |   45 +-
 ofstd/include/dcmtk/ofstd/ofstream.h               |    4 +-
 ofstd/include/dcmtk/ofstd/ofstring.h               |    8 +-
 ofstd/include/dcmtk/ofstd/oftraits.h               |    4 +-
 ofstd/include/dcmtk/ofstd/oftuple.h                |   23 +-
 ofstd/include/dcmtk/ofstd/oftypes.h                |    6 +-
 ofstd/include/dcmtk/ofstd/ofutil.h                 |  205 +-
 ofstd/include/dcmtk/ofstd/ofvector.h               |    6 +-
 ofstd/include/dcmtk/ofstd/ofvriant.h               |    4 +-
 ofstd/include/dcmtk/ofstd/variadic/tuple.h         |   11 +
 ofstd/libsrc/CMakeLists.txt                        |    4 +-
 ofstd/libsrc/Makefile.dep                          |   47 +-
 ofstd/libsrc/Makefile.in                           |    3 +-
 ofstd/libsrc/ofchrenc.cc                           |   21 +
 ofstd/libsrc/oferror.cc                            |  205 ++
 ofstd/libsrc/ofstd.cc                              |   98 +-
 ofstd/libsrc/ofstring.cc                           |    6 +-
 ofstd/libsrc/ofthread.cc                           |   32 +-
 ofstd/libsrc/oftime.cc                             |   43 +-
 ofstd/libsrc/ofxml.cc                              |   18 +
 ofstd/tests/CMakeLists.txt                         |    4 +-
 ofstd/tests/Makefile.dep                           |   88 +-
 ofstd/tests/Makefile.in                            |    6 +-
 ofstd/tests/tatof.cc                               |    4 +-
 ofstd/tests/terror.cc                              |   94 +
 ofstd/tests/tests.cc                               |    1 +
 ofstd/tests/tofdatim.cc                            |    6 +-
 ofstd/tests/toption.cc                             |    4 +-
 ofstd/tests/tvec.cc                                |    8 +
 1098 files changed, 24405 insertions(+), 13439 deletions(-)

diff --git a/ANNOUNCE b/ANNOUNCE
index 4a26a22..0816365 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,29 +1,346 @@
-
--------------------------------------------------------------------------------
-  Since this is a development snapshot of the DCMTK, there is no public
-  announcement.  This file will be updated for the next official release.
--------------------------------------------------------------------------------
-
-
 ANNOUNCEMENT
 
-Version X.Y.Z of the OFFIS DCMTK (DICOM ToolKit) software is now available for
+Version 3.6.2 of the OFFIS DCMTK (DICOM ToolKit) software is now available for
 public release.  This release includes the following main changes over the
 previous version 3.6.0:
 
-  [...]
+- DCMTK 3.6.2 builds correctly on older and up-to-date versions of GNU gcc
+  (4.2.1 to 7.1.1) Clang (3.4.1 to 4.0.1),  Microsoft Visual Studio (2005 to
+  2017) and SunPro CC (5.14 and 5.15).
+
+- Tested with the following operating systems/environments:
+
+  - Android on arm64
+  - Cygwin on x86_64
+  - FreeBSD on x86_64
+  - Linux on x86_64 and x86
+  - MacOS X on x86_64
+  - NetBSD on x86_64
+  - OpenBSD on x86_64
+  - OpenIndiana on x86
+  - QNX on x86
+  - Solaris on x86
+  - Windows (and MinGW) on x86_64 and x86
+
+  For a complete list of tested systems and compilers, see the INSTALL file.
+
+- The CMake build system is now considered as mature as our GNU Autoconf
+  setup.  There are even some features that are only available when using CMake,
+  for example exporting the build configuration in order to easily integrate
+  DCMTK into other CMake based projects.
+
+- It is now possible to build shared libraries (Linux) resp. dynamic link
+  libraries (DLLs, Windows) using CMake and the "BUILD_SHARED_LIBS" option.
+  DCMTK can even be compiled into a single shared library (e.g. "dcmtk.dll")
+  using the "BUILD_SINGLE_SHARED_LIBRARY" option.
+
+- Added character set transcoding support:
+
+  - Support for converting DICOM files, datasets and element values between
+    different character sets (incl. code extension techniques).
+  - Windows-specific support for converting between wide character encoding and
+    e.g. UTF-8 or Latin-1.
+  - Support for wide character strings (UTF-16) used for filenames by the
+    Windows operating system.
+  - Supports replacing the underlying character set conversion implementation as
+    needed using either:
+    - GNU libiconv,
+    - International Components for Unicode (ICU) or
+    - the iconv functions from the C standard library.
+  - "dcmqrdb" allows matching queries with datasets using different character
+    sets and response conversion.
+
+- Integrated a unit test framework and added several unit tests to ensure that
+  basic functionality (e.g. parsing DICOM data, network transmission) will
+  never break.
+
+- Updated CharLS to version 1.0 and log4cplus to version 1.1.0.
+
+- Added cross compiling support for Windows and Android targets.  The Android
+  emulator and Wine have been integrated into our CMake setup for running the
+  run time configuration tests as required and (optionally) the unit tests.
+
+- Refactored native STL integration:
+
+  - Added arguments resp. variables to Autoconf and CMake replacing the old
+    macros for choosing whether to use DCMTK's fallback or the native
+    implementation of various STL features.  See the INSTALL file for more
+    information about this.
+  - Added configuration tests ensuring that the enabled STL features work as
+    expected/required before actually using them.
+  - Added unit tests to ensure whichever chosen implementation actually works.
+
+- Added support for several C++11 (and newer) features and fallback
+  implementations as required:
+
+  - Added arguments resp. variables to Autoconf and CMake for enabling native
+    C++11 support or DCMTK's own fallback implementations and workarounds.  See
+    the INSTALL file for more information.
+  - Added configuration tests that ensure that the compiler actually provides
+    C++11 support before using it.
+  - Added advanced memory management primitives OFunique_ptr and OFshared_ptr
+    to support users in writing memory leak free code.
+  - Added support for move semantics, e.g. to transfer the ownership of an
+    OFunique_ptr.
+  - Added OFnumeric_limits to query information about fundamental arithmetic
+    types.
+  - Added type traits (OFenable_if etc.) to support template meta-programing.
+  - Added OFtuple as a more generic alternative to OFPair.
+  - Added OFoptional to connect the state information of optional values with
+    the actual value, e.g. for being used as function return value.
+  - Added OFvariant, a type safe tagged union to store different objects in
+    a single variable (not simultaneously) depending on runtime requirements.
+  - Added unit tests to ensure all above mentioned features really work.
+
+- Introduced platform independent defines for suppressing inappropriate compiler
+  diagnostic output (i.e. "warnings").  This mechanism is used to locally
+  suppress warnings that originate from the compiler misinterpreting the authors
+  intention, e.g. warnings when intentionally mixing "class" and "struct" for
+  template specialization to save typing "public" and "private".
+
+- Introduced several new modules:
+
+  - "dcmrt"    - implements support for the DICOM Radiation Therapy IODs
+  - "dcmiod"   - eases IOD module composition and supports constraint checking
+                 when reading and writing IODs and their modules.
+  - "dcmfg"    - allows to represent Functional Groups in the source code.
+  - "dcmseg"   - implements the segmentation IOD based on "dcmiod" and "dcmfg".
+  - "dcmtract" - offers a dedicated API to create and read DICOM Tractography
+                 Results objects (introduced in DICOM Supplement 181).
+  - "dcmpmap"  - for creating, saving and loading DICOM Parametric Maps objects
+                 (introduced with Supplement 172).
+
+- Further enhanced DICOM Structured Reporting (SR) module "dcmsr":
+
+  - Added the "dcmsr/cmr" submodule implementing support for parts of the DICOM
+    Content Mapping Resource (DCMR).
+  - Added support for SR templates by introducing two general classes for root
+    and non-root templates.
+  - Also added support for CP-1031 (Support long code values) and CP-1417
+    (Clarify use and declaration of private mapping resource).
+  - Added support for the SR Template TID 1500 (Measurement Report) and included
+    subordinated Templates (e.g. TID 1001, 1204, 1600, 1411).
+  - Also added support for all required Context Groups and Code definitions, i.e.
+    from DICOM, NCIt, SNOMED, UCUM, and UMLS coding scheme.
+  - Added support for the new Acquisition Context SR IOD, Comprehensive 3D SR
+    IOD, Implantation Plan SR Document IOD, Radiopharmaceutical Radiation Dose
+    SR IOD, Simplified Adult Echo SR IOD and Spectacle Prescription Report IOD.
+  - Further improved handling of incorrectly encoded DICOM SR documents.
+  - Many further improvements in order to stay up-to-date with development of
+    the DICOM standard and to make it easier to create, read, write, and modify
+    SR documents.
+
+- Introduced several new command line tools:
+
+  - "getscu"   - a C-GET Service Class User.
+  - "dcmsend"  - a Simple Storage Service Class User, based on new class
+                 "DcmStorageSCU".
+  - "dcmrecv"  - alternative to storescp with focus on easy use, based on new
+                 class "DcmStorageSCP".
+  - "dcm2json" - converts DICOM files to DICOM's official JSON encoding.
+
+- Added threading functionality to DcmSCP via thread pool classes.
+
+- Added new output format to dcm2xml: the Native DICOM Model according to
+  part 19 of the DICOM standard ("Application Hosting").
+
+- Added support for 16 bits per sample to PNG image export.
+
+- Significantly enhanced performance of the DICOMDIR code for reading and
+  writing such files. Also added support for all new Directory Record Types.
+
+- Added support for new Return Key Attributes to the "wlmscpfs", which are
+  required for the IHE Eye Care Workflow.
+
+- Introduced advanced parameterization methods for DCMTLS.
+
+- Improved data dictionary configuration options and handling.
+
+- Added support for new Value Representations "Other Double" (OD), "Other Long"
+  (OL), "Unlimited Characters" (UC) and "Universal Resource Identifiers/Locators
+  (URI/URL)" (UR).
+
+- Added support for three new DICOS Storage SOP Classes from the DICOM-related
+  DICOS (Digital Imaging and Communications in Security) standard.
+
+- Added additional matching keys to dcmqrdb and dcmwlm: StudyDate, StudyTime and
+  IssuerOfPatientID.
+
+- Updated data dictionary, SOP Class and Transfer Syntax UIDs for the recently
+  approved changes to the DICOM standard (i.e. Supplements and CPs), up to DICOM
+  standard release DICOM 2017b.
+
+- Added support for additional MPEG4 transfer syntaxes to several command line
+  programs.
+
+- Enhanced support for DICOM Non-Patient Objects, e.g. allow for transferring
+  them using the standard networking tools.
+
+- DCMTK now supports compiling with OpenSSL 1.1.x; support for some older,
+  insecure TLS cipher suites has been removed.
+
+- The JPEG encoder now implements DICOM CP 1447, i.e. always writes a SOF1
+  marker into the JPEG bitstream in extended sequential mode.
+
+- The socket timeout used for send() and recv() is now configurable (at
+  runtime); further fixes and enhancements to networking basics.
+
+- Revised implementation of class OFCondition in order to avoid issues with
+  static initialization order.
+
+- Fixed various issues that occurred after the official 3.6.0 release.
+
 
 Many people have contributed to this new release of DCMTK, appearing here in
 alphabetical order.  Thank you very much for your support!
 
-  [...]
+  Alexander Haderer <alexander.haderer at loescap.de>
+  Alexander Karaivanov <alexander.karaivanov at karoshealth.com>
+  Andrei Terechko <andrei at vectorfabrics.com>
+  Andrey Fedorov <andrey.fedorov at gmail.com>
+  Anne-Gaelle Berge <anne-gaelle.berge at kereval.com>
+  Bhuvan Bose <bhuvanbose86 at gmail.com>
+  Bill Lorensen <bill.lorensen at gmail.com>
+  Brad Jascob <bjascob at msn.com>
+  Bruno Milutin <bmilutin at digithurst.de>
+  Carmen Avram <carmen at pixeldata.ro>
+  Christian Fremgen <Christian.Fremgen at ith-icoserve.com>
+  Christian Herz <cherz at bwh.harvard.edu>
+  Christian Wetzel <wetzel at phoenix-pacs.de>
+  Daniele Giunchi <d.giunchi at scsitaly.com>
+  David Clunie <dclunie at dclunie.com>
+  Detlev Hohmeier <detlev.hohmeier at meditec.zeiss.com>
+  Dimitri Papadopoulos <dimitri.papadopoulos at cea.fr>
+  Dr. Martin Korp <Martin.Korp at ith-icoserve.com>
+  Dr. Michael Heber <mheber.aup at t-online.de>
+  Eric A. Borisch <eborisch at macports.org>
+  David Flade <fladedavid at gmail.com>
+  Fred Stegemann <fred.stegemann at fstsoft.de>
+  Fu Peng <fupeng at gmail.com>
+  Gareth Sylvester-Bradley <garethsb at gmail.com>
+  Gary Carter <gary.carter at eigen.com>
+  Gigante <fgigante at imsitaly.com>
+  Grzegorz Chlebus <grzegorz.chlebus at mevis.fraunhofer.de>
+  Hanno Hugenberg <hanno.hugenberg at gkmedsys.de>
+  Hans J. Johnson <hans-johnson at uiowa.edu>
+  Hans Kluijtmans <hans.kluijtmans at topcon.eu>
+  Hector Marco <hecmargi at upv.es>
+  Heyo Spekker <spekker at icsmed.de>
+  Hüseyin Kozan <posta at huseyinkozan.com.tr>
+  Ing-Long Eric Kuo <draconpern at hotmail.com>
+  Jean-Christophe Fillion-Robin <jchris.fillionr at kitware.com>
+  Jeroen Eggermont <J.Eggermont at lumc.nl>
+  John Stark <jstark at therapixel.com>
+  Julien Finet <julien.finet at kitware.com>
+  Kent Williams <norman-k-williams at uiowa.edu>
+  Kornelius Sohn <k.sohn at starc-medical.de>
+  Lin Qi Ruan <rlq1969612634 at gmail.com>
+  Marco Nolden <m.nolden at dkfz-heidelberg.de>
+  Mario Ceresa <mrceresa at gmail.com>
+  Markus Konrad <markus.konrad at et-innovations.org>
+  Markus Mertens <markus.mertens at evkb.de>
+  Martin Wenger <Martin.Wenger at klinikum-hef.de>
+  Mathieu Malaterre <mathieu.malaterre at gmail.com>
+  Matt McCormick <matt.mccormick at kitware.com>
+  Michael Knopke <knopkem at gmail.com>
+  Michael Schinner <Michael.Schinner at ith-icoserve.com>
+  Michal Spacek <tupinek at gmail.com>
+  Niels Dekker <C.E.Dekker at lumc.nl>
+  Paolo Marcheschi <paolo.marcheschi at ftgm.it>
+  Per Inge Mathisen <perim at sonowand.com>
+  Peter Hille <peter at das-system-networks.de>
+  Peter Klotz <Peter.Klotz at ith-icoserve.com>
+  Pietro Cerutti <gahr at FreeBSD.org>
+  Rasmus Christian Pedersen <zerhacken at yahoo.com>
+  Richard Flay <richardf at acres.com.au>
+  Robert Habrich <habrich at image-systems.biz>
+  Stacy Loesch <Stacy.Loesch at varian.com>
+  Takeo Satomi <takeo.satomi at gmail.com>
+  Tamas Nemeth <tnemeth at erad.com>
+  Thomas Puckett <puckett_thomas at hotmail.com>
+  Thomas Sondergaard <thomas.sondergaard at karoshealth.com>
+  Tiago D'Agostini <tiago.dagostini at pixeon.com>
+  Tilman Vogel <tilman at circlecvi.com>
+  Timothy Pitt <tim at vaquita.co.uk>
+  Waldir Pimenta <waldir.pimenta at gmail.com>
+  Wang Qiang <wq_net at 163.com>
+  Yves Neumann <neumann at image-systems.biz>
+
+  Forum user "AlexanderLysenko"
+  Forum user "andreasb"
+  Forum user "angad"
+  Forum user "aprogrammer"
+  Forum user "bibble_235"
+  Forum user "budric"
+  Forum user "chaircrusher"
+  Forum user "coach4ae"
+  Forum user "dimitri"
+  Forum user "flang"
+  Forum user "Geof"
+  Forum user "gerhardh"
+  Forum user "ghleclerc"
+  Forum user "HackerNeo"
+  Forum user "henry"
+  Forum user "Hua Cong Danh"
+  Forum user "ichimura.t"
+  Forum user "ionut.vaida"
+  Forum user "jacobf"
+  Forum user "jacobscolin"
+  Forum user "jakecobb"
+  Forum user "kosborn"
+  Forum user "kron24"
+  Forum user "lars_matthaeus"
+  Forum user "Luuk"
+  Forum user "maleike"
+  Forum user "martinrame"
+  Forum user "Matterhorn"
+  Forum user "merlin"
+  Forum user "michael12345"
+  Forum user "nikkoara"
+  Forum user "nmoraes"
+  Forum user "oblivion81"
+  Forum user "oxymoron"
+  Forum user "Paul Groot"
+  Forum user "Per"
+  Forum user "poupofa"
+  Forum user "psih128"
+  Forum user "Rich in Soquel"
+  Forum user "sfzhang"
+  Forum user "Shaeto"
+  Forum user "spasmous"
+  Forum user "st80rules"
+  Forum user "Tim"
+  Forum user "tpalagyi"
+  Forum user "vlad"
+  Forum user "vsalomoni"
+  Forum user "wollet88"
+  Forum user "wrenashe"
+  Forum user "xcoder"
+  Forum user "ymartelli"
+  Forum user "yueran"
+  Forum user "Yves Neumann"
+  Forum user "zaq"
+
+Members of the DCMTK Team who have worked on this release are
+(in alphabetical order):
+
+  Marco Eichelberg <eichelberg at offis.de>
+  Michael Onken <onken at open-connections.de>
+  Joerg Riesmeier <dicom at jriesmeier.com>
+  Jan Schlamelcher <schlamelcher at offis.de>
+
+Student associates:
 
-Members of the OFFIS DICOM Team who have worked on this release are:
+  Nikolas Goldhammer <nikolasgoldhammer at gmail.com>
+  Sebastian Grallert <Grallert.Sebastian at web.de>
+  Thorben Hasenpusch <tpuschel at fastmail.com>
+  Uli Schlachter <psychon at znc.in>
 
-  [...]
+Also see CREDITS file for projects and companies who have been generously
+supporting DCMTK.
 
 The DCMTK software can be downloaded via:
 
   http://dicom.offis.de/dcmtk or http://www.dcmtk.org/
 
-OFFIS e.V., Oldenburg, Germany, 2011-02-01
+OFFIS e.V., Oldenburg, Germany, 2017-07-14
diff --git a/CHANGES b/CHANGES
index 1eb7feb..b7fc065 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,10 +3,10 @@ In earlier versions of DCMTK, changes between releases had been documented in a
 CHANGES.XXX file inside DCMTK's main directory.
 
 Now, the CHANGES.XXX file has been moved to the dcmtk/doc folder with the latest
-one being updated every time that a new snapshot is released. Thus it always
-contains all DCMTK changes between the last DCMTK release and the latest
-snapshot.
+one being updated every time that a new DCMTK version is released.  Thus it
+always contains all DCMTK changes between the last DCMTK release and the most
+recent one.
 
 For very recent changes, i. e. those changes to DCMTK that have been applied
-after release of the latest snapshot, see the DCMTK git repository log at
+after the most recent release, see the DCMTK git repository log at
 http://git.dcmtk.org/ .
diff --git a/CMake/3rdparty.cmake b/CMake/3rdparty.cmake
index eedce5f..8caa1d9 100644
--- a/CMake/3rdparty.cmake
+++ b/CMake/3rdparty.cmake
@@ -5,42 +5,44 @@ IF(WIN32 AND NOT MINGW)
   # website (pre-built).
 
   # libxml support: find out whether user has library
-  GET_FILENAME_COMPONENT(LIBXML_DIR "${DCMTK_SOURCE_DIR}/../libxml2-2.7.7" ABSOLUTE)
+  FILE(GLOB LIBXML_DIR "${DCMTK_SOURCE_DIR}/../libxml2*")
   FIND_PATH(WITH_LIBXMLINC "/include/libxml/parser.h" "${LIBXML_DIR}" NO_DEFAULT_PATH)
 
   # libpng support: find out whether user has library
-  GET_FILENAME_COMPONENT(LIBPNG_DIR "${DCMTK_SOURCE_DIR}/../libpng-1.4.2" ABSOLUTE)
+  FILE(GLOB LIBPNG_DIR "${DCMTK_SOURCE_DIR}/../libpng*")
   FIND_PATH(WITH_LIBPNGINC "include/png.h" "${LIBPNG_DIR}" NO_DEFAULT_PATH)
 
   # libtiff support: find out whether user has library
-  GET_FILENAME_COMPONENT(LIBTIFF_DIR "${DCMTK_SOURCE_DIR}/../tiff-3.9.2" ABSOLUTE)
+  FILE(GLOB LIBTIFF_DIR "${DCMTK_SOURCE_DIR}/../libtiff*")
   FIND_PATH(WITH_LIBTIFFINC "include/tiff.h" "${LIBTIFF_DIR}" NO_DEFAULT_PATH)
 
   # OpenSSL support: find out whether user has library
-  GET_FILENAME_COMPONENT(OPENSSL_DIR "${DCMTK_SOURCE_DIR}/../openssl-1.0.0" ABSOLUTE)
+  FILE(GLOB OPENSSL_DIR "${DCMTK_SOURCE_DIR}/../openssl*")
   FIND_PATH(WITH_OPENSSLINC "include/openssl/ssl.h" "${OPENSSL_DIR}" NO_DEFAULT_PATH)
 
   # zlib support: find out whether user has library
-  GET_FILENAME_COMPONENT(ZLIB_DIR "${DCMTK_SOURCE_DIR}/../zlib-1.2.5" ABSOLUTE)
+  FILE(GLOB ZLIB_DIR "${DCMTK_SOURCE_DIR}/../zlib*")
   FIND_PATH(WITH_ZLIBINC "include/zlib.h" "${ZLIB_DIR}" NO_DEFAULT_PATH)
 
   # sndfile support: find out whether user has library. Needed for module dcmwave (not in public DCMTK yet, marked as advanced)
-  GET_FILENAME_COMPONENT(SNDFILE_DIR "${DCMTK_SOURCE_DIR}/../libsndfile-1.0.17" ABSOLUTE)
+  FILE(GLOB SNDFILE_DIR "${DCMTK_SOURCE_DIR}/../libsndfile*")
   FIND_PATH(WITH_SNDFILEINC "sndfile.h" "${SNDFILE_DIR}" NO_DEFAULT_PATH)
   MARK_AS_ADVANCED(SNDFILE_DIR WITH_SNDFILEINC)
 
   # libiconv support: find out whether user has library
-  GET_FILENAME_COMPONENT(LIBICONV_DIR "${DCMTK_SOURCE_DIR}/../libiconv-1.14" ABSOLUTE)
+  FILE(GLOB LIBICONV_DIR "${DCMTK_SOURCE_DIR}/../libiconv*")
   FIND_PATH(WITH_LIBICONVINC "include/iconv.h" "${LIBICONV_DIR}" NO_DEFAULT_PATH)
 
   # libxml support: configure compiler
   IF(DCMTK_WITH_XML)
     IF(WITH_LIBXMLINC)
-      SET(LIBXML_INCDIR ${WITH_LIBXMLINC}/include)
-      SET(LIBXML_LIBDIR ${WITH_LIBXMLINC}/lib)
-      SET(LIBXML_LIBS debug ${LIBXML_LIBDIR}/libxml2_d.lib optimized ${LIBXML_LIBDIR}/libxml2_o.lib debug ${LIBXML_LIBDIR}/iconv_d.lib optimized ${LIBXML_LIBDIR}/iconv_o.lib)
+      SET(LIBXML_INCDIR "${WITH_LIBXMLINC}/include")
+      SET(LIBXML_LIBDIR "${WITH_LIBXMLINC}/lib")
+      SET(LIBXML_LIBS debug "${LIBXML_LIBDIR}/libxml2_d.lib" optimized "${LIBXML_LIBDIR}/libxml2_o.lib" debug "${LIBXML_LIBDIR}/iconv_d.lib" optimized "${LIBXML_LIBDIR}/iconv_o.lib")
       MESSAGE(STATUS "Info: DCMTK XML support will be enabled")
       SET(WITH_LIBXML 1)
+      # this hides some warnings that are emitted when linking against libxmlXXX.lib instead of linking the DLL directly
+      ADD_DEFINITIONS("-DLIBXML_STATIC")
     ELSE(WITH_LIBXMLINC) # turn off library if library path not set
       MESSAGE(STATUS "Warning: XML support will be disabled because libxml2 directory is not specified. Correct path and re-enable DCMTK_WITH_XML.")
       SET(DCMTK_WITH_XML OFF CACHE BOOL "" FORCE)
@@ -51,9 +53,9 @@ IF(WIN32 AND NOT MINGW)
   # libpng support: configure compiler
   IF(DCMTK_WITH_PNG)
     IF(WITH_LIBPNGINC)
-      SET(LIBPNG_INCDIR ${WITH_LIBPNGINC}/include)
-      SET(LIBPNG_LIBDIR ${WITH_LIBPNGINC}/lib)
-      SET(LIBPNG_LIBS debug ${LIBPNG_LIBDIR}/libpng_d.lib optimized ${LIBPNG_LIBDIR}/libpng_o.lib)
+      SET(LIBPNG_INCDIR "${WITH_LIBPNGINC}/include")
+      SET(LIBPNG_LIBDIR "${WITH_LIBPNGINC}/lib")
+      SET(LIBPNG_LIBS debug "${LIBPNG_LIBDIR}/libpng_d.lib" optimized "${LIBPNG_LIBDIR}/libpng_o.lib")
       MESSAGE(STATUS "Info: DCMTK PNG support will be enabled")
       SET(WITH_LIBPNG 1)
     ELSE(WITH_LIBPNGINC) # turn off library if library path not set
@@ -66,9 +68,9 @@ IF(WIN32 AND NOT MINGW)
   # libtiff support: configure compiler
   IF(DCMTK_WITH_TIFF)
     IF(WITH_LIBTIFFINC)
-      SET(LIBTIFF_INCDIR ${WITH_LIBTIFFINC}/include)
-      SET(LIBTIFF_LIBDIR ${WITH_LIBTIFFINC}/lib)
-      SET(LIBTIFF_LIBS debug ${LIBTIFF_LIBDIR}/libtiff_d.lib optimized ${LIBTIFF_LIBDIR}/libtiff_o.lib)
+      SET(LIBTIFF_INCDIR "${WITH_LIBTIFFINC}/include")
+      SET(LIBTIFF_LIBDIR "${WITH_LIBTIFFINC}/lib")
+      SET(LIBTIFF_LIBS debug "${LIBTIFF_LIBDIR}/libtiff_d.lib" optimized "${LIBTIFF_LIBDIR}/libtiff_o.lib")
       MESSAGE(STATUS "Info: DCMTK TIFF support will be enabled")
       SET(WITH_LIBTIFF 1)
     ELSE(WITH_LIBTIFFINC) # turn off library if library path not set
@@ -81,10 +83,10 @@ IF(WIN32 AND NOT MINGW)
   # OpenSSL support: configure compiler
   IF(DCMTK_WITH_OPENSSL)
     IF(WITH_OPENSSLINC)
-      SET(OPENSSL_BINDIR ${WITH_OPENSSLINC}/bin)
-      SET(OPENSSL_INCDIR ${WITH_OPENSSLINC}/include)
-      SET(OPENSSL_LIBDIR ${WITH_OPENSSLINC}/lib)
-      SET(OPENSSL_LIBS debug ${OPENSSL_LIBDIR}/dcmtkssl_d.lib optimized ${OPENSSL_LIBDIR}/dcmtkssl_o.lib debug ${OPENSSL_LIBDIR}/dcmtkeay_d.lib optimized ${OPENSSL_LIBDIR}/dcmtkeay_o.lib)
+      SET(OPENSSL_BINDIR "${WITH_OPENSSLINC}/bin")
+      SET(OPENSSL_INCDIR "${WITH_OPENSSLINC}/include")
+      SET(OPENSSL_LIBDIR "${WITH_OPENSSLINC}/lib")
+      SET(OPENSSL_LIBS debug "${OPENSSL_LIBDIR}/dcmtkssl_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkssl_o.lib" debug "${OPENSSL_LIBDIR}/dcmtkcrypto_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkcrypto_o.lib")
       MESSAGE(STATUS "Info: DCMTK OPENSSL support will be enabled")
       SET(WITH_OPENSSL 1)
     ELSE(WITH_OPENSSLINC) # turn off library if library path not set
@@ -97,9 +99,9 @@ IF(WIN32 AND NOT MINGW)
   # zlib support: configure compiler
   IF(DCMTK_WITH_ZLIB)
     IF(WITH_ZLIBINC)
-      SET(ZLIB_INCDIR ${WITH_ZLIBINC}/include)
-      SET(ZLIB_LIBDIR ${WITH_ZLIBINC}/lib)
-      SET(ZLIB_LIBS debug ${ZLIB_LIBDIR}/zlib_d.lib optimized ${ZLIB_LIBDIR}/zlib_o.lib)
+      SET(ZLIB_INCDIR "${WITH_ZLIBINC}/include")
+      SET(ZLIB_LIBDIR "${WITH_ZLIBINC}/lib")
+      SET(ZLIB_LIBS debug "${ZLIB_LIBDIR}/zlib_d.lib" optimized "${ZLIB_LIBDIR}/zlib_o.lib")
       MESSAGE(STATUS "Info: DCMTK ZLIB support will be enabled")
       SET(WITH_ZLIB 1)
     ELSE(WITH_ZLIBINC) # turn off library if library path not set
@@ -112,9 +114,9 @@ IF(WIN32 AND NOT MINGW)
   # sndfile support: configure compiler
   IF(DCMTK_WITH_SNDFILE)
     IF(WITH_SNDFILEINC)
-      SET(SNDFILE_INCDIR ${WITH_SNDFILEINC}/include)
-      SET(SNDFILE_LIBDIR ${WITH_SNDFILEINC}/lib)
-      SET(SNDFILE_LIBS debug ${SNDFILE_LIBDIR}/libsndfile_d.lib optimized ${SNDFILE_LIBDIR}/libsndfile_o.lib)
+      SET(SNDFILE_INCDIR "${WITH_SNDFILEINC}/include")
+      SET(SNDFILE_LIBDIR "${WITH_SNDFILEINC}/lib")
+      SET(SNDFILE_LIBS debug "${SNDFILE_LIBDIR}/libsndfile_d.lib" optimized "${SNDFILE_LIBDIR}/libsndfile_o.lib")
       MESSAGE(STATUS "Info: DCMTK SNDFILE support will be enabled")
       SET(WITH_SNDFILE 1)
     ELSE(WITH_SNDFILEINC) # turn off library if library path not set
@@ -127,9 +129,9 @@ IF(WIN32 AND NOT MINGW)
   # libiconv support: configure compiler
   IF(DCMTK_WITH_ICONV)
     IF(WITH_LIBICONVINC)
-      SET(LIBICONV_INCDIR ${WITH_LIBICONVINC}/include)
-      SET(LIBICONV_LIBDIR ${WITH_LIBICONVINC}/lib)
-      SET(LIBICONV_LIBS debug ${LIBICONV_LIBDIR}/libiconv_d.lib optimized ${LIBICONV_LIBDIR}/libiconv_o.lib)
+      SET(LIBICONV_INCDIR "${WITH_LIBICONVINC}/include")
+      SET(LIBICONV_LIBDIR "${WITH_LIBICONVINC}/lib")
+      SET(LIBICONV_LIBS debug "${LIBICONV_LIBDIR}/libiconv_d.lib" optimized "${LIBICONV_LIBDIR}/libiconv_o.lib")
       MESSAGE(STATUS "Info: DCMTK ICONV support will be enabled")
       SET(WITH_LIBICONV 1)
     ELSE(WITH_LIBICONVINC) # turn off library if library path not set
@@ -281,7 +283,7 @@ IF(NOT DEFINED DCMTK_WITH_STDLIBC_ICONV)
 ENDIF(NOT DEFINED DCMTK_WITH_STDLIBC_ICONV)
 
 IF(DCMTK_WITH_ICU)
-  FIND_PACKAGE(ICU)
+  FIND_PACKAGE(ICU COMPONENTS uc data QUIET)
   IF(NOT ICU_FOUND)
     MESSAGE(STATUS "Warning: ICU support will be disabled because the ICU were not found.")
     SET(DCMTK_WITH_ICU OFF CACHE BOOL "" FORCE)
diff --git a/CMake/CTest/CTestCustom.cmake b/CMake/CTest/CTestCustom.cmake
deleted file mode 100644
index d8f051d..0000000
--- a/CMake/CTest/CTestCustom.cmake
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# This file is run prior to the unit tests for preparing the testing
-# environment. Currently only required / necessary for running the
-# tests on the Android device emulator.
-#
-
-# Restore the required settings of the CMake configuration step
-INCLUDE(dcmtkCTestConfig.cmake NO_POLICY_SCOPE)
-
-# Emulate some required CMake commands while running inside CTest
-INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/CTest/dcmtkCTestMacros.cmake)
-
-# Prepare the Android testing environment
-IF(ANDROID)
-    # Load required functions for controlling the Android device emulator
-    INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake)
-
-    # Prepare the emulator
-    DCMTK_ANDROID_START_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE)
-    DCMTK_ANDROID_WAIT_FOR_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE)
-
-    # Get the emulator's name for emitting a shutdown command when done
-    DCMTK_ANDROID_GET_OBJECT_PROPERTIES(DCMTK_ANDROID_EMULATOR_INSTANCE)
-    DCMTK_ANDROID_STOP_EMULATOR_COMMAND(STOP_EMULATOR ${EMULATOR_NAME})
-    DCMTK_ANDROID_EMULATOR_SHUTDOWN_MESSAGE(STOP_MESSAGE)
-    MESSAGE_COMMAND(STOP_MESSAGE ${STOP_MESSAGE})
-    # CTEST_CUSTOM_POST_TESTS executes a sequence of 'non CMake' commands separated
-    # by ';' characters. Therefore the sequence a single command consists of must
-    # be translated appropriately first
-    STRING(REPLACE ";" " " STOP_EMULATOR "${STOP_EMULATOR}")
-    STRING(REPLACE ";" " " STOP_MESSAGE "${STOP_MESSAGE}")
-    SET(CLEANUP_COMMAND "${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkCTestRunAndroid.cmake")
-    # Register the cleanup hooks
-    SET(CTEST_CUSTOM_POST_TEST "${CLEANUP_COMMAND}" "${STOP_MESSAGE}" "${STOP_EMULATOR}")
-
-    # Prepare the test script, most importantly set the current emulator instance handle
-    CONFIGURE_FILE(
-        ${DCMTK_CMAKE_INCLUDE}CMake/CTest/dcmtkCTestRunAndroid.cmake.in
-        ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkCTestRunAndroid.cmake
-        @ONLY
-    )
-
-    # Collect the list of required libraries
-    IF(BUILD_SHARED_LIBS)
-        FOREACH(LIBRARY ${DCMTK_ALL_LIBRARIES})
-            LIST(APPEND DCMTK_CREATED_SHARED_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_PACKAGE_VERSION})
-        ENDFOREACH()
-    ENDIF(BUILD_SHARED_LIBS)
-
-    # Transmit the required executables and libraries to the emulator
-    DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE
-        ${ANDROID_RUNTIME_LIBRARIES}
-        ${DCMTK_LIBRARY_DEPENDENCIES}
-        ${DCMTK_CREATED_SHARED_LIBRARIES}
-        ${DCMTK_TEST_EXECUTABLES}
-        DESTINATION ${ANDROID_TEMPORARY_FILES_LOCATION}
-    )
-
-    # Set executable permissions
-    FOREACH(TEST_EXECUTABLE ${DCMTK_TEST_EXECUTABLES})
-        GET_FILENAME_COMPONENT(NAME ${TEST_EXECUTABLE} NAME)
-        DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE
-            COMMAND chmod 755 ${ANDROID_TEMPORARY_FILES_LOCATION}/${NAME}
-            OUTPUT_QUIET
-            ERROR_QUIET
-        )
-    ENDFOREACH()
-
-    # Create necessary softlinks
-    IF(BUILD_SHARED_LIBS)
-        FOREACH(LIBRARY ${DCMTK_ALL_LIBRARIES})
-            DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE
-            COMMAND ln -s ./${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_PACKAGE_VERSION} ${ANDROID_TEMPORARY_FILES_LOCATION}/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_ABI_VERSION}
-            OUTPUT_QUIET
-            ERROR_QUIET
-            )
-        ENDFOREACH()
-    ENDIF(BUILD_SHARED_LIBS)
-ENDIF(ANDROID)
diff --git a/CMake/CTest/CTestCustomAndroid.cmake.in b/CMake/CTest/CTestCustomAndroid.cmake.in
new file mode 100644
index 0000000..2b93e0b
--- /dev/null
+++ b/CMake/CTest/CTestCustomAndroid.cmake.in
@@ -0,0 +1,98 @@
+#
+# This file is run prior to the unit tests for preparing the testing
+# environment. Currently only required / necessary for running the
+# tests on the Android device emulator.
+#
+
+# Restore the required settings of the CMake configuration step
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+SET(CMAKE_COMMAND "@CMAKE_COMMAND@")
+SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
+SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_BINARY_DIR@")
+SET(CMAKE_FILES_DIRECTORY "@CMAKE_FILES_DIRECTORY@")
+SET(CMAKE_MODULE_PATH "@CMAKE_ROOT@/Modules")
+SET(CMAKE_SHARED_LIBRARY_PREFIX "@CMAKE_SHARED_LIBRARY_PREFIX@")
+SET(CMAKE_SHARED_LIBRARY_SUFFIX "@CMAKE_SHARED_LIBRARY_SUFFIX@")
+SET(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@")
+SET(DCMTK_CMAKE_INCLUDE "@CMAKE_SOURCE_DIR@/@DCMTK_CMAKE_INCLUDE@")
+SET(DCMTK_TEST_EXECUTABLES "@DCMTK_TEST_EXECUTABLES@")
+SET(DCMTK_ALL_LIBRARIES "@DCMTK_ALL_LIBRARIES@")
+SET(DCMTK_LIBRARY_DEPENDENCIES "@DCMTK_LIBRARY_DEPENDENCIES@")
+SET(DCMTK_PACKAGE_VERSION "@DCMTK_PACKAGE_VERSION@")
+SET(DCMTK_ABI_VERSION "@DCMTK_ABI_VERSION@")
+SET(BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
+SET(DCMTK_DICOM_DICTIONARIES "@DCMTK_DICOM_DICTIONARIES@")
+SET(ANDROID "@ANDROID@")
+SET(ANDROID_ADB_PROGRAM "@ANDROID_ADB_PROGRAM@")
+SET(ANDROID_ANDROID_PROGRAM "@ANDROID_ANDROID_PROGRAM@")
+SET(ANDROID_EMULATOR_PROGRAM "@ANDROID_EMULATOR_PROGRAM@")
+SET(ANDROID_EMULATOR_AVD "@ANDROID_EMULATOR_AVD@")
+SET(ANDROID_RUNTIME_LIBRARIES "@ANDROID_RUNTIME_LIBRARIES@")
+SET(ANDROID_TEMPORARY_FILES_LOCATION "@ANDROID_TEMPORARY_FILES_LOCATION@")
+# Emulate some required CMake commands while running inside CTest
+INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/CTest/dcmtkCTestMacros.cmake)
+# For DCMTK_UNSET_XXX
+INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkMacros.cmake)
+# Load required functions for controlling the Android device emulator
+INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake)
+
+# Prepare the Android testing environment
+# Prepare the emulator
+DCMTK_ANDROID_START_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE)
+DCMTK_ANDROID_WAIT_FOR_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE)
+
+# Get the emulator's name for emitting a shutdown command when done
+DCMTK_ANDROID_GET_OBJECT_PROPERTIES(DCMTK_ANDROID_EMULATOR_INSTANCE)
+DCMTK_ANDROID_STOP_EMULATOR_COMMAND(STOP_EMULATOR "${EMULATOR_NAME}")
+DCMTK_ANDROID_EMULATOR_SHUTDOWN_MESSAGE(STOP_MESSAGE)
+# Note: no quotation marks around STOP_MESSAGE, since it contains the message
+#       and the message type (e.g. STATUS)
+MESSAGE_COMMAND(STOP_MESSAGE ${STOP_MESSAGE})
+# CTEST_CUSTOM_POST_TESTS executes a sequence of 'non CMake' commands separated
+# by ';' characters. Therefore the sequence a single command consists of must
+# be translated appropriately first
+STRING(REPLACE ";" " " STOP_EMULATOR "${STOP_EMULATOR}")
+STRING(REPLACE ";" " " STOP_MESSAGE "${STOP_MESSAGE}")
+# Register the cleanup hooks
+SET(CTEST_CUSTOM_POST_TEST "${STOP_MESSAGE}" "${STOP_EMULATOR}")
+
+# Set the current emulator instance handle via an environment variable
+SET(ENV{DCMTK_ANDROID_EMULATOR_INSTANCE} "${DCMTK_ANDROID_EMULATOR_INSTANCE}")
+
+# Collect the list of required libraries
+IF(BUILD_SHARED_LIBS)
+    FOREACH(LIBRARY ${DCMTK_ALL_LIBRARIES})
+        LIST(APPEND DCMTK_CREATED_SHARED_LIBRARIES "${CMAKE_BINARY_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_PACKAGE_VERSION}")
+    ENDFOREACH()
+ENDIF(BUILD_SHARED_LIBS)
+
+# Transmit the required executables, libraries and dictionaries to the emulator
+DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE
+    ${ANDROID_RUNTIME_LIBRARIES}
+    ${DCMTK_LIBRARY_DEPENDENCIES}
+    ${DCMTK_CREATED_SHARED_LIBRARIES}
+    ${DCMTK_TEST_EXECUTABLES}
+    ${DCMTK_DICOM_DICTIONARIES}
+    DESTINATION ${ANDROID_TEMPORARY_FILES_LOCATION}
+)
+
+# Set executable permissions
+FOREACH(TEST_EXECUTABLE ${DCMTK_TEST_EXECUTABLES})
+    GET_FILENAME_COMPONENT(NAME "${TEST_EXECUTABLE}" NAME)
+    DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE
+        COMMAND chmod 755 "${ANDROID_TEMPORARY_FILES_LOCATION}/${NAME}"
+        OUTPUT_QUIET
+        ERROR_QUIET
+    )
+ENDFOREACH()
+
+# Create necessary softlinks
+IF(BUILD_SHARED_LIBS)
+    FOREACH(LIBRARY ${DCMTK_ALL_LIBRARIES})
+        DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE
+        COMMAND ln -s "./${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_PACKAGE_VERSION}" "${ANDROID_TEMPORARY_FILES_LOCATION}/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_ABI_VERSION}"
+        OUTPUT_QUIET
+        ERROR_QUIET
+        )
+    ENDFOREACH()
+ENDIF(BUILD_SHARED_LIBS)
diff --git a/CMake/CTest/CTestCustomWine.cmake.in b/CMake/CTest/CTestCustomWine.cmake.in
new file mode 100644
index 0000000..4ec2eb3
--- /dev/null
+++ b/CMake/CTest/CTestCustomWine.cmake.in
@@ -0,0 +1,17 @@
+#
+# This file ensures that the wineserver is spawned before running the unit
+# tests, such that CTest will not attach itself to it. This is an ugly hack
+# workaround, but what can you do?
+#
+
+SET(ENV{WINEPREFIX} "@DCMTK_WINEPREFIX@")
+SET(ENV{DCMDICTPATH} "@DCMDICTPATH@")
+SET(WINE_WINE_PROGRAM "@WINE_WINE_PROGRAM@")
+
+# spawn the winserver using 'cmd /C call' -> effectively NOP
+# spawn it using 'sh', such that this script does not attach itself to it.
+EXECUTE_PROCESS(COMMAND
+    sh -c "\"${WINE_WINE_PROGRAM}\" cmd /C call"
+    OUTPUT_FILE "/dev/null"
+    ERROR_FILE "/dev/null"
+)
diff --git a/CMake/CTest/dcmtkCTestConfig.cmake.in b/CMake/CTest/dcmtkCTestConfig.cmake.in
deleted file mode 100644
index 69ae53b..0000000
--- a/CMake/CTest/dcmtkCTestConfig.cmake.in
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# This file is used to recover the necessary CMake cache variables while
-# running the unit tests.
-#
-
-# Minimum CMake version required
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-SET(CMAKE_COMMAND "@CMAKE_COMMAND@")
-SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
-SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_BINARY_DIR@")
-SET(CMAKE_FILES_DIRECTORY "@CMAKE_FILES_DIRECTORY@")
-SET(CMAKE_MODULE_PATH "@CMAKE_ROOT@/Modules")
-SET(CMAKE_SHARED_LIBRARY_PREFIX "@CMAKE_SHARED_LIBRARY_PREFIX@")
-SET(CMAKE_SHARED_LIBRARY_SUFFIX "@CMAKE_SHARED_LIBRARY_SUFFIX@")
-SET(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@")
-SET(DCMTK_CMAKE_INCLUDE "@CMAKE_SOURCE_DIR@/@DCMTK_CMAKE_INCLUDE@")
-SET(DCMTK_TEST_EXECUTABLES "@DCMTK_TEST_EXECUTABLES@")
-SET(DCMTK_ALL_LIBRARIES "@DCMTK_ALL_LIBRARIES@")
-SET(DCMTK_LIBRARY_DEPENDENCIES "@DCMTK_LIBRARY_DEPENDENCIES@")
-SET(DCMTK_PACKAGE_VERSION "@DCMTK_PACKAGE_VERSION@")
-SET(DCMTK_ABI_VERSION "@DCMTK_ABI_VERSION@")
-SET(BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
-
-# Variables used when cross compiling for Android, will be unset otherwise
-SET(ANDROID "@ANDROID@")
-IF(ANDROID)
-  SET(ANDROID_ADB_PROGRAM "@ANDROID_ADB_PROGRAM@")
-  SET(ANDROID_ANDROID_PROGRAM "@ANDROID_ANDROID_PROGRAM@")
-  SET(ANDROID_EMULATOR_PROGRAM "@ANDROID_EMULATOR_PROGRAM@")
-  SET(ANDROID_EMULATOR_AVD "@ANDROID_EMULATOR_AVD@")
-  SET(ANDROID_RUNTIME_LIBRARIES "@ANDROID_RUNTIME_LIBRARIES@")
-  SET(ANDROID_TEMPORARY_FILES_LOCATION "@ANDROID_TEMPORARY_FILES_LOCATION@")
-ELSE(ANDROID)
-  UNSET(ANDROID)
-ENDIF(ANDROID)
diff --git a/CMake/CTest/dcmtkCTestRun.cmake.in b/CMake/CTest/dcmtkCTestRun.cmake.in
new file mode 100644
index 0000000..603f726
--- /dev/null
+++ b/CMake/CTest/dcmtkCTestRun.cmake.in
@@ -0,0 +1,18 @@
+#
+# This file is used to executed given unit test commands locally, handling
+# additional arguments like 'exhaustive' and setting the DCMDICTPATH
+# environment variable appropriately.
+#
+
+SET(ENV{DCMDICTPATH} "@DCMDICTPATH@")
+
+EXECUTE_PROCESS(COMMAND
+    "${DCMTK_CTEST_TESTCASE_COMMAND}" ${DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}"
+    RESULT_VARIABLE RESULT
+)
+
+# We cannot forward the result value to CMake, so print it instead and let CMake
+# return with code '1' or whatever it deems appropriate to notify about an error.
+IF(RESULT)
+    MESSAGE(FATAL_ERROR "Test command returned: ${RESULT}")
+ENDIF()
diff --git a/CMake/CTest/dcmtkCTestRunAndroid.cmake.in b/CMake/CTest/dcmtkCTestRunAndroid.cmake.in
index 4cc1dca..819fd31 100644
--- a/CMake/CTest/dcmtkCTestRunAndroid.cmake.in
+++ b/CMake/CTest/dcmtkCTestRunAndroid.cmake.in
@@ -1,25 +1,32 @@
 #
 # This file is used to executed given unit test commands on a previously
-# initialize Android device emulator instance
+# initialize Android device emulator instance, handling additional arguments
+# like 'exhaustive' and setting the DCMDICTPATH environment variable
+# appropriately.
 #
 
 # Restore the required settings of the CMake configuration step
-INCLUDE(@CMAKE_BINARY_DIR@/dcmtkCTestConfig.cmake NO_POLICY_SCOPE)
-
-# Load required functions for accessing the Android device emulator
+SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
+SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_BINARY_DIR@")
+SET(CMAKE_FILES_DIRECTORY "@CMAKE_FILES_DIRECTORY@")
+SET(DCMTK_CMAKE_INCLUDE "@CMAKE_SOURCE_DIR@/@DCMTK_CMAKE_INCLUDE@")
+SET(DCMDICTPATH "@DCMDICTPATH@")
+SET(ANDROID_ADB_PROGRAM "@ANDROID_ADB_PROGRAM@")
+SET(ANDROID_TEMPORARY_FILES_LOCATION "@ANDROID_TEMPORARY_FILES_LOCATION@")
+# Load required functions for controlling the Android device emulator
 INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake)
 
 # Restore the Android device emulator instance handle
-SET(DCMTK_ANDROID_EMULATOR_INSTANCE @DCMTK_ANDROID_EMULATOR_INSTANCE@)
+SET(DCMTK_ANDROID_EMULATOR_INSTANCE "$ENV{DCMTK_ANDROID_EMULATOR_INSTANCE}")
 
 # Run the actual testcase on the remote device
 DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE
-    COMMAND "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${ANDROID_TEMPORARY_FILES_LOCATION}" ${DCMTK_CTEST_TESTCASE_COMMAND}
-    WORKING_DIRECTORY ${ANDROID_TEMPORARY_FILES_LOCATION}
+    COMMAND "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${ANDROID_TEMPORARY_FILES_LOCATION}" "DCMDICTPATH=${DCMDICTPATH}" "${DCMTK_CTEST_TESTCASE_COMMAND}" ${DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}"
+    WORKING_DIRECTORY "${ANDROID_TEMPORARY_FILES_LOCATION}"
     RESULT_VARIABLE RESULT
 )
 
-# We cannot forward the result value to CMake, so print it instead and let CMake
+# We cannot forward the result value to CTest, so print it instead and let CMake
 # return with code '1' or whatever it deems appropriate to notify about an error.
 IF(RESULT)
     MESSAGE(FATAL_ERROR "Test command returned: ${RESULT}")
diff --git a/CMake/CTest/dcmtkCTestRunExhaustive.cmake b/CMake/CTest/dcmtkCTestRunExhaustive.cmake
new file mode 100644
index 0000000..0c72636
--- /dev/null
+++ b/CMake/CTest/dcmtkCTestRunExhaustive.cmake
@@ -0,0 +1,6 @@
+#
+# this file is used to execute the unit tests with the -x option injected
+#
+
+SET(ENV{DCMTK_CTEST_EXTRA_ARGUMENTS} "-x")
+EXECUTE_PROCESS(COMMAND ${CMAKE_CTEST_COMMAND})
diff --git a/CMake/CTest/dcmtkCTestRunWine.cmake.in b/CMake/CTest/dcmtkCTestRunWine.cmake.in
new file mode 100644
index 0000000..e0e9a43
--- /dev/null
+++ b/CMake/CTest/dcmtkCTestRunWine.cmake.in
@@ -0,0 +1,23 @@
+#
+# This file is used to executed given unit test commands using wine, handling
+# additional arguments like 'exhaustive' and setting the DCMDICTPATH
+# environment variable appropriately. It uses the prepared wineprefix to
+# load the MinGW C++ runtime (stdc++.dll etc.) and helps to detach the
+# wineserver process from CTest such that it does not hang waiting for it to
+# shutdown.
+#
+
+SET(ENV{WINEPREFIX} "@DCMTK_WINEPREFIX@")
+SET(ENV{DCMDICTPATH} "@DCMDICTPATH@")
+SET(WINE_WINE_PROGRAM "@WINE_WINE_PROGRAM@")
+
+EXECUTE_PROCESS(COMMAND
+    "${WINE_WINE_PROGRAM}" "${DCMTK_CTEST_TESTCASE_COMMAND}" ${DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}"
+    RESULT_VARIABLE RESULT
+)
+
+# We cannot forward the result value to CMake, so print it instead and let CMake
+# return with code '1' or whatever it deems appropriate to notify about an error.
+IF(RESULT)
+    MESSAGE(FATAL_ERROR "Test command returned: ${RESULT}")
+ENDIF()
diff --git a/CMake/CheckFunctionWithHeaderExists.cmake b/CMake/CheckFunctionWithHeaderExists.cmake
index e924c7f..1b95ac4 100644
--- a/CMake/CheckFunctionWithHeaderExists.cmake
+++ b/CMake/CheckFunctionWithHeaderExists.cmake
@@ -28,17 +28,18 @@ MACRO(CHECK_FUNCTIONWITHHEADER_EXISTS SYMBOL FILES VARIABLE)
 
     MESSAGE(STATUS "Looking for prototype of ${SYMBOL}")
     TRY_COMPILE(${VARIABLE}
-      ${CMAKE_BINARY_DIR}
-      ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.cxx
+      "${CMAKE_BINARY_DIR}"
+      "${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.cxx"
       CMAKE_FLAGS
       -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS}
+      "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}"
       "${CHECK_SYMBOL_EXISTS_LIBS}"
       ${DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS}
       OUTPUT_VARIABLE OUTPUT)
     IF(${VARIABLE})
       MESSAGE(STATUS "Looking for prototype of ${SYMBOL} - found")
       SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+      FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
         "Determining if the ${SYMBOL} "
         "exist passed with the following output:\n"
         "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.ccc:\n"
@@ -46,7 +47,7 @@ MACRO(CHECK_FUNCTIONWITHHEADER_EXISTS SYMBOL FILES VARIABLE)
     ELSE(${VARIABLE})
       MESSAGE(STATUS "Looking for prototype of ${SYMBOL} - not found.")
       SET(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+      FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
         "Determining if the ${SYMBOL} "
         "exist failed with the following output:\n"
         "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.cxx:\n"
diff --git a/CMake/DCMTKConfig.cmake.in b/CMake/DCMTKConfig.cmake.in
index 89188d2..b574626 100644
--- a/CMake/DCMTKConfig.cmake.in
+++ b/CMake/DCMTKConfig.cmake.in
@@ -13,7 +13,7 @@ SET(DCMTK_BUILD_VERSION @DCMTK_BUILD_VERSION@)
 SET(DCMTK_MODULES "@DCMTK_MODULES@")
 SET(DCMTK_LIBRARIES "@DCMTK_LIBRARY_TARGETS@")
 
-# DCMTK build options
+# Optional DCMTK 3rd party libraries
 SET(DCMTK_WITH_TIFF @DCMTK_WITH_TIFF@)
 SET(DCMTK_WITH_PNG @DCMTK_WITH_PNG@)
 SET(DCMTK_WITH_XML @DCMTK_WITH_XML@)
@@ -21,17 +21,31 @@ SET(DCMTK_WITH_ZLIB @DCMTK_WITH_ZLIB@)
 SET(DCMTK_WITH_OPENSSL @DCMTK_WITH_OPENSSL@)
 SET(DCMTK_WITH_SNDFILE @DCMTK_WITH_SNDFILE@)
 SET(DCMTK_WITH_ICONV @DCMTK_WITH_ICONV@)
+SET(DCMTK_WITH_STDLIBC_ICONV @DCMTK_WITH_STDLIBC_ICONV@)
+SET(DCMTK_WITH_ICU @DCMTK_WITH_ICU@)
+SET(DCMTK_WITH_WRAP @DCMTK_WITH_WRAP@)
+SET(DCMTK_WITH_DOXYGEN @DCMTK_WITH_DOXYGEN@)
+
+# Dictionary-related
+SET(DCMTK_ENABLE_BUILTIN_DICTIONARY @DCMTK_ENABLE_BUILTIN_DICTIONARY@)
+SET(DCMTK_ENABLE_EXTERNAL_DICTIONARY @DCMTK_ENABLE_EXTERNAL_DICTIONARY@)
 SET(DCMTK_ENABLE_PRIVATE_TAGS @DCMTK_ENABLE_PRIVATE_TAGS@)
-SET(DCMTK_WITH_THREADS @DCMTK_WITH_THREADS@)
+
+# Compiler / standard library features
+SET(DCMTK_ENABLE_CXX11 @DCMTK_ENABLE_CXX11@)
+SET(DCMTK_CXX11_FLAGS @DCMTK_CXX11_FLAGS@)
+SET(DCMTK_ENABLE_STL @DCMTK_ENABLE_STL@)
 
 # DCMTK shared libraries
 SET(DCMTK_SHARED_LIBRARIES @BUILD_SHARED_LIBS@)
 SET(DCMTK_SINGLE_SHARED_LIBRARY @BUILD_SINGLE_SHARED_LIBRARY@)
 
 # DCMTK additional options
+SET(DCMTK_WITH_THREADS @DCMTK_WITH_THREADS@)
 SET(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS @DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS@)
 SET(DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS @DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS@)
 SET(DCMTK_WIDE_CHAR_MAIN_FUNCTION @DCMTK_WIDE_CHAR_MAIN_FUNCTION@)
+SET(DCMTK_ENABLE_LFS @DCMTK_ENABLE_LFS@)
 
 SET_AND_CHECK(DCMTK_TARGETS "@PACKAGE_DCMTK_CMKDIR_CONFIG@/DCMTKTargets.cmake")
 
diff --git a/CMake/DCMTKConfig.cmake26.in b/CMake/DCMTKConfig.old_cmake.in
similarity index 67%
rename from CMake/DCMTKConfig.cmake26.in
rename to CMake/DCMTKConfig.old_cmake.in
index 75cd8eb..e68f027 100644
--- a/CMake/DCMTKConfig.cmake26.in
+++ b/CMake/DCMTKConfig.old_cmake.in
@@ -14,9 +14,9 @@ SET(DCMTK_BUILD_VERSION @DCMTK_BUILD_VERSION@)
 
 # DCMTK libraries and modules
 SET(DCMTK_MODULES "@DCMTK_MODULES@")
-SET(DCMTK_LIBRARIES "@DCMTK_ALL_LIBRARIES@")
+SET(DCMTK_LIBRARIES "@DCMTK_LIBRARY_TARGETS@")
 
-# DCMTK build options
+# Optional DCMTK 3rd party libraries
 SET(DCMTK_WITH_TIFF @DCMTK_WITH_TIFF@)
 SET(DCMTK_WITH_PNG @DCMTK_WITH_PNG@)
 SET(DCMTK_WITH_XML @DCMTK_WITH_XML@)
@@ -24,14 +24,28 @@ SET(DCMTK_WITH_ZLIB @DCMTK_WITH_ZLIB@)
 SET(DCMTK_WITH_OPENSSL @DCMTK_WITH_OPENSSL@)
 SET(DCMTK_WITH_SNDFILE @DCMTK_WITH_SNDFILE@)
 SET(DCMTK_WITH_ICONV @DCMTK_WITH_ICONV@)
+SET(DCMTK_WITH_STDLIBC_ICONV @DCMTK_WITH_STDLIBC_ICONV@)
+SET(DCMTK_WITH_ICU @DCMTK_WITH_ICU@)
+SET(DCMTK_WITH_WRAP @DCMTK_WITH_WRAP@)
+SET(DCMTK_WITH_DOXYGEN @DCMTK_WITH_DOXYGEN@)
+
+# Dictionary-related
+SET(DCMTK_ENABLE_BUILTIN_DICTIONARY @DCMTK_ENABLE_BUILTIN_DICTIONARY@)
+SET(DCMTK_ENABLE_EXTERNAL_DICTIONARY @DCMTK_ENABLE_EXTERNAL_DICTIONARY@)
 SET(DCMTK_ENABLE_PRIVATE_TAGS @DCMTK_ENABLE_PRIVATE_TAGS@)
-SET(DCMTK_WITH_THREADS @DCMTK_WITH_THREADS@)
+
+# Compiler / standard library features
+SET(DCMTK_ENABLE_CXX11 @DCMTK_ENABLE_CXX11@)
+SET(DCMTK_CXX11_FLAGS @DCMTK_CXX11_FLAGS@)
+SET(DCMTK_ENABLE_STL @DCMTK_ENABLE_STL@)
 
 # DCMTK shared libraries
 SET(DCMTK_SHARED_LIBRARIES @BUILD_SHARED_LIBS@)
 SET(DCMTK_SINGLE_SHARED_LIBRARY @BUILD_SINGLE_SHARED_LIBRARY@)
 
 # DCMTK additional options
+SET(DCMTK_WITH_THREADS @DCMTK_WITH_THREADS@)
 SET(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS @DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS@)
 SET(DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS @DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS@)
 SET(DCMTK_WIDE_CHAR_MAIN_FUNCTION @DCMTK_WIDE_CHAR_MAIN_FUNCTION@)
+SET(DCMTK_ENABLE_LFS @DCMTK_ENABLE_LFS@)
diff --git a/CMake/GenerateCMakeExports.cmake b/CMake/GenerateCMakeExports.cmake
index 453ecc0..e231e58 100644
--- a/CMake/GenerateCMakeExports.cmake
+++ b/CMake/GenerateCMakeExports.cmake
@@ -16,14 +16,14 @@
 
 # Get and store all executable targets to DCMTKTargets.cmake within build's main dir
 GET_PROPERTY(DCMTK_EXECUTABLE_TARGETS GLOBAL PROPERTY DCMTK_EXECUTABLE_TARGETS)
-EXPORT(TARGETS ${DCMTK_EXECUTABLE_TARGETS} APPEND FILE ${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake)
+EXPORT(TARGETS ${DCMTK_EXECUTABLE_TARGETS} APPEND FILE "${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake")
 
 # Get and store libraries to DCMTKTargets.cmake within the build's main dir
 GET_PROPERTY(DCMTK_LIBRARY_TARGETS GLOBAL PROPERTY DCMTK_LIBRARY_TARGETS)
-EXPORT(TARGETS ${DCMTK_LIBRARY_TARGETS} APPEND FILE ${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake)
+EXPORT(TARGETS ${DCMTK_LIBRARY_TARGETS} APPEND FILE "${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake")
 
 # Create DCMTConfigVersion.cmake with basic DCMTK version information (build tree)
-SET(DCMTK_CONFIG_VERSION ${DCMTK_BUILD_CMKDIR}/DCMTKConfigVersion.cmake)
+SET(DCMTK_CONFIG_VERSION "${DCMTK_BUILD_CMKDIR}/DCMTKConfigVersion.cmake")
 WRITE_BASIC_PACKAGE_VERSION_FILE(
     ${DCMTK_CONFIG_VERSION}
     VERSION ${DCMTK_MAJOR_VERSION}.${DCMTK_MINOR_VERSION}.${DCMTK_BUILD_VERSION}
@@ -36,7 +36,7 @@ WRITE_BASIC_PACKAGE_VERSION_FILE(
 # build and install tree versions of the file.
 
 # Case 1: Configure 'DCMTKConfig.cmake' for a build tree.
-SET(DCMTK_CMKDIR_CONFIG ${DCMTK_BUILD_CMKDIR})
+SET(DCMTK_CMKDIR_CONFIG "${DCMTK_BUILD_CMKDIR}")
 # Collect include paths
 SET(DCMTK_INCLUDE_DIR_CONFIGS
     "SET_AND_CHECK(DCMTK_config_INCLUDE_DIR \"${DCMTK_BINARY_DIR}/config/include/dcmtk/config\")")
@@ -50,17 +50,17 @@ FOREACH(module ${DCMTK_MODULES})
     SET(DCMTK_CONFIG_CODE "${DCMTK_CONFIG_CODE}list(APPEND DCMTK_INCLUDE_DIRS \"${DCMTK_SOURCE_DIR}/${module}/include\")\n")
 ENDFOREACH(module)
 SET(DCMTK_CONFIG_CODE "${DCMTK_CONFIG_CODE}##################################################")
-SET(dcmtk_config ${DCMTK_BUILD_CMKDIR}/DCMTKConfig.cmake)
+SET(dcmtk_config "${DCMTK_BUILD_CMKDIR}/DCMTKConfig.cmake")
 # Actually configure file and write it to build's main directory
 CONFIGURE_PACKAGE_CONFIG_FILE(
     CMake/DCMTKConfig.cmake.in
     ${dcmtk_config}
-    INSTALL_DESTINATION ${CMAKE_BINARY_DIR}
+    INSTALL_DESTINATION "${CMAKE_BINARY_DIR}"
     PATH_VARS DCMTK_CMKDIR_CONFIG DCMTK_INCLUDE_DIR_CONFIGS
     NO_CHECK_REQUIRED_COMPONENTS_MACRO)
 
 # Case 2: Configure 'DCMTKConfig.cmake' for an install tree
-SET(DCMTK_CMKDIR_CONFIG ${DCMTK_INSTALL_CMKDIR})
+SET(DCMTK_CMKDIR_CONFIG "${DCMTK_INSTALL_CMKDIR}")
 # Collect include paths
 SET(DCMTK_INCLUDE_DIR_CONFIGS
     "SET_AND_CHECK(DCMTK_config_INCLUDE_DIR \"\${PACKAGE_PREFIX_DIR}/include/dcmtk/config\")")
@@ -71,11 +71,11 @@ ENDFOREACH(module)
 SET(DCMTK_CONFIG_CODE "####### Expanded from \@DCMTK_CONFIG_CODE\@ #######\n")
 SET(DCMTK_CONFIG_CODE "${DCMTK_CONFIG_CODE}list(APPEND DCMTK_INCLUDE_DIRS \"\${PACKAGE_PREFIX_DIR}/include\")\n")
 SET(DCMTK_CONFIG_CODE "${DCMTK_CONFIG_CODE}##################################################")
-SET(DCMTK_INSTALL_CONFIG ${CMAKE_BINARY_DIR}/CMakeFiles/DCMTKConfig.cmake)
+SET(DCMTK_INSTALL_CONFIG "${CMAKE_BINARY_DIR}/CMakeFiles/DCMTKConfig.cmake")
 # Actually configure file and set rule to install it to installation subdir
 CONFIGURE_PACKAGE_CONFIG_FILE(
     CMake/DCMTKConfig.cmake.in
-    ${DCMTK_INSTALL_CONFIG}
-    INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/${DCMTK_INSTALL_CMKDIR}
+    "${DCMTK_INSTALL_CONFIG}"
+    INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX}/${DCMTK_INSTALL_CMKDIR}"
     PATH_VARS DCMTK_CMKDIR_CONFIG DCMTK_INCLUDE_DIR_CONFIGS
     NO_CHECK_REQUIRED_COMPONENTS_MACRO)
diff --git a/CMake/GenerateDCMTKConfigure.cmake b/CMake/GenerateDCMTKConfigure.cmake
old mode 100644
new mode 100755
index a31cc53..19fb179
--- a/CMake/GenerateDCMTKConfigure.cmake
+++ b/CMake/GenerateDCMTKConfigure.cmake
@@ -1,3 +1,10 @@
+# Set build configuration to use for configuration tests
+IF(CMAKE_BUILD_TYPE)
+  SET(CMAKE_TRY_COMPILE_CONFIGURATION "${CMAKE_BUILD_TYPE}")
+ELSE(CMAKE_BUILD_TYPE)
+  SET(CMAKE_TRY_COMPILE_CONFIGURATION "Release")
+ENDIF(CMAKE_BUILD_TYPE)
+
 # Compiled-in dictionary support
 IF(DCMTK_ENABLE_BUILTIN_DICTIONARY)
   SET(ENABLE_BUILTIN_DICTIONARY 1)
@@ -118,7 +125,7 @@ SET(CANONICAL_HOST_TYPE "${SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}")
 DCMTK_UNSET(SYSTEM_PROCESSOR)
 
 # Configure dictionary path and install prefix
-IF(WIN32 AND NOT CYGWIN AND NOT MINGW)
+IF(WIN32 AND NOT CYGWIN)
   # Set DCMTK_PREFIX needed within some code. Be sure that all / are replaced by \\.
   SET(DCMTK_PREFIX "${CMAKE_INSTALL_PREFIX}")
   STRING(REGEX REPLACE "/" "\\\\\\\\" DCMTK_PREFIX "${DCMTK_PREFIX}")
@@ -140,26 +147,26 @@ IF(WIN32 AND NOT CYGWIN AND NOT MINGW)
   # Set default directory for configuration and support data.
   SET(DCMTK_DEFAULT_CONFIGURATION_DIR "")
   SET(DCMTK_DEFAULT_SUPPORT_DATA_DIR "")
-ELSE(WIN32 AND NOT CYGWIN AND NOT MINGW)
+ELSE(WIN32 AND NOT CYGWIN)
   # Set DCMTK_PREFIX needed within some code.
   SET(DCMTK_PREFIX "${CMAKE_INSTALL_PREFIX}")
   # Set path and multiple path separator being used in dictionary code etc.
   SET(PATH_SEPARATOR "/")
   SET(ENVIRONMENT_PATH_SEPARATOR ":")
   # Set dictionary path to the data dir inside install main dir (prefix).
-  if (DCMTK_ENABLE_EXTERNAL_DICTIONARY)
+  IF(DCMTK_ENABLE_EXTERNAL_DICTIONARY)
     SET(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}/${DCMTK_INSTALL_DATDIR}/dicom.dic")
     # If private dictionary should be utilized, add it to default dictionary path.
     IF(ENABLE_PRIVATE_TAGS)
       SET(DCM_DICT_DEFAULT_PATH "${DCM_DICT_DEFAULT_PATH}:${DCMTK_PREFIX}/${DCMTK_INSTALL_DATDIR}/private.dic")
     ENDIF(ENABLE_PRIVATE_TAGS)
-  ELSE (DCMTK_ENABLE_EXTERNAL_DICTIONARY)
+  ELSE(DCMTK_ENABLE_EXTERNAL_DICTIONARY)
     SET(DCM_DICT_DEFAULT_PATH "")
-  ENDIF (DCMTK_ENABLE_EXTERNAL_DICTIONARY)
+  ENDIF(DCMTK_ENABLE_EXTERNAL_DICTIONARY)
   # Set default directory for configuration and support data.
   SET(DCMTK_DEFAULT_CONFIGURATION_DIR "${DCMTK_PREFIX}/${DCMTK_INSTALL_ETCDIR}/")
   SET(DCMTK_DEFAULT_SUPPORT_DATA_DIR "${DCMTK_PREFIX}/${DCMTK_INSTALL_DATDIR}/")
-ENDIF(WIN32 AND NOT CYGWIN AND NOT MINGW)
+ENDIF(WIN32 AND NOT CYGWIN)
 
 # Check the sizes of various types
 INCLUDE (CheckTypeSize)
@@ -172,16 +179,59 @@ CHECK_TYPE_SIZE("short" SIZEOF_SHORT)
 CHECK_TYPE_SIZE("void*" SIZEOF_VOID_P)
 
 # Check for include files, libraries, and functions
-INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
-INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake)
-INCLUDE(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
-INCLUDE(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
-INCLUDE(${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
-INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/CheckFunctionWithHeaderExists.cmake)
+INCLUDE("${DCMTK_CMAKE_INCLUDE}CMake/dcmtkTryCompile.cmake")
+INCLUDE("${DCMTK_CMAKE_INCLUDE}CMake/dcmtkTryRun.cmake")
+INCLUDE("${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake")
+INCLUDE("${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake")
+INCLUDE("${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake")
+INCLUDE("${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake")
+INCLUDE("${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake")
+INCLUDE("${DCMTK_CMAKE_INCLUDE}CMake/CheckFunctionWithHeaderExists.cmake")
+INCLUDE(CheckCXXSymbolExists OPTIONAL)
+IF(NOT COMMAND CHECK_CXX_SYMBOL_EXISTS)
+  # fallback implementation for old CMake Versions
+  FUNCTION(CHECK_CXX_SYMBOL_EXISTS SYMBOL FILES VAR)
+    SET(CODE)
+    FOREACH(FILE ${FILES})
+      SET(CODE "${CODE}#include <${FILE}>\n")
+    ENDFOREACH()
+    SET(CODE "${CODE}\nint main(int argc, char** argv)\n{\n  (void)argv;\n#ifndef ${SYMBOL}\n  return ((int*)(&${SYMBOL}))[argc];\n#else\n  (void)argc;\n  return 0;\n#endif\n}\n")
+    DCMTK_TRY_COMPILE("${VAR}" "the compiler supports ${SYMBOL}" "${CODE}")
+  ENDFUNCTION()
+ENDIF(NOT COMMAND CHECK_CXX_SYMBOL_EXISTS)
+
+FOREACH(FUNC "__FUNCTION__" "__PRETTY_FUNCTION__" "__func__")
+  CHECK_SYMBOL_EXISTS("${FUNC}" "" "HAVE_${FUNC}_C_MACRO")
+  # test if the C++ compiler also supports them (e.g. SunPro doesn't)
+  CHECK_CXX_SYMBOL_EXISTS("${FUNC}" "" "HAVE_${FUNC}_CXX_MACRO")
+  IF(HAVE_${FUNC}_C_MACRO AND HAVE_${FUNC}_CXX_MACRO)
+    SET("HAVE_${FUNC}_MACRO" 1 CACHE INTERNAL "Have symbol ${FUNC}" FORCE)
+  ELSE()
+    SET("HAVE_${FUNC}_MACRO" CACHE INTERNAL "Have symbol ${FUNC}" FORCE)
+  ENDIF()
+ENDFOREACH()
 
-CHECK_SYMBOL_EXISTS(__FUNCTION__        "" HAVE___FUNCTION___MACRO)
-CHECK_SYMBOL_EXISTS(__PRETTY_FUNCTION__ "" HAVE___PRETTY_FUNCTION___MACRO)
-CHECK_SYMBOL_EXISTS(__func__            "" HAVE___func___MACRO)
+# prepare include directories for 3rdparty libraries before performing
+# header searches
+IF(ZLIB_INCDIR)
+  LIST(APPEND CMAKE_REQUIRED_INCLUDES "${ZLIB_INCDIR}")
+ENDIF(ZLIB_INCDIR)
+
+IF(ZLIB_INCLUDE_DIRS)
+  LIST(APPEND CMAKE_REQUIRED_INCLUDES "${ZLIB_INCLUDE_DIRS}")
+ENDIF(ZLIB_INCLUDE_DIRS)
+
+IF(LIBPNG_INCDIR)
+  LIST(APPEND CMAKE_REQUIRED_INCLUDES "${LIBPNG_INCDIR}")
+ENDIF(LIBPNG_INCDIR)
+
+IF(PNG_INCLUDE_DIR)
+  LIST(APPEND CMAKE_REQUIRED_INCLUDES "${PNG_INCLUDE_DIR}")
+ENDIF(PNG_INCLUDE_DIR)
+
+IF(OPENSSL_INCDIR)
+  LIST(APPEND CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCDIR}")
+ENDIF(OPENSSL_INCDIR)
 
 # For Windows, hardcode these values to avoid long search times
 IF(WIN32 AND NOT CYGWIN)
@@ -208,7 +258,7 @@ ENDIF(WIN32 AND NOT CYGWIN)
   CHECK_INCLUDE_FILE_CXX("iostream.h" HAVE_IOSTREAM_H)
   CHECK_INCLUDE_FILE_CXX("io.h" HAVE_IO_H)
   CHECK_INCLUDE_FILE_CXX("iso646.h" HAVE_ISO646_H)
-  CHECK_INCLUDE_FILE_CXX("png.h" HAVE_LIBPNG_PNG_H)
+  CHECK_INCLUDE_FILE_CXX("png.h" HAVE_PNG_H)
   CHECK_INCLUDE_FILE_CXX("limits.h" HAVE_LIMITS_H)
   CHECK_INCLUDE_FILE_CXX("climits" HAVE_CLIMITS)
   CHECK_INCLUDE_FILE_CXX("locale.h" HAVE_LOCALE_H)
@@ -288,6 +338,14 @@ ENDIF(WIN32 AND NOT CYGWIN)
   ENDIF(HAVE_NETINET_IN_H)
   CHECK_INCLUDE_FILES("${TCP_H_DEPS};netinet/tcp.h" HAVE_NETINET_TCP_H)
 
+  IF(NOT HAVE_PNG_H)
+    # <png.h> is unavailable, so test if we need to include it as <libpng/png.h>
+    CHECK_INCLUDE_FILE_CXX("libpng/png.h" HAVE_LIBPNG_PNG_H)
+  ELSE(NOT HAVE_PNG_H)
+    # ensure including <png.h> is preferred
+    DCMTK_UNSET_CACHE(HAVE_LIBPNG_PNG_H)
+  ENDIF(NOT HAVE_PNG_H)
+
   # There is no CMake macro to take care of these yet
 
   IF(WIN32 AND NOT CYGWIN AND NOT MINGW)
@@ -322,11 +380,10 @@ ENDIF(WIN32 AND NOT CYGWIN)
   CHECK_FUNCTION_EXISTS(gethostbyname HAVE_GETHOSTBYNAME)
   CHECK_FUNCTION_EXISTS(gethostbyname_r HAVE_GETHOSTBYNAME_R)
   CHECK_FUNCTION_EXISTS(gethostbyaddr_r HAVE_GETHOSTBYADDR_R)
-  CHECK_FUNCTION_EXISTS(getgrnam_r HAVE_GETGRNAM_R)
-  CHECK_FUNCTION_EXISTS(getpwnam_r HAVE_GETPWNAM_R)
   CHECK_FUNCTION_EXISTS(gethostname HAVE_GETHOSTNAME)
   CHECK_FUNCTION_EXISTS(gethostid HAVE_GETHOSTID)
   CHECK_FUNCTION_EXISTS(getlogin HAVE_GETLOGIN)
+  CHECK_FUNCTION_EXISTS(getlogin_r HAVE_GETLOGIN_R)
   CHECK_FUNCTION_EXISTS(getpid HAVE_GETPID)
   CHECK_FUNCTION_EXISTS(getpwnam HAVE_GETPWNAM)
   CHECK_FUNCTION_EXISTS(getsockname HAVE_GETSOCKNAME)
@@ -344,10 +401,7 @@ ENDIF(WIN32 AND NOT CYGWIN)
   CHECK_FUNCTION_EXISTS(malloc_debug HAVE_MALLOC_DEBUG)
   CHECK_FUNCTION_EXISTS(mbstowcs HAVE_MBSTOWCS)
   CHECK_FUNCTION_EXISTS(wcstombs HAVE_WCSTOMBS)
-  CHECK_FUNCTION_EXISTS(memcmp HAVE_MEMCMP)
-  CHECK_FUNCTION_EXISTS(memcpy HAVE_MEMCPY)
   CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)
-  CHECK_FUNCTION_EXISTS(memset HAVE_MEMSET)
   CHECK_FUNCTION_EXISTS(mkstemp HAVE_MKSTEMP)
   CHECK_FUNCTION_EXISTS(mktemp HAVE_MKTEMP)
   CHECK_FUNCTION_EXISTS(rindex HAVE_RINDEX)
@@ -468,19 +522,31 @@ ENDIF(WIN32 AND NOT CYGWIN)
     SET(HEADERS ${HEADERS} windows.h)
   ENDIF(HAVE_WINDOWS_H)
 
+  IF(HAVE_GRP_H)
+    SET(HEADERS ${HEADERS} grp.h)
+  ENDIF(HAVE_GRP_H)
+
   IF(HAVE_PWD_H)
     SET(HEADERS ${HEADERS} pwd.h)
   ENDIF(HAVE_PWD_H)
 
+  IF(HAVE_DIRENT_H)
+    SET(HEADERS ${HEADERS} dirent.h)
+  ENDIF(HAVE_DIRENT_H)
+
   IF(HAVE_SYS_SYSCALL_H)
     SET(HEADERS ${HEADERS} sys/syscall.h)
   ENDIF(HAVE_SYS_SYSCALL_H)
 
   IF(HAVE_WINSOCK_H)
     SET(HEADERS ${HEADERS} winsock.h)
-    SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ws2_32 netapi32 wsock32)
+    SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} iphlpapi ws2_32 netapi32 wsock32)
   ENDIF(HAVE_WINSOCK_H)
 
+  IF(HAVE_FENV_H)
+    SET(HEADERS ${HEADERS} fenv.h)
+  ENDIF(HAVE_FENV_H)
+
   # std::vsnprintf and std::vsnprintf need the C++ version of the headers.
   # We just assume they exist when the C version was found
   SET(CXXHEADERS)
@@ -501,6 +567,7 @@ ENDIF(WIN32 AND NOT CYGWIN)
     SET(CXXHEADERS ${CXXHEADERS} cstddef)
   ENDIF(HAVE_CSTDDEF)
 
+  CHECK_FUNCTIONWITHHEADER_EXISTS(feenableexcept "${HEADERS}" HAVE_PROTOTYPE_FEENABLEEXCEPT)
   CHECK_FUNCTIONWITHHEADER_EXISTS(isinf "${HEADERS}" HAVE_PROTOTYPE_ISINF)
   CHECK_FUNCTIONWITHHEADER_EXISTS(isnan "${HEADERS}" HAVE_PROTOTYPE_ISNAN)
   CHECK_FUNCTIONWITHHEADER_EXISTS(finite "${HEADERS}" HAVE_PROTOTYPE_FINITE)
@@ -510,6 +577,7 @@ ENDIF(WIN32 AND NOT CYGWIN)
   CHECK_FUNCTIONWITHHEADER_EXISTS(flock "${HEADERS}" HAVE_PROTOTYPE_FLOCK)
   CHECK_FUNCTIONWITHHEADER_EXISTS(gethostbyname "${HEADERS}" HAVE_PROTOTYPE_GETHOSTBYNAME)
   CHECK_FUNCTIONWITHHEADER_EXISTS(gethostbyname_r "${HEADERS}" HAVE_PROTOTYPE_GETHOSTBYNAME_R)
+  CHECK_FUNCTIONWITHHEADER_EXISTS(gethostbyaddr_r "${HEADERS}" HAVE_PROTOTYPE_GETHOSTBYADDR_R)
   CHECK_FUNCTIONWITHHEADER_EXISTS(gethostid "${HEADERS}" HAVE_PROTOTYPE_GETHOSTID)
   CHECK_FUNCTIONWITHHEADER_EXISTS(bzero "${HEADERS}" HAVE_PROTOTYPE_BZERO)
   CHECK_FUNCTIONWITHHEADER_EXISTS(gethostname "${HEADERS}" HAVE_PROTOTYPE_GETHOSTNAME)
@@ -538,6 +606,9 @@ ENDIF(WIN32 AND NOT CYGWIN)
   CHECK_FUNCTIONWITHHEADER_EXISTS(connect "${HEADERS}" HAVE_PROTOTYPE_CONNECT)
   CHECK_FUNCTIONWITHHEADER_EXISTS(mkstemp "${HEADERS}" HAVE_PROTOTYPE_MKSTEMP)
   CHECK_FUNCTIONWITHHEADER_EXISTS(mktemp "${HEADERS}" HAVE_PROTOTYPE_MKTEMP)
+  CHECK_FUNCTIONWITHHEADER_EXISTS(memcmp "${HEADERS}" HAVE_MEMCMP)
+  CHECK_FUNCTIONWITHHEADER_EXISTS(memcpy "${HEADERS}" HAVE_MEMCPY)
+  CHECK_FUNCTIONWITHHEADER_EXISTS(memset "${HEADERS}" HAVE_MEMSET)
   CHECK_FUNCTIONWITHHEADER_EXISTS(select "${HEADERS}" HAVE_PROTOTYPE_SELECT)
   CHECK_FUNCTIONWITHHEADER_EXISTS(strcasecmp "${HEADERS}" HAVE_PROTOTYPE_STRCASECMP)
   CHECK_FUNCTIONWITHHEADER_EXISTS(strncasecmp "${HEADERS}" HAVE_PROTOTYPE_STRNCASECMP)
@@ -551,13 +622,14 @@ ENDIF(WIN32 AND NOT CYGWIN)
   CHECK_FUNCTIONWITHHEADER_EXISTS("InterlockedIncrement((long*)0)" "${HEADERS}" HAVE_INTERLOCKED_INCREMENT)
   CHECK_FUNCTIONWITHHEADER_EXISTS("InterlockedDecrement((long*)0)" "${HEADERS}" HAVE_INTERLOCKED_DECREMENT)
   CHECK_FUNCTIONWITHHEADER_EXISTS("_fpclassf(0.0f)" "${HEADERS}" HAVE_PROTOTYPE__FPCLASSF)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("getgrnam_r((char*)0,(group*)0,(char*)0,0,(group**)0)" "${HEADERS}" HAVE_GETGRNAM_R)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("getpwnam_r((char*)0,(passwd*)0,(char*)0,0,(passwd**)0)" "${HEADERS}" HAVE_GETPWNAM_R)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("readdir_r((DIR*)0,(dirent*)0,(dirent**)0)" "${HEADERS}" HAVE_READDIR_R)
   CHECK_FUNCTIONWITHHEADER_EXISTS(nanosleep "${HEADERS}" HAVE_PROTOTYPE_NANOSLEEP)
   CHECK_FUNCTIONWITHHEADER_EXISTS("&passwd::pw_gecos" "${HEADERS}" HAVE_PASSWD_GECOS)
 
   # TODO: Uncommented because it seems not to make sense. Remove if there are no complaints.
   #CHECK_LIBRARY_EXISTS(iostream "" "" HAVE_LIBIOSTREAM)
-  #CHECK_LIBRARY_EXISTS(nsl "" "" HAVE_LIBNSL)
-  #CHECK_LIBRARY_EXISTS(socket "" "" HAVE_LIBSOCKET)
 
   # Check for some type definitions needed by JasPer and defines them if necessary
   # Even if not functions but types are looked for, the script works fine.
@@ -570,6 +642,8 @@ ENDIF(WIN32 AND NOT CYGWIN)
   CHECK_FUNCTIONWITHHEADER_EXISTS("ulonglong definition" "${HEADERS}" HAVE_ULONGLONG)
   CHECK_FUNCTIONWITHHEADER_EXISTS("long long definition" "${HEADERS}" HAVE_LONG_LONG)
   CHECK_FUNCTIONWITHHEADER_EXISTS("unsigned long long definition" "${HEADERS}" HAVE_UNSIGNED_LONG_LONG)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("int64_t definition" "${HEADERS}" HAVE_INT64_T)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("uint64_t definition" "${HEADERS}" HAVE_UINT64_T)
 
   # File access stuff
   CHECK_FUNCTIONWITHHEADER_EXISTS("fpos64_t definition" "${HEADERS}" HAVE_FPOS64_T)
@@ -588,14 +662,61 @@ IF(DCMTK_WITH_OPENSSL)
   CHECK_FUNCTIONWITHHEADER_EXISTS("RAND_egd" "openssl/rand.h" HAVE_RAND_EGD ${OPENSSL_LIBS})
 ENDIF(DCMTK_WITH_OPENSSL)
 
+IF(HAVE_LOCKF AND ANDROID)
+  # When Android introduced lockf, they forgot to put the constants like F_LOCK in the
+  # appropriate headers, this tests if they are defined and disables lockf if they are not
+  CHECK_FUNCTIONWITHHEADER_EXISTS("lockf(0, F_LOCK, 0)" "${HEADERS}" HAVE_LOCKF_CONSTANTS)
+  IF(NOT HAVE_LOCKF_CONSTANTS)
+    SET(HAVE_LOCKF FALSE CACHE INTERNAL "lockf implementation is broken")
+  ENDIF()
+ENDIF(HAVE_LOCKF AND ANDROID)
+
 # Tests that require a try-compile
-INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkTryCompile.cmake)
-INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkTryRun.cmake)
+
+IF(HAVE_MATH_H)
+  IF(HAVE_LIBC_H)
+    # checks if <libc.h> and <math.h> cause a problem if libc.h is included extern "C"
+    # and math.h is not. This is the case on QNX 6.2.x and 6.5.x.
+    DCMTK_TRY_COMPILE(INCLUDE_LIBC_H_AS_EXTERN_C "<libc.h> can be included as extern \"C\""
+    "extern \"C\" {
+#include <libc.h>
+}
+#include <math.h>
+int main()
+{
+    int i = 0;
+    return 0;
+}")
+    IF(INCLUDE_LIBC_H_AS_EXTERN_C)
+      SET(INCLUDE_LIBC_H_AS_CXX 0 CACHE INTERNAL "libc.h should be treated as a C++ header")
+    ELSE()
+      SET(INCLUDE_LIBC_H_AS_CXX 1 CACHE INTERNAL "libc.h should be treated as a C++ header")
+    ENDIF()
+  ENDIF(HAVE_LIBC_H)
+
+  # checks if <math.h> must be included as a C++ include file (i.e. without extern "C").
+  # Some sytems (Win32, HP/UX 10) use C++ language features in <math.h>.
+  DCMTK_TRY_COMPILE(INCLUDE_MATH_H_AS_EXTERN_C "<math.h> can be included as extern \"C\""
+  "extern \"C\" {
+#include <math.h>
+}
+int main()
+{
+    int i = 0;
+    return 0;
+}")
+  IF(INCLUDE_MATH_H_AS_EXTERN_C)
+    SET(INCLUDE_MATH_H_AS_CXX 0 CACHE INTERNAL "math.h should be treated as a C++ header")
+  ELSE()
+    SET(INCLUDE_MATH_H_AS_CXX 1 CACHE INTERNAL "math.h should be treated as a C++ header")
+  ENDIF()
+ENDIF(HAVE_MATH_H)
+
 
 IF(NOT DEFINED C_CHAR_UNSIGNED)
   MESSAGE(STATUS "Checking signedness of char")
-  DCMTK_TRY_RUN(C_CHAR_SIGNED C_CHAR_SIGNED_COMPILED ${CMAKE_BINARY_DIR}/CMakeTmp/Char
-          ${DCMTK_SOURCE_DIR}/CMake/dcmtkTestCharSignedness.cc
+  DCMTK_TRY_RUN(C_CHAR_SIGNED C_CHAR_SIGNED_COMPILED "${CMAKE_BINARY_DIR}/CMakeTmp/Char"
+          "${DCMTK_SOURCE_DIR}/CMake/dcmtkTestCharSignedness.cc"
           COMPILE_OUTPUT_VARIABLE C_CHAR_SIGNED_COMPILE_OUTPUT)
   IF(C_CHAR_SIGNED_COMPILED)
     IF(C_CHAR_SIGNED)
@@ -622,10 +743,10 @@ int main()
 }")
 
 # Check for thread type
-IF (HAVE_WINDOWS_H)
-    SET(HAVE_INT_TYPE_PTHREAD_T 1)
-ELSE (HAVE_WINDOWS_H)
-    DCMTK_TRY_COMPILE(HAVE_INT_TYPE_PTHREAD_T "pthread_t is an integer type"
+IF(HAVE_WINDOWS_H)
+  SET(HAVE_INT_TYPE_PTHREAD_T 1)
+ELSE(HAVE_WINDOWS_H)
+  DCMTK_TRY_COMPILE(HAVE_INT_TYPE_PTHREAD_T "pthread_t is an integer type"
         "// test to see if pthread_t is a pointer type or not
 
 #include <pthread.h>
@@ -636,11 +757,11 @@ int main ()
   unsigned long l = p;
   return 0;
 }")
-    IF (NOT HAVE_INT_TYPE_PTHREAD_T)
-        SET(HAVE_POINTER_TYPE_PTHREAD_T 1 CACHE INTERNAL "Set if pthread_t is a pointer type")
-    ELSE (NOT HAVE_INT_TYPE_PTHREAD_T)
-        SET(HAVE_POINTER_TYPE_PTHREAD_T 0 CACHE INTERNAL "Set if pthread_t is a pointer type")
-    ENDIF (NOT HAVE_INT_TYPE_PTHREAD_T)
+  IF(NOT HAVE_INT_TYPE_PTHREAD_T)
+    SET(HAVE_POINTER_TYPE_PTHREAD_T 1 CACHE INTERNAL "Set if pthread_t is a pointer type")
+  ELSE(NOT HAVE_INT_TYPE_PTHREAD_T)
+    SET(HAVE_POINTER_TYPE_PTHREAD_T 0 CACHE INTERNAL "Set if pthread_t is a pointer type")
+  ENDIF(NOT HAVE_INT_TYPE_PTHREAD_T)
 ENDIF(HAVE_WINDOWS_H)
 
 # Check if typename works properly. Only MSC6 really fails here.
@@ -717,18 +838,228 @@ int main()
   return 0;
 }")
 
-# Check for explicit large file support
-DCMTK_TRY_COMPILE(_LARGEFILE64_SOURCE "explicit large file support is available"
-    "#define _LARGEFILE64_SOURCE
-#include <stdio.h>
-
-using namespace std;
+# do try compile to detect lfs and flags
+FUNCTION(DCMTK_LFS_TRY_COMPILE VAR FILE FLAGS DEFINITIONS)
+  IF(FLAGS OR DEFINITIONS)
+    SET(OPTIONS " with arguments: \"")
+  ELSE()
+    SET(OPTIONS)
+  ENDIF()
+  IF(DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS OR FLAGS)
+    SET(CMAKE_FLAGS CMAKE_FLAGS ${DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS})
+    IF(FLAGS)
+      LIST(APPEND CMAKE_FLAGS "-DCMAKE_C_FLAGS:STRING=${FLAGS}")
+      SET(OPTIONS "${OPTIONS}${FLAGS}")
+    ENDIF()
+  ELSE()
+    SET(CMAKE_FLAGS)
+  ENDIF()
+  IF(DEFINITIONS)
+    SET(COMPILE_DEFINITIONS COMPILE_DEFINITIONS ${DEFINITIONS})
+    IF(FLAGS)
+      SET(OPTIONS "${OPTIONS} ")
+    ENDIF()
+    SET(OPTIONS "${OPTIONS}${DEFINITIONS}")
+  ELSE()
+    SET(COMPILE_DEFINITIONS)
+  ENDIF()
+  IF(FLAGS OR DEFINITIONS)
+    SET(OPTIONS "${OPTIONS}\"")
+  ENDIF()
+  SET(SOURCEFILE "${DCMTK_SOURCE_DIR}/config/tests/${FILE}")
+  TRY_COMPILE(RESULT
+        "${CMAKE_BINARY_DIR}"
+        "${SOURCEFILE}"
+        ${CMAKE_FLAGS}
+        ${COMPILE_DEFINITIONS}
+        OUTPUT_VARIABLE OUTPUT
+  )
+  SET("${VAR}" "${RESULT}" PARENT_SCOPE)
+  IF(RESULT)
+    SET(LOGFILE "CMakeOutput.log")
+    SET(LOG "succeded")
+  ELSE()
+    SET(LOGFILE "CMakeError.log")
+    SET(LOG "failed")
+  ENDIF()
+  FILE(TO_NATIVE_PATH "${SOURCEFILE}" SOURCEFILE)
+  FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${LOGFILE}"
+    "compiling \"${SOURCEFILE}\"${OPTIONS} ${LOG} with the following output:\n"
+    "${OUTPUT}\n"
+  )
+ENDFUNCTION(DCMTK_LFS_TRY_COMPILE)
+
+FUNCTION(DCMTK_CHECK_ENABLE_LFS)
+  # normalize arguments
+  IF(DCMTK_ENABLE_LFS)
+    # for cases insensitive comparison
+    STRING(TOLOWER "${DCMTK_ENABLE_LFS}" DCMTK_ENABLE_LFS)
+  ENDIF()
+  IF(NOT DCMTK_ENABLE_LFS OR DCMTK_ENABLE_LFS MATCHES "^(on|true|yes|1)$")
+    SET(DCMTK_ENABLE_LFS "auto")
+  ELSEIF(DCMTK_ENABLE_LFS MATCHES "^(no|false|0)$")
+    SET(DCMTK_ENABLE_LFS "off")
+  ENDIF()
+  # determin whether lfs64 is available in case it wasn't detected yet it may be used
+  IF(NOT DEFINED DCMTK_LFS64_AVAILABLE AND DCMTK_ENABLE_LFS MATCHES "^(lfs64|auto)$")
+    SET(DCMTK_LFS64_DEFINITIONS)
+    SET(MESSAGE_RESULT "no")
+    SET(MESSAGE "Checking whether explicit large file support (LFS64) is available")
+    MESSAGE(STATUS "${MESSAGE}")
+    DCMTK_LFS_TRY_COMPILE(RESULT "lfs64.cc" "" "")
+    IF(NOT RESULT)
+      DCMTK_LFS_TRY_COMPILE(RESULT "lfs64.cc" "" "-D_LARGEFILE64_SOURCE")
+      IF(RESULT)
+        SET(DCMTK_LFS64_DEFINITIONS "-D_LARGEFILE64_SOURCE")
+        SET(MESSAGE_RESULT "yes, with ${DCMTK_LFS64_DEFINITIONS}")
+      ENDIF()
+    ELSE()
+      SET(MESSAGE_RESULT "yes")
+    ENDIF()
+    IF(RESULT)
+      SET(DCMTK_ENABLE_LFS "lfs64")
+      SET(DCMTK_LFS64_DEFINITIONS "${DCMTK_LFS64_DEFINITIONS}" CACHE INTERNAL "which compiler definitions to set for enabling LFS64 support")
+    ENDIF()
+    SET(DCMTK_LFS64_AVAILABLE "${RESULT}" CACHE INTERNAL "whether LFS64 is available or not" FORCE)
+    MESSAGE(STATUS "${MESSAGE} -- ${MESSAGE_RESULT}")
+  ENDIF()
+  # determin whether lfs is available in case it wasn't detected yet it may be used
+  IF(NOT DEFINED DCMTK_LFS_AVAILABLE AND DCMTK_ENABLE_LFS MATCHES "^(lfs|auto)$")
+    SET(DCMTK_LFS_FLAGS)
+    SET(DCMTK_LFS_DEFINITIONS)
+    SET(MESSAGE_RESULT "no")
+    SET(MESSAGE "Checking whether large file support (LFS) is available")
+    MESSAGE(STATUS "${MESSAGE}")
+    # determine size of fpos_t (for the strange LFS implementation on Windows)
+    SET(CMAKE_EXTRA_INCLUDE_FILES)
+    IF(HAVE_STDIO_H)
+      # prefer stdio.h so that is not in namespace std
+      SET(CMAKE_EXTRA_INCLUDE_FILES "stdio.h")
+    ELSEIF(HAVE_CSTDIO)
+      # use cstdio as the fallback
+      SET(CMAKE_EXTRA_INCLUDE_FILES "cstdio")
+    ENDIF()
+    CHECK_TYPE_SIZE("fpos_t" SIZEOF_FPOS_T)
+    # assume sizeof off_t to be correct, will be removed if below tests fail
+    SET(SIZEOF_OFF_T 8)
+    # try compile different combinations of compiler flags and definitions
+    DCMTK_LFS_TRY_COMPILE(RESULT "lfs.c" "" "")
+    IF(NOT RESULT)
+      SET(DCMTK_LFS_FLAGS "-n32")
+      DCMTK_LFS_TRY_COMPILE(RESULT "lfs.c" "-n32" "")
+    ENDIF()
+    IF(NOT RESULT)
+      SET(DCMTK_LFS_FLAGS "")
+      SET(DCMTK_LFS_DEFINITIONS "-D_FILE_OFFSET_BITS=64")
+      DCMTK_LFS_TRY_COMPILE(RESULT "lfs.c" "" "-D_FILE_OFFSET_BITS=64")
+    ENDIF()
+    IF(NOT RESULT)
+      SET(DCMTK_LFS_FLAGS "-n32")
+      SET(DCMTK_LFS_DEFINITIONS "-D_FILE_OFFSET_BITS=64")
+      DCMTK_LFS_TRY_COMPILE(RESULT "lfs.c" "-n32" "-D_FILE_OFFSET_BITS=64")
+    ENDIF()
+    IF(NOT RESULT)
+      SET(DCMTK_LFS_FLAGS "")
+      SET(DCMTK_LFS_DEFINITIONS "-D_LARGE_FILES=1")
+      DCMTK_LFS_TRY_COMPILE(RESULT "lfs.c" "" "-D_LARGE_FILES=1")
+    ENDIF()
+    IF(NOT RESULT)
+      SET(DCMTK_LFS_FLAGS "-n32")
+      SET(DCMTK_LFS_DEFINITIONS "-D_LARGE_FILES=1")
+      DCMTK_LFS_TRY_COMPILE(RESULT "lfs.c" "-n32" "-D_LARGE_FILES=1")
+    ENDIF()
+    IF(NOT RESULT)
+      # remove flags and reset SIZEOF_OFF_T to indeterminate
+      SET(DCMTK_LFS_FLAGS)
+      SET(DCMTK_LFS_DEFINITIONS)
+      SET(SIZEOF_OFF_T)
+      # detect strange LFS implementation that (at least) Windows provides
+      # strange since sizeof(fpos_t) == 8 but sizeof(off_t) == 4!
+      IF(SIZEOF_FPOS_T EQUAL 8)
+        SET(RESULT TRUE)
+      ENDIF()
+    ENDIF()
+    # format a nice result message
+    IF(RESULT)
+      SET(DCMTK_ENABLE_LFS "lfs")
+      SET(DCMTK_LFS_FLAGS "${DCMTK_LFS_FLAGS}" CACHE INTERNAL "which compiler flags to set for enabling LFS support")
+      SET(DCMTK_LFS_DEFINITIONS "${DCMTK_LFS_DEFINITIONS}" CACHE INTERNAL "which compiler definitions to set for enabling LFS support")
+      SET(MESSAGE_RESULT "yes")
+      IF(NOT DCMTK_LFS_FLAGS STREQUAL "" OR NOT DCMTK_LFS_DEFINITIONS STREQUAL "")
+        SET(MESSAGE_RESULT "${MESSAGE_RESULT}, with")
+        IF(NOT DCMTK_LFS_FLAGS STREQUAL "")
+          SET(MESSAGE_RESULT "${MESSAGE_RESULT} ${DCMTK_LFS_FLAGS}")
+        ENDIF()
+        IF(NOT DCMTK_LFS_DEFINITIONS STREQUAL "")
+          SET(MESSAGE_RESULT "${MESSAGE_RESULT} ${DCMTK_LFS_DEFINITIONS}")
+        ENDIF()
+      ENDIF()
+    ENDIF()
+    SET(DCMTK_LFS_AVAILABLE "${RESULT}" CACHE INTERNAL "whether LFS is available or not" FORCE)
+    IF(DEFINED SIZEOF_OFF_T)
+      SET(SIZEOF_OFF_T "${SIZEOF_OFF_T}" CACHE INTERNAL "")
+    ENDIF()
+    MESSAGE(STATUS "${MESSAGE} -- ${MESSAGE_RESULT}")
+  ENDIF()
+  # auto-select LFS implementation in case this is not the first run and the above tests did not select it
+  IF(DCMTK_ENABLE_LFS STREQUAL "auto")
+    IF(DCMTK_LFS64_AVAILABLE)
+      SET(DCMTK_ENABLE_LFS "lfs64")
+    ELSEIF(DCMTK_LFS_AVAILABLE)
+      SET(DCMTK_ENABLE_LFS "lfs")
+    ELSE()
+      SET(DCMTK_ENABLE_LFS "off")
+    ENDIF()
+  ELSEIF(NOT DCMTK_ENABLE_LFS MATCHES "^(lfs|lfs64|off)$")
+    # print a warning in case the given argument was not understood
+    MESSAGE(WARNING "unknown argument \"${DCMTK_ENABLE_LFS}\" for DCMTK_ENABLE_LFS, setting it to \"off\"")
+    SET(DCMTK_ENABLE_LFS "off")
+  ELSEIF(DCMTK_ENABLE_LFS STREQUAL "lfs64" AND NOT DCMTK_LFS64_AVAILABLE)
+    # test if the explicitly chosen implementation is really available
+    MESSAGE(WARNING "LFS64 was enabled but LFS64 support is not available, focing DCMTK_ENABLE_LFS to \"off\"")
+    SET(DCMTK_ENABLE_LFS "off")
+  ELSEIF(DCMTK_ENABLE_LFS STREQUAL "lfs" AND NOT DCMTK_LFS_AVAILABLE)
+    # test if the explicitly chosen implementation is really available
+    MESSAGE(WARNING "LFS was enabled but LFS support is not available, focing DCMTK_ENABLE_LFS to \"off\"")
+    SET(DCMTK_ENABLE_LFS "off")
+  ENDIF()
+  # create a list of available LFS types for the CMake GUI
+  SET(AVAILABLE_LFS_TYPES)
+  IF(NOT DEFINED DCMTK_LFS64_AVAILABLE OR DCMTK_LFS64_AVAILABLE)
+    LIST(APPEND AVAILABLE_LFS_TYPES "lfs64")
+  ENDIF()
+  IF(NOT DEFINED DCMTK_LFS_AVAILABLE OR DCMTK_LFS_AVAILABLE)
+    LIST(APPEND AVAILABLE_LFS_TYPES "lfs")
+  ENDIF()
+  # store the chosen value to the cache (potentially normalizing the given argument)
+  SET(DCMTK_ENABLE_LFS "${DCMTK_ENABLE_LFS}" CACHE STRING "whether to use lfs/lfs64 or not" FORCE)
+  SET_PROPERTY(CACHE DCMTK_ENABLE_LFS  PROPERTY STRINGS "auto" ${AVAILABLE_LFS_TYPES} "off")
+  # set values for osconfig.h and add compiler flags and definitions (if necessary)
+  IF(DCMTK_ENABLE_LFS STREQUAL "lfs64")
+    # set the value for generating osconfig.h
+    SET(DCMTK_LFS_MODE "DCMTK_LFS64" CACHE INTERNAL "" FORCE)
+    IF(NOT DCMTK_LFS64_DEFINITIONS STREQUAL "")
+      ADD_DEFINITIONS(${DCMTK_LFS64_DEFINITIONS})
+    ENDIF()
+    MESSAGE(STATUS "Info: Building DCMTK with explicit large file support (LFS64)")
+  ELSEIF(DCMTK_ENABLE_LFS STREQUAL "lfs")
+    # set the value for generating osconfig.h
+    SET(DCMTK_LFS_MODE "DCMTK_LFS" CACHE INTERNAL "" FORCE)
+    IF(NOT DCMTK_LFS_FLAGS STREQUAL "")
+      SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DCMTK_LFS_FLAGS}")
+      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DCMTK_LFS_FLAGS}")
+    ENDIF()
+    IF(NOT DCMTK_LFS_DEFINITIONS STREQUAL "")
+      ADD_DEFINITIONS(${DCMTK_LFS_DEFINITIONS})
+    ENDIF()
+    MESSAGE(STATUS "Info: Building DCMTK with large file support (LFS)")
+  ELSE()
+    SET(DCMTK_ENABLE_LFS)
+    MESSAGE(STATUS "Info: Building DCMTK without large file support, files >4GB may be inaccesible!")
+  ENDIF()
+ENDFUNCTION(DCMTK_CHECK_ENABLE_LFS)
 
-int main()
-{
-  FILE *f = fopen64(\"name\", \"r\");
-  return 0;
-}")
+DCMTK_CHECK_ENABLE_LFS()
 
 IF(WIN32)
   # If someone can tell me how to convince TRY_COMPILE to link against winsock,
@@ -832,13 +1163,6 @@ int main()
     return 0;
 }")
 
-DCMTK_TRY_COMPILE(ALIGNAS_SUPPORTS_TYPEDEFS "alignas supports typedefs"
-    "int main()
-{
-    typedef char type[16] alignas(4);
-    return 0;
-}")
-
 DCMTK_TRY_COMPILE(HAVE_DECLSPEC_ALIGN "__declspec(align) is supported"
     "int main()
 {
@@ -856,39 +1180,69 @@ static yes_type sfinae(consume<sizeof *new X>*);
 template<typename X>
 static no_type sfinae(...);
 struct test { test( int ); };
+template<int I>
+struct enable {};
+template<>
+struct enable<0> { enum { result = 0 }; };
 int main()
 {
-    return sizeof(sfinae<test>(0)) == sizeof(yes_type);
+    return enable<sizeof(sfinae<test>(0)) == sizeof(yes_type)>::result;
 }")
 
-# Compile config/arith.cc and generate config/arith.h
+DCMTK_TRY_COMPILE(HAVE_STD_NAMESPACE "ANSI standard C++ includes use std namespace"
+    "#include <iostream>
+int main()
+{
+    using namespace std;
+    std::cout << endl;
+    return 0;
+}")
+
+DCMTK_TRY_COMPILE(HAVE_STD__NOTHROW "the compiler supports std::nothrow"
+    "#include <new>
+int main()
+{
+    int* i = new (std::nothrow) int;
+    return 0;
+}")
+
+DCMTK_TRY_COMPILE(HAVE_NOTHROW_DELETE "the compiler supports operator delete (std::nothrow)"
+    "#include <new>
+int main()
+{
+    int* i = 0;
+    operator delete (i,std::nothrow);
+    return 0;
+}")
+
+# Compile config/tests/arith.cc and generate config/arith.h
 FUNCTION(INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES)
-  SET(ARITH_H_FILE ${DCMTK_BINARY_DIR}/config/include/dcmtk/config/arith.h)
-  IF(NOT EXISTS "${ARITH_H_FILE}")
+  SET(ARITH_H_FILE "${DCMTK_BINARY_DIR}/config/include/dcmtk/config/arith.h")
+  IF("${DCMTK_SOURCE_DIR}/config/tests/arith.cc" IS_NEWER_THAN "${ARITH_H_FILE}")
     IF(CMAKE_CROSSCOMPILING)
       IF(WIN32)
-        UNIX_TO_WINE_PATH(ARITH_H_FILE ${ARITH_H_FILE})
-        STRING(REPLACE "\\" "\\\\" ARITH_H_FILE ${ARITH_H_FILE})
+        UNIX_TO_WINE_PATH(ARITH_H_FILE "${ARITH_H_FILE}")
+        STRING(REPLACE "\\" "\\\\" ARITH_H_FILE "${ARITH_H_FILE}")
       ELSEIF(ANDROID)
-        SET(ARITH_H_DESTINATION ${ARITH_H_FILE})
+        SET(ARITH_H_DESTINATION "${ARITH_H_FILE}")
         SET(ARITH_H_FILE "${ANDROID_TEMPORARY_FILES_LOCATION}/arith.h")
       ENDIF()
     ENDIF(CMAKE_CROSSCOMPILING)
     DCMTK_TRY_RUN(
       RESULT COMPILED
-      ${DCMTK_BINARY_DIR}/CMakeTmp/Arith
-      ${DCMTK_SOURCE_DIR}/config/arith.cc
+      "${DCMTK_BINARY_DIR}/CMakeTmp/Arith"
+      "${DCMTK_SOURCE_DIR}/config/tests/arith.cc"
       COMPILE_DEFINITIONS -I"${DCMTK_BINARY_DIR}/config/include" -I"${DCMTK_SOURCE_DIR}/ofstd/include" -I"${DCMTK_SOURCE_DIR}/ofstd/libsrc"
       RUN_OUTPUT_VARIABLE OUTPUT
       COMPILE_OUTPUT_VARIABLE CERR
-      ARGS \"${ARITH_H_FILE}\"
+      ARGS "\\\"${ARITH_H_FILE}\\\""
     )
     IF(COMPILED)
       IF(NOT RESULT)
         MESSAGE(STATUS "${OUTPUT}")
         IF(CMAKE_CROSSCOMPILING)
           IF(ANDROID)
-            DCMTK_ANDROID_PULL(DCMTK_ANDROID_EMULATOR_INSTANCE ${ARITH_H_FILE} DESTINATION ${ARITH_H_DESTINATION})
+            DCMTK_ANDROID_PULL(DCMTK_ANDROID_EMULATOR_INSTANCE "${ARITH_H_FILE}" DESTINATION "${ARITH_H_DESTINATION}")
           ENDIF()
         ENDIF(CMAKE_CROSSCOMPILING)
       ELSE(NOT RESULT)
@@ -897,9 +1251,98 @@ FUNCTION(INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES)
     ELSE(COMPILED)
       MESSAGE(FATAL_ERROR "${CERR}")
     ENDIF(COMPILED)
-  ENDIF() # file exists
+  ENDIF() # file needs update
 ENDFUNCTION(INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES)
 
+FUNCTION(DCMTK_ADD_CXX11_FLAGS)
+  STRING(FIND "${CMAKE_CXX_FLAGS}" "${DCMTK_CXX11_FLAGS}" INDEX)
+  IF(INDEX EQUAL -1)
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DCMTK_CXX11_FLAGS}" PARENT_SCOPE)
+  ENDIF()
+ENDFUNCTION(DCMTK_ADD_CXX11_FLAGS)
+
+FUNCTION(DCMTK_TEST_ENABLE_CXX11)
+  SET(RESULT 0)
+  SET(TEXT_RESULT "disabled")
+  IF(DCMTK_ENABLE_CXX11)
+    IF(DEFINED HAVE_CXX11_TEST_RESULT)
+      IF(HAVE_CXX11_TEST_RESULT)
+        DCMTK_ADD_CXX11_FLAGS()
+        SET(RESULT 1)
+        SET(TEXT_RESULT "enabled")
+      ENDIF()
+    ELSE()
+      DCMTK_ADD_CXX11_FLAGS() # will automatically be removed by the function scope
+      SET(MESSAGE "Checking whether the compiler supports C++11")
+      MESSAGE(STATUS "${MESSAGE}")
+      TRY_COMPILE(COMPILE_RESULT "${CMAKE_BINARY_DIR}" "${DCMTK_SOURCE_DIR}/config/tests/cxx11.cc")
+      SET(HAVE_CXX11_TEST_RESULT "${COMPILE_RESULT}" CACHE INTERNAL "Caches the configuration test result for C++11 support.")
+      IF(COMPILE_RESULT)
+        SET(RESULT 1)
+        SET(TEXT_RESULT "enabled")
+        MESSAGE(STATUS "${MESSAGE} -- yes")
+      ELSE()
+        MESSAGE(STATUS "${MESSAGE} -- no")
+      ENDIF()
+    ENDIF()
+  ENDIF()
+  SET(HAVE_CXX11 "${RESULT}" CACHE INTERNAL "Set to 1 if the compiler supports C++11 and it should be enabled.")
+  MESSAGE(STATUS "Info: C++11 features ${TEXT_RESULT}")
+  IF(RESULT)
+    # push C++11 CXX-flags to the parent scope
+    SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} PARENT_SCOPE)
+  ENDIF()
+ENDFUNCTION(DCMTK_TEST_ENABLE_CXX11)
+
+FUNCTION(DCMTK_TEST_ENABLE_STL_FEATURE NAME)
+  STRING(TOUPPER "${NAME}" FEATURE)
+  IF(ARGN)
+    SET(SOURCEFILE "${ARGN}")
+  ELSE()
+    SET(SOURCEFILE "${NAME}")
+  ENDIF()
+  IF(DCMTK_ENABLE_STL_${FEATURE} STREQUAL "INFERRED")
+    SET(DCMTK_ENABLE_STL_${FEATURE} ${DCMTK_ENABLE_STL})
+  ENDIF()
+  SET(RESULT 0)
+  SET(TEXT_RESULT "disabled")
+  IF(DCMTK_ENABLE_STL_${FEATURE} STREQUAL "ON")
+    IF(DEFINED HAVE_STL_${FEATURE}_TEST_RESULT)
+      IF(HAVE_STL_${FEATURE}_TEST_RESULT)
+        SET(RESULT 1)
+        SET(TEXT_RESULT "enabled")
+      ENDIF()
+    ELSE()
+      SET(MESSAGE "Checking whether STL ${NAME} works correctly")
+      MESSAGE(STATUS "${MESSAGE}")
+      DCMTK_TRY_RUN(RUN_RESULT COMPILE_RESULT "${CMAKE_BINARY_DIR}" "${DCMTK_SOURCE_DIR}/config/tests/${SOURCEFILE}.cc")
+      IF(COMPILE_RESULT AND RUN_RESULT EQUAL 0)
+        SET(RESULT 1)
+        SET(TEXT_RESULT "enabled")
+        MESSAGE(STATUS "${MESSAGE} -- yes")
+      ELSE()
+        MESSAGE(STATUS "${MESSAGE} -- no")
+      ENDIF()
+      SET(HAVE_STL_${FEATURE}_TEST_RESULT ${RESULT} CACHE INTERNAL "Caches the configuration test result for STL ${NAME}")
+    ENDIF()
+  ENDIF()
+  SET(HAVE_STL_${FEATURE} ${RESULT} CACHE INTERNAL "Set to 1 if the compiler/OS provides a working STL ${NAME} implementation.")
+  MESSAGE(STATUS "Info: STL ${NAME} support ${TEXT_RESULT}")
+ENDFUNCTION(DCMTK_TEST_ENABLE_STL_FEATURE)
+
+DCMTK_TEST_ENABLE_CXX11()
+DCMTK_TEST_ENABLE_STL_FEATURE("vector")
+DCMTK_TEST_ENABLE_STL_FEATURE("algorithm" "algo")
+DCMTK_TEST_ENABLE_STL_FEATURE("limits")
+DCMTK_TEST_ENABLE_STL_FEATURE("list")
+DCMTK_TEST_ENABLE_STL_FEATURE("map")
+DCMTK_TEST_ENABLE_STL_FEATURE("memory")
+DCMTK_TEST_ENABLE_STL_FEATURE("stack")
+DCMTK_TEST_ENABLE_STL_FEATURE("string")
+DCMTK_TEST_ENABLE_STL_FEATURE("type_traits" "ttraits")
+DCMTK_TEST_ENABLE_STL_FEATURE("tuple")
+DCMTK_TEST_ENABLE_STL_FEATURE("system_error" "syserr")
+
 IF(CMAKE_CROSSCOMPILING)
   SET(DCMTK_CROSS_COMPILING ${CMAKE_CROSSCOMPILING})
 ENDIF(CMAKE_CROSSCOMPILING)
diff --git a/CMake/android.toolchain.cmake b/CMake/android.toolchain.cmake
deleted file mode 100644
index 94f7da4..0000000
--- a/CMake/android.toolchain.cmake
+++ /dev/null
@@ -1,1812 +0,0 @@
-#
-#
-#  Copyright (C) 2015, OFFIS e.V.
-#  All rights reserved.  See COPYRIGHT file for details.
-#
-#  This software and supporting documentation were developed by
-#
-#    OFFIS e.V.
-#    R&D Division Health
-#    Escherweg 2
-#    D-26121 Oldenburg, Germany
-#
-#  Author:  Jan Schlamelcher
-#
-#  Purpose:
-#      Detecting and inspecting any available Android NDK installation
-#      and contained toolchains. Setting the depending CMake variables
-#      appropriately based on the detection results and user settings.
-#
-#  This file is based upon this Android toolchain file found on
-#  github: https://github.com/taka-no-me/android-cmake,
-#  originally released under this license:
-
-# Copyright (c) 2010-2011, Ethan Rublee
-# Copyright (c) 2011-2014, Andrey Kamaev
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# 1.  Redistributions of source code must retain the above copyright notice,
-#     this list of conditions and the following disclaimer.
-#
-# 2.  Redistributions in binary form must reproduce the above copyright notice,
-#     this list of conditions and the following disclaimer in the documentation
-#     and/or other materials provided with the distribution.
-#
-# 3.  Neither the name of the copyright holder nor the names of its
-#     contributors may be used to endorse or promote products derived from this
-#     software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-# ------------------------------------------------------------------------------
-#  Android CMake toolchain file, for use with the Android NDK r5-r9
-#  Requires cmake 2.6.3 or newer (2.8.5 or newer is recommended).
-#  See home page: https://github.com/taka-no-me/android-cmake
-#
-#  The file is maintained by the OpenCV project. The latest version can be get at
-#  http://code.opencv.org/projects/opencv/repository/revisions/master/changes/android/android.toolchain.cmake
-#
-#  Usage Linux:
-#   $ export ANDROID_NDK=/absolute/path/to/the/android-ndk
-#   $ mkdir build && cd build
-#   $ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/the/android.toolchain.cmake ..
-#   $ make -j8
-#
-#  Usage Linux (using standalone toolchain):
-#   $ export ANDROID_STANDALONE_TOOLCHAIN=/absolute/path/to/android-toolchain
-#   $ mkdir build && cd build
-#   $ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/the/android.toolchain.cmake ..
-#   $ make -j8
-#
-#  Usage Windows:
-#     You need native port of make to build your project.
-#     Android NDK r7 (or newer) already has make.exe on board.
-#     For older NDK you have to install it separately.
-#     For example, this one: http://gnuwin32.sourceforge.net/packages/make.htm
-#
-#   $ SET ANDROID_NDK=C:\absolute\path\to\the\android-ndk
-#   $ mkdir build && cd build
-#   $ cmake.exe -G"MinGW Makefiles"
-#       -DCMAKE_TOOLCHAIN_FILE=path\to\the\android.toolchain.cmake
-#       -DCMAKE_MAKE_PROGRAM="%ANDROID_NDK%\prebuilt\windows\bin\make.exe" ..
-#   $ cmake.exe --build .
-#
-#
-#  Options (can be set as cmake parameters: -D<option_name>=<value>):
-#    ANDROID_NDK=/opt/android-ndk - path to the NDK root.
-#      Can be set as environment variable. Can be set only at first cmake run.
-#
-#    ANDROID_STANDALONE_TOOLCHAIN=/opt/android-toolchain - path to the
-#      standalone toolchain. This option is not used if full NDK is found
-#      (ignored if ANDROID_NDK is set).
-#      Can be set as environment variable. Can be set only at first cmake run.
-#
-#    ANDROID_ABI=armeabi-v7a - specifies the target Application Binary
-#      Interface (ABI). This option nearly matches to the APP_ABI variable
-#      used by ndk-build tool from Android NDK.
-#
-#      Possible targets are:
-#        "armeabi" - matches to the NDK ABI with the same name.
-#           See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
-#        "armeabi-v7a" - matches to the NDK ABI with the same name.
-#           See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
-#        "armeabi-v7a with NEON" - same as armeabi-v7a, but
-#            sets NEON as floating-point unit
-#        "armeabi-v7a with VFPV3" - same as armeabi-v7a, but
-#            sets VFPV3 as floating-point unit (has 32 registers instead of 16).
-#        "armeabi-v6 with VFP" - tuned for ARMv6 processors having VFP.
-#        "x86" - matches to the NDK ABI with the same name.
-#            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
-#        "mips" - matches to the NDK ABI with the same name.
-#            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
-#
-#    ANDROID_NATIVE_API_LEVEL=android-8 - level of Android API compile for.
-#      Option is read-only when standalone toolchain is used.
-#
-#    ANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.6 - the name of compiler
-#      toolchain to be used. The list of possible values depends on the NDK
-#      version. For NDK r8c the possible values are:
-#
-#        * arm-linux-androideabi-4.4.3
-#        * arm-linux-androideabi-4.6
-#        * arm-linux-androideabi-clang3.1
-#        * mipsel-linux-android-4.4.3
-#        * mipsel-linux-android-4.6
-#        * mipsel-linux-android-clang3.1
-#        * x86-4.4.3
-#        * x86-4.6
-#        * x86-clang3.1
-#
-#    ANDROID_FORCE_ARM_BUILD=OFF - set ON to generate 32-bit ARM instructions
-#      instead of Thumb. Is not available for "x86" (inapplicable) and
-#      "armeabi-v6 with VFP" (is forced to be ON) ABIs.
-#
-#    ANDROID_NO_UNDEFINED=ON - set ON to show all undefined symbols as linker
-#      errors even if they are not used.
-#
-#    ANDROID_SO_UNDEFINED=OFF - set ON to allow undefined symbols in shared
-#      libraries. Automatically turned for NDK r5x and r6x due to GLESv2
-#      problems.
-#
-#    LIBRARY_OUTPUT_PATH_ROOT=${CMAKE_BINARY_DIR} - where to output binary
-#      files. See additional details below.
-#
-#    ANDROID_SET_OBSOLETE_VARIABLES=ON - if set, then toolchain defines some
-#      obsolete variables which were used by previous versions of this file for
-#      backward compatibility.
-#
-#    ANDROID_STL=gnustl_static - specify the runtime to use.
-#
-#      Possible values are:
-#        none           -> Do not configure the runtime.
-#        system         -> Use the default minimal system C++ runtime library.
-#                          Implies -fno-rtti -fno-exceptions.
-#                          Is not available for standalone toolchain.
-#        system_re      -> Use the default minimal system C++ runtime library.
-#                          Implies -frtti -fexceptions.
-#                          Is not available for standalone toolchain.
-#        gabi++_static  -> Use the GAbi++ runtime as a static library.
-#                          Implies -frtti -fno-exceptions.
-#                          Available for NDK r7 and newer.
-#                          Is not available for standalone toolchain.
-#        gabi++_shared  -> Use the GAbi++ runtime as a shared library.
-#                          Implies -frtti -fno-exceptions.
-#                          Available for NDK r7 and newer.
-#                          Is not available for standalone toolchain.
-#        stlport_static -> Use the STLport runtime as a static library.
-#                          Implies -fno-rtti -fno-exceptions for NDK before r7.
-#                          Implies -frtti -fno-exceptions for NDK r7 and newer.
-#                          Is not available for standalone toolchain.
-#        stlport_shared -> Use the STLport runtime as a shared library.
-#                          Implies -fno-rtti -fno-exceptions for NDK before r7.
-#                          Implies -frtti -fno-exceptions for NDK r7 and newer.
-#                          Is not available for standalone toolchain.
-#        gnustl_static  -> Use the GNU STL as a static library.
-#                          Implies -frtti -fexceptions.
-#        gnustl_shared  -> Use the GNU STL as a shared library.
-#                          Implies -frtti -fno-exceptions.
-#                          Available for NDK r7b and newer.
-#                          Silently degrades to gnustl_static if not available.
-#
-#    ANDROID_STL_FORCE_FEATURES=ON - turn rtti and exceptions support based on
-#      chosen runtime. If disabled, then the user is responsible for settings
-#      these options.
-#
-#  What?:
-#    android-cmake toolchain searches for NDK/toolchain in the following order:
-#      ANDROID_NDK - cmake parameter
-#      ANDROID_NDK - environment variable
-#      ANDROID_STANDALONE_TOOLCHAIN - cmake parameter
-#      ANDROID_STANDALONE_TOOLCHAIN - environment variable
-#      ANDROID_NDK - default locations
-#      ANDROID_STANDALONE_TOOLCHAIN - default locations
-#
-#    Make sure to do the following in your scripts:
-#      SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${my_cxx_flags}" )
-#      SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${my_cxx_flags}" )
-#    The flags will be prepopulated with critical flags, so don't loose them.
-#    Also be aware that toolchain also sets configuration-specific compiler
-#    flags and linker flags.
-#
-#    ANDROID and BUILD_ANDROID will be set to true, you may test any of these
-#    variables to make necessary Android-specific configuration changes.
-#
-#    Also ARMEABI or ARMEABI_V7A or X86 or MIPS will be set true, mutually
-#    exclusive. NEON option will be set true if VFP is set to NEON.
-#
-#    LIBRARY_OUTPUT_PATH_ROOT should be set in cache to determine where Android
-#    libraries will be installed.
-#    Default is ${CMAKE_BINARY_DIR}, and the android libs will always be
-#    under the ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}
-#    (depending on the target ABI). This is convenient for Android packaging.
-#
-#  Change Log:
-#   - initial version December 2010
-#   - April 2011
-#     [+] added possibility to build with NDK (without standalone toolchain)
-#     [+] support cross-compilation on Windows (native, no cygwin support)
-#     [+] added compiler option to force "char" type to be signed
-#     [+] added toolchain option to compile to 32-bit ARM instructions
-#     [+] added toolchain option to disable SWIG search
-#     [+] added platform "armeabi-v7a with VFPV3"
-#     [~] ARM_TARGETS renamed to ARM_TARGET
-#     [+] EXECUTABLE_OUTPUT_PATH is set by toolchain (required on Windows)
-#     [~] Fixed bug with ANDROID_API_LEVEL variable
-#     [~] turn off SWIG search if it is not found first time
-#   - May 2011
-#     [~] ANDROID_LEVEL is renamed to ANDROID_API_LEVEL
-#     [+] ANDROID_API_LEVEL is detected by toolchain if not specified
-#     [~] added guard to prevent changing of output directories on the first
-#         cmake pass
-#     [~] toolchain exits with error if ARM_TARGET is not recognized
-#   - June 2011
-#     [~] default NDK path is updated for version r5c
-#     [+] variable CMAKE_SYSTEM_PROCESSOR is set based on ARM_TARGET
-#     [~] toolchain install directory is added to linker paths
-#     [-] removed SWIG-related stuff from toolchain
-#     [+] added macro find_host_package, find_host_program to search
-#         packages/programs on the host system
-#     [~] fixed path to STL library
-#   - July 2011
-#     [~] fixed options caching
-#     [~] search for all supported NDK versions
-#     [~] allowed spaces in NDK path
-#   - September 2011
-#     [~] updated for NDK r6b
-#   - November 2011
-#     [*] rewritten for NDK r7
-#     [+] x86 toolchain support (experimental)
-#     [+] added "armeabi-v6 with VFP" ABI for ARMv6 processors.
-#     [~] improved compiler and linker flags management
-#     [+] support different build flags for Release and Debug configurations
-#     [~] by default compiler flags the same as used by ndk-build (but only
-#         where reasonable)
-#     [~] ANDROID_NDK_TOOLCHAIN_ROOT is split to ANDROID_STANDALONE_TOOLCHAIN
-#         and ANDROID_TOOLCHAIN_ROOT
-#     [~] ARM_TARGET is renamed to ANDROID_ABI
-#     [~] ARMEABI_NDK_NAME is renamed to ANDROID_NDK_ABI_NAME
-#     [~] ANDROID_API_LEVEL is renamed to ANDROID_NATIVE_API_LEVEL
-#   - January 2012
-#     [+] added stlport_static support (experimental)
-#     [+] added special check for cygwin
-#     [+] filtered out hidden files (starting with .) while globbing inside NDK
-#     [+] automatically applied GLESv2 linkage fix for NDK revisions 5-6
-#     [+] added ANDROID_GET_ABI_RAWNAME to get NDK ABI names by CMake flags
-#   - February 2012
-#     [+] updated for NDK r7b
-#     [~] fixed cmake try_compile() command
-#     [~] Fix for missing install_name_tool on OS X
-#   - March 2012
-#     [~] fixed incorrect C compiler flags
-#     [~] fixed CMAKE_SYSTEM_PROCESSOR change on ANDROID_ABI change
-#     [+] improved toolchain loading speed
-#     [+] added assembler language support (.S)
-#     [+] allowed preset search paths and extra search suffixes
-#   - April 2012
-#     [+] updated for NDK r7c
-#     [~] fixed most of problems with compiler/linker flags and caching
-#     [+] added option ANDROID_FUNCTION_LEVEL_LINKING
-#   - May 2012
-#     [+] updated for NDK r8
-#     [+] added mips architecture support
-#   - August 2012
-#     [+] updated for NDK r8b
-#     [~] all intermediate files generated by toolchain are moved to CMakeFiles
-#     [~] libstdc++ and libsupc are removed from explicit link libraries
-#     [+] added CCache support (via NDK_CCACHE environment or cmake variable)
-#     [+] added gold linker support for NDK r8b
-#     [~] fixed mips linker flags for NDK r8b
-#   - September 2012
-#     [+] added NDK release name detection (see ANDROID_NDK_RELEASE)
-#     [+] added support for all C++ runtimes from NDK
-#         (system, gabi++, stlport, gnustl)
-#     [+] improved warnings on known issues of NDKs
-#     [~] use gold linker as default if available (NDK r8b)
-#     [~] globally turned off rpath
-#     [~] compiler options are aligned with NDK r8b
-#   - October 2012
-#     [~] fixed C++ linking: explicitly link with math library (OpenCV #2426)
-#   - November 2012
-#     [+] updated for NDK r8c
-#     [+] added support for clang compiler
-#   - December 2012
-#     [+] suppress warning about unused CMAKE_TOOLCHAIN_FILE variable
-#     [+] adjust API level to closest compatible as NDK does
-#     [~] fixed ccache full path search
-#     [+] updated for NDK r8d
-#     [~] compiler options are aligned with NDK r8d
-#   - March 2013
-#     [+] updated for NDK r8e (x86 version)
-#     [+] support x86_64 version of NDK
-#   - April 2013
-#     [+] support non-release NDK layouts (from Linaro git and Android git)
-#     [~] automatically detect if explicit link to crtbegin_*.o is needed
-#   - June 2013
-#     [~] fixed stl include path for standalone toolchain made by NDK >= r8c
-#   - July 2013
-#     [+] updated for NDK r9
-#   - November 2013
-#     [+] updated for NDK r9b
-#   - December 2013
-#     [+] updated for NDK r9c
-#   - January 2014
-#     [~] fix copying of shared STL
-#   - April 2014
-#     [+] updated for NDK r9d
-# ------------------------------------------------------------------------------
-
-cmake_minimum_required( VERSION 2.8.3 )
-if( ${CMAKE_VERSION} VERSION_GREATER 3.1 OR ${CMAKE_VERSION} VERSION_EQUAL 3.1 )
-  cmake_policy( SET CMP0054 NEW )
-endif()
-
-if( DEFINED CMAKE_CROSSCOMPILING )
- # subsequent toolchain loading is not really needed
- return()
-endif()
-
-if( CMAKE_TOOLCHAIN_FILE )
- # touch toolchain variable only to suppress "unused variable" warning
-endif()
-
-get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
-if( _CMAKE_IN_TRY_COMPILE )
- if( NOT ANDROID_TOOLCHAIN_CONFIG_FILE )
-  set( ANDROID_TOOLCHAIN_CONFIG_FILE "${CMAKE_BINARY_DIR}/../android.toolchain.config.cmake" )
- endif()
- include( "${ANDROID_TOOLCHAIN_CONFIG_FILE}" )
-endif()
-
-# this one is important
-set( CMAKE_SYSTEM_NAME Linux )
-# this one not so much
-set( CMAKE_SYSTEM_VERSION 1 )
-
-# rpath makes low sense for Android
-set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )
-
-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
-if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS)
- if( CMAKE_HOST_WIN32 )
-  file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
-  set( ANDROID_NDK_SEARCH_PATHS "${ANDROID_NDK_SEARCH_PATHS}/android-ndk" "$ENV{SystemDrive}/NVPACK/android-ndk" )
- else()
-  file( TO_CMAKE_PATH "$ENV{HOME}" ANDROID_NDK_SEARCH_PATHS )
-  set( ANDROID_NDK_SEARCH_PATHS /opt/android-ndk "${ANDROID_NDK_SEARCH_PATHS}/NVPACK/android-ndk" )
- endif()
-endif()
-if(NOT DEFINED ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH)
- set( ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH /opt/android-toolchain )
-endif()
-
-set( ANDROID_SUPPORTED_ABIS_arm "armeabi-v7a;armeabi;armeabi-v7a with NEON;armeabi-v7a with VFPV3;armeabi-v6 with VFP" )
-set( ANDROID_SUPPORTED_ABIS_x86 "x86" )
-set( ANDROID_SUPPORTED_ABIS_mipsel "mips" )
-
-set( ANDROID_DEFAULT_NDK_API_LEVEL 8 )
-set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 )
-set( ANDROID_DEFAULT_NDK_API_LEVEL_mips 9 )
-
-
-macro( __LIST_FILTER listvar regex )
- if( ${listvar} )
-  foreach( __val ${${listvar}} )
-   if( __val MATCHES "${regex}" )
-    list( REMOVE_ITEM ${listvar} "${__val}" )
-   endif()
-  endforeach()
- endif()
-endmacro()
-
-macro( __INIT_VARIABLE var_name )
- set( __test_path 0 )
- foreach( __var ${ARGN} )
-  if( __var STREQUAL "PATH" )
-   set( __test_path 1 )
-   break()
-  endif()
- endforeach()
- if( __test_path AND NOT EXISTS "${${var_name}}" )
-  unset( ${var_name} CACHE )
- endif()
- if( "${${var_name}}" STREQUAL "" )
-  set( __values 0 )
-  foreach( __var ${ARGN} )
-   if( __var STREQUAL "VALUES" )
-    set( __values 1 )
-   elseif( NOT __var STREQUAL "PATH" )
-    set( __obsolete 0 )
-    if( __var MATCHES "^OBSOLETE_.*$" )
-     string( REPLACE "OBSOLETE_" "" __var "${__var}" )
-     set( __obsolete 1 )
-    endif()
-    if( __var MATCHES "^ENV_.*$" )
-     string( REPLACE "ENV_" "" __var "${__var}" )
-     set( __value "$ENV{${__var}}" )
-    elseif( DEFINED ${__var} )
-     set( __value "${${__var}}" )
-    else()
-     if( __values )
-      set( __value "${__var}" )
-     else()
-      set( __value "" )
-     endif()
-    endif()
-    if( NOT "${__value}" STREQUAL "" )
-     if( __test_path )
-      if( EXISTS "${__value}" )
-       file( TO_CMAKE_PATH "${__value}" ${var_name} )
-       if( __obsolete AND NOT _CMAKE_IN_TRY_COMPILE )
-        message( WARNING "Using value of obsolete variable ${__var} as initial value for ${var_name}. Please note, that ${__var} can be completely removed in future versions of the toolchain." )
-       endif()
-       break()
-      endif()
-     else()
-      set( ${var_name} "${__value}" )
-       if( __obsolete AND NOT _CMAKE_IN_TRY_COMPILE )
-        message( WARNING "Using value of obsolete variable ${__var} as initial value for ${var_name}. Please note, that ${__var} can be completely removed in future versions of the toolchain." )
-       endif()
-      break()
-     endif()
-    endif()
-   endif()
-  endforeach()
-  unset( __value )
-  unset( __values )
-  unset( __obsolete )
- elseif( __test_path )
-  file( TO_CMAKE_PATH "${${var_name}}" ${var_name} )
- endif()
- unset( __test_path )
-endmacro()
-
-macro( __DETECT_NATIVE_API_LEVEL _var _path )
- SET( __ndkApiLevelRegex "^[\t ]*#define[\t ]+__ANDROID_API__[\t ]+([0-9]+)[\t ]*$" )
- FILE( STRINGS ${_path} __apiFileContent REGEX "${__ndkApiLevelRegex}" )
- if( NOT __apiFileContent )
-  message( SEND_ERROR "Could not get Android native API level. Probably you have specified invalid level value, or your copy of NDK/toolchain is broken." )
- endif()
- string( REGEX REPLACE "${__ndkApiLevelRegex}" "\\1" ${_var} "${__apiFileContent}" )
- unset( __apiFileContent )
- unset( __ndkApiLevelRegex )
-endmacro()
-
-macro( __DETECT_TOOLCHAIN_MACHINE_NAME _var _root )
- if( EXISTS "${_root}" )
-  file( GLOB __gccExePath RELATIVE "${_root}/bin/" "${_root}/bin/*-gcc${TOOL_OS_SUFFIX}" )
-  __LIST_FILTER( __gccExePath "^[.].*" )
-  list( LENGTH __gccExePath __gccExePathsCount )
-  if( NOT __gccExePathsCount EQUAL 1  AND NOT _CMAKE_IN_TRY_COMPILE )
-   message( WARNING "Could not determine machine name for compiler from ${_root}" )
-   set( ${_var} "" )
-  else()
-   get_filename_component( __gccExeName "${__gccExePath}" NAME_WE )
-   string( REPLACE "-gcc" "" ${_var} "${__gccExeName}" )
-  endif()
-  unset( __gccExePath )
-  unset( __gccExePathsCount )
-  unset( __gccExeName )
- else()
-  set( ${_var} "" )
- endif()
-endmacro()
-
-
-# fight against cygwin
-set( ANDROID_FORBID_SYGWIN TRUE CACHE BOOL "Prevent cmake from working under cygwin and using cygwin tools")
-mark_as_advanced( ANDROID_FORBID_SYGWIN )
-if( ANDROID_FORBID_SYGWIN )
- if( CYGWIN )
-  message( FATAL_ERROR "Android NDK and android-cmake toolchain are not welcome Cygwin. It is unlikely that this cmake toolchain will work under cygwin. But if you want to try then you can set cmake variable ANDROID_FORBID_SYGWIN to FALSE and rerun cmake." )
- endif()
-
- if( CMAKE_HOST_WIN32 )
-  # remove cygwin from PATH
-  set( __new_path "$ENV{PATH}")
-  __LIST_FILTER( __new_path "cygwin" )
-  set(ENV{PATH} "${__new_path}")
-  unset(__new_path)
- endif()
-endif()
-
-
-# detect current host platform
-if( NOT DEFINED ANDROID_NDK_HOST_X64 AND (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64" OR CMAKE_HOST_APPLE) )
- set( ANDROID_NDK_HOST_X64 1 CACHE BOOL "Try to use 64-bit compiler toolchain" )
- mark_as_advanced( ANDROID_NDK_HOST_X64 )
-endif()
-
-set( TOOL_OS_SUFFIX "" )
-if( CMAKE_HOST_APPLE )
- set( ANDROID_NDK_HOST_SYSTEM_NAME "darwin-x86_64" )
- set( ANDROID_NDK_HOST_SYSTEM_NAME2 "darwin-x86" )
-elseif( CMAKE_HOST_WIN32 )
- set( ANDROID_NDK_HOST_SYSTEM_NAME "windows-x86_64" )
- set( ANDROID_NDK_HOST_SYSTEM_NAME2 "windows" )
- set( TOOL_OS_SUFFIX ".exe" )
-elseif( CMAKE_HOST_UNIX )
- set( ANDROID_NDK_HOST_SYSTEM_NAME "linux-x86_64" )
- set( ANDROID_NDK_HOST_SYSTEM_NAME2 "linux-x86" )
-else()
- message( FATAL_ERROR "Cross-compilation on your platform is not supported by this cmake toolchain" )
-endif()
-
-if( NOT ANDROID_NDK_HOST_X64 )
- set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} )
-endif()
-
-# see if we have path to Android NDK
-__INIT_VARIABLE( ANDROID_NDK PATH ENV_ANDROID_NDK )
-if( NOT ANDROID_NDK )
- # see if we have path to Android standalone toolchain
- __INIT_VARIABLE( ANDROID_STANDALONE_TOOLCHAIN PATH ENV_ANDROID_STANDALONE_TOOLCHAIN OBSOLETE_ANDROID_NDK_TOOLCHAIN_ROOT OBSOLETE_ENV_ANDROID_NDK_TOOLCHAIN_ROOT )
-
- if( NOT ANDROID_STANDALONE_TOOLCHAIN )
-  #try to find Android NDK in one of the the default locations
-  set( __ndkSearchPaths )
-  foreach( __ndkSearchPath ${ANDROID_NDK_SEARCH_PATHS} )
-   foreach( suffix ${ANDROID_SUPPORTED_NDK_VERSIONS} )
-    list( APPEND __ndkSearchPaths "${__ndkSearchPath}${suffix}" )
-   endforeach()
-  endforeach()
-  __INIT_VARIABLE( ANDROID_NDK PATH VALUES ${__ndkSearchPaths} )
-  unset( __ndkSearchPaths )
-
-  if( ANDROID_NDK )
-   message( STATUS "Using default path for Android NDK: ${ANDROID_NDK}" )
-   message( STATUS "  If you prefer to use a different location, please define a cmake or environment variable: ANDROID_NDK" )
-  else()
-   #try to find Android standalone toolchain in one of the the default locations
-   __INIT_VARIABLE( ANDROID_STANDALONE_TOOLCHAIN PATH ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH )
-
-   if( ANDROID_STANDALONE_TOOLCHAIN )
-    message( STATUS "Using default path for standalone toolchain ${ANDROID_STANDALONE_TOOLCHAIN}" )
-    message( STATUS "  If you prefer to use a different location, please define the variable: ANDROID_STANDALONE_TOOLCHAIN" )
-   endif( ANDROID_STANDALONE_TOOLCHAIN )
-  endif( ANDROID_NDK )
- endif( NOT ANDROID_STANDALONE_TOOLCHAIN )
-endif( NOT ANDROID_NDK )
-
-# remember found paths
-if( ANDROID_NDK )
- get_filename_component( ANDROID_NDK "${ANDROID_NDK}" ABSOLUTE )
- set( ANDROID_NDK "${ANDROID_NDK}" CACHE INTERNAL "Path of the Android NDK" FORCE )
- set( BUILD_WITH_ANDROID_NDK True )
- if( EXISTS "${ANDROID_NDK}/RELEASE.TXT" )
-  file( STRINGS "${ANDROID_NDK}/RELEASE.TXT" ANDROID_NDK_RELEASE_FULL LIMIT_COUNT 1 REGEX r[0-9]+[a-z]? )
-  string( REGEX MATCH r[0-9]+[a-z]? ANDROID_NDK_RELEASE "${ANDROID_NDK_RELEASE_FULL}" )
- else()
-  set( ANDROID_NDK_RELEASE "r1x" )
-  set( ANDROID_NDK_RELEASE_FULL "unreleased" )
- endif()
-elseif( ANDROID_STANDALONE_TOOLCHAIN )
- get_filename_component( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" ABSOLUTE )
- # try to detect change
- if( CMAKE_AR )
-  string( LENGTH "${ANDROID_STANDALONE_TOOLCHAIN}" __length )
-  string( SUBSTRING "${CMAKE_AR}" 0 ${__length} __androidStandaloneToolchainPreviousPath )
-  if( NOT __androidStandaloneToolchainPreviousPath STREQUAL ANDROID_STANDALONE_TOOLCHAIN )
-   message( FATAL_ERROR "It is not possible to change path to the Android standalone toolchain on subsequent run." )
-  endif()
-  unset( __androidStandaloneToolchainPreviousPath )
-  unset( __length )
- endif()
- set( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" CACHE INTERNAL "Path of the Android standalone toolchain" FORCE )
- set( BUILD_WITH_STANDALONE_TOOLCHAIN True )
-else()
- list(GET ANDROID_NDK_SEARCH_PATHS 0 ANDROID_NDK_SEARCH_PATH)
- message( FATAL_ERROR "Could not find neither Android NDK nor Android standalone toolchain.
-    You should either set an environment variable:
-      export ANDROID_NDK=~/my-android-ndk
-    or
-      export ANDROID_STANDALONE_TOOLCHAIN=~/my-android-toolchain
-    or put the toolchain or NDK in the default path:
-      sudo ln -s ~/my-android-ndk ${ANDROID_NDK_SEARCH_PATH}
-      sudo ln -s ~/my-android-toolchain ${ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH}" )
-endif()
-
-# android NDK layout
-if( BUILD_WITH_ANDROID_NDK )
- if( NOT DEFINED ANDROID_NDK_LAYOUT )
-  # try to automatically detect the layout
-  if( EXISTS "${ANDROID_NDK}/RELEASE.TXT")
-   set( ANDROID_NDK_LAYOUT "RELEASE" )
-  elseif( EXISTS "${ANDROID_NDK}/../../linux-x86/toolchain/" )
-   set( ANDROID_NDK_LAYOUT "LINARO" )
-  elseif( EXISTS "${ANDROID_NDK}/../../gcc/" )
-   set( ANDROID_NDK_LAYOUT "ANDROID" )
-  endif()
- endif()
- set( ANDROID_NDK_LAYOUT "${ANDROID_NDK_LAYOUT}" CACHE STRING "The inner layout of NDK" )
- mark_as_advanced( ANDROID_NDK_LAYOUT )
- if( ANDROID_NDK_LAYOUT STREQUAL "LINARO" )
-  set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} ) # only 32-bit at the moment
-  set( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK}/../../${ANDROID_NDK_HOST_SYSTEM_NAME}/toolchain" )
-  set( ANDROID_NDK_TOOLCHAINS_SUBPATH  "" )
-  set( ANDROID_NDK_TOOLCHAINS_SUBPATH2 "" )
- elseif( ANDROID_NDK_LAYOUT STREQUAL "ANDROID" )
-  set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} ) # only 32-bit at the moment
-  set( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK}/../../gcc/${ANDROID_NDK_HOST_SYSTEM_NAME}/arm" )
-  set( ANDROID_NDK_TOOLCHAINS_SUBPATH  "" )
-  set( ANDROID_NDK_TOOLCHAINS_SUBPATH2 "" )
- else() # ANDROID_NDK_LAYOUT STREQUAL "RELEASE"
-  set( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK}/toolchains" )
-  set( ANDROID_NDK_TOOLCHAINS_SUBPATH  "/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}" )
-  set( ANDROID_NDK_TOOLCHAINS_SUBPATH2 "/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME2}" )
- endif()
- get_filename_component( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK_TOOLCHAINS_PATH}" ABSOLUTE )
-
- # try to detect change of NDK
- if( CMAKE_AR )
-  string( LENGTH "${ANDROID_NDK_TOOLCHAINS_PATH}" __length )
-  string( SUBSTRING "${CMAKE_AR}" 0 ${__length} __androidNdkPreviousPath )
-  if( NOT __androidNdkPreviousPath STREQUAL ANDROID_NDK_TOOLCHAINS_PATH )
-   message( FATAL_ERROR "It is not possible to change the path to the NDK on subsequent CMake run. You must remove all generated files from your build folder first.
-   " )
-  endif()
-  unset( __androidNdkPreviousPath )
-  unset( __length )
- endif()
-endif()
-
-
-# get all the details about standalone toolchain
-if( BUILD_WITH_STANDALONE_TOOLCHAIN )
- __DETECT_NATIVE_API_LEVEL( ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_STANDALONE_TOOLCHAIN}/sysroot/usr/include/android/api-level.h" )
- set( ANDROID_STANDALONE_TOOLCHAIN_API_LEVEL ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
- set( __availableToolchains "standalone" )
- __DETECT_TOOLCHAIN_MACHINE_NAME( __availableToolchainMachines "${ANDROID_STANDALONE_TOOLCHAIN}" )
- if( NOT __availableToolchainMachines )
-  message( FATAL_ERROR "Could not determine machine name of your toolchain. Probably your Android standalone toolchain is broken." )
- endif()
- if( __availableToolchainMachines MATCHES i686 )
-  set( __availableToolchainArchs "x86" )
- elseif( __availableToolchainMachines MATCHES arm )
-  set( __availableToolchainArchs "arm" )
- elseif( __availableToolchainMachines MATCHES mipsel )
-  set( __availableToolchainArchs "mipsel" )
- endif()
- execute_process( COMMAND "${ANDROID_STANDALONE_TOOLCHAIN}/bin/${__availableToolchainMachines}-gcc${TOOL_OS_SUFFIX}" -dumpversion
-                  OUTPUT_VARIABLE __availableToolchainCompilerVersions OUTPUT_STRIP_TRAILING_WHITESPACE )
- string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9]+)?" __availableToolchainCompilerVersions "${__availableToolchainCompilerVersions}" )
- if( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/bin/clang${TOOL_OS_SUFFIX}" )
-  list( APPEND __availableToolchains "standalone-clang" )
-  list( APPEND __availableToolchainMachines ${__availableToolchainMachines} )
-  list( APPEND __availableToolchainArchs ${__availableToolchainArchs} )
-  list( APPEND __availableToolchainCompilerVersions ${__availableToolchainCompilerVersions} )
- endif()
-endif()
-
-macro( __GLOB_NDK_TOOLCHAINS __availableToolchainsVar __availableToolchainsLst __toolchain_subpath )
- foreach( __toolchain ${${__availableToolchainsLst}} )
-  if( "${__toolchain}" MATCHES "-clang3[.][0-9]$" AND NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}${__toolchain_subpath}" )
-   string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" )
-  else()
-   set( __gcc_toolchain "${__toolchain}" )
-  endif()
-  __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK_TOOLCHAINS_PATH}/${__gcc_toolchain}${__toolchain_subpath}" )
-  if( __machine )
-   string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" )
-   if( __machine MATCHES i686 )
-    set( __arch "x86" )
-   elseif( __machine MATCHES arm )
-    set( __arch "arm" )
-   elseif( __machine MATCHES mipsel )
-    set( __arch "mipsel" )
-   else()
-    unset( __arch )
-   endif()
-   if( __arch )
-     list( APPEND __availableToolchainMachines "${__machine}" )
-     list( APPEND __availableToolchainArchs "${__arch}" )
-     list( APPEND __availableToolchainCompilerVersions "${__version}" )
-     list( APPEND ${__availableToolchainsVar} "${__toolchain}" )
-   endif()
-  endif()
-  unset( __gcc_toolchain )
- endforeach()
-endmacro()
-
-# get all the details about NDK
-if( BUILD_WITH_ANDROID_NDK )
- file( GLOB ANDROID_SUPPORTED_NATIVE_API_LEVELS RELATIVE "${ANDROID_NDK}/platforms" "${ANDROID_NDK}/platforms/android-*" )
- string( REPLACE "android-" "" ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_SUPPORTED_NATIVE_API_LEVELS}" )
- set( __availableToolchains "" )
- set( __availableToolchainMachines "" )
- set( __availableToolchainArchs "" )
- set( __availableToolchainCompilerVersions "" )
- if( ANDROID_TOOLCHAIN_NAME AND EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_TOOLCHAIN_NAME}/" )
-  # do not go through all toolchains if we know the name
-  set( __availableToolchainsLst "${ANDROID_TOOLCHAIN_NAME}" )
-  __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
-  if( NOT __availableToolchains AND NOT ANDROID_NDK_TOOLCHAINS_SUBPATH STREQUAL ANDROID_NDK_TOOLCHAINS_SUBPATH2 )
-   __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH2}" )
-   if( __availableToolchains )
-    set( ANDROID_NDK_TOOLCHAINS_SUBPATH ${ANDROID_NDK_TOOLCHAINS_SUBPATH2} )
-   endif()
-  endif()
- endif()
- if( NOT __availableToolchains )
-  file( GLOB __availableToolchainsLst RELATIVE "${ANDROID_NDK_TOOLCHAINS_PATH}" "${ANDROID_NDK_TOOLCHAINS_PATH}/*" )
-  if( __availableToolchains )
-   list(SORT __availableToolchainsLst) # we need clang to go after gcc
-  endif()
-  __LIST_FILTER( __availableToolchainsLst "^[.]" )
-  __LIST_FILTER( __availableToolchainsLst "llvm" )
-  __LIST_FILTER( __availableToolchainsLst "renderscript" )
-  __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
-  if( NOT __availableToolchains AND NOT ANDROID_NDK_TOOLCHAINS_SUBPATH STREQUAL ANDROID_NDK_TOOLCHAINS_SUBPATH2 )
-   __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH2}" )
-   if( __availableToolchains )
-    set( ANDROID_NDK_TOOLCHAINS_SUBPATH ${ANDROID_NDK_TOOLCHAINS_SUBPATH2} )
-   endif()
-  endif()
- endif()
- if( NOT __availableToolchains )
-  message( FATAL_ERROR "Could not find any working toolchain in the NDK. Probably your Android NDK is broken." )
- endif()
-endif()
-
-# build list of available ABIs
-set( ANDROID_SUPPORTED_ABIS "" )
-set( __uniqToolchainArchNames ${__availableToolchainArchs} )
-list( REMOVE_DUPLICATES __uniqToolchainArchNames )
-list( SORT __uniqToolchainArchNames )
-foreach( __arch ${__uniqToolchainArchNames} )
- list( APPEND ANDROID_SUPPORTED_ABIS ${ANDROID_SUPPORTED_ABIS_${__arch}} )
-endforeach()
-unset( __uniqToolchainArchNames )
-if( NOT ANDROID_SUPPORTED_ABIS )
- message( FATAL_ERROR "No one of known Android ABIs is supported by this cmake toolchain." )
-endif()
-
-# choose target ABI
-__INIT_VARIABLE( ANDROID_ABI OBSOLETE_ARM_TARGET OBSOLETE_ARM_TARGETS VALUES ${ANDROID_SUPPORTED_ABIS} )
-# verify that target ABI is supported
-list( FIND ANDROID_SUPPORTED_ABIS "${ANDROID_ABI}" __androidAbiIdx )
-if( __androidAbiIdx EQUAL -1 )
- string( REPLACE ";" "\", \"" PRINTABLE_ANDROID_SUPPORTED_ABIS  "${ANDROID_SUPPORTED_ABIS}" )
- message( FATAL_ERROR "Specified ANDROID_ABI = \"${ANDROID_ABI}\" is not supported by this cmake toolchain or your NDK/toolchain.
-   Supported values are: \"${PRINTABLE_ANDROID_SUPPORTED_ABIS}\"
-   " )
-endif()
-unset( __androidAbiIdx )
-
-# set target ABI options
-if( ANDROID_ABI STREQUAL "x86" )
- set( X86 true )
- set( ANDROID_NDK_ABI_NAME "x86" )
- set( ANDROID_ARCH_NAME "x86" )
- set( ANDROID_ARCH_FULLNAME "x86" )
- set( ANDROID_LLVM_TRIPLE "i686-none-linux-android" )
- set( CMAKE_SYSTEM_PROCESSOR "i686" )
-elseif( ANDROID_ABI STREQUAL "mips" )
- set( MIPS true )
- set( ANDROID_NDK_ABI_NAME "mips" )
- set( ANDROID_ARCH_NAME "mips" )
- set( ANDROID_ARCH_FULLNAME "mipsel" )
- set( ANDROID_LLVM_TRIPLE "mipsel-none-linux-android" )
- set( CMAKE_SYSTEM_PROCESSOR "mips" )
-elseif( ANDROID_ABI STREQUAL "armeabi" )
- set( ARMEABI true )
- set( ANDROID_NDK_ABI_NAME "armeabi" )
- set( ANDROID_ARCH_NAME "arm" )
- set( ANDROID_ARCH_FULLNAME "arm" )
- set( ANDROID_LLVM_TRIPLE "armv5te-none-linux-androideabi" )
- set( CMAKE_SYSTEM_PROCESSOR "armv5te" )
-elseif( ANDROID_ABI STREQUAL "armeabi-v6 with VFP" )
- set( ARMEABI_V6 true )
- set( ANDROID_NDK_ABI_NAME "armeabi" )
- set( ANDROID_ARCH_NAME "arm" )
- set( ANDROID_ARCH_FULLNAME "arm" )
- set( ANDROID_LLVM_TRIPLE "armv5te-none-linux-androideabi" )
- set( CMAKE_SYSTEM_PROCESSOR "armv6" )
- # need always fallback to older platform
- set( ARMEABI true )
-elseif( ANDROID_ABI STREQUAL "armeabi-v7a")
- set( ARMEABI_V7A true )
- set( ANDROID_NDK_ABI_NAME "armeabi-v7a" )
- set( ANDROID_ARCH_NAME "arm" )
- set( ANDROID_ARCH_FULLNAME "arm" )
- set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" )
- set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
-elseif( ANDROID_ABI STREQUAL "armeabi-v7a with VFPV3" )
- set( ARMEABI_V7A true )
- set( ANDROID_NDK_ABI_NAME "armeabi-v7a" )
- set( ANDROID_ARCH_NAME "arm" )
- set( ANDROID_ARCH_FULLNAME "arm" )
- set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" )
- set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
- set( VFPV3 true )
-elseif( ANDROID_ABI STREQUAL "armeabi-v7a with NEON" )
- set( ARMEABI_V7A true )
- set( ANDROID_NDK_ABI_NAME "armeabi-v7a" )
- set( ANDROID_ARCH_NAME "arm" )
- set( ANDROID_ARCH_FULLNAME "arm" )
- set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" )
- set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
- set( VFPV3 true )
- set( NEON true )
-else()
- message( SEND_ERROR "Unknown ANDROID_ABI=\"${ANDROID_ABI}\" is specified." )
-endif()
-
-if( CMAKE_BINARY_DIR AND EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake" )
- # really dirty hack
- # it is not possible to change CMAKE_SYSTEM_PROCESSOR after the first run...
- file( APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake" "SET(CMAKE_SYSTEM_PROCESSOR \"${CMAKE_SYSTEM_PROCESSOR}\")\n" )
-endif()
-
-if( ANDROID_ARCH_NAME STREQUAL "arm" AND NOT ARMEABI_V6 )
- __INIT_VARIABLE( ANDROID_FORCE_ARM_BUILD OBSOLETE_FORCE_ARM VALUES OFF )
- set( ANDROID_FORCE_ARM_BUILD ${ANDROID_FORCE_ARM_BUILD} CACHE BOOL "Use 32-bit ARM instructions instead of Thumb-1" FORCE )
- mark_as_advanced( ANDROID_FORCE_ARM_BUILD )
-else()
- unset( ANDROID_FORCE_ARM_BUILD CACHE )
-endif()
-
-# choose toolchain
-if( ANDROID_TOOLCHAIN_NAME )
- list( FIND __availableToolchains "${ANDROID_TOOLCHAIN_NAME}" __toolchainIdx )
- if( __toolchainIdx EQUAL -1 )
-  list( SORT __availableToolchains )
-  string( REPLACE ";" "\n  * " toolchains_list "${__availableToolchains}" )
-  set( toolchains_list "  * ${toolchains_list}")
-  message( FATAL_ERROR "Specified toolchain \"${ANDROID_TOOLCHAIN_NAME}\" is missing in your NDK or broken. Please verify that your NDK is working or select another compiler toolchain.
-To configure the toolchain set CMake variable ANDROID_TOOLCHAIN_NAME to one of the following values:\n${toolchains_list}\n" )
- endif()
- list( GET __availableToolchainArchs ${__toolchainIdx} __toolchainArch )
- if( NOT __toolchainArch STREQUAL ANDROID_ARCH_FULLNAME )
-  message( SEND_ERROR "Selected toolchain \"${ANDROID_TOOLCHAIN_NAME}\" is not able to compile binaries for the \"${ANDROID_ARCH_NAME}\" platform." )
- endif()
-else()
- set( __toolchainIdx -1 )
- set( __applicableToolchains "" )
- set( __toolchainMaxVersion "0.0.0" )
- list( LENGTH __availableToolchains __availableToolchainsCount )
- math( EXPR __availableToolchainsCount "${__availableToolchainsCount}-1" )
- foreach( __idx RANGE ${__availableToolchainsCount} )
-  list( GET __availableToolchainArchs ${__idx} __toolchainArch )
-  if( __toolchainArch STREQUAL ANDROID_ARCH_FULLNAME )
-   list( GET __availableToolchainCompilerVersions ${__idx} __toolchainVersion )
-   string( REPLACE "x" "99" __toolchainVersion "${__toolchainVersion}")
-   if( __toolchainVersion VERSION_GREATER __toolchainMaxVersion )
-    set( __toolchainMaxVersion "${__toolchainVersion}" )
-    set( __toolchainIdx ${__idx} )
-   endif()
-  endif()
- endforeach()
- unset( __availableToolchainsCount )
- unset( __toolchainMaxVersion )
- unset( __toolchainVersion )
-endif()
-unset( __toolchainArch )
-if( __toolchainIdx EQUAL -1 )
- message( FATAL_ERROR "No one of available compiler toolchains is able to compile for ${ANDROID_ARCH_NAME} platform." )
-endif()
-list( GET __availableToolchains ${__toolchainIdx} ANDROID_TOOLCHAIN_NAME )
-list( GET __availableToolchainMachines ${__toolchainIdx} ANDROID_TOOLCHAIN_MACHINE_NAME )
-list( GET __availableToolchainCompilerVersions ${__toolchainIdx} ANDROID_COMPILER_VERSION )
-
-unset( __toolchainIdx )
-unset( __availableToolchains )
-unset( __availableToolchainMachines )
-unset( __availableToolchainArchs )
-unset( __availableToolchainCompilerVersions )
-
-# choose native API level
-__INIT_VARIABLE( ANDROID_NATIVE_API_LEVEL ENV_ANDROID_NATIVE_API_LEVEL ANDROID_API_LEVEL ENV_ANDROID_API_LEVEL ANDROID_STANDALONE_TOOLCHAIN_API_LEVEL ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME} ANDROID_DEFAULT_NDK_API_LEVEL )
-string( REGEX MATCH "[0-9]+" ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" )
-# adjust API level
-set( __real_api_level ${ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME}} )
-foreach( __level ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
- if( NOT __level GREATER ANDROID_NATIVE_API_LEVEL AND NOT __level LESS __real_api_level )
-  set( __real_api_level ${__level} )
- endif()
-endforeach()
-if( __real_api_level AND NOT ANDROID_NATIVE_API_LEVEL EQUAL __real_api_level )
- message( STATUS "Adjusting Android API level 'android-${ANDROID_NATIVE_API_LEVEL}' to 'android-${__real_api_level}'")
- set( ANDROID_NATIVE_API_LEVEL ${__real_api_level} )
-endif()
-unset(__real_api_level)
-# validate
-list( FIND ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_NATIVE_API_LEVEL}" __levelIdx )
-if( __levelIdx EQUAL -1 )
- message( SEND_ERROR "Specified Android native API level 'android-${ANDROID_NATIVE_API_LEVEL}' is not supported by your NDK/toolchain." )
-else()
- if( BUILD_WITH_ANDROID_NDK )
-  __DETECT_NATIVE_API_LEVEL( __realApiLevel "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}/usr/include/android/api-level.h" )
-  if( NOT __realApiLevel EQUAL ANDROID_NATIVE_API_LEVEL )
-   message( SEND_ERROR "Specified Android API level (${ANDROID_NATIVE_API_LEVEL}) does not match to the level found (${__realApiLevel}). Probably your copy of NDK is broken." )
-  endif()
-  unset( __realApiLevel )
- endif()
- set( ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" CACHE STRING "Android API level for native code" FORCE )
- if( CMAKE_VERSION VERSION_GREATER "2.8" )
-  list( SORT ANDROID_SUPPORTED_NATIVE_API_LEVELS )
-  set_property( CACHE ANDROID_NATIVE_API_LEVEL PROPERTY STRINGS ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
- endif()
-endif()
-unset( __levelIdx )
-
-
-# remember target ABI
-set( ANDROID_ABI "${ANDROID_ABI}" CACHE STRING "The target ABI for Android. If arm, then armeabi-v7a is recommended for hardware floating point." FORCE )
-if( CMAKE_VERSION VERSION_GREATER "2.8" )
- list( SORT ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_FULLNAME} )
- set_property( CACHE ANDROID_ABI PROPERTY STRINGS ${ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_FULLNAME}} )
-endif()
-
-
-# runtime choice (STL, rtti, exceptions)
-if( NOT ANDROID_STL )
- # honor legacy ANDROID_USE_STLPORT
- if( DEFINED ANDROID_USE_STLPORT )
-  if( ANDROID_USE_STLPORT )
-   set( ANDROID_STL stlport_static )
-  endif()
-  message( WARNING "You are using an obsolete variable ANDROID_USE_STLPORT to select the STL variant. Use -DANDROID_STL=stlport_static instead." )
- endif()
- if( NOT ANDROID_STL )
-  set( ANDROID_STL gnustl_static )
- endif()
-endif()
-set( ANDROID_STL "${ANDROID_STL}" CACHE STRING "C++ runtime" )
-set( ANDROID_STL_FORCE_FEATURES ON CACHE BOOL "automatically configure rtti and exceptions support based on C++ runtime" )
-mark_as_advanced( ANDROID_STL ANDROID_STL_FORCE_FEATURES )
-
-if( BUILD_WITH_ANDROID_NDK )
- if( NOT "${ANDROID_STL}" MATCHES "^(none|system|system_re|gabi\\+\\+_static|gabi\\+\\+_shared|stlport_static|stlport_shared|gnustl_static|gnustl_shared)$")
-  message( FATAL_ERROR "ANDROID_STL is set to invalid value \"${ANDROID_STL}\".
-The possible values are:
-  none           -> Do not configure the runtime.
-  system         -> Use the default minimal system C++ runtime library.
-  system_re      -> Same as system but with rtti and exceptions.
-  gabi++_static  -> Use the GAbi++ runtime as a static library.
-  gabi++_shared  -> Use the GAbi++ runtime as a shared library.
-  stlport_static -> Use the STLport runtime as a static library.
-  stlport_shared -> Use the STLport runtime as a shared library.
-  gnustl_static  -> (default) Use the GNU STL as a static library.
-  gnustl_shared  -> Use the GNU STL as a shared library.
-" )
- endif()
-elseif( BUILD_WITH_STANDALONE_TOOLCHAIN )
- if( NOT "${ANDROID_STL}" MATCHES "^(none|gnustl_static|gnustl_shared)$")
-  message( FATAL_ERROR "ANDROID_STL is set to invalid value \"${ANDROID_STL}\".
-The possible values are:
-  none           -> Do not configure the runtime.
-  gnustl_static  -> (default) Use the GNU STL as a static library.
-  gnustl_shared  -> Use the GNU STL as a shared library.
-" )
- endif()
-endif()
-
-unset( ANDROID_RTTI )
-unset( ANDROID_EXCEPTIONS )
-unset( ANDROID_STL_INCLUDE_DIRS )
-unset( __libstl )
-unset( __libsupcxx )
-
-if( NOT _CMAKE_IN_TRY_COMPILE AND ANDROID_NDK_RELEASE STREQUAL "r7b" AND ARMEABI_V7A AND NOT VFPV3 AND ANDROID_STL MATCHES "gnustl" )
- message( WARNING  "The GNU STL armeabi-v7a binaries from NDK r7b can crash non-NEON devices. The files provided with NDK r7b were not configured properly, resulting in crashes on Tegra2-based devices and others when trying to use certain floating-point functions (e.g., cosf, sinf, expf).
-You are strongly recommended to switch to another NDK release.
-" )
-endif()
-
-if( NOT _CMAKE_IN_TRY_COMPILE AND X86 AND ANDROID_STL MATCHES "gnustl" AND ANDROID_NDK_RELEASE STREQUAL "r6" )
-  message( WARNING  "The x86 system header file from NDK r6 has incorrect definition for ptrdiff_t. You are recommended to upgrade to a newer NDK release or manually patch the header:
-See https://android.googlesource.com/platform/development.git f907f4f9d4e56ccc8093df6fee54454b8bcab6c2
-  diff --git a/ndk/platforms/android-9/arch-x86/include/machine/_types.h b/ndk/platforms/android-9/arch-x86/include/machine/_types.h
-  index 5e28c64..65892a1 100644
-  --- a/ndk/platforms/android-9/arch-x86/include/machine/_types.h
-  +++ b/ndk/platforms/android-9/arch-x86/include/machine/_types.h
-  @@ -51,7 +51,11 @@ typedef long int       ssize_t;
-   #endif
-   #ifndef _PTRDIFF_T
-   #define _PTRDIFF_T
-  -typedef long           ptrdiff_t;
-  +#  ifdef __ANDROID__
-  +     typedef int            ptrdiff_t;
-  +#  else
-  +     typedef long           ptrdiff_t;
-  +#  endif
-   #endif
-" )
-endif()
-
-
-# setup paths and STL for standalone toolchain
-if( BUILD_WITH_STANDALONE_TOOLCHAIN )
- set( ANDROID_TOOLCHAIN_ROOT "${ANDROID_STANDALONE_TOOLCHAIN}" )
- set( ANDROID_CLANG_TOOLCHAIN_ROOT "${ANDROID_STANDALONE_TOOLCHAIN}" )
- set( ANDROID_SYSROOT "${ANDROID_STANDALONE_TOOLCHAIN}/sysroot" )
-
- if( NOT ANDROID_STL STREQUAL "none" )
-  set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/include/c++/${ANDROID_COMPILER_VERSION}" )
-  if( NOT EXISTS "${ANDROID_STL_INCLUDE_DIRS}" )
-   # old location ( pre r8c )
-   set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}" )
-  endif()
-  if( ARMEABI_V7A AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}/bits" )
-   list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}" )
-  elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb/bits" )
-   list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb" )
-  else()
-   list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" )
-  endif()
-  # always search static GNU STL to get the location of libsupc++.a
-  if( ARMEABI_V7A AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libstdc++.a" )
-   set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb" )
-  elseif( ARMEABI_V7A AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libstdc++.a" )
-   set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}" )
-  elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libstdc++.a" )
-   set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb" )
-  elseif( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libstdc++.a" )
-   set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib" )
-  endif()
-  if( __libstl )
-   set( __libsupcxx "${__libstl}/libsupc++.a" )
-   set( __libstl    "${__libstl}/libstdc++.a" )
-  endif()
-  if( NOT EXISTS "${__libsupcxx}" )
-   message( FATAL_ERROR "The required libstdsupc++.a is missing in your standalone toolchain.
- Usually it happens because of bug in make-standalone-toolchain.sh script from NDK r7, r7b and r7c.
- You need to either upgrade to newer NDK or manually copy
-     $ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a
- to
-     ${__libsupcxx}
-   " )
-  endif()
-  if( ANDROID_STL STREQUAL "gnustl_shared" )
-   if( ARMEABI_V7A AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" )
-    set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" )
-   elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libgnustl_shared.so" )
-    set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libgnustl_shared.so" )
-   elseif( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libgnustl_shared.so" )
-    set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libgnustl_shared.so" )
-   endif()
-  endif()
- endif()
-endif()
-
-# clang
-if( "${ANDROID_TOOLCHAIN_NAME}" STREQUAL "standalone-clang" )
- set( ANDROID_COMPILER_IS_CLANG 1 )
- execute_process( COMMAND "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/clang${TOOL_OS_SUFFIX}" --version OUTPUT_VARIABLE ANDROID_CLANG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE )
- string( REGEX MATCH "[0-9]+[.][0-9]+" ANDROID_CLANG_VERSION "${ANDROID_CLANG_VERSION}")
-elseif( "${ANDROID_TOOLCHAIN_NAME}" MATCHES "-clang3[.][0-9]?$" )
- string( REGEX MATCH "3[.][0-9]$" ANDROID_CLANG_VERSION "${ANDROID_TOOLCHAIN_NAME}")
- string( REGEX REPLACE "-clang${ANDROID_CLANG_VERSION}$" "-4.6" ANDROID_GCC_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" )
- if( NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/llvm-${ANDROID_CLANG_VERSION}${ANDROID_NDK_TOOLCHAINS_SUBPATH}/bin/clang${TOOL_OS_SUFFIX}" )
-  message( FATAL_ERROR "Could not find the Clang compiler driver" )
- endif()
- set( ANDROID_COMPILER_IS_CLANG 1 )
- set( ANDROID_CLANG_TOOLCHAIN_ROOT "${ANDROID_NDK_TOOLCHAINS_PATH}/llvm-${ANDROID_CLANG_VERSION}${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
-else()
- set( ANDROID_GCC_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" )
- unset( ANDROID_COMPILER_IS_CLANG CACHE )
-endif()
-
-string( REPLACE "." "" _clang_name "clang${ANDROID_CLANG_VERSION}" )
-if( NOT EXISTS "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}${TOOL_OS_SUFFIX}" )
- set( _clang_name "clang" )
-endif()
-
-
-# setup paths and STL for NDK
-if( BUILD_WITH_ANDROID_NDK )
- set( ANDROID_TOOLCHAIN_ROOT "${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
- set( ANDROID_SYSROOT "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}" )
-
- if( ANDROID_STL STREQUAL "none" )
-  # do nothing
- elseif( ANDROID_STL STREQUAL "system" )
-  set( ANDROID_RTTI             OFF )
-  set( ANDROID_EXCEPTIONS       OFF )
-  set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/system/include" )
- elseif( ANDROID_STL STREQUAL "system_re" )
-  set( ANDROID_RTTI             ON )
-  set( ANDROID_EXCEPTIONS       ON )
-  set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/system/include" )
- elseif( ANDROID_STL MATCHES "gabi" )
-  if( ANDROID_NDK_RELEASE STRLESS "r7" )
-   message( FATAL_ERROR "gabi++ is not awailable in your NDK. You have to upgrade to NDK r7 or newer to use gabi++.")
-  endif()
-  set( ANDROID_RTTI             ON )
-  set( ANDROID_EXCEPTIONS       OFF )
-  set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/gabi++/include" )
-  set( __libstl                 "${ANDROID_NDK}/sources/cxx-stl/gabi++/libs/${ANDROID_NDK_ABI_NAME}/libgabi++_static.a" )
- elseif( ANDROID_STL MATCHES "stlport" )
-  if( NOT ANDROID_NDK_RELEASE STRLESS "r8d" )
-   set( ANDROID_EXCEPTIONS       ON )
-  else()
-   set( ANDROID_EXCEPTIONS       OFF )
-  endif()
-  if( ANDROID_NDK_RELEASE STRLESS "r7" )
-   set( ANDROID_RTTI            OFF )
-  else()
-   set( ANDROID_RTTI            ON )
-  endif()
-  set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/stlport/stlport" )
-  set( __libstl                 "${ANDROID_NDK}/sources/cxx-stl/stlport/libs/${ANDROID_NDK_ABI_NAME}/libstlport_static.a" )
- elseif( ANDROID_STL MATCHES "gnustl" )
-  set( ANDROID_EXCEPTIONS       ON )
-  set( ANDROID_RTTI             ON )
-  if( EXISTS "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}" )
-   if( ARMEABI_V7A AND ANDROID_COMPILER_VERSION VERSION_EQUAL "4.7" AND ANDROID_NDK_RELEASE STREQUAL "r8d" )
-    # gnustl binary for 4.7 compiler is buggy :(
-    # TODO: look for right fix
-    set( __libstl                "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/4.6" )
-   else()
-    set( __libstl                "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}" )
-   endif()
-  else()
-   set( __libstl                "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++" )
-  endif()
-  set( ANDROID_STL_INCLUDE_DIRS "${__libstl}/include" "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/include" )
-  if( EXISTS "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libgnustl_static.a" )
-   set( __libstl                "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libgnustl_static.a" )
-  else()
-   set( __libstl                "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libstdc++.a" )
-  endif()
- else()
-  message( FATAL_ERROR "Unknown runtime: ${ANDROID_STL}" )
- endif()
- # find libsupc++.a - rtti & exceptions
- if( ANDROID_STL STREQUAL "system_re" OR ANDROID_STL MATCHES "gnustl" )
-  set( __libsupcxx "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" ) # r8b or newer
-  if( NOT EXISTS "${__libsupcxx}" )
-   set( __libsupcxx "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" ) # r7-r8
-  endif()
-  if( NOT EXISTS "${__libsupcxx}" ) # before r7
-   if( ARMEABI_V7A )
-    if( ANDROID_FORCE_ARM_BUILD )
-     set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libsupc++.a" )
-    else()
-     set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libsupc++.a" )
-    endif()
-   elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD )
-    set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libsupc++.a" )
-   else()
-    set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libsupc++.a" )
-   endif()
-  endif()
-  if( NOT EXISTS "${__libsupcxx}")
-   message( ERROR "Could not find libsupc++.a for a chosen platform. Either your NDK is not supported or is broken.")
-  endif()
- endif()
-endif()
-
-
-# case of shared STL linkage
-if( ANDROID_STL MATCHES "shared" AND DEFINED __libstl )
- string( REPLACE "_static.a" "_shared.so" __libstl "${__libstl}" )
- # TODO: check if .so file exists before the renaming
-endif()
-
-
-# ccache support
-__INIT_VARIABLE( _ndk_ccache NDK_CCACHE ENV_NDK_CCACHE )
-if( _ndk_ccache )
- if( DEFINED NDK_CCACHE AND NOT EXISTS NDK_CCACHE )
-  unset( NDK_CCACHE CACHE )
- endif()
- find_program( NDK_CCACHE "${_ndk_ccache}" DOC "The path to ccache binary")
-else()
- unset( NDK_CCACHE CACHE )
-endif()
-unset( _ndk_ccache )
-
-
-# setup the cross-compiler
-if( NOT CMAKE_C_COMPILER )
- if( NDK_CCACHE AND NOT ANDROID_SYSROOT MATCHES "[ ;\"]" )
-  set( CMAKE_C_COMPILER   "${NDK_CCACHE}" CACHE PATH "ccache as C compiler" )
-  set( CMAKE_CXX_COMPILER "${NDK_CCACHE}" CACHE PATH "ccache as C++ compiler" )
-  if( ANDROID_COMPILER_IS_CLANG )
-   set( CMAKE_C_COMPILER_ARG1   "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}${TOOL_OS_SUFFIX}"   CACHE PATH "C compiler")
-   set( CMAKE_CXX_COMPILER_ARG1 "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler")
-  else()
-   set( CMAKE_C_COMPILER_ARG1   "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}" CACHE PATH "C compiler")
-   set( CMAKE_CXX_COMPILER_ARG1 "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler")
-  endif()
- else()
-  if( ANDROID_COMPILER_IS_CLANG )
-   set( CMAKE_C_COMPILER   "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}${TOOL_OS_SUFFIX}"   CACHE PATH "C compiler")
-   set( CMAKE_CXX_COMPILER "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler")
-  else()
-   set( CMAKE_C_COMPILER   "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"    CACHE PATH "C compiler" )
-   set( CMAKE_CXX_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}"    CACHE PATH "C++ compiler" )
-  endif()
- endif()
- set( CMAKE_ASM_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"     CACHE PATH "assembler" )
- set( CMAKE_STRIP        "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-strip${TOOL_OS_SUFFIX}"   CACHE PATH "strip" )
- set( CMAKE_AR           "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ar${TOOL_OS_SUFFIX}"      CACHE PATH "archive" )
- set( CMAKE_LINKER       "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ld${TOOL_OS_SUFFIX}"      CACHE PATH "linker" )
- set( CMAKE_NM           "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-nm${TOOL_OS_SUFFIX}"      CACHE PATH "nm" )
- set( CMAKE_OBJCOPY      "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objcopy${TOOL_OS_SUFFIX}" CACHE PATH "objcopy" )
- set( CMAKE_OBJDUMP      "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objdump${TOOL_OS_SUFFIX}" CACHE PATH "objdump" )
- set( CMAKE_RANLIB       "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ranlib${TOOL_OS_SUFFIX}"  CACHE PATH "ranlib" )
-endif()
-
-set( _CMAKE_TOOLCHAIN_PREFIX "${ANDROID_TOOLCHAIN_MACHINE_NAME}-" )
-if( CMAKE_VERSION VERSION_LESS 2.8.5 )
- set( CMAKE_ASM_COMPILER_ARG1 "-c" )
-endif()
-if( APPLE )
- find_program( CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool )
- if( NOT CMAKE_INSTALL_NAME_TOOL )
-  message( FATAL_ERROR "Could not find install_name_tool, please check your installation." )
- endif()
- mark_as_advanced( CMAKE_INSTALL_NAME_TOOL )
-endif()
-
-# Force set compilers because standard identification works badly for us
-include( CMakeForceCompiler )
-CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU )
-if( ANDROID_COMPILER_IS_CLANG )
- set( CMAKE_C_COMPILER_ID Clang)
-endif()
-set( CMAKE_C_PLATFORM_ID Linux )
-set( CMAKE_C_SIZEOF_DATA_PTR 4 )
-set( CMAKE_C_HAS_ISYSROOT 1 )
-set( CMAKE_C_COMPILER_ABI ELF )
-CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU )
-if( ANDROID_COMPILER_IS_CLANG )
- set( CMAKE_CXX_COMPILER_ID Clang)
-endif()
-set( CMAKE_CXX_PLATFORM_ID Linux )
-set( CMAKE_CXX_SIZEOF_DATA_PTR 4 )
-set( CMAKE_CXX_HAS_ISYSROOT 1 )
-set( CMAKE_CXX_COMPILER_ABI ELF )
-set( CMAKE_CXX_SOURCE_FILE_EXTENSIONS cc cp cxx cpp CPP c++ C )
-# force ASM compiler (required for CMake < 2.8.5)
-set( CMAKE_ASM_COMPILER_ID_RUN TRUE )
-set( CMAKE_ASM_COMPILER_ID GNU )
-set( CMAKE_ASM_COMPILER_WORKS TRUE )
-set( CMAKE_ASM_COMPILER_FORCED TRUE )
-set( CMAKE_COMPILER_IS_GNUASM 1)
-set( CMAKE_ASM_SOURCE_FILE_EXTENSIONS s S asm )
-
-# flags and definitions
-remove_definitions( -DANDROID )
-add_definitions( -DANDROID )
-
-if( ANDROID_SYSROOT MATCHES "[ ;\"]" )
- if( CMAKE_HOST_WIN32 )
-  # try to convert path to 8.3 form
-  file( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cvt83.cmd" "@echo %~s1" )
-  execute_process( COMMAND "$ENV{ComSpec}" /c "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cvt83.cmd" "${ANDROID_SYSROOT}"
-                   OUTPUT_VARIABLE __path OUTPUT_STRIP_TRAILING_WHITESPACE
-                   RESULT_VARIABLE __result ERROR_QUIET )
-  if( __result EQUAL 0 )
-   file( TO_CMAKE_PATH "${__path}" ANDROID_SYSROOT )
-   set( ANDROID_CXX_FLAGS "--sysroot=${ANDROID_SYSROOT}" )
-  else()
-   set( ANDROID_CXX_FLAGS "--sysroot=\"${ANDROID_SYSROOT}\"" )
-  endif()
- else()
-  set( ANDROID_CXX_FLAGS "'--sysroot=${ANDROID_SYSROOT}'" )
- endif()
- if( NOT _CMAKE_IN_TRY_COMPILE )
-  # quotes can break try_compile and compiler identification
-  message(WARNING "Path to your Android NDK (or toolchain) has non-alphanumeric symbols.\nThe build might be broken.\n")
- endif()
-else()
- set( ANDROID_CXX_FLAGS "--sysroot=${ANDROID_SYSROOT}" )
-endif()
-
-# NDK flags
-if( ARMEABI OR ARMEABI_V7A )
- set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fpic -funwind-tables" )
- if( NOT ANDROID_FORCE_ARM_BUILD AND NOT ARMEABI_V6 )
-  set( ANDROID_CXX_FLAGS_RELEASE "-mthumb -fomit-frame-pointer -fno-strict-aliasing" )
-  set( ANDROID_CXX_FLAGS_DEBUG   "-marm -fno-omit-frame-pointer -fno-strict-aliasing" )
-  if( NOT ANDROID_COMPILER_IS_CLANG )
-   set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -finline-limit=64" )
-  endif()
- else()
-  # always compile ARMEABI_V6 in arm mode; otherwise there is no difference from ARMEABI
-  set( ANDROID_CXX_FLAGS_RELEASE "-marm -fomit-frame-pointer -fstrict-aliasing" )
-  set( ANDROID_CXX_FLAGS_DEBUG   "-marm -fno-omit-frame-pointer -fno-strict-aliasing" )
-  if( NOT ANDROID_COMPILER_IS_CLANG )
-   set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" )
-  endif()
- endif()
-elseif( X86 )
- set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funwind-tables" )
- if( NOT ANDROID_COMPILER_IS_CLANG )
-  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" )
- else()
-  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fPIC" )
- endif()
- set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer -fstrict-aliasing" )
- set( ANDROID_CXX_FLAGS_DEBUG   "-fno-omit-frame-pointer -fno-strict-aliasing" )
-elseif( MIPS )
- set( ANDROID_CXX_FLAGS         "${ANDROID_CXX_FLAGS} -fpic -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0" )
- set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer" )
- set( ANDROID_CXX_FLAGS_DEBUG   "-fno-omit-frame-pointer" )
- if( NOT ANDROID_COMPILER_IS_CLANG )
-  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers" )
-  set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} -funswitch-loops -finline-limit=300" )
- endif()
-elseif()
- set( ANDROID_CXX_FLAGS_RELEASE "" )
- set( ANDROID_CXX_FLAGS_DEBUG   "" )
-endif()
-
-set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fsigned-char" ) # good/necessary when porting desktop libraries
-
-if( NOT X86 AND NOT ANDROID_COMPILER_IS_CLANG )
- set( ANDROID_CXX_FLAGS "-Wno-psabi ${ANDROID_CXX_FLAGS}" )
-endif()
-
-if( NOT ANDROID_COMPILER_VERSION VERSION_LESS "4.6" )
- set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -no-canonical-prefixes" ) # see https://android-review.googlesource.com/#/c/47564/
-endif()
-
-# ABI-specific flags
-if( ARMEABI_V7A )
- set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv7-a -mfloat-abi=softfp" )
- if( NEON )
-  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=neon" )
- elseif( VFPV3 )
-  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=vfpv3" )
- else()
-  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=vfpv3-d16" )
- endif()
-elseif( ARMEABI_V6 )
- set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv6 -mfloat-abi=softfp -mfpu=vfp" ) # vfp == vfpv2
-elseif( ARMEABI )
- set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv5te -mtune=xscale -msoft-float" )
-endif()
-
-if( ANDROID_STL MATCHES "gnustl" AND (EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}") )
- set( CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
- set( CMAKE_CXX_CREATE_SHARED_MODULE  "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
- set( CMAKE_CXX_LINK_EXECUTABLE       "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>" )
-else()
- set( CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
- set( CMAKE_CXX_CREATE_SHARED_MODULE  "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
- set( CMAKE_CXX_LINK_EXECUTABLE       "<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>" )
-endif()
-
-# STL
-if( EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}" )
- if( EXISTS "${__libstl}" )
-  set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${__libstl}\"" )
-  set( CMAKE_CXX_CREATE_SHARED_MODULE  "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${__libstl}\"" )
-  set( CMAKE_CXX_LINK_EXECUTABLE       "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libstl}\"" )
- endif()
- if( EXISTS "${__libsupcxx}" )
-  set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${__libsupcxx}\"" )
-  set( CMAKE_CXX_CREATE_SHARED_MODULE  "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${__libsupcxx}\"" )
-  set( CMAKE_CXX_LINK_EXECUTABLE       "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libsupcxx}\"" )
-  # C objects:
-  set( CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
-  set( CMAKE_C_CREATE_SHARED_MODULE  "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
-  set( CMAKE_C_LINK_EXECUTABLE       "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>" )
-  set( CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_C_CREATE_SHARED_LIBRARY} \"${__libsupcxx}\"" )
-  set( CMAKE_C_CREATE_SHARED_MODULE  "${CMAKE_C_CREATE_SHARED_MODULE} \"${__libsupcxx}\"" )
-  set( CMAKE_C_LINK_EXECUTABLE       "${CMAKE_C_LINK_EXECUTABLE} \"${__libsupcxx}\"" )
- endif()
- if( ANDROID_STL MATCHES "gnustl" )
-  if( NOT EXISTS "${ANDROID_LIBM_PATH}" )
-   set( ANDROID_LIBM_PATH -lm )
-  endif()
-  set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} ${ANDROID_LIBM_PATH}" )
-  set( CMAKE_CXX_CREATE_SHARED_MODULE  "${CMAKE_CXX_CREATE_SHARED_MODULE} ${ANDROID_LIBM_PATH}" )
-  set( CMAKE_CXX_LINK_EXECUTABLE       "${CMAKE_CXX_LINK_EXECUTABLE} ${ANDROID_LIBM_PATH}" )
- endif()
-endif()
-
-# variables controlling optional build flags
-if (ANDROID_NDK_RELEASE STRLESS "r7")
- # libGLESv2.so in NDK's prior to r7 refers to missing external symbols.
- # So this flag option is required for all projects using OpenGL from native.
- __INIT_VARIABLE( ANDROID_SO_UNDEFINED                      VALUES ON )
-else()
- __INIT_VARIABLE( ANDROID_SO_UNDEFINED                      VALUES OFF )
-endif()
-__INIT_VARIABLE( ANDROID_NO_UNDEFINED OBSOLETE_NO_UNDEFINED VALUES ON )
-__INIT_VARIABLE( ANDROID_FUNCTION_LEVEL_LINKING             VALUES ON )
-__INIT_VARIABLE( ANDROID_GOLD_LINKER                        VALUES ON )
-__INIT_VARIABLE( ANDROID_NOEXECSTACK                        VALUES ON )
-__INIT_VARIABLE( ANDROID_RELRO                              VALUES ON )
-
-set( ANDROID_NO_UNDEFINED           ${ANDROID_NO_UNDEFINED}           CACHE BOOL "Show all undefined symbols as linker errors" )
-set( ANDROID_SO_UNDEFINED           ${ANDROID_SO_UNDEFINED}           CACHE BOOL "Allows or disallows undefined symbols in shared libraries" )
-set( ANDROID_FUNCTION_LEVEL_LINKING ${ANDROID_FUNCTION_LEVEL_LINKING} CACHE BOOL "Allows or disallows undefined symbols in shared libraries" )
-set( ANDROID_GOLD_LINKER            ${ANDROID_GOLD_LINKER}            CACHE BOOL "Enables gold linker (only available for NDK r8b for ARM and x86 architectures on linux-86 and darwin-x86 hosts)" )
-set( ANDROID_NOEXECSTACK            ${ANDROID_NOEXECSTACK}            CACHE BOOL "Allows or disallows undefined symbols in shared libraries" )
-set( ANDROID_RELRO                  ${ANDROID_RELRO}                  CACHE BOOL "Enables RELRO - a memory corruption mitigation technique" )
-mark_as_advanced( ANDROID_NO_UNDEFINED ANDROID_SO_UNDEFINED ANDROID_FUNCTION_LEVEL_LINKING ANDROID_GOLD_LINKER ANDROID_NOEXECSTACK ANDROID_RELRO )
-
-# linker flags
-set( ANDROID_LINKER_FLAGS "" )
-
-if( ARMEABI_V7A )
- # this is *required* to use the following linker flags that routes around
- # a CPU bug in some Cortex-A8 implementations:
- set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--fix-cortex-a8" )
-endif()
-
-if( ANDROID_NO_UNDEFINED )
- if( MIPS )
-  # there is some sysroot-related problem in mips linker...
-  if( NOT ANDROID_SYSROOT MATCHES "[ ;\"]" )
-   set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--no-undefined -Wl,-rpath-link,${ANDROID_SYSROOT}/usr/lib" )
-  endif()
- else()
-  set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--no-undefined" )
- endif()
-endif()
-
-if( ANDROID_SO_UNDEFINED )
- set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,-allow-shlib-undefined" )
-endif()
-
-if( ANDROID_FUNCTION_LEVEL_LINKING )
- set( ANDROID_CXX_FLAGS    "${ANDROID_CXX_FLAGS} -fdata-sections -ffunction-sections" )
- set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--gc-sections" )
-endif()
-
-if( ANDROID_COMPILER_VERSION VERSION_EQUAL "4.6" )
- if( ANDROID_GOLD_LINKER AND (CMAKE_HOST_UNIX OR ANDROID_NDK_RELEASE STRGREATER "r8b") AND (ARMEABI OR ARMEABI_V7A OR X86) )
-  set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=gold" )
- elseif( ANDROID_NDK_RELEASE STRGREATER "r8b")
-  set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=bfd" )
- elseif( ANDROID_NDK_RELEASE STREQUAL "r8b" AND ARMEABI AND NOT _CMAKE_IN_TRY_COMPILE )
-  message( WARNING "The default bfd linker from arm GCC 4.6 toolchain can fail with 'unresolvable R_ARM_THM_CALL relocation' error message. See https://code.google.com/p/android/issues/detail?id=35342
-  On Linux and OS X host platform you can workaround this problem using gold linker (default).
-  Rerun cmake with -DANDROID_GOLD_LINKER=ON option in case of problems.
-" )
- endif()
-endif() # version 4.6
-
-if( ANDROID_NOEXECSTACK )
- if( ANDROID_COMPILER_IS_CLANG )
-  set( ANDROID_CXX_FLAGS    "${ANDROID_CXX_FLAGS} -Xclang -mnoexecstack" )
- else()
-  set( ANDROID_CXX_FLAGS    "${ANDROID_CXX_FLAGS} -Wa,--noexecstack" )
- endif()
- set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,-z,noexecstack" )
-endif()
-
-if( ANDROID_RELRO )
- set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now" )
-endif()
-
-if( ANDROID_COMPILER_IS_CLANG )
- set( ANDROID_CXX_FLAGS "-Qunused-arguments ${ANDROID_CXX_FLAGS}" )
- if( ARMEABI_V7A AND NOT ANDROID_FORCE_ARM_BUILD )
-  set( ANDROID_CXX_FLAGS_RELEASE "-target thumbv7-none-linux-androideabi ${ANDROID_CXX_FLAGS_RELEASE}" )
-  set( ANDROID_CXX_FLAGS_DEBUG   "-target ${ANDROID_LLVM_TRIPLE} ${ANDROID_CXX_FLAGS_DEBUG}" )
- else()
-  set( ANDROID_CXX_FLAGS "-target ${ANDROID_LLVM_TRIPLE} ${ANDROID_CXX_FLAGS}" )
- endif()
- if( BUILD_WITH_ANDROID_NDK )
-  set( ANDROID_CXX_FLAGS "-gcc-toolchain ${ANDROID_TOOLCHAIN_ROOT} ${ANDROID_CXX_FLAGS}" )
- endif()
-endif()
-
-# cache flags
-set( CMAKE_CXX_FLAGS           ""                        CACHE STRING "c++ flags" )
-set( CMAKE_C_FLAGS             ""                        CACHE STRING "c flags" )
-set( CMAKE_CXX_FLAGS_RELEASE   "-O3 -DNDEBUG"            CACHE STRING "c++ Release flags" )
-set( CMAKE_C_FLAGS_RELEASE     "-O3 -DNDEBUG"            CACHE STRING "c Release flags" )
-set( CMAKE_CXX_FLAGS_DEBUG     "-O0 -g -DDEBUG -D_DEBUG" CACHE STRING "c++ Debug flags" )
-set( CMAKE_C_FLAGS_DEBUG       "-O0 -g -DDEBUG -D_DEBUG" CACHE STRING "c Debug flags" )
-set( CMAKE_SHARED_LINKER_FLAGS ""                        CACHE STRING "shared linker flags" )
-set( CMAKE_MODULE_LINKER_FLAGS ""                        CACHE STRING "module linker flags" )
-set( CMAKE_EXE_LINKER_FLAGS    "-Wl,-z,nocopyreloc"      CACHE STRING "executable linker flags" )
-
-# put flags to cache (for debug purpose only)
-set( ANDROID_CXX_FLAGS         "${ANDROID_CXX_FLAGS}"         CACHE INTERNAL "Android specific c/c++ flags" )
-set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE}" CACHE INTERNAL "Android specific c/c++ Release flags" )
-set( ANDROID_CXX_FLAGS_DEBUG   "${ANDROID_CXX_FLAGS_DEBUG}"   CACHE INTERNAL "Android specific c/c++ Debug flags" )
-set( ANDROID_LINKER_FLAGS      "${ANDROID_LINKER_FLAGS}"      CACHE INTERNAL "Android specific c/c++ linker flags" )
-
-# finish flags
-set( CMAKE_CXX_FLAGS           "${ANDROID_CXX_FLAGS} ${CMAKE_CXX_FLAGS}" )
-set( CMAKE_C_FLAGS             "${ANDROID_CXX_FLAGS} ${CMAKE_C_FLAGS}" )
-set( CMAKE_CXX_FLAGS_RELEASE   "${ANDROID_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELEASE}" )
-set( CMAKE_C_FLAGS_RELEASE     "${ANDROID_CXX_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELEASE}" )
-set( CMAKE_CXX_FLAGS_DEBUG     "${ANDROID_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_DEBUG}" )
-set( CMAKE_C_FLAGS_DEBUG       "${ANDROID_CXX_FLAGS_DEBUG} ${CMAKE_C_FLAGS_DEBUG}" )
-set( CMAKE_SHARED_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}" )
-set( CMAKE_MODULE_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_MODULE_LINKER_FLAGS}" )
-set( CMAKE_EXE_LINKER_FLAGS    "${ANDROID_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}" )
-
-if( MIPS AND BUILD_WITH_ANDROID_NDK AND ANDROID_NDK_RELEASE STREQUAL "r8" )
- set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.xsc ${CMAKE_SHARED_LINKER_FLAGS}" )
- set( CMAKE_MODULE_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.xsc ${CMAKE_MODULE_LINKER_FLAGS}" )
- set( CMAKE_EXE_LINKER_FLAGS    "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.x ${CMAKE_EXE_LINKER_FLAGS}" )
-endif()
-
-# configure rtti
-if( DEFINED ANDROID_RTTI AND ANDROID_STL_FORCE_FEATURES )
- if( ANDROID_RTTI )
-  set( CMAKE_CXX_FLAGS "-frtti ${CMAKE_CXX_FLAGS}" )
- else()
-  set( CMAKE_CXX_FLAGS "-fno-rtti ${CMAKE_CXX_FLAGS}" )
- endif()
-endif()
-
-# configure exceptios
-if( DEFINED ANDROID_EXCEPTIONS AND ANDROID_STL_FORCE_FEATURES )
- if( ANDROID_EXCEPTIONS )
-  set( CMAKE_CXX_FLAGS "-fexceptions ${CMAKE_CXX_FLAGS}" )
-  set( CMAKE_C_FLAGS "-fexceptions ${CMAKE_C_FLAGS}" )
- else()
-  set( CMAKE_CXX_FLAGS "-fno-exceptions ${CMAKE_CXX_FLAGS}" )
-  set( CMAKE_C_FLAGS "-fno-exceptions ${CMAKE_C_FLAGS}" )
- endif()
-endif()
-
-# global includes and link directories
-include_directories( SYSTEM "${ANDROID_SYSROOT}/usr/include" ${ANDROID_STL_INCLUDE_DIRS} )
-get_filename_component(__android_install_path "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" ABSOLUTE) # avoid CMP0015 policy warning
-link_directories( "${__android_install_path}" )
-
-# detect if need link crtbegin_so.o explicitly
-if( NOT DEFINED ANDROID_EXPLICIT_CRT_LINK )
- set( __cmd "${CMAKE_CXX_CREATE_SHARED_LIBRARY}" )
- string( REPLACE "<CMAKE_CXX_COMPILER>" "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" __cmd "${__cmd}" )
- string( REPLACE "<CMAKE_C_COMPILER>"   "${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}"   __cmd "${__cmd}" )
- string( REPLACE "<CMAKE_SHARED_LIBRARY_CXX_FLAGS>" "${CMAKE_CXX_FLAGS}" __cmd "${__cmd}" )
- string( REPLACE "<LANGUAGE_COMPILE_FLAGS>" "" __cmd "${__cmd}" )
- string( REPLACE "<LINK_FLAGS>" "${CMAKE_SHARED_LINKER_FLAGS}" __cmd "${__cmd}" )
- string( REPLACE "<CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS>" "-shared" __cmd "${__cmd}" )
- string( REPLACE "<CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG>" "" __cmd "${__cmd}" )
- string( REPLACE "<TARGET_SONAME>" "" __cmd "${__cmd}" )
- string( REPLACE "<TARGET>" "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/toolchain_crtlink_test.so" __cmd "${__cmd}" )
- string( REPLACE "<OBJECTS>" "\"${ANDROID_SYSROOT}/usr/lib/crtbegin_so.o\"" __cmd "${__cmd}" )
- string( REPLACE "<LINK_LIBRARIES>" "" __cmd "${__cmd}" )
- separate_arguments( __cmd )
- foreach( __var ANDROID_NDK ANDROID_NDK_TOOLCHAINS_PATH ANDROID_STANDALONE_TOOLCHAIN )
-  if( ${__var} )
-   set( __tmp "${${__var}}" )
-   separate_arguments( __tmp )
-   string( REPLACE "${__tmp}" "${${__var}}" __cmd "${__cmd}")
-  endif()
- endforeach()
- string( REPLACE "'" "" __cmd "${__cmd}" )
- string( REPLACE "\"" "" __cmd "${__cmd}" )
- execute_process( COMMAND ${__cmd} RESULT_VARIABLE __cmd_result OUTPUT_QUIET ERROR_QUIET )
- if( __cmd_result EQUAL 0 )
-  set( ANDROID_EXPLICIT_CRT_LINK ON )
- else()
-  set( ANDROID_EXPLICIT_CRT_LINK OFF )
- endif()
-endif()
-
-if( ANDROID_EXPLICIT_CRT_LINK )
- set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${ANDROID_SYSROOT}/usr/lib/crtbegin_so.o\"" )
- set( CMAKE_CXX_CREATE_SHARED_MODULE  "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${ANDROID_SYSROOT}/usr/lib/crtbegin_so.o\"" )
-endif()
-
-# setup output directories
-set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_BINARY_DIR} CACHE PATH "root for library output, set this to change where android libs are installed to" )
-set( CMAKE_INSTALL_PREFIX "${ANDROID_TOOLCHAIN_ROOT}/user" CACHE STRING "path for installing" )
-
-if(NOT _CMAKE_IN_TRY_COMPILE)
- if( EXISTS "${CMAKE_SOURCE_DIR}/jni/CMakeLists.txt" )
-  set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_ABI_NAME}" CACHE PATH "Output directory for applications" )
- else()
-  set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin" CACHE PATH "Output directory for applications" )
- endif()
- set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}" CACHE PATH "path for android libs" )
-endif()
-
-# copy shaed stl library to build directory
-if( NOT _CMAKE_IN_TRY_COMPILE AND __libstl MATCHES "[.]so$" )
- get_filename_component( __libstlname "${__libstl}" NAME )
- execute_process( COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${__libstl}" "${LIBRARY_OUTPUT_PATH}/${__libstlname}" RESULT_VARIABLE __fileCopyProcess )
- if( NOT __fileCopyProcess EQUAL 0 OR NOT EXISTS "${LIBRARY_OUTPUT_PATH}/${__libstlname}")
-  message( SEND_ERROR "Failed copying of ${__libstl} to the ${LIBRARY_OUTPUT_PATH}/${__libstlname}" )
- endif()
- unset( __fileCopyProcess )
- unset( __libstlname )
-endif()
-
-
-# set these global flags for cmake client scripts to change behavior
-set( ANDROID True )
-set( BUILD_ANDROID True )
-
-# where is the target environment
-set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )
-
-# only search for libraries and includes in the ndk toolchain
-set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
-set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
-set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
-
-
-# macro to find packages on the host OS
-macro( find_host_package )
- set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
- set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER )
- set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER )
- if( CMAKE_HOST_WIN32 )
-  SET( WIN32 1 )
-  SET( UNIX )
- elseif( CMAKE_HOST_APPLE )
-  SET( APPLE 1 )
-  SET( UNIX )
- endif()
- find_package( ${ARGN} )
- SET( WIN32 )
- SET( APPLE )
- SET( UNIX 1 )
- set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
- set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
- set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
-endmacro()
-
-
-# macro to find programs on the host OS
-macro( find_host_program )
- set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
- set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER )
- set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER )
- if( CMAKE_HOST_WIN32 )
-  SET( WIN32 1 )
-  SET( UNIX )
- elseif( CMAKE_HOST_APPLE )
-  SET( APPLE 1 )
-  SET( UNIX )
- endif()
- find_program( ${ARGN} )
- SET( WIN32 )
- SET( APPLE )
- SET( UNIX 1 )
- set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
- set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
- set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
-endmacro()
-
-
-macro( ANDROID_GET_ABI_RAWNAME TOOLCHAIN_FLAG VAR )
- if( "${TOOLCHAIN_FLAG}" STREQUAL "ARMEABI" )
-  set( ${VAR} "armeabi" )
- elseif( "${TOOLCHAIN_FLAG}" STREQUAL "ARMEABI_V7A" )
-  set( ${VAR} "armeabi-v7a" )
- elseif( "${TOOLCHAIN_FLAG}" STREQUAL "X86" )
-  set( ${VAR} "x86" )
- elseif( "${TOOLCHAIN_FLAG}" STREQUAL "MIPS" )
-  set( ${VAR} "mips" )
- else()
-  set( ${VAR} "unknown" )
- endif()
-endmacro()
-
-
-# export toolchain settings for the try_compile() command
-if( NOT PROJECT_NAME STREQUAL "CMAKE_TRY_COMPILE" )
- set( __toolchain_config "")
- foreach( __var NDK_CCACHE  LIBRARY_OUTPUT_PATH_ROOT  ANDROID_FORBID_SYGWIN  ANDROID_SET_OBSOLETE_VARIABLES
-                ANDROID_NDK_HOST_X64
-                ANDROID_NDK
-                ANDROID_NDK_LAYOUT
-                ANDROID_STANDALONE_TOOLCHAIN
-                ANDROID_TOOLCHAIN_NAME
-                ANDROID_ABI
-                ANDROID_NATIVE_API_LEVEL
-                ANDROID_STL
-                ANDROID_STL_FORCE_FEATURES
-                ANDROID_FORCE_ARM_BUILD
-                ANDROID_NO_UNDEFINED
-                ANDROID_SO_UNDEFINED
-                ANDROID_FUNCTION_LEVEL_LINKING
-                ANDROID_GOLD_LINKER
-                ANDROID_NOEXECSTACK
-                ANDROID_RELRO
-                ANDROID_LIBM_PATH
-                ANDROID_EXPLICIT_CRT_LINK
-                )
-  if( DEFINED ${__var} )
-   if( "${__var}" MATCHES " ")
-    set( __toolchain_config "${__toolchain_config}set( ${__var} \"${${__var}}\" CACHE INTERNAL \"\" )\n" )
-   else()
-    set( __toolchain_config "${__toolchain_config}set( ${__var} ${${__var}} CACHE INTERNAL \"\" )\n" )
-   endif()
-  endif()
- endforeach()
- set( ANDROID_TOOLCHAIN_CONFIG_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/android.toolchain.config.cmake" CACHE INTERNAL "" )
- file( WRITE "${ANDROID_TOOLCHAIN_CONFIG_FILE}" "${__toolchain_config}" )
- unset( __toolchain_config )
-endif()
-
-
-# force cmake to produce / instead of \ in build commands for Ninja generator
-if( CMAKE_GENERATOR MATCHES "Ninja" AND CMAKE_HOST_WIN32 )
- # it is a bad hack after all
- # CMake generates Ninja makefiles with UNIX paths only if it thinks that we are going to build with MinGW
- set( CMAKE_COMPILER_IS_MINGW TRUE ) # tell CMake that we are MinGW
- set( CMAKE_CROSSCOMPILING TRUE )    # stop recursion
- enable_language( C )
- enable_language( CXX )
- # unset( CMAKE_COMPILER_IS_MINGW ) # can't unset because CMake does not convert back-slashes in response files without it
- unset( MINGW )
-endif()
-
-
-# set some obsolete variables for backward compatibility
-set( ANDROID_SET_OBSOLETE_VARIABLES ON CACHE BOOL "Define obsolete Andrid-specific cmake variables" )
-mark_as_advanced( ANDROID_SET_OBSOLETE_VARIABLES )
-if( ANDROID_SET_OBSOLETE_VARIABLES )
- set( ANDROID_API_LEVEL ${ANDROID_NATIVE_API_LEVEL} )
- set( ARM_TARGET "${ANDROID_ABI}" )
- set( ARMEABI_NDK_NAME "${ANDROID_NDK_ABI_NAME}" )
-endif()
-
-
-# Variables controlling behavior or set by cmake toolchain:
-#   ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips"
-#   ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14 (depends on NDK version)
-#   ANDROID_STL : gnustl_static/gnustl_shared/stlport_static/stlport_shared/gabi++_static/gabi++_shared/system_re/system/none
-#   ANDROID_FORBID_SYGWIN : ON/OFF
-#   ANDROID_NO_UNDEFINED : ON/OFF
-#   ANDROID_SO_UNDEFINED : OFF/ON  (default depends on NDK version)
-#   ANDROID_FUNCTION_LEVEL_LINKING : ON/OFF
-#   ANDROID_GOLD_LINKER : ON/OFF
-#   ANDROID_NOEXECSTACK : ON/OFF
-#   ANDROID_RELRO : ON/OFF
-#   ANDROID_FORCE_ARM_BUILD : ON/OFF
-#   ANDROID_STL_FORCE_FEATURES : ON/OFF
-#   ANDROID_SET_OBSOLETE_VARIABLES : ON/OFF
-# Can be set only at the first run:
-#   ANDROID_NDK
-#   ANDROID_STANDALONE_TOOLCHAIN
-#   ANDROID_TOOLCHAIN_NAME : the NDK name of compiler toolchain
-#   ANDROID_NDK_HOST_X64 : try to use x86_64 toolchain (default for x64 host systems)
-#   ANDROID_NDK_LAYOUT : the inner NDK structure (RELEASE, LINARO, ANDROID)
-#   LIBRARY_OUTPUT_PATH_ROOT : <any valid path>
-#   NDK_CCACHE : <path to your ccache executable>
-# Obsolete:
-#   ANDROID_API_LEVEL : superseded by ANDROID_NATIVE_API_LEVEL
-#   ARM_TARGET : superseded by ANDROID_ABI
-#   ARM_TARGETS : superseded by ANDROID_ABI (can be set only)
-#   ANDROID_NDK_TOOLCHAIN_ROOT : superseded by ANDROID_STANDALONE_TOOLCHAIN (can be set only)
-#   ANDROID_USE_STLPORT : superseded by ANDROID_STL=stlport_static
-#   ANDROID_LEVEL : superseded by ANDROID_NATIVE_API_LEVEL (completely removed)
-#
-# Primary read-only variables:
-#   ANDROID : always TRUE
-#   ARMEABI : TRUE for arm v6 and older devices
-#   ARMEABI_V6 : TRUE for arm v6
-#   ARMEABI_V7A : TRUE for arm v7a
-#   NEON : TRUE if NEON unit is enabled
-#   VFPV3 : TRUE if VFP version 3 is enabled
-#   X86 : TRUE if configured for x86
-#   MIPS : TRUE if configured for mips
-#   BUILD_ANDROID : always TRUE
-#   BUILD_WITH_ANDROID_NDK : TRUE if NDK is used
-#   BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
-#   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
-#   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86" or "mips" depending on ANDROID_ABI
-#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c, r9d; set only for NDK
-#   ANDROID_ARCH_NAME : "arm" or "x86" or "mips" depending on ANDROID_ABI
-#   ANDROID_SYSROOT : path to the compiler sysroot
-#   TOOL_OS_SUFFIX : "" or ".exe" depending on host platform
-#   ANDROID_COMPILER_IS_CLANG : TRUE if clang compiler is used
-# Obsolete:
-#   ARMEABI_NDK_NAME : superseded by ANDROID_NDK_ABI_NAME
-#
-# Secondary (less stable) read-only variables:
-#   ANDROID_COMPILER_VERSION : GCC version used
-#   ANDROID_CXX_FLAGS : C/C++ compiler flags required by Android platform
-#   ANDROID_SUPPORTED_ABIS : list of currently allowed values for ANDROID_ABI
-#   ANDROID_TOOLCHAIN_MACHINE_NAME : "arm-linux-androideabi", "arm-eabi" or "i686-android-linux"
-#   ANDROID_TOOLCHAIN_ROOT : path to the top level of toolchain (standalone or placed inside NDK)
-#   ANDROID_CLANG_TOOLCHAIN_ROOT : path to clang tools
-#   ANDROID_SUPPORTED_NATIVE_API_LEVELS : list of native API levels found inside NDK
-#   ANDROID_STL_INCLUDE_DIRS : stl include paths
-#   ANDROID_RTTI : if rtti is enabled by the runtime
-#   ANDROID_EXCEPTIONS : if exceptions are enabled by the runtime
-#   ANDROID_GCC_TOOLCHAIN_NAME : read-only, differs from ANDROID_TOOLCHAIN_NAME only if clang is used
-#   ANDROID_CLANG_VERSION : version of clang compiler if clang is used
-#   ANDROID_LIBM_PATH : path to libm.so (set to something like $(TOP)/out/target/product/<product_name>/obj/lib/libm.so) to workaround unresolved `sincos`
-#
-# Defaults:
-#   ANDROID_DEFAULT_NDK_API_LEVEL
-#   ANDROID_DEFAULT_NDK_API_LEVEL_${ARCH}
-#   ANDROID_NDK_SEARCH_PATHS
-#   ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH
-#   ANDROID_SUPPORTED_ABIS_${ARCH}
-#   ANDROID_SUPPORTED_NDK_VERSIONS
diff --git a/CMake/dcmtkAfterModules.cmake b/CMake/dcmtkAfterModules.cmake
index d2e4aee..da7b487 100644
--- a/CMake/dcmtkAfterModules.cmake
+++ b/CMake/dcmtkAfterModules.cmake
@@ -21,7 +21,7 @@ IF(BUILD_SINGLE_SHARED_LIBRARY)
   INSTALL(TARGETS dcmtk
           EXPORT DCMTKTargets
           COMPONENT lib
-          RUNTIME DESTINATION ${DCMTK_INSTALL_BINDIR}
-          LIBRARY DESTINATION ${DCMTK_INSTALL_LIBDIR}
-          ARCHIVE DESTINATION ${DCMTK_INSTALL_LIBDIR})
+          RUNTIME DESTINATION "${DCMTK_INSTALL_BINDIR}"
+          LIBRARY DESTINATION "${DCMTK_INSTALL_LIBDIR}"
+          ARCHIVE DESTINATION "${DCMTK_INSTALL_LIBDIR}")
 ENDIF(BUILD_SINGLE_SHARED_LIBRARY)
diff --git a/CMake/dcmtkMacros.cmake b/CMake/dcmtkMacros.cmake
index a14d1a8..2ce1ff1 100644
--- a/CMake/dcmtkMacros.cmake
+++ b/CMake/dcmtkMacros.cmake
@@ -1,43 +1,43 @@
 #
 # Register all tests for the current module
 #
-# DCMTK_ADD_TESTS - macro which registers all tests
+# DCMTK_ADD_TESTS - function which registers all tests for a module
 # MODULE - name of the module that we are called for
 #
-MACRO(DCMTK_ADD_TESTS MODULE)
-    IF(CMAKE_CROSSCOMPILING)
-        IF(WIN32)
-            WINE_COMMAND(${MODULE}_TEST_CMD "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MODULE}_tests")
-            STRING(REPLACE "\\" "\\\\" ${MODULE}_TEST_CMD "${${MODULE}_TEST_CMD}")
-        ELSEIF(ANDROID)
-            SET(${MODULE}_TEST_CMD -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkCTestRunAndroid.cmake)
-        ELSE()
-            IF(NOT DEFINED DCMTK_UNIT_TESTS_UNSUPPORTED_WARN_ONCE)
-                SET(DCMTK_UNIT_TESTS_UNSUPPORTED_WARN_ONCE CACHE INTERNAL "")
-                MESSAGE(WARNING "Emulation for your target platform is not available, unit tests will fail!")
+FUNCTION(DCMTK_ADD_TESTS MODULE)
+    IF(BUILD_APPS AND DCMTK_RUN_CTEST_SCRIPT)
+        SET(TEST_EXECUTABLE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MODULE}_tests${CMAKE_EXECUTABLE_SUFFIX}")
+        IF(CMAKE_CROSSCOMPILING)
+            IF(WIN32)
+                WINE_COMMAND(TEST_COMMAND "${TEST_EXECUTABLE}")
+                STRING(REPLACE "\\" "\\\\" TEST_COMMAND "${TEST_COMMAND}")
+            ELSEIF(ANDROID)
+                SET(TEST_COMMAND "${ANDROID_TEMPORARY_FILES_LOCATION}/${MODULE}_tests")
+            ELSE()
+                # not reachable, handled by not defining DCMTK_RUN_CTEST_SCRIPT
             ENDIF()
-            SET(${MODULE}_TEST_CMD "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MODULE}_tests")
-        ENDIF()
-    ELSE(CMAKE_CROSSCOMPILING)
-        SET(${MODULE}_TEST_CMD "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MODULE}_tests")
-    ENDIF(CMAKE_CROSSCOMPILING)
-    LIST(APPEND DCMTK_TEST_EXECUTABLES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MODULE}_tests")
-    LIST(REMOVE_DUPLICATES DCMTK_TEST_EXECUTABLES)
-    SET(DCMTK_TEST_EXECUTABLES ${DCMTK_TEST_EXECUTABLES} CACHE INTERNAL "List of executables needed to run the unit tests")
-    FILE(STRINGS tests.cc AVAIL_TESTS REGEX "OFTEST_REGISTER\\([^)]*\\)")
-    FOREACH(TEST_LINE ${AVAIL_TESTS})
-        # TODO: How can we parse tests.cc in a saner way?
-        STRING(REGEX MATCH "OFTEST_REGISTER\\([^)]*" TEST "${TEST_LINE}")
-        STRING(REPLACE "OFTEST_REGISTER(" "" TEST ${TEST})
-        # This assumes that test names are globally unique
-        IF(CMAKE_CROSSCOMPILING AND ANDROID)
-            ADD_TEST("${TEST}" ${CMAKE_COMMAND} "-DDCMTK_CTEST_TESTCASE_COMMAND=${ANDROID_TEMPORARY_FILES_LOCATION}/${MODULE}_tests\;${TEST}" ${${MODULE}_TEST_CMD})
         ELSE()
-            ADD_TEST("${TEST}" ${${MODULE}_TEST_CMD} "${TEST}")
+            SET(TEST_COMMAND "${TEST_EXECUTABLE}")
         ENDIF()
-        SET_PROPERTY(TEST "${TEST}" PROPERTY LABELS "${MODULE}")
-    ENDFOREACH(TEST_LINE)
-ENDMACRO(DCMTK_ADD_TESTS)
+        LIST(APPEND DCMTK_TEST_EXECUTABLES "${TEST_EXECUTABLE}")
+        LIST(REMOVE_DUPLICATES DCMTK_TEST_EXECUTABLES)
+        SET(DCMTK_TEST_EXECUTABLES ${DCMTK_TEST_EXECUTABLES} CACHE INTERNAL "List of executables needed to run the unit tests")
+        FILE(STRINGS tests.cc AVAIL_TESTS REGEX "OFTEST_REGISTER\\([^)]*\\)")
+        FOREACH(TEST_LINE ${AVAIL_TESTS})
+            # TODO: How can we parse tests.cc in a saner way?
+            STRING(REGEX MATCH "OFTEST_REGISTER\\([^)]*" TEST "${TEST_LINE}")
+            STRING(REPLACE "OFTEST_REGISTER(" "" TEST ${TEST})
+            # This assumes that test names are globally unique
+            ADD_TEST("${TEST}" "${CMAKE_COMMAND}" "-DDCMTK_CTEST_TESTCASE_COMMAND=${TEST_COMMAND}" "-DDCMTK_CTEST_TEST_NAME=${TEST}" "-DDCMTK_CTEST_EXTRA_ARGUMENTS=\$ENV{DCMTK_CTEST_EXTRA_ARGUMENTS}" "-P" "${DCMTK_RUN_CTEST_SCRIPT}")
+            SET_PROPERTY(TEST "${TEST}" PROPERTY LABELS "${MODULE}")
+            SET_PROPERTY(TEST "${TEST}" PROPERTY REQUIRED_FILES "${TEST_EXECUTABLE}")
+        ENDFOREACH(TEST_LINE)
+        ADD_CUSTOM_TARGET("${MODULE}-test-exhaustive"
+            COMMAND "${CMAKE_COMMAND}" "-P" "${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestRunExhaustive.cmake"
+            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+        )
+    ENDIF(BUILD_APPS AND DCMTK_RUN_CTEST_SCRIPT)
+ENDFUNCTION(DCMTK_ADD_TESTS)
 
 #
 # Setup an executable
@@ -92,9 +92,9 @@ MACRO(DCMTK_ADD_LIBRARY LIBRARY)
         # Declare installation files
         INSTALL(TARGETS ${LIBRARY}${DCMTK_LIBRARY_SUFFIX}
           EXPORT DCMTKTargets
-          RUNTIME DESTINATION ${DCMTK_INSTALL_BINDIR} COMPONENT bin
-          LIBRARY DESTINATION ${DCMTK_INSTALL_LIBDIR} COMPONENT shlib
-          ARCHIVE DESTINATION ${DCMTK_INSTALL_LIBDIR} COMPONENT lib)
+          RUNTIME DESTINATION "${DCMTK_INSTALL_BINDIR}" COMPONENT bin
+          LIBRARY DESTINATION "${DCMTK_INSTALL_LIBDIR}" COMPONENT shlib
+          ARCHIVE DESTINATION "${DCMTK_INSTALL_LIBDIR}" COMPONENT lib)
     ENDIF(NOT BUILD_SINGLE_SHARED_LIBRARY)
 ENDMACRO(DCMTK_ADD_LIBRARY)
 
@@ -167,25 +167,3 @@ ELSE(CMAKE_VERSION VERSION_LESS 3.0)
     UNSET(${VAR} PARENT_SCOPE)
   ENDMACRO(DCMTK_UNSET_PARENT_SCOPE)
 ENDIF(CMAKE_VERSION VERSION_LESS 3.0)
-
-# C style atexit for CMake
-FUNCTION(DCMTK_ATEXIT_DISPATCHER)
-    # this will be called at every scope change, but CMAKE_PARENT_LIST_FILE will only
-    # be empty at exit.
-    IF(NOT CMAKE_PARENT_LIST_FILE)
-        FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/atexit.cmake "${DCMTK_ATEXIT_HOOK}")
-        DCMTK_UNSET_CACHE(DCMTK_ATEXIT_HOOK)
-        INCLUDE(${CMAKE_BINARY_DIR}/CMakeTmp/atexit.cmake NO_POLICY_SCOPE)
-        FILE(REMOVE ${CMAKE_BINARY_DIR}/CMakeTmp/atexit.cmake)
-    ENDIF()
-ENDFUNCTION(DCMTK_ATEXIT_DISPATCHER)
-
-# Necessary since it's sometimes not correctly cleaned up
-DCMTK_UNSET_CACHE(DCMTK_ATEXIT_HOOK)
-
-MACRO(DCMTK_ATEXIT FUNCTION)
-    IF(NOT DCMTK_ATEXIT_HOOK)
-        VARIABLE_WATCH(CMAKE_PARENT_LIST_FILE DCMTK_ATEXIT_DISPATCHER)
-    ENDIF()
-    SET(DCMTK_ATEXIT_HOOK "${FUNCTION}(${ARGN})" CACHE INTERNAL "")
-ENDMACRO(DCMTK_ATEXIT)
diff --git a/CMake/dcmtkPrepare.cmake b/CMake/dcmtkPrepare.cmake
index 679d607..2e30100 100644
--- a/CMake/dcmtkPrepare.cmake
+++ b/CMake/dcmtkPrepare.cmake
@@ -9,9 +9,9 @@ SET(DCMTK_CONFIGURATION_DONE true)
 
 # Minimum CMake version required
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-IF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.7.2)
-  SET(CMAKE_BACKWARDS_COMPATIBILITY 3.7.2 CACHE STRING "Latest version of CMake when this project was released." FORCE)
-ENDIF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.7.2)
+IF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.8.2)
+  SET(CMAKE_BACKWARDS_COMPATIBILITY 3.8.2 CACHE STRING "Latest version of CMake when this project was released." FORCE)
+ENDIF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.8.2)
 
 # CMAKE_BUILD_TYPE is set to value "Release" if none is specified by the
 # selected build file generator. For those generators that support multiple
@@ -39,14 +39,14 @@ ENDIF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
 #  a development snapshot and an even number indicates an official release.)
 SET(DCMTK_MAJOR_VERSION 3)
 SET(DCMTK_MINOR_VERSION 6)
-SET(DCMTK_BUILD_VERSION 1)
+SET(DCMTK_BUILD_VERSION 2)
 # The ABI is not guaranteed to be stable between different snapshots/releases,
 # so this particular version number is increased for each snapshot or release.
-SET(DCMTK_ABI_VERSION 11)
+SET(DCMTK_ABI_VERSION 12)
 
 # Package "release" settings (some are currently unused and, therefore, disabled)
 SET(DCMTK_PACKAGE_NAME "dcmtk")
-SET(DCMTK_PACKAGE_DATE "DEV")
+SET(DCMTK_PACKAGE_DATE "2017-07-14")
 SET(DCMTK_PACKAGE_VERSION "${DCMTK_MAJOR_VERSION}.${DCMTK_MINOR_VERSION}.${DCMTK_BUILD_VERSION}")
 SET(DCMTK_PACKAGE_VERSION_NUMBER ${DCMTK_MAJOR_VERSION}${DCMTK_MINOR_VERSION}${DCMTK_BUILD_VERSION})
 SET(DCMTK_PACKAGE_VERSION_SUFFIX "")
@@ -64,7 +64,15 @@ OPTION(BUILD_SHARED_LIBS "Build with shared libraries." OFF)
 OPTION(BUILD_SINGLE_SHARED_LIBRARY "Build a single DCMTK library." OFF)
 MARK_AS_ADVANCED(BUILD_SINGLE_SHARED_LIBRARY)
 SET(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Library postfix for debug builds. Usually left blank.")
-SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/${DCMTK_CMAKE_INCLUDE}/CMake/")
+# add our CMake modules to the module path, but prefer the ones from CMake.
+LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_ROOT}/Modules" "${CMAKE_CURRENT_SOURCE_DIR}/${DCMTK_CMAKE_INCLUDE}/CMake/")
+# newer CMake versions will warn if a module exists in its and the project's module paths, which is now always
+# the case since above line adds CMake's module path to the project's one. It, therefore, doesn't matter whether
+# we set the policy to OLD or NEW, since in both cases CMake's own module will be preferred. We just set
+# the policy to silence the warning.
+IF(POLICY CMP0017)
+    CMAKE_POLICY(SET CMP0017 NEW)
+ENDIF()
 IF(BUILD_SINGLE_SHARED_LIBRARY)
   # When we are building a single shared lib, we are building shared libs :-)
   SET(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE)
@@ -88,6 +96,27 @@ OPTION(DCMTK_WITH_DOXYGEN "Build API documentation with DOXYGEN." ON)
 OPTION(DCMTK_GENERATE_DOXYGEN_TAGFILE "Generate a tag file with DOXYGEN." OFF)
 OPTION(DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS "Build with wide char file I/O functions." OFF)
 OPTION(DCMTK_WIDE_CHAR_MAIN_FUNCTION "Build command line tools with wide char main function." OFF)
+OPTION(DCMTK_ENABLE_STL "Enable use of native STL classes and algorithms instead of DCMTK's own implementations." OFF)
+OPTION(DCMTK_ENABLE_CXX11 "Enable use of native C++11 features (eg. move semantics)." OFF)
+
+MACRO(DCMTK_INFERABLE_OPTION OPTION DESCRIPTION)
+  SET("${OPTION}" INFERRED CACHE STRING "${DESCRIPTION}")
+  SET_PROPERTY(CACHE "${OPTION}" PROPERTY STRINGS "INFERRED" "ON" "OFF")
+  # currently, all inferable options are advanced options
+  MARK_AS_ADVANCED("${OPTION}")
+ENDMACRO(DCMTK_INFERABLE_OPTION)
+
+DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_VECTOR "Enable use of STL vector.")
+DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_ALGORITHM "Enable use of STL algorithm.")
+DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_LIMITS "Enable use of STL limit.")
+DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_LIST "Enable use of STL list.")
+DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_MAP "Enable use of STL map.")
+DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_MEMORY "Enable use of STL memory.")
+DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_STACK "Enable use of STL stack.")
+DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_STRING "Enable use of STL string.")
+DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_TYPE_TRAITS "Enable use of STL type traits.")
+DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_TUPLE "Enable use of STL tuple.")
+DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_SYSTEM_ERROR "Enable use of STL system_error.")
 
 # Built-in (compiled-in) dictionary enabled on Windows per default, otherwise
 # disabled. Loading of external dictionary via run-time is, per default,
@@ -124,22 +153,12 @@ ENABLE_TESTING()
 
 IF(CMAKE_CROSSCOMPILING)
   IF(WIN32)
-    INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseWine.cmake)
+    INCLUDE("${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseWine.cmake")
     DCMTK_SETUP_WINE()
   ELSEIF(ANDROID)
-    SET(DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS "-DANDROID_TOOLCHAIN_CONFIG_FILE:INTERNAL=${ANDROID_TOOLCHAIN_CONFIG_FILE}")
-    INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake)
-    IF(NOT DCMTK_ANDROID_TOOLCHAIN_VERIFIED)
-      # Ensure the configuration variables for the Android device emulator exist in the cache.
-      DCMTK_SETUP_ANDROID_EMULATOR()
-      SET(DCMTK_ANDROID_TOOLCHAIN_VERIFIED TRUE CACHE INTERNAL "Set to TRUE to prevent aborting configuration on first Android toolchain run")
-      MESSAGE(FATAL_ERROR
-        "Please verify your Android toolchain configuration (e.g.\"ANDROID_NATIVE_API_LEVEL\") is correct before configuring DCMTK.\n"
-        "Hit \"Configure\" again to resume configuration when you are done.\n"
-        "NOTE: set \"DCMTK_ANDROID_TOOLCHAIN_VERIFIED\" to \"TRUE\" to avoid this check (e.g. to allow automated builds), you may use"
-        "something like\n    \"cmake -DDCMTK_ANDROID_TOOLCHAIN_VERIFIED=TRUE ...\"\nto achieve that."
-      )
-    ENDIF()
+    INCLUDE("${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake")
+    # Ensure the configuration variables for the Android device emulator exist in the cache.
+    DCMTK_SETUP_ANDROID_EMULATOR()
   ENDIF()
 ENDIF(CMAKE_CROSSCOMPILING)
 
@@ -147,7 +166,7 @@ ENDIF(CMAKE_CROSSCOMPILING)
 # Generic utilities used for configuring DCMTK
 #-----------------------------------------------------------------------------
 
-INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkMacros.cmake)
+INCLUDE("${DCMTK_CMAKE_INCLUDE}CMake/dcmtkMacros.cmake")
 
 #-----------------------------------------------------------------------------
 # Prepare external dependencies for cross compiling
@@ -159,7 +178,6 @@ IF(CMAKE_CROSSCOMPILING)
   IF(ANDROID)
     UNSET(DCMTK_TRY_RUN_ANDROID_RUNTIME_INSTALLED CACHE)
     DCMTK_ANDROID_START_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE)
-    DCMTK_ATEXIT(DCMTK_ANDROID_STOP_EMULATOR DCMTK_ANDROID_EMULATOR_INSTANCE)
   ENDIF()
 ENDIF(CMAKE_CROSSCOMPILING)
 
@@ -190,12 +208,12 @@ MARK_AS_ADVANCED(DCMTK_INSTALL_BINDIR DCMTK_INSTALL_INCDIR DCMTK_INSTALL_LIBDIR
 #-----------------------------------------------------------------------------
 # Build directories
 #-----------------------------------------------------------------------------
-SET(DCMTK_BUILD_CMKDIR ${CMAKE_BINARY_DIR})
+SET(DCMTK_BUILD_CMKDIR "${CMAKE_BINARY_DIR}")
 
 #-----------------------------------------------------------------------------
 # Start with clean DCMTKTargets.cmake, filled in GenerateCMakeExports.cmake
 #-----------------------------------------------------------------------------
-FILE(WRITE ${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake "")
+FILE(WRITE "${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake" "")
 
 #-----------------------------------------------------------------------------
 # Platform-independent settings
@@ -213,7 +231,14 @@ IF(COMMAND CMAKE_POLICY)
 ENDIF(COMMAND CMAKE_POLICY)
 
 # pass optional build date to compiler
-ADD_DEFINITIONS(-DDCMTK_BUILD_DATE=\\\"2017-02-28\\\")
+#SET(DCMTK_BUILD_DATE "\\\"YYYY-MM-DD\\\"")
+IF(DCMTK_BUILD_DATE)
+    # Xcode needs one escaping layer more than (as far as we know) everyone else - we gotta go deeper!
+    IF(CMAKE_GENERATOR MATCHES Xcode)
+        STRING(REPLACE "\\" "\\\\" DCMTK_BUILD_DATE "${DCMTK_BUILD_DATE}")
+    ENDIF()
+    ADD_DEFINITIONS(-DDCMTK_BUILD_DATE=${DCMTK_BUILD_DATE})
+ENDIF(DCMTK_BUILD_DATE)
 
 # make OFString(NULL) safe by default
 ADD_DEFINITIONS(-DUSE_NULL_SAFE_OFSTRING)
@@ -350,8 +375,12 @@ ELSE(WIN32)   # ... for non-Windows systems
   IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE")
     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE")
-  # FreeBSD and newer versions of OpenBSD fail with these flags
-  ELSEIF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" OR ${CMAKE_SYSTEM_VERSION} VERSION_LESS 4))
+  # Compiler flags for NetBSD
+  ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_NETBSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L")
+    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_NETBSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L")
+  # Solaris, FreeBSD and newer versions of OpenBSD fail with these flags
+  ELSEIF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" OR ${CMAKE_SYSTEM_VERSION} VERSION_LESS 4))
     # Compiler flags for all other non-Windows systems
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L")
     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L")
@@ -370,7 +399,7 @@ ENDIF(WIN32)
 
 # define libraries and object files that must be linked to most Windows applications
 IF(WIN32)
-  SET(WIN32_STD_LIBRARIES ws2_32 netapi32 wsock32)
+  SET(WIN32_STD_LIBRARIES iphlpapi ws2_32 netapi32 wsock32)
   IF(NOT DEFINED MINGW)
     # additional object file needed for wildcard expansion; for wchar_t* support, use 'wsetargv'
     SET(WIN32_STD_OBJECTS setargv)
@@ -386,6 +415,23 @@ ENDIF(WIN32)
 SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
 
+# determine which flags are required to enable C++11 features (if any)
+IF(NOT DEFINED DCMTK_CXX11_FLAGS)
+  IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
+    SET(DCMTK_CXX11_FLAGS "-std=c++11")
+  ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+    IF(CMAKE_HOST_WIN32)
+      SET(DCMTK_CXX11_FLAGS "/Qstd=c++11")
+    ELSE()
+      SET(DCMTK_CXX11_FLAGS "-std=c++11")
+    ENDIF()
+  ELSE()
+    SET(DCMTK_CXX11_FLAGS "")
+  ENDIF()
+  SET(DCMTK_CXX11_FLAGS "${DCMTK_CXX11_FLAGS}" CACHE STRING "The flags to add to CMAKE_CXX_FLAGS for enabling C++11 (if any).")
+  MARK_AS_ADVANCED(DCMTK_CXX11_FLAGS)
+ENDIF(NOT DEFINED DCMTK_CXX11_FLAGS)
+
 #-----------------------------------------------------------------------------
 # Third party libraries
 #-----------------------------------------------------------------------------
@@ -393,60 +439,6 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
 INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/3rdparty.cmake)
 
 #-----------------------------------------------------------------------------
-# C++11 support
-#-----------------------------------------------------------------------------
-
-MACRO(GET_CXX_VERSION VERSION)
-  EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE ${VERSION})
-  STRING(REGEX REPLACE "^.*[ ]([0-9]\\.[0-9]\\.[0-9]).*$" "\\1" ${VERSION} "${${VERSION}}")
-ENDMACRO(GET_CXX_VERSION VERSION)
-
-MACRO(ALLOW_CXX11_SUPPORT FLAGS)
-  IF(NOT DCMTK_CXX11_FLAGS)
-    SET(DCMTK_CXX11_FLAGS ${FLAGS} CACHE STRING "Flags used to enable C++11 support.")
-  ENDIF()
-  IF(DCMTK_USE_CXX11_STL)
-    MESSAGE(STATUS "Info: Configured DCMTK to use native C++11 features.")
-    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DCMTK_CXX11_FLAGS}")
-    SET(DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS ${DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS} "-DCMAKE_CXX_FLAGS:STRING=${DCMTK_CXX11_FLAGS}")
-  ELSE()
-    MESSAGE(STATUS "Info: Your compiler supports C++11. You may enable C++11 features via \"DCMTK_USE_CXX11_STL\" to create a C++11 build of DCMTK.")
-    SET(DCMTK_USE_CXX11_STL OFF CACHE BOOL "Enable or disable C++11 while building DCMTK.")
-  ENDIF()
-ENDMACRO(ALLOW_CXX11_SUPPORT)
-
-MACRO(DENY_CXX11_SUPPORT)
-  IF(DCMTK_USE_CXX11_STL)
-    IF(DCMTK_CXX11_FLAGS AND NOT DCMTK_CXX11_FLAGS STREQUAL "unknown")
-      MESSAGE(STATUS "Info: Enabling C++11 support with custom flags \"${DCMTK_CXX11_FLAGS}\" for a potentially unsupported compiler.")
-      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DCMTK_CXX11_FLAGS}")
-      SET(DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS ${DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS} "-DCMAKE_CXX_FLAGS:STRING=${DCMTK_CXX11_FLAGS}")
-    ELSE()
-      MESSAGE(WARNING "DCMTK has been configured to use the C++11 STL, but the compiler does not seem to support C++11. Override this warning by setting DCMTK_CXX11_FLAGS to tell DCMTK how to enable C++11 support for your compiler.")
-      SET(DCMTK_CXX11_FLAGS "unknown" CACHE STRING "Flags used to enable C++11 support.")
-    ENDIF()
-  ENDIF()
-ENDMACRO(DENY_CXX11_SUPPORT)
-
-IF(CMAKE_COMPILER_IS_GNUCXX)
-  GET_CXX_VERSION(GXX_VERSION)
-  IF(GXX_VERSION VERSION_GREATER 4.8.1 OR GXX_VERSION VERSION_EQUAL 4.8.1)
-    ALLOW_CXX11_SUPPORT("-std=c++11")
-  ELSE()
-    DENY_CXX11_SUPPORT()
-  ENDIF()
-ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-  GET_CXX_VERSION(CLANG_VERSION)
-  IF(CLANG_VERSION VERSION_GREATER 3.3 OR CLANG_VERSION VERSION_EQUAL 3.3)
-    ALLOW_CXX11_SUPPORT("-std=c++11")
-  ELSE()
-    DENY_CXX11_SUPPORT()
-  ENDIF()
-ELSE()
-  DENY_CXX11_SUPPORT()
-ENDIF()
-
-#-----------------------------------------------------------------------------
 # DCMTK libraries
 #-----------------------------------------------------------------------------
 
@@ -491,3 +483,32 @@ IF(WITH_THREADS)
     ENDIF(HAVE_LIBRT)
   ENDIF(HAVE_PTHREAD_H)
 ENDIF(WITH_THREADS)
+
+#-----------------------------------------------------------------------------
+# Test for socket libraries if needed (Solaris)
+#-----------------------------------------------------------------------------
+
+SET(SOCKET_LIBS)
+
+FUNCTION(DCMTK_TEST_SOCKET_LIBRARY NAME SYMBOL)
+  STRING(TOUPPER "${NAME}" VARNAME)
+  CHECK_LIBRARY_EXISTS("${NAME}" "main" "" "HAVE_LIB${VARNAME}_MAIN")
+  IF(NOT HAVE_LIB${VARNAME}_MAIN)
+    CHECK_LIBRARY_EXISTS("${NAME}" "${SYMBOL}" "" "HAVE_LIB${VARNAME}")
+  ENDIF(NOT HAVE_LIB${VARNAME}_MAIN)
+  IF(HAVE_LIB${VARNAME} OR HAVE_LIB${VARNAME}_MAIN)
+    LIST(APPEND SOCKET_LIBS "${NAME}")
+    SET(SOCKET_LIBS "${SOCKET_LIBS}" PARENT_SCOPE)
+  ENDIF(HAVE_LIB${VARNAME} OR HAVE_LIB${VARNAME}_MAIN)
+ENDFUNCTION(DCMTK_TEST_SOCKET_LIBRARY)
+
+DCMTK_TEST_SOCKET_LIBRARY(nsl "gethostbyname")
+DCMTK_TEST_SOCKET_LIBRARY(socket "socket")
+
+#-----------------------------------------------------------------------------
+# Test if SunPro compiler and add features
+#-----------------------------------------------------------------------------
+
+IF(CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
+  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -features=tmplrefstatic")
+ENDIF()
diff --git a/CMake/dcmtkTryCompile.cmake b/CMake/dcmtkTryCompile.cmake
index 102864d..0010b0b 100644
--- a/CMake/dcmtkTryCompile.cmake
+++ b/CMake/dcmtkTryCompile.cmake
@@ -21,21 +21,21 @@ MACRO(DCMTK_TRY_COMPILE VAR MESSAGE SOURCE)
             DCMTK_UNSET(DCMTK_TRY_COMPILE_CMAKE_FLAGS)
         ENDIF()
         TRY_COMPILE(${VAR}
-                    ${CMAKE_BINARY_DIR}
-                    ${DCMTK_TRY_COMPILE_FILE}
+                    "${CMAKE_BINARY_DIR}"
+                    "${DCMTK_TRY_COMPILE_FILE}"
                     ${DCMTK_TRY_COMPILE_CMAKE_FLAGS}
                     OUTPUT_VARIABLE OUTPUT
                     ${ARGN})
         IF(${VAR})
             MESSAGE(STATUS "Checking whether ${MESSAGE} -- yes")
             SET(${VAR} 1 CACHE INTERNAL "${MESSAGE}")
-            FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+            FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
                  "${MESSAGE} passed with the following output:\n"
                  "${OUTPUT}\n")
         ELSE(${VAR})
             MESSAGE(STATUS "Checking whether ${MESSAGE} -- no")
             SET(${VAR} 0 CACHE INTERNAL "${MESSAGE}")
-            FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+            FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
                  "${MESSAGE} failed with the following output:\n"
                  "${OUTPUT}\n")
         ENDIF(${VAR})
diff --git a/CMake/dcmtkTryRun.cmake b/CMake/dcmtkTryRun.cmake
index beba7ef..3a425f2 100644
--- a/CMake/dcmtkTryRun.cmake
+++ b/CMake/dcmtkTryRun.cmake
@@ -27,10 +27,10 @@ FUNCTION(DCMTK_TRY_RUN_CROSS RUN_RESULT_VAR COMPILE_RESULT_VAR bindir srcfile)
             "CMAKE_FLAGS;COMPILE_DEFINITIONS;ARGS"
             ${ARGN}
     )
-    GET_FILENAME_COMPONENT(OUTPUT_EXECUTABLE_NAME ${srcfile} NAME)
-    SET(OUTPUT_EXECUTABLE_NAME ${OUTPUT_EXECUTABLE_NAME}${CMAKE_EXECUTABLE_SUFFIX})
-    SET(OUTPUT_EXECUTABLE ${bindir}/${OUTPUT_EXECUTABLE_NAME})
-    SET(TRY_COMPILE_ARGS ${COMPILE_RESULT_VAR} ${bindir} ${srcfile})
+    GET_FILENAME_COMPONENT(OUTPUT_EXECUTABLE_NAME "${srcfile}" NAME)
+    SET(OUTPUT_EXECUTABLE_NAME "${OUTPUT_EXECUTABLE_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
+    SET(OUTPUT_EXECUTABLE "${bindir}/${OUTPUT_EXECUTABLE_NAME}")
+    SET(TRY_COMPILE_ARGS "${COMPILE_RESULT_VAR}" "${bindir}" "${srcfile}")
     IF(DCMTK_TRY_RUN_CMAKE_FLAGS)
         LIST(APPEND TRY_COMPILE_ARGS CMAKE_FLAGS ${DCMTK_TRY_RUN_CMAKE_FLAGS} ${DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS})
     ELSEIF(DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS)
@@ -42,49 +42,42 @@ FUNCTION(DCMTK_TRY_RUN_CROSS RUN_RESULT_VAR COMPILE_RESULT_VAR bindir srcfile)
     IF(DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE)
         LIST(APPEND TRY_COMPILE_ARGS OUTPUT_VARIABLE ${DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE})
     ENDIF()
-    TRY_COMPILE(${TRY_COMPILE_ARGS} COPY_FILE ${OUTPUT_EXECUTABLE})
-    SET(${COMPILE_RESULT_VAR} ${${COMPILE_RESULT_VAR}} PARENT_SCOPE)
+    TRY_COMPILE(${TRY_COMPILE_ARGS} COPY_FILE "${OUTPUT_EXECUTABLE}")
+    SET("${COMPILE_RESULT_VAR}" ${${COMPILE_RESULT_VAR}} PARENT_SCOPE)
     IF(DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE)
-        SET(${DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE} ${${DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE}} PARENT_SCOPE)
+        SET("${DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE}" ${${DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE}} PARENT_SCOPE)
     ENDIF()
     IF(${COMPILE_RESULT_VAR})
         IF(WIN32)
-            WINE_COMMAND(CMD ${OUTPUT_EXECUTABLE} ${DCMTK_TRY_RUN_ARGS})
-            IF(CMD)
-                EXECUTE_PROCESS(
-                    COMMAND ${CMD}
-                    RESULT_VARIABLE ${RUN_RESULT_VAR}
-                    OUTPUT_VARIABLE ${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}
-                    ERROR_VARIABLE ${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}
-                )
-            ENDIF()
+            WINE_COMMAND(CMD "${OUTPUT_EXECUTABLE}" ${DCMTK_TRY_RUN_ARGS})
+            WINE_DETACHED("${RUN_RESULT_VAR}" "${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}" "${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}" "${WINE_WINE_PROGRAM}" ${CMD})
         ELSEIF(ANDROID)
             DCMTK_ANDROID_WAIT_FOR_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE)
             IF(NOT DCMTK_TRY_RUN_ANDROID_RUNTIME_INSTALLED)
                 DCMTK_ANDROID_FIND_RUNTIME_LIBRARIES(ANDROID_RUNTIME_LIBRARIES)
                 SET(ANDROID_RUNTIME_LIBRARIES ${ANDROID_RUNTIME_LIBRARIES} CACHE INTERNAL "")
-                DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE ${ANDROID_RUNTIME_LIBRARIES} DESTINATION ${ANDROID_TEMPORARY_FILES_LOCATION})
+                DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE ${ANDROID_RUNTIME_LIBRARIES} DESTINATION "${ANDROID_TEMPORARY_FILES_LOCATION}")
                 SET(DCMTK_TRY_RUN_ANDROID_RUNTIME_INSTALLED TRUE CACHE INTERNAL "")
             ENDIF()
-            DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE ${OUTPUT_EXECUTABLE} DESTINATION ${ANDROID_TEMPORARY_FILES_LOCATION}/${OUTPUT_EXECUTABLE_NAME})
+            DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE "${OUTPUT_EXECUTABLE}" DESTINATION "${ANDROID_TEMPORARY_FILES_LOCATION}/${OUTPUT_EXECUTABLE_NAME}")
             DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE
-                COMMAND chmod 755 ${ANDROID_TEMPORARY_FILES_LOCATION}/${OUTPUT_EXECUTABLE_NAME}
+                COMMAND chmod 755 "${ANDROID_TEMPORARY_FILES_LOCATION}/${OUTPUT_EXECUTABLE_NAME}"
                 OUTPUT_QUIET
                 ERROR_QUIET
             )
             DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE
-                COMMAND "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${ANDROID_TEMPORARY_FILES_LOCATION}" ${ANDROID_TEMPORARY_FILES_LOCATION}/${OUTPUT_EXECUTABLE_NAME} ${DCMTK_TRY_RUN_ARGS}
-                RESULT_VARIABLE ${RUN_RESULT_VAR}
-                OUTPUT_VARIABLE ${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}
-                ERROR_VARIABLE ${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}
+                COMMAND "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${ANDROID_TEMPORARY_FILES_LOCATION}" "${ANDROID_TEMPORARY_FILES_LOCATION}/${OUTPUT_EXECUTABLE_NAME}" ${DCMTK_TRY_RUN_ARGS}
+                RESULT_VARIABLE "${RUN_RESULT_VAR}"
+                OUTPUT_VARIABLE "${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}"
+                ERROR_VARIABLE "${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}"
             )
         ELSE()
             MESSAGE(WARNING "Emulation for your target platform is not available, please fill in the required configure test results manually.")
-            TRY_RUN(${RUN_RESULT_VAR} ${COMPILE_RESULT_VAR} ${bindir} ${srcfile} ${ARGN})
+            TRY_RUN("${RUN_RESULT_VAR}" "${COMPILE_RESULT_VAR}" "${bindir}" "${srcfile}" ${ARGN})
             RETURN()
         ENDIF()
-        SET(${RUN_RESULT_VAR} ${${RUN_RESULT_VAR}} PARENT_SCOPE)
-        SET(${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE} ${${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}} PARENT_SCOPE)
+        SET("${RUN_RESULT_VAR}" ${${RUN_RESULT_VAR}} PARENT_SCOPE)
+        SET("${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}" ${${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}} PARENT_SCOPE)
     ENDIF()
 ENDFUNCTION(DCMTK_TRY_RUN_CROSS)
 
diff --git a/CMake/dcmtkUseAndroidSDK.cmake b/CMake/dcmtkUseAndroidSDK.cmake
index 925423e..57fab9b 100644
--- a/CMake/dcmtkUseAndroidSDK.cmake
+++ b/CMake/dcmtkUseAndroidSDK.cmake
@@ -84,7 +84,7 @@ ENDMACRO(DCMTK_ANDROID_SET_OBJECT_PROPERTIES)
 # All additional arguments will be ignored.
 #
 MACRO(DCMTK_ANDROID_DESTROY_OBJECT VAR)
-    UNSET(${VAR} CACHE)
+    UNSET("${VAR}" CACHE)
 ENDMACRO(DCMTK_ANDROID_DESTROY_OBJECT)
 
 #
@@ -99,15 +99,15 @@ FUNCTION(DCMTK_ANDROID_FIND_RUNTIME_LIBRARIES VAR)
     SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so")
     FOREACH(DIR ${ANDROID_STL_INCLUDE_DIRS})
         IF(CMAKE_VERSION VERSION_LESS 2.8.11)
-            GET_FILENAME_COMPONENT(DIR ${DIR} PATH)
+            GET_FILENAME_COMPONENT(DIR "${DIR}" PATH)
         ELSE()
-            GET_FILENAME_COMPONENT(DIR ${DIR} DIRECTORY)
+            GET_FILENAME_COMPONENT(DIR "${DIR}" DIRECTORY)
         ENDIF()
-        LIST(APPEND ANDROID_STL_LIBRARY_DIRS ${DIR})
+        LIST(APPEND ANDROID_STL_LIBRARY_DIRS "${DIR}")
     ENDFOREACH()
     FIND_LIBRARY(ANDROID_STL_SHARED_OBJECT ${ANDROID_STL} PATHS ${ANDROID_STL_LIBRARY_DIRS} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
     IF(ANDROID_STL_SHARED_OBJECT)
-        SET(${VAR} ${ANDROID_STL_SHARED_OBJECT} PARENT_SCOPE)
+        SET("${VAR}" ${ANDROID_STL_SHARED_OBJECT} PARENT_SCOPE)
     ENDIF()
 ENDFUNCTION(DCMTK_ANDROID_FIND_RUNTIME_LIBRARIES)
 
@@ -144,7 +144,7 @@ FUNCTION(DCMTK_SETUP_ANDROID_EMULATOR)
             "or set the missing tools manually!"
         )
     ELSE()
-        EXECUTE_PROCESS(COMMAND ${ANDROID_ANDROID_PROGRAM} list avd RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_QUIET)
+        EXECUTE_PROCESS(COMMAND "${ANDROID_ANDROID_PROGRAM}" list avd RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_QUIET)
         STRING(REGEX MATCHALL "Name:[ \t]*[^\r\n]*" ANDROID_AVAILABLE_AVDS ${OUTPUT})
         STRING(REGEX REPLACE "Name:[ \t]*([^\r\n;]*)" "\\1" ANDROID_AVAILABLE_AVDS "${ANDROID_AVAILABLE_AVDS}")
         SET(ANDROID_EMULATOR_AVD "${ANDROID_EMULATOR_AVD}" CACHE STRING "Android emulator Android Virtual Device (AVD) configuration" FORCE)
@@ -169,7 +169,7 @@ FUNCTION(DCMTK_ANDROID_LIST_EMULATORS ONLINE OFFLINE)
     DCMTK_SETUP_ANDROID_EMULATOR()
     IF(ANDROID_ADB_PROGRAM)
         EXECUTE_PROCESS(
-            COMMAND ${ANDROID_ADB_PROGRAM} devices
+            COMMAND "${ANDROID_ADB_PROGRAM}" devices
             RESULT_VARIABLE RESULT
             OUTPUT_VARIABLE DEVICES_RAW
             ERROR_QUIET
@@ -182,15 +182,15 @@ FUNCTION(DCMTK_ANDROID_LIST_EMULATORS ONLINE OFFLINE)
                 LIST(GET DS 0 EMULATOR_NAME)
                 LIST(GET DS 1 EMULATOR_STATE)
                 IF(EMULATOR_STATE MATCHES "^device$")
-                    LIST(APPEND ${ONLINE} ${EMULATOR_NAME})
+                    LIST(APPEND "${ONLINE}" ${EMULATOR_NAME})
                 ELSE()
-                    LIST(APPEND ${OFFLINE} ${EMULATOR_NAME})
+                    LIST(APPEND "${OFFLINE}" ${EMULATOR_NAME})
                 ENDIF()
             ENDIF()
         ENDFOREACH()
     ENDIF()
-    SET(${ONLINE} ${${ONLINE}} PARENT_SCOPE)
-    SET(${OFFLINE} ${${OFFLINE}} PARENT_SCOPE)
+    SET("${ONLINE}" ${${ONLINE}} PARENT_SCOPE)
+    SET("${OFFLINE}" ${${OFFLINE}} PARENT_SCOPE)
 ENDFUNCTION(DCMTK_ANDROID_LIST_EMULATORS)
 
 #
@@ -224,16 +224,16 @@ ENDIF(CMAKE_VERSION VERSION_LESS 2.8.11)
 #
 FUNCTION(DCMTK_ANDROID_GET_EMULATOR_UUID EMULATOR_NAME VAR)
     EXECUTE_PROCESS(
-        COMMAND ${ANDROID_ADB_PROGRAM} -s ${EMULATOR_NAME} shell getprop
+        COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" shell getprop "ro.emu.uuid"
         RESULT_VARIABLE RESULT
         OUTPUT_VARIABLE OUTPUT
         ERROR_QUIET
     )
     DCMTK_UNSET_PARENT_SCOPE(${VAR})
     IF(NOT RESULT)
-        STRING(REGEX REPLACE ".*\\[emu\\.uuid\\]: \\[([^]]+)\\].*" "\\1" ${VAR} "${OUTPUT}")
-        IF(${VAR})
-            SET(${VAR} ${${VAR}} PARENT_SCOPE)
+        STRING(STRIP "${OUTPUT}" UUID)
+        IF(UUID)
+            SET("${VAR}" ${UUID} PARENT_SCOPE)
         ENDIF()
     ENDIF()
 ENDFUNCTION(DCMTK_ANDROID_GET_EMULATOR_UUID)
@@ -252,9 +252,9 @@ ENDFUNCTION(DCMTK_ANDROID_GET_EMULATOR_UUID)
 FUNCTION(DCMTK_ANDROID_GET_EMULATOR_NAME VAR EMULATOR_UUID)
     DCMTK_ANDROID_LIST_EMULATORS(ONLINE_EMULATORS OFFLINE_EMULATORS)
     FOREACH(EMULATOR ${ONLINE_EMULATORS})
-        DCMTK_ANDROID_GET_EMULATOR_UUID(${EMULATOR} UUID)
+        DCMTK_ANDROID_GET_EMULATOR_UUID("${EMULATOR}" UUID)
         IF(EMULATOR_UUID STREQUAL UUID)
-            SET(${VAR} ${EMULATOR} PARENT_SCOPE)
+            SET("${VAR}" "${EMULATOR}" PARENT_SCOPE)
             RETURN()
         ENDIF()
     ENDFOREACH()
@@ -262,24 +262,24 @@ FUNCTION(DCMTK_ANDROID_GET_EMULATOR_NAME VAR EMULATOR_UUID)
         LIST(GET OFFLINE_EMULATORS 0 EMULATOR)
         LIST(REMOVE_AT OFFLINE_EMULATORS 0)
         EXECUTE_PROCESS(
-            COMMAND ${ANDROID_ADB_PROGRAM} -s ${EMULATOR} wait-for-device
+            COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR}" wait-for-device
             TIMEOUT 1
             RESULT_VARIABLE RESULT
             OUTPUT_QUIET
             ERROR_QUIET
         )
         IF(NOT RESULT)
-            DCMTK_ANDROID_GET_EMULATOR_UUID(${EMULATOR} UUID)
+            DCMTK_ANDROID_GET_EMULATOR_UUID("${EMULATOR}" UUID)
             IF(UUID)
                 IF(EMULATOR_UUID STREQUAL UUID)
-                    SET(${VAR} ${EMULATOR} PARENT_SCOPE)
+                    SET("${VAR}" "${EMULATOR}" PARENT_SCOPE)
                     RETURN()
                 ENDIF()
             ELSE()
-                LIST(APPEND OFFLINE_EMULATORS ${EMULATOR})
+                LIST(APPEND OFFLINE_EMULATORS "${EMULATOR}")
             ENDIF()
         ELSE()
-            LIST(APPEND OFFLINE_EMULATORS ${EMULATOR})
+            LIST(APPEND OFFLINE_EMULATORS "${EMULATOR}")
         ENDIF()
     ENDWHILE()
 ENDFUNCTION()
@@ -300,11 +300,11 @@ FUNCTION(DCMTK_ANDROID_START_EMULATOR VAR)
     IF(NOT ANDROID_EMULATOR_AVD)
         MESSAGE(FATAL_ERROR "Please select which Android emulator Android Virtual Device (AVD) configuration to use!")
     ELSE()
-        DCMTK_ANDROID_GET_OBJECT_PROPERTIES(${VAR})
+        DCMTK_ANDROID_GET_OBJECT_PROPERTIES("${VAR}")
         IF(NOT EMULATOR_STATE)
             DCMTK_ANDROID_EMULATOR_GENERATE_UUID(EMULATOR_UUID)
         ELSEIF(EMULATOR_STATE STREQUAL "RUNNING")
-            DCMTK_ANDROID_GET_EMULATOR_UUID(${EMULATOR_NAME} UUID)
+            DCMTK_ANDROID_GET_EMULATOR_UUID("${EMULATOR_NAME}" UUID)
             # Do nothing if the running emulator instance is ok and can be reused.
             # Otherwise restart it.
             IF(UUID STREQUAL EMULATOR_UUID)
@@ -314,19 +314,19 @@ FUNCTION(DCMTK_ANDROID_START_EMULATOR VAR)
         ELSEIF(EMULATOR_STATE STREQUAL "STARTING")
             # Is it really starting, or has somebody aborted it?
             MESSAGE(STATUS "Found previously started Android device emulator, checking if it's still present...")
-            DCMTK_ANDROID_GET_EMULATOR_NAME(EMULATOR_NAME ${EMULATOR_UUID})
+            DCMTK_ANDROID_GET_EMULATOR_NAME(EMULATOR_NAME "${EMULATOR_UUID}")
             IF(EMULATOR_NAME)
               MESSAGE(STATUS "Found previously started Android device emulator, checking if it's still present... yes")
-              DCMTK_ANDROID_SET_OBJECT_PROPERTIES(${VAR} RUNNING ${EMULATOR_UUID} ${EMULATOR_NAME})
+              DCMTK_ANDROID_SET_OBJECT_PROPERTIES(${VAR} RUNNING "${EMULATOR_UUID}" "${EMULATOR_NAME}")
               RETURN()
             ENDIF()
             MESSAGE(STATUS "Found previously started Android device emulator, checking if it's still present... no")
         ENDIF()
         MESSAGE(STATUS "Starting the Android device emulator...")
         IF(CMAKE_HOST_SYSTEM MATCHES "Windows.*")
-            SET(COMMAND sh -c "${ANDROID_EMULATOR_PROGRAM} -avd ${ANDROID_EMULATOR_AVD} -no-boot-anim -noaudio -prop emu.uuid=${EMULATOR_UUID} >/dev/null 2>&1 < /dev/null &")
+            SET(COMMAND sh -c "${ANDROID_EMULATOR_PROGRAM} -avd ${ANDROID_EMULATOR_AVD} -no-boot-anim -prop ro.emu.uuid=${EMULATOR_UUID} >${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/android-emulator.log 2>&1 < /dev/null &")
         ELSE()
-            SET(COMMAND sh -c "${ANDROID_EMULATOR_PROGRAM} -avd ${ANDROID_EMULATOR_AVD} -no-window -no-boot-anim -noaudio -prop emu.uuid=${EMULATOR_UUID} >/dev/null 2>&1 < /dev/null &")
+            SET(COMMAND sh -c "${ANDROID_EMULATOR_PROGRAM} -avd ${ANDROID_EMULATOR_AVD} -no-window -no-boot-anim -prop ro.emu.uuid=${EMULATOR_UUID} >${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/android-emulator.log 2>&1 < /dev/null &")
         ENDIF()
         EXECUTE_PROCESS(
             COMMAND ${COMMAND}
@@ -335,15 +335,43 @@ FUNCTION(DCMTK_ANDROID_START_EMULATOR VAR)
             ERROR_QUIET
         )
         IF(NOT RESULT)
-            DCMTK_ANDROID_SET_OBJECT_PROPERTIES(${VAR} STARTING ${EMULATOR_UUID} "")
+            DCMTK_ANDROID_SET_OBJECT_PROPERTIES("${VAR}" STARTING "${EMULATOR_UUID}" "")
         ELSE()
-            DCMTK_ANDROID_DESTROY_OBJECT(${VAR})
+            DCMTK_ANDROID_DESTROY_OBJECT("${VAR}")
             MESSAGE(FATAL_ERROR "Error starting Android emulator.")
         ENDIF()
     ENDIF()
 ENDFUNCTION(DCMTK_ANDROID_START_EMULATOR)
 
 #
+# Restart adb/the emulated device in root mode so that we gain write access to
+# the device.
+# Newer versions of the SDK seem to require this for doing anything meaningful
+# with it.
+# EMULATOR_NAME - the name of the emulated device that shall be rooted.
+# Will ignore all additional arguments.
+#
+FUNCTION(DCMTK_ANDROID_ADB_ROOT EMULATOR_NAME)
+    EXECUTE_PROCESS(
+        COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" root
+        OUTPUT_QUIET
+        ERROR_QUIET
+    )
+    # the SDK was seemingly designed by a five year old, the device will
+    # become invisible while it is being rooted, therefore, wait until
+    # it is ready again
+    SET(STATUS 1)
+    WHILE(STATUS)
+        EXECUTE_PROCESS(
+            COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" wait-for-device
+            RESULT_VARIABLE STATUS
+            OUTPUT_QUIET
+            ERROR_QUIET
+        )
+    ENDWHILE()
+ENDFUNCTION(DCMTK_ANDROID_ADB_ROOT)
+
+#
 # Waits until the given emulator instance becomes online (RUNNING).
 # VAR - the emulator instance handle object referring to the emulator
 #       to wait for
@@ -355,7 +383,7 @@ ENDFUNCTION(DCMTK_ANDROID_START_EMULATOR)
 # Will ignore all additional arguments.
 #
 FUNCTION(DCMTK_ANDROID_WAIT_FOR_EMULATOR VAR)
-    DCMTK_ANDROID_GET_OBJECT_PROPERTIES(${VAR})
+    DCMTK_ANDROID_GET_OBJECT_PROPERTIES("${VAR}")
     IF(NOT EMULATOR_STATE)
         MESSAGE(AUTHOR_WARNING "Error: ${VAR} is not a valid Android emulator instance handle.")
     ELSEIF(EMULATOR_STATE STREQUAL "RUNNING")
@@ -365,9 +393,10 @@ FUNCTION(DCMTK_ANDROID_WAIT_FOR_EMULATOR VAR)
     ELSE()
         MESSAGE(STATUS "Waiting until the Android device emulator is ready to receive instructions...")
         WHILE(NOT EMULATOR_NAME)
-            DCMTK_ANDROID_GET_EMULATOR_NAME(EMULATOR_NAME ${EMULATOR_UUID})
+            DCMTK_ANDROID_GET_EMULATOR_NAME(EMULATOR_NAME "${EMULATOR_UUID}")
         ENDWHILE()
-        DCMTK_ANDROID_SET_OBJECT_PROPERTIES(${VAR} RUNNING ${EMULATOR_UUID} ${EMULATOR_NAME})
+        DCMTK_ANDROID_ADB_ROOT("${EMULATOR_NAME}")
+        DCMTK_ANDROID_SET_OBJECT_PROPERTIES("${VAR}" RUNNING "${EMULATOR_UUID}" "${EMULATOR_NAME}")
     ENDIF()
 ENDFUNCTION(DCMTK_ANDROID_WAIT_FOR_EMULATOR)
 
@@ -384,9 +413,9 @@ ENDFUNCTION(DCMTK_ANDROID_WAIT_FOR_EMULATOR)
 #
 MACRO(DCMTK_ANDROID_STOP_EMULATOR_COMMAND VAR EMULATOR_NAME)
     IF(CMAKE_HOST_SYSTEM MATCHES "Windows.*")
-        UNSET(${VAR})
+        UNSET("${VAR}")
     ELSE()
-        SET(${VAR} ${ANDROID_ADB_PROGRAM} -s ${EMULATOR_NAME} emu kill)
+        SET("${VAR}" "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" emu kill)
     ENDIF()
 ENDMACRO(DCMTK_ANDROID_STOP_EMULATOR_COMMAND)
 
@@ -398,9 +427,9 @@ ENDMACRO(DCMTK_ANDROID_STOP_EMULATOR_COMMAND)
 #
 MACRO(DCMTK_ANDROID_EMULATOR_SHUTDOWN_MESSAGE VAR)
     IF(CMAKE_HOST_SYSTEM MATCHES "Windows.*")
-        SET(${VAR} WARNING "The Android device emulator can't be terminated automatically under Windows, please shutdown \"${EMULATOR_NAME}\" manually!")
+        SET("${VAR}" WARNING "The Android device emulator can't be terminated automatically under Windows, please shutdown \"${EMULATOR_NAME}\" manually!")
     ELSE()
-        SET(${VAR} STATUS "Shutting down the Android device emulator...")
+        SET("${VAR}" STATUS "Shutting down the Android device emulator...")
     ENDIF()
 ENDMACRO(DCMTK_ANDROID_EMULATOR_SHUTDOWN_MESSAGE)
 
@@ -413,12 +442,12 @@ ENDMACRO(DCMTK_ANDROID_EMULATOR_SHUTDOWN_MESSAGE)
 # Will ignore all additional arguments.
 #
 FUNCTION(DCMTK_ANDROID_STOP_EMULATOR VAR)
-    DCMTK_ANDROID_GET_OBJECT_PROPERTIES(${VAR})
+    DCMTK_ANDROID_GET_OBJECT_PROPERTIES("${VAR}")
     IF(NOT EMULATOR_STATE)
         MESSAGE(AUTHOR_WARNING "Error: ${VAR} is not a valid Android emulator instance handle.")
     ELSEIF(EMULATOR_STATE STREQUAL "STARTING")
         # Can't tell it to stop if it is not done starting
-        DCMTK_ANDROID_WAIT_FOR_EMULATOR(${VAR})
+        DCMTK_ANDROID_WAIT_FOR_EMULATOR("${VAR}")
     ELSEIF(EMULATOR_STATE STREQUAL "STOPPED")
         # Emulator is already stopped, do nothing
         RETURN()
@@ -426,7 +455,7 @@ FUNCTION(DCMTK_ANDROID_STOP_EMULATOR VAR)
     DCMTK_ANDROID_EMULATOR_SHUTDOWN_MESSAGE(MESSAGE)
     MESSAGE(${MESSAGE})
     IF(NOT CMAKE_HOST_SYSTEM MATCHES "Windows.*")
-        DCMTK_ANDROID_STOP_EMULATOR_COMMAND(COMMAND ${EMULATOR_NAME})
+        DCMTK_ANDROID_STOP_EMULATOR_COMMAND(COMMAND "${EMULATOR_NAME}")
         EXECUTE_PROCESS(
           COMMAND ${COMMAND}
           RESULT_VARIABLE RESULT
@@ -434,7 +463,7 @@ FUNCTION(DCMTK_ANDROID_STOP_EMULATOR VAR)
           ERROR_QUIET
         )
         IF(NOT RESULT)
-            DCMTK_ANDROID_SET_OBJECT_PROPERTIES(${VAR} STOPPED ${EMULATOR_UUID} "")
+            DCMTK_ANDROID_SET_OBJECT_PROPERTIES("${VAR}" STOPPED "${EMULATOR_UUID}" "")
         ELSE()
             MESSAGE(WARNING "Unable to stop the android device emulator, please shutdown \"${EMULATOR_NAME}\" manually!")
         ENDIF()
@@ -450,14 +479,14 @@ ENDFUNCTION(DCMTK_ANDROID_STOP_EMULATOR)
 # CMake's FILE(COPY ...) command.
 #
 FUNCTION(DCMTK_ANDROID_PUSH VAR)
-    DCMTK_ANDROID_GET_OBJECT_PROPERTIES(${VAR})
+    DCMTK_ANDROID_GET_OBJECT_PROPERTIES("${VAR}")
     IF(NOT EMULATOR_STATE)
         MESSAGE(AUTHOR_WARNING "Error: ${VAR} is not a valid Android emulator instance handle.")
     ELSEIF(EMULATOR_STATE STREQUAL "RUNNING")
         CMAKE_PARSE_ARGUMENTS(DCMTK_ANDROID_PUSH "" "" "DESTINATION" ${ARGN})
         FOREACH(LOCAL_FILE ${DCMTK_ANDROID_PUSH_UNPARSED_ARGUMENTS})
             EXECUTE_PROCESS(
-                COMMAND ${ANDROID_ADB_PROGRAM} -s ${EMULATOR_NAME} push ${LOCAL_FILE} ${DCMTK_ANDROID_PUSH_DESTINATION}
+                COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" push "${LOCAL_FILE}" "${DCMTK_ANDROID_PUSH_DESTINATION}"
                 RESULT_VARIABLE RESULT
                 OUTPUT_QUIET
                 ERROR_QUIET
@@ -477,14 +506,14 @@ ENDFUNCTION(DCMTK_ANDROID_PUSH)
 # CMake's FILE(COPY ...) command.
 #
 FUNCTION(DCMTK_ANDROID_PULL VAR)
-    DCMTK_ANDROID_GET_OBJECT_PROPERTIES(${VAR})
+    DCMTK_ANDROID_GET_OBJECT_PROPERTIES("${VAR}")
     IF(NOT EMULATOR_STATE)
         MESSAGE(AUTHOR_WARNING "Error: ${VAR} is not a valid Android emulator instance handle.")
     ELSEIF(EMULATOR_STATE STREQUAL "RUNNING")
         CMAKE_PARSE_ARGUMENTS(DCMTK_ANDROID_PULL "" "" "DESTINATION" ${ARGN})
         FOREACH(REMOTE_FILE ${DCMTK_ANDROID_PULL_UNPARSED_ARGUMENTS})
             EXECUTE_PROCESS(
-                COMMAND ${ANDROID_ADB_PROGRAM} -s ${EMULATOR_NAME} pull ${REMOTE_FILE} ${DCMTK_ANDROID_PULL_DESTINATION}
+                COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" pull "${REMOTE_FILE}" "${DCMTK_ANDROID_PULL_DESTINATION}"
                 RESULT_VARIABLE RESULT
                 OUTPUT_QUIET
                 ERROR_QUIET
@@ -504,7 +533,7 @@ ENDFUNCTION(DCMTK_ANDROID_PULL)
 # CMake's EXECUTE_PROCESS(...) command.
 #
 FUNCTION(DCMTK_ANDROID_SHELL VAR)
-    DCMTK_ANDROID_GET_OBJECT_PROPERTIES(${VAR})
+    DCMTK_ANDROID_GET_OBJECT_PROPERTIES("${VAR}")
     IF(NOT EMULATOR_STATE)
         MESSAGE(AUTHOR_WARNING "Error: ${VAR} is not a valid Android emulator instance handle.")
     ELSEIF(EMULATOR_STATE STREQUAL "RUNNING")
@@ -516,7 +545,7 @@ FUNCTION(DCMTK_ANDROID_SHELL VAR)
         )
 
         # Prepare commandline
-        SET(COMMAND ${ANDROID_ADB_PROGRAM} -s ${EMULATOR_NAME} shell)
+        SET(COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" shell)
         IF(DCMTK_ANDROID_SHELL_WORKING_DIRECTORY)
             LIST(APPEND COMMAND "cd" "${DCMTK_ANDROID_SHELL_WORKING_DIRECTORY}" "&&")
         ENDIF()
@@ -552,13 +581,13 @@ FUNCTION(DCMTK_ANDROID_SHELL VAR)
 
         # Prepare output redirection (buffering)
         IF(STREAMS_MERGED)
-            LIST(APPEND COMMAND > ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output 2>&1)
+            LIST(APPEND COMMAND > "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output" 2>&1)
         ELSE()
-            LIST(APPEND COMMAND > ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output 2> ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_error)
+            LIST(APPEND COMMAND > "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output" 2> "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_error")
         ENDIF()
 
         # Prepare capturing the result
-        LIST(APPEND COMMAND "\;" echo -n $? > ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_result)
+        LIST(APPEND COMMAND "\;" echo -n $? > "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_result")
 
         # Run the command
         EXECUTE_PROCESS(
@@ -572,45 +601,45 @@ FUNCTION(DCMTK_ANDROID_SHELL VAR)
         IF(ADB_RESULT)
             MESSAGE(WARNING "Error sending command to the Android emulator, adb reported the error: ${ADB_OUTPUT}")
             IF(DCMTK_ANDROID_SHELL_RESULT_VARIABLE)
-                SET(${DCMTK_ANDROID_SHELL_RESULT_VARIABLE} ${ADB_RESULT} PARENT_SCOPE)
+                SET("${DCMTK_ANDROID_SHELL_RESULT_VARIABLE}" ${ADB_RESULT} PARENT_SCOPE)
             ENDIF()
         ELSE(ADB_RESULT)
             # Receive results
-            DCMTK_ANDROID_PULL(${VAR} ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_error ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_result
-                DESTINATION ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}
+            DCMTK_ANDROID_PULL("${VAR}" "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output" "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_error" "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_result"
+                DESTINATION "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}"
             )
             # Cleanup temp files
             EXECUTE_PROCESS(
-                COMMAND ${ANDROID_ADB_PROGRAM} -s ${EMULATOR_NAME} shell rm ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output "\;" rm ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_error "\;" rm ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_result
+                COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" shell rm "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output" "\;" rm "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_error" "\;" rm "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_result"
                 RESULT_VARIABLE RESULT_QUIET
                 OUTPUT_QUIET
                 ERROR_QUIET
             )
             # Analyze results
             IF(DCMTK_ANDROID_SHELL_RESULT_VARIABLE)
-                FILE(READ ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_result ${DCMTK_ANDROID_SHELL_RESULT_VARIABLE})
-                SET(${DCMTK_ANDROID_SHELL_RESULT_VARIABLE} ${${DCMTK_ANDROID_SHELL_RESULT_VARIABLE}} PARENT_SCOPE)
+                FILE(READ "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_result" "${DCMTK_ANDROID_SHELL_RESULT_VARIABLE}")
+                SET("${DCMTK_ANDROID_SHELL_RESULT_VARIABLE}" ${${DCMTK_ANDROID_SHELL_RESULT_VARIABLE}} PARENT_SCOPE)
             ENDIF()
             IF(NOT DCMTK_ANDROID_SHELL_OUTPUT_QUIET OR (STREAMS_MERGED AND NOT DCMTK_ANDROID_SHELL_ERROR_QUIET))
-                FILE(READ ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_output ${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE})
+                FILE(READ "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_output" "${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE}")
                 IF(PUSH_OUTPUT_VAR)
-                    SET(${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE} ${${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE}} PARENT_SCOPE)
+                    SET("${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE}" ${${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE}} PARENT_SCOPE)
                 ELSE()
                     MESSAGE("${${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE}}")
                 ENDIF()
             ENDIF()
             IF(NOT DCMTK_ANDROID_SHELL_ERROR_QUIET AND NOT STREAMS_MERGED)
-                FILE(READ ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_error ${DCMTK_ANDROID_SHELL_ERROR_VARIABLE})
+                FILE(READ "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_error" "${DCMTK_ANDROID_SHELL_ERROR_VARIABLE}")
                 IF(PUSH_ERROR_VAR)
-                    SET(${DCMTK_ANDROID_SHELL_ERROR_VARIABLE} ${${DCMTK_ANDROID_SHELL_ERROR_VARIABLE}} PARENT_SCOPE)
+                    SET("${DCMTK_ANDROID_SHELL_ERROR_VARIABLE}" ${${DCMTK_ANDROID_SHELL_ERROR_VARIABLE}} PARENT_SCOPE)
                 ELSE()
                     MESSAGE("${${DCMTK_ANDROID_SHELL_ERROR_VARIABLE}}")
                 ENDIF()
             ENDIF()
             # Cleanup temp files
-            FILE(REMOVE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_result)
-            FILE(REMOVE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_output)
-            FILE(REMOVE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_error)
+            FILE(REMOVE "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_result")
+            FILE(REMOVE "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_output")
+            FILE(REMOVE "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_error")
         ENDIF(ADB_RESULT)
     ELSE()
         MESSAGE(AUTHOR_WARNING "Error: the Android emulator \"${VAR}\" is not ready to receive commands")
diff --git a/CMake/dcmtkUseWine.cmake b/CMake/dcmtkUseWine.cmake
index 0ae2a3e..3433642 100644
--- a/CMake/dcmtkUseWine.cmake
+++ b/CMake/dcmtkUseWine.cmake
@@ -33,9 +33,68 @@ FUNCTION(DCMTK_SETUP_WINE)
             "Please set WINE_WINE_PROGRAM and WINE_WINEPATH_PROGRAM appropriately."
         )
     ENDIF()
+    # prepare wine prefix for configure and unit tests
+    IF(NOT DCMTK_WINEPREFIX)
+        SET(DCMTK_WINEPREFIX "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/wineprefix" CACHE INTERNALE "the path of the wineprefix to use for configuration and unit tests")
+        MESSAGE(STATUS "Info: Preparing wine prefix for configuration and unit tests: ${DCMTK_WINEPREFIX}")
+        STRING(REPLACE "\\" "\\\\" WINE_CPP_RUNTIME "${WINE_CPP_RUNTIME}")
+        SET(WINE_PATH_REG "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkWinePath.reg")
+        CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/dcmtkWinePath.reg.in" "${WINE_PATH_REG}" ESCAPE_QUOTES @ONLY)
+        SET(ENV{WINEPREFIX} "${DCMTK_WINEPREFIX}")
+        EXECUTE_PROCESS(COMMAND "${WINE_WINE_PROGRAM}" "regedit" "${WINE_PATH_REG}"
+            OUTPUT_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/wineprefix.log"
+            ERROR_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/wineprefix.log"
+            OUTPUT_VARIABLE RESULT
+        )
+        IF(RESULT)
+            SET(DCMTK_WINEPREFIX CACHE INTERNAL "error, see ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/wineprefix.log")
+            MESSAGE(FATAL_ERROR "Failed to setup the wineprefix, see \"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/wineprefix.log\"")
+        ENDIF()
+    ELSE()
+        SET(ENV{WINEPREFIX} "${DCMTK_WINEPREFIX}")
+    ENDIF()
 ENDFUNCTION(DCMTK_SETUP_WINE)
 
 #
+# Helper function to detach the output and error streams from a wine process, so
+# that CMake doesn't wait for the wineserver to quit before continuing execution.
+# VAR - the variable that will hold the exit code of the launched process.
+# OUTPUT_VAR - the variable that will hold the standard output of the launched process.
+# ERROR_VAR - the variable that will hold the error output of the launched process.
+# ARGN - the command to execute.
+#
+FUNCTION(WINE_DETACHED VAR OUTPUT_VAR ERROR_VAR)
+    # Prefix to prevent collision of output capturing files
+    IF(CMAKE_VERSION VERSION_LESS 2.8.7)
+        STRING(RANDOM LENGTH 20 ALPHABET "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" PREFIX)
+    ELSE()
+        STRING(MD5 PREFIX "${ARGN}")
+    ENDIF()
+    SET(OUTPUT_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_output")
+    IF(OUTPUT_VAR STREQUAL ERROR_VAR)
+        SET(ERROR_FILE "${OUTPUT_FILE}")
+    ELSE()
+        SET(ERROR_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_error")
+    ENDIF()
+    EXECUTE_PROCESS(
+        COMMAND ${ARGN}
+        OUTPUT_FILE "${OUTPUT_FILE}"
+        ERROR_FILE "${ERROR_FILE}"
+        RESULT_VARIABLE RESULT
+    )
+    FILE(READ "${OUTPUT_FILE}" OUTPUT)
+    SET("${OUTPUT_VAR}" ${OUTPUT} PARENT_SCOPE)
+    IF(OUTPUT_VAR STREQUAL ERROR_VAR)
+        FILE(REMOVE "${OUTPUT_FILE}")
+    ELSE()
+        FILE(READ "${ERROR_FILE}" ERROR)
+        SET("${ERROR_VAR}" ${ERROR} PARENT_SCOPE)
+        FILE(REMOVE "${OUTPUT_FILE}" "${ERROR_FILE}")
+    ENDIF()
+    SET("${VAR}" ${RESULT} PARENT_SCOPE)
+ENDFUNCTION(WINE_DETACHED)
+
+#
 # Uses 'winepath' to translate a host path or filename to the location it can be
 # accessed from within the emulated Windows environment (e. g. replaces '/' by '\').
 # VAR - name of the variable to store the result in
@@ -44,12 +103,7 @@ ENDFUNCTION(DCMTK_SETUP_WINE)
 # Additional arguments will be ignored.
 #
 FUNCTION(UNIX_TO_WINE_PATH VAR PATH)
-    EXECUTE_PROCESS(
-        COMMAND ${WINE_WINEPATH_PROGRAM} -w ${PATH}
-        RESULT_VARIABLE ERROR
-        OUTPUT_VARIABLE RESULT
-        ERROR_VARIABLE STDERR
-    )
+    WINE_DETACHED(ERROR RESULT STDERR "${WINE_WINEPATH_PROGRAM}" "-w" "${PATH}")
     IF(NOT ERROR)
         STRING(REPLACE "\n" "" RESULT ${RESULT})
         SET(${VAR} ${RESULT} PARENT_SCOPE)
@@ -69,5 +123,5 @@ ENDFUNCTION()
 FUNCTION(WINE_COMMAND VAR COMMAND)
     UNIX_TO_WINE_PATH(CMD ${COMMAND})
     SEPARATE_ARGUMENTS(ARGS WINDOWS_COMMAND "${ARGN}")
-    SET(${VAR} ${WINE_WINE_PROGRAM} cmd /c "PATH=${WINE_CPP_RUNTIME}\;%PATH%" \\& ${CMD} ${ARGS} PARENT_SCOPE)
+    SET(${VAR} "${CMD}" ${ARGS} PARENT_SCOPE)
 ENDFUNCTION()
diff --git a/CMake/dcmtkWinePath.reg.in b/CMake/dcmtkWinePath.reg.in
new file mode 100644
index 0000000..78d3dd9
--- /dev/null
+++ b/CMake/dcmtkWinePath.reg.in
@@ -0,0 +1,4 @@
+REGEDIT4
+
+[HKEY_CURRENT_USER\Environment]
+"PATH"="@WINE_CPP_RUNTIME@"
diff --git a/CMake/osconfig.h.in b/CMake/osconfig.h.in
index bfe7e5c..9b7a2fa 100644
--- a/CMake/osconfig.h.in
+++ b/CMake/osconfig.h.in
@@ -213,6 +213,9 @@
 /* Define to 1 if you have the `getlogin' function. */
 #cmakedefine HAVE_GETLOGIN @HAVE_GETLOGIN@
 
+/* Define to 1 if you have the `getlogin_r' function. */
+#cmakedefine HAVE_GETLOGIN_R @HAVE_GETLOGIN_R@
+
 /* Define to 1 if you have the `getpid' function. */
 #cmakedefine HAVE_GETPID @HAVE_GETPID@
 
@@ -294,10 +297,8 @@
 /* Define to 1 if you have the `nsl' library (-lnsl). */
 #cmakedefine HAVE_LIBNSL @HAVE_LIBNSL@
 
-/* Define to 1 if you have the <libpng/png.h> header file. */
-/* Comment this out so inside dipipng.cxx we can include <png.h> */
-/* instead of <libpng/png.h> KW 20060622 */
-/* #cmakedefine HAVE_LIBPNG_PNG_H @HAVE_LIBPNG_PNG_H@ */
+/* Define to 1 if the <libpng/png.h> header shall be used instead of <png.h>. */
+#cmakedefine HAVE_LIBPNG_PNG_H @HAVE_LIBPNG_PNG_H@
 
 /* Define to 1 if you have the `socket' library (-lsocket). */
 #cmakedefine HAVE_LIBSOCKET @HAVE_LIBSOCKET@
@@ -389,11 +390,17 @@
 /* Define to 1 if you have the <sys/systeminfo.h> header file. */
 #cmakedefine HAVE_SYS_SYSTEMINFO_H @HAVE_SYS_SYSTEMINFO_H@
 
+/* Define to 1 if you have readdir_r */
+#cmakedefine HAVE_READDIR_R @HAVE_READDIR_R@
+
 /* Define if your system supports readdir_r with the obsolete Posix 1.c draft
    6 declaration (2 arguments) instead of the Posix 1.c declaration with 3
    arguments. */
 /* #undef HAVE_OLD_READDIR_R */
 
+/* Define if your system has a prototype for feenableexcept in fenv.h */
+#cmakedefine HAVE_PROTOTYPE_FEENABLEEXCEPT @HAVE_PROTOTYPE_FEENABLEEXCEPT@
+
 /* Define if your system has a prototype for accept in sys/types.h
    sys/socket.h */
 #cmakedefine HAVE_PROTOTYPE_ACCEPT @HAVE_PROTOTYPE_ACCEPT@
@@ -426,6 +433,10 @@
    stdlib.h netdb.h */
 #cmakedefine HAVE_PROTOTYPE_GETHOSTBYNAME_R @HAVE_PROTOTYPE_GETHOSTBYNAME_R@
 
+/* Define if your system has a prototype for gethostbyaddr_r in libc.h unistd.h
+   stdlib.h netdb.h */
+#cmakedefine HAVE_PROTOTYPE_GETHOSTBYADDR_R @HAVE_PROTOTYPE_GETHOSTBYADDR_R@
+
 /* Define if your system has a prototype for gethostid in libc.h unistd.h
    stdlib.h netdb.h */
 #cmakedefine HAVE_PROTOTYPE_GETHOSTID @HAVE_PROTOTYPE_GETHOSTID@
@@ -798,8 +809,11 @@
 /* Define to 1 if you have the `nanosleep' function. */
 #cmakedefine HAVE_NANOSLEEP @HAVE_NANOSLEEP@
 
+/* Define if libc.h should be treated as a C++ header */
+#cmakedefine INCLUDE_LIBC_H_AS_CXX @INCLUDE_LIBC_H_AS_CXX@
+
 /* Define if <math.h> fails if included extern "C" */
-#define INCLUDE_MATH_H_AS_CXX 1
+#cmakedefine INCLUDE_MATH_H_AS_CXX @INCLUDE_MATH_H_AS_CXX@
 
 /* Define to 1 if you have variable length arrays. */
 #cmakedefine HAVE_VLA @HAVE_VLA@
@@ -843,16 +857,12 @@
 /* Define if signal handlers need ellipse (...) parameters */
 /* #undef SIGNAL_HANDLER_WITH_ELLIPSE */
 
-/* Define to enable LFS64 (explicit large file support) if available*/
-#cmakedefine _LARGEFILE64_SOURCE @_LARGEFILE64_SOURCE@
+/* LFS mode constants. */
+#define DCMTK_LFS 1
+#define DCMTK_LFS64 2
 
-/* Explicitly request large file support, assuming it exists if fseeko() exists */
-#if defined(HAVE_FSEEKO) && !defined(_LARGEFILE_SOURCE)
-#define _LARGEFILE_SOURCE 1
-#endif
-#if defined(_LARGEFILE_SOURCE) && !defined(_FILE_OFFSET_BITS)
-#define _FILE_OFFSET_BITS 64
-#endif
+/* Select LFS mode (defined above) that shall be used or don't define it */
+#cmakedefine DCMTK_ENABLE_LFS @DCMTK_LFS_MODE@
 
 /* The size of a `char', as computed by sizeof. */
 #cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@
@@ -875,6 +885,12 @@
 /* The size of a `void *', as computed by sizeof. */
 #cmakedefine SIZEOF_VOID_P @SIZEOF_VOID_P@
 
+/* The size of a `fpos_t', as computed by sizeof. */
+#cmakedefine SIZEOF_FPOS_T @SIZEOF_FPOS_T@
+
+/* The size of a `off_t', as computed by sizeof. */
+#cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
+
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
@@ -992,6 +1008,9 @@ typedef unsigned long ulong;
 #cmakedefine HAVE_LONGLONG
 #cmakedefine HAVE_ULONGLONG
 
+#cmakedefine HAVE_INT64_T @HAVE_INT64_T@
+#cmakedefine HAVE_UINT64_T @HAVE_UINT64_T@
+
  /* Additional settings for Borland C++ Builder */
 #ifdef __BORLANDC__
 #define _stricmp stricmp    /* _stricmp in MSVC is stricmp in Borland C++ */
@@ -1005,7 +1024,6 @@ typedef unsigned long ulong;
 #endif
 #define HAVE_PROTOTYPE_MKTEMP 1
 #undef HAVE_SYS_UTIME_H
-#define NO_IOS_BASE_ASSIGN 1
 #define _MSC_VER 1200       /* Treat Borland C++ 5.5 as MSVC6. */
 #endif /* __BORLANDC__ */
 
@@ -1043,49 +1061,18 @@ typedef unsigned long ulong;
 /* Define if your system defines ios::nocreate in iostream.h */
 #cmakedefine HAVE_IOS_NOCREATE @HAVE_IOS_NOCREATE@
 
-#ifdef USE_STD_CXX_INCLUDES
-
 /* Define if ANSI standard C++ includes use std namespace */
-#define HAVE_STD_NAMESPACE 1
-
-/* Define if it is not possible to assign stream objects */
-#define NO_IOS_BASE_ASSIGN 1
+#cmakedefine HAVE_STD_NAMESPACE @HAVE_STD_NAMESPACE@
 
 /* Define if the compiler supports std::nothrow */
-#define HAVE_STD__NOTHROW 1
-
-/* Define if the compiler supports operator delete (std::nothrow).
- * Microsoft Visual C++ 6.0 does NOT have it, newer versions do.
- * For other compilers, by default assume that it exists.
- */
-#if defined(_MSC_VER) && (_MSC_VER <= 1200)
-/* #undef HAVE_NOTHROW_DELETE */
-#else
-#define HAVE_NOTHROW_DELETE 1
-#endif
-
-/* Define if your system has a prototype for std::vfprintf in stdarg.h */
-/* #undef HAVE_PROTOTYPE_STD__VFPRINTF */
-
-#else
-
-/* Define if ANSI standard C++ includes use std namespace */
-/* #undef HAVE_STD_NAMESPACE */
-
-/* Define if it is not possible to assign stream objects */
-/* #undef NO_IOS_BASE_ASSIGN */
-
-/* Define if the compiler supports std::nothrow */
-/* #undef HAVE_STD__NOTHROW */
+#cmakedefine HAVE_STD__NOTHROW @HAVE_STD__NOTHROW@
 
 /* Define if the compiler supports operator delete (std::nothrow) */
-/* #undef HAVE_NOTHROW_DELETE */
+#cmakedefine HAVE_NOTHROW_DELETE @HAVE_NOTHROW_DELETE@
 
 /* Define if your system has a prototype for std::vfprintf in stdarg.h */
 #cmakedefine HAVE_PROTOTYPE_STD__VFPRINTF @HAVE_PROTOTYPE_STD__VFPRINTF@
 
-#endif /* USE_STD_CXX_INCLUDES */
-
 /* Define if your system has off64_t */
 #cmakedefine HAVE_OFF64_T @HAVE_OFF64_T@
 
@@ -1110,13 +1097,12 @@ typedef unsigned long ulong;
 /* Always define STDIO_NAMESPACE to ::, because MSVC6 gets mad if you don't. */
 #define STDIO_NAMESPACE ::
 
-/* Enable or disable C++11 while building DCMTK */
-#cmakedefine DCMTK_USE_CXX11_STL @DCMTK_USE_CXX11_STL@
+/* Define if we can use C++11 */
+#cmakedefine HAVE_CXX11 @HAVE_CXX11@
 
-#if defined(DCMTK_USE_CXX11_STL) && defined(__cplusplus) && __cplusplus < 201103L
+#if defined(HAVE_CXX11) && defined(__cplusplus) && __cplusplus < 201103L
 #error\
- DCMTK was configured to use the C++11 STL, but your compiler is not configured\
- for building with C++11 features.
+DCMTK was configured to use C++11 features, but your compiler does not or was not configured to provide them.
 #endif
 
 /* Define if the compiler supports __alignof__ */
@@ -1131,9 +1117,6 @@ typedef unsigned long ulong;
 /* Define if __attribute__((aligned)) supports templates */
 #cmakedefine ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES @ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES@
 
-/* Define if alignas supports typedefs */
-#cmakedefine ALIGNAS_SUPPORTS_TYPEDEFS @ALIGNAS_SUPPORTS_TYPEDEFS@
-
 /* Define if the compiler supports __declspec(align) */
 #cmakedefine HAVE_DECLSPEC_ALIGN @HAVE_DECLSPEC_ALIGN@
 
@@ -1146,4 +1129,37 @@ typedef unsigned long ulong;
 /* The path on the Android device that should be used for temporary files */
 #cmakedefine ANDROID_TEMPORARY_FILES_LOCATION "@ANDROID_TEMPORARY_FILES_LOCATION@"
 
+/* Define if we are supposed to use STL's vector */
+#cmakedefine HAVE_STL_VECTOR @HAVE_STL_VECTOR@
+
+/* Define if we are supposed to use STL's algorithms */
+#cmakedefine HAVE_STL_ALGORITHM @HAVE_STL_ALGORITHM@
+
+/* Define if we are supposed to use STL's limit */
+#cmakedefine HAVE_STL_LIMITS @HAVE_STL_LIMITS@
+
+/* Define if we are supposed to use STL's list */
+#cmakedefine HAVE_STL_LIST @HAVE_STL_LIST@
+
+/* Define if we are supposed to use STL's list */
+#cmakedefine HAVE_STL_MAP @HAVE_STL_MAP@
+
+/* Define if we are supposed to use STL's memory */
+#cmakedefine HAVE_STL_MEMORY @HAVE_STL_MEMORY@
+
+/* Define if we are supposed to use STL's stack */
+#cmakedefine HAVE_STL_STACK @HAVE_STL_STACK@
+
+/* Define if we are supposed to use STL's string */
+#cmakedefine HAVE_STL_STRING @HAVE_STL_STRING@
+
+/* Define if we are supposed to use STL's type_traits */
+#cmakedefine HAVE_STL_TYPE_TRAITS @HAVE_STL_TYPE_TRAITS@
+
+/* Define if we are supposed to use STL's tuple */
+#cmakedefine HAVE_STL_TUPLE @HAVE_STL_TUPLE@
+
+/* Define if we are supposed to use STL's system_error */
+#cmakedefine HAVE_STL_SYSTEM_ERROR @HAVE_STL_SYSTEM_ERROR@
+
 #endif /* !OSCONFIG_H*/
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b54f69a..59a7587 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,16 @@
 PROJECT(DCMTK)
 
 # Minimum CMake version required
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
+
+# Disables a warning emitted by CMake 3.7.2. The same setting is performed
+# again in CMake/dcmtkPrepare.cmake (included below), but the warning is still
+# emitted if it is not set here (it only goes away if the policy is set in
+# both files).
+# We do not entirely understand this behavior, perhaps it is a bug in CMake?
+IF(POLICY CMP0017)
+    CMAKE_POLICY(SET CMP0017 NEW)
+ENDIF()
 
 # Check the build system
 INCLUDE(CMake/dcmtkPrepare.cmake NO_POLICY_SCOPE)
@@ -22,9 +31,9 @@ SET(DCMTK_MODULES ofstd oflog dcmdata dcmimgle
 # Include directories
 #-----------------------------------------------------------------------------
 
-SET(DCMTK_INCLUDE_DIR ${DCMTK_BINARY_DIR}/config/include)
+SET(DCMTK_INCLUDE_DIR "${DCMTK_BINARY_DIR}/config/include")
 FOREACH(inc ${DCMTK_MODULES})
-  LIST(APPEND DCMTK_INCLUDE_DIR ${DCMTK_SOURCE_DIR}/${inc}/include)
+  LIST(APPEND DCMTK_INCLUDE_DIR "${DCMTK_SOURCE_DIR}/${inc}/include")
 ENDFOREACH(inc)
 
 INCLUDE_DIRECTORIES(${DCMTK_INCLUDE_DIR})
@@ -34,8 +43,8 @@ INCLUDE_DIRECTORIES(${DCMTK_INCLUDE_DIR})
 #-----------------------------------------------------------------------------
 
 # add the osconfig.h.in file
-CONFIGURE_FILE(${DCMTK_SOURCE_DIR}/CMake/osconfig.h.in
-               ${DCMTK_BINARY_DIR}/config/include/dcmtk/config/osconfig.h)
+CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/osconfig.h.in"
+               "${DCMTK_BINARY_DIR}/config/include/dcmtk/config/osconfig.h")
 
 #-----------------------------------------------------------------------------
 # Prepare arith.h
@@ -43,6 +52,28 @@ CONFIGURE_FILE(${DCMTK_SOURCE_DIR}/CMake/osconfig.h.in
 
 INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES()
 
+# ----------------------------------------------------------------------------
+# Unit test related configuration/setup
+# ----------------------------------------------------------------------------
+
+IF(CMAKE_CROSSCOMPILING)
+  IF(WIN32)
+    SET(DCMTK_RUN_CTEST_SCRIPT "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkCTestRunWine.cmake" CACHE INTERNAL "path to the CMake script for launching a unit test as a detached Wine process in the prepared wineprefix")
+  ELSEIF(ANDROID)
+    SET(DCMTK_RUN_CTEST_SCRIPT "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkCTestRunAndroid.cmake" CACHE INTERNAL "path to the CMake script for launching a unit test via the android emulator")
+  ELSE()
+    MESSAGE(WARNING "Emulation for your target platform is not available, CTest will not be able to execute the unit tests!")
+  ENDIF()
+ELSE(CMAKE_CROSSCOMPILING)
+  SET(DCMTK_RUN_CTEST_SCRIPT "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkCTestRun.cmake" CACHE INTERNAL "path to the CMake script for launching a unit test")
+ENDIF(CMAKE_CROSSCOMPILING)
+# Add a target to run the unit tests in exhaustive mode
+ADD_CUSTOM_TARGET("test-exhaustive"
+    COMMAND "${CMAKE_COMMAND}" "-P"
+        "${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestRunExhaustive.cmake"
+    WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
+)
+
 #-----------------------------------------------------------------------------
 # Start actual compilation tasks
 #-----------------------------------------------------------------------------
@@ -58,16 +89,16 @@ INCLUDE(CMake/dcmtkAfterModules.cmake NO_POLICY_SCOPE)
 #-----------------------------------------------------------------------------
 
 # Install global headers
-INSTALL(FILES ${DCMTK_BINARY_DIR}/config/include/dcmtk/config/osconfig.h
-              ${DCMTK_BINARY_DIR}/config/include/dcmtk/config/arith.h
-        DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk/config
+INSTALL(FILES "${DCMTK_BINARY_DIR}/config/include/dcmtk/config/osconfig.h"
+              "${DCMTK_BINARY_DIR}/config/include/dcmtk/config/arith.h"
+        DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk/config"
         COMPONENT include)
 
 # Install DCMTK's general documentation files
 INSTALL(FILES ANNOUNCE CHANGES COPYRIGHT CREDITS FAQ HISTORY VERSION
-        DESTINATION ${DCMTK_INSTALL_DOCDIR}
+        DESTINATION "${DCMTK_INSTALL_DOCDIR}"
         COMPONENT doc)
-INSTALL(DIRECTORY docs/ DESTINATION ${DCMTK_INSTALL_DOCDIR}
+INSTALL(DIRECTORY docs/ DESTINATION "${DCMTK_INSTALL_DOCDIR}"
         COMPONENT doc FILES_MATCHING PATTERN "CHANGES.???")
 
 #-----------------------------------------------------------------------------
@@ -97,11 +128,11 @@ IF(HAVE_CONFIGURE_PACKAGE_CONFIG_FILE AND HAVE_WRITE_BASIC_PACKAGE_VERSION_FILE)
   # defined within CMake/GenerateCMakeExports.cmake.
   # Install DCMTKTargets.cmake to install tree
   INSTALL(EXPORT DCMTKTargets FILE DCMTKTargets.cmake
-          DESTINATION ${DCMTK_INSTALL_CMKDIR} COMPONENT cmake)
+          DESTINATION "${DCMTK_INSTALL_CMKDIR}" COMPONENT cmake)
 
   # Install DCMTKConfig.cmake and DCMTKConfigVersion.cmake
-  INSTALL(FILES ${DCMTK_INSTALL_CONFIG} ${DCMTK_CONFIG_VERSION}
-          DESTINATION ${DCMTK_INSTALL_CMKDIR} COMPONENT cmake)
+  INSTALL(FILES "${DCMTK_INSTALL_CONFIG}" "${DCMTK_CONFIG_VERSION}"
+          DESTINATION "${DCMTK_INSTALL_CMKDIR}" COMPONENT cmake)
 
 ELSE(HAVE_CONFIGURE_PACKAGE_CONFIG_FILE AND HAVE_WRITE_BASIC_PACKAGE_VERSION_FILE)
 
@@ -109,29 +140,53 @@ ELSE(HAVE_CONFIGURE_PACKAGE_CONFIG_FILE AND HAVE_WRITE_BASIC_PACKAGE_VERSION_FIL
   MESSAGE(STATUS "Warning: Using old CONFIGURE_FILE() mechanism to produce DCMTKConfig.cmake")
 
   # Actually configure file
-  CONFIGURE_FILE(${DCMTK_SOURCE_DIR}/CMake/DCMTKConfig.cmake26.in
-                 ${DCMTK_BINARY_DIR}/DCMTKConfig.cmake @ONLY)
+  CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/DCMTKConfig.old_cmake.in"
+                 "${DCMTK_BINARY_DIR}/DCMTKConfig.cmake" @ONLY)
 
   # Install DCMTKConfig.cmake and DCMTKConfigVersion.cmake
-  INSTALL(FILES ${DCMTK_BINARY_DIR}/DCMTKConfig.cmake ${DCMTK_BINARY_DIR}/DCMTKConfigVersion.cmake
-          DESTINATION ${DCMTK_INSTALL_CMKDIR}
+  INSTALL(FILES "${DCMTK_BINARY_DIR}/DCMTKConfig.cmake" "${DCMTK_BINARY_DIR}/DCMTKConfigVersion.cmake"
+          DESTINATION "${DCMTK_INSTALL_CMKDIR}"
           COMPONENT cmake)
 
 ENDIF(HAVE_CONFIGURE_PACKAGE_CONFIG_FILE AND HAVE_WRITE_BASIC_PACKAGE_VERSION_FILE)
 
 #-----------------------------------------------------------------------------
-# Configure files needed for cross compiling (if any)
+# Configure files needed for running the unit tests and cleanup
 #-----------------------------------------------------------------------------
 
 IF(CMAKE_CROSSCOMPILING)
-  IF(ANDROID)
-    # setup the CTestCustom.cmake file as appropriate for android
-    FILE(COPY ${DCMTK_SOURCE_DIR}/CMake/CTest/CTestCustom.cmake
-        DESTINATION ${CMAKE_BINARY_DIR}
+  IF(WIN32)
+    STRING(REPLACE ";" "${ENVIRONMENT_PATH_SEPARATOR}" DCMDICTPATH "${DCMTK_DICOM_DICTIONARIES}")
+    CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/CTest/CTestCustomWine.cmake.in"
+      "${DCMTK_BINARY_DIR}/CTestCustom.cmake" ESCAPE_QUOTES @ONLY
+    )
+    CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestRunWine.cmake.in"
+      "${DCMTK_RUN_CTEST_SCRIPT}" ESCAPE_QUOTES @ONLY
+    )
+  ELSEIF(ANDROID)
+    DCMTK_ANDROID_STOP_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE)
+    # Prepare setting environment variable DCMDICTPATH
+    SET(DICTIONARIES ${DCMTK_DICOM_DICTIONARIES})
+    LIST(GET DICTIONARIES 0 DCMDICTPATH)
+    LIST(REMOVE_AT DICTIONARIES 0)
+    GET_FILENAME_COMPONENT(DCMDICTPATH "${DCMDICTPATH}" NAME)
+    SET(DCMDICTPATH "${ANDROID_TEMPORARY_FILES_LOCATION}/${DCMDICTPATH}")
+    FOREACH(DICTIONARY ${DICTIONARIES})
+        GET_FILENAME_COMPONENT(FILE "${DICTIONARY}" NAME)
+        SET(DCMDICTPATH "${DCMDICTPATH}:${ANDROID_TEMPORARY_FILES_LOCATION}/${FILE}")
+    ENDFOREACH()
+    CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/CTest/CTestCustomAndroid.cmake.in"
+      "${DCMTK_BINARY_DIR}/CTestCustom.cmake" ESCAPE_QUOTES @ONLY
     )
-    # prepare the configuration for unit testing
-    CONFIGURE_FILE(${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestConfig.cmake.in
-        ${CMAKE_BINARY_DIR}/dcmtkCTestConfig.cmake @ONLY
+    CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestRunAndroid.cmake.in"
+      "${DCMTK_RUN_CTEST_SCRIPT}" ESCAPE_QUOTES @ONLY
     )
+  ELSE()
+    # nothing to do
   ENDIF()
+ELSE(CMAKE_CROSSCOMPILING)
+  STRING(REPLACE ";" "${ENVIRONMENT_PATH_SEPARATOR}" DCMDICTPATH "${DCMTK_DICOM_DICTIONARIES}")
+  CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestRun.cmake.in"
+    "${DCMTK_RUN_CTEST_SCRIPT}" ESCAPE_QUOTES @ONLY
+  )
 ENDIF(CMAKE_CROSSCOMPILING)
diff --git a/COPYRIGHT b/COPYRIGHT
index a73c4cb..fd2f3ab 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -5,7 +5,7 @@ Unless otherwise specified, the DCMTK software package has the following
 copyright:
 
 /*
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.
  *
  *  This software and supporting documentation were developed by
@@ -478,7 +478,7 @@ The dcmrt sub-package is covered by the following copyright:
 ---------------------------------------------------------------------------
 
 Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
-Copyright (C) 2013-2016, J. Riesmeier, Oldenburg, Germany
+Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -511,7 +511,7 @@ Parts of the dcmsr sub-package are covered by the following copyright:
 
 ---------------------------------------------------------------------------
 
-Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany
+Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -542,44 +542,6 @@ POSSIBILITY OF SUCH DAMAGE.
 
 ---------------------------------------------------------------------------
 
-The Android toolchain configuration file for CMake
-(CMake/android.toolchain.cmake) is borrowed from the OpenCV project and is
-covered by the following copyright:
-
----------------------------------------------------------------------------
-
-# Copyright (c) 2010-2011, Ethan Rublee
-# Copyright (c) 2011-2014, Andrey Kamaev
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# 1.  Redistributions of source code must retain the above copyright notice,
-#     this list of conditions and the following disclaimer.
-#
-# 2.  Redistributions in binary form must reproduce the above copyright notice,
-#     this list of conditions and the following disclaimer in the documentation
-#     and/or other materials provided with the distribution.
-#
-# 3.  Neither the name of the copyright holder nor the names of its
-#     contributors may be used to endorse or promote products derived from this
-#     software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
----------------------------------------------------------------------------
-
 The cielabutil source code (class IODCLabUtil) is adapted from Pascal Getreuer's
 package for converting color representations
 
@@ -613,3 +575,432 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 ---------------------------------------------------------------------------
+
+Finally, DCMTK can be configured and compiled to make use of a number of
+optional external libraries that, when available, provide added functionality
+such as compression, encryption, or support for certain image formats.
+For binary libraries and executables statically linked against these
+external libraries, the following additional copyright notices /
+licenses apply:
+
+When compiled with libiconv support:
+
+---------------------------------------------------------------------------
+
+GNU LESSER GENERAL PUBLIC LICENSE
+
+License text available at: https://www.gnu.org/licenses/lgpl.html
+
+---------------------------------------------------------------------------
+
+When compiled with libicu support:
+
+---------------------------------------------------------------------------
+
+Copyright (C) 1991-2017 Unicode, Inc. All rights reserved.
+Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Unicode data files and any associated documentation
+(the "Data Files") or Unicode software and any associated documentation
+(the "Software") to deal in the Data Files or Software
+without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, and/or sell copies of
+the Data Files or Software, and to permit persons to whom the Data Files
+or Software are furnished to do so, provided that either
+(a) this copyright and permission notice appear with all copies
+of the Data Files or Software, or
+(b) this copyright and permission notice appear in associated
+Documentation.
+
+THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in these Data Files or Software without prior
+written authorization of the copyright holder.
+
+---------------------------------------------------------------------------
+
+When compiled with libpng support:
+
+---------------------------------------------------------------------------
+
+This copy of the libpng notices is provided for your convenience.  In case of
+any discrepancy between this copy and the notices in the file png.h that is
+included in the libpng distribution, the latter shall prevail.
+
+COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
+
+If you modify libpng you may insert additional notices immediately following
+this sentence.
+
+This code is released under the libpng license.
+
+libpng versions 1.0.7, July 1, 2000 through 1.6.29, March 16, 2017 are
+Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
+derived from libpng-1.0.6, and are distributed according to the same
+disclaimer and license as libpng-1.0.6 with the following individuals
+added to the list of Contributing Authors:
+
+   Simon-Pierre Cadieux
+   Eric S. Raymond
+   Mans Rullgard
+   Cosmin Truta
+   Gilles Vollant
+   James Yu
+   Mandar Sahastrabuddhe
+   Google Inc.
+   Vadim Barkov
+
+and with the following additions to the disclaimer:
+
+   There is no warranty against interference with your enjoyment of the
+   library or against infringement.  There is no warranty that our
+   efforts or the library will fulfill any of your particular purposes
+   or needs.  This library is provided with all faults, and the entire
+   risk of satisfactory quality, performance, accuracy, and effort is with
+   the user.
+
+Some files in the "contrib" directory and some configure-generated
+files that are distributed with libpng have other copyright owners and
+are released under other open source licenses.
+
+libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
+Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
+libpng-0.96, and are distributed according to the same disclaimer and
+license as libpng-0.96, with the following individuals added to the list
+of Contributing Authors:
+
+   Tom Lane
+   Glenn Randers-Pehrson
+   Willem van Schaik
+
+libpng versions 0.89, June 1996, through 0.96, May 1997, are
+Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
+and are distributed according to the same disclaimer and license as
+libpng-0.88, with the following individuals added to the list of
+Contributing Authors:
+
+   John Bowler
+   Kevin Bracey
+   Sam Bushell
+   Magnus Holmgren
+   Greg Roelofs
+   Tom Tanner
+
+Some files in the "scripts" directory have other copyright owners
+but are released under this license.
+
+libpng versions 0.5, May 1995, through 0.88, January 1996, are
+Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+
+For the purposes of this copyright and license, "Contributing Authors"
+is defined as the following set of individuals:
+
+   Andreas Dilger
+   Dave Martindale
+   Guy Eric Schalnat
+   Paul Schmidt
+   Tim Wegner
+
+The PNG Reference Library is supplied "AS IS".  The Contributing Authors
+and Group 42, Inc. disclaim all warranties, expressed or implied,
+including, without limitation, the warranties of merchantability and of
+fitness for any purpose.  The Contributing Authors and Group 42, Inc.
+assume no liability for direct, indirect, incidental, special, exemplary,
+or consequential damages, which may result from the use of the PNG
+Reference Library, even if advised of the possibility of such damage.
+
+Permission is hereby granted to use, copy, modify, and distribute this
+source code, or portions hereof, for any purpose, without fee, subject
+to the following restrictions:
+
+  1. The origin of this source code must not be misrepresented.
+
+  2. Altered versions must be plainly marked as such and must not
+     be misrepresented as being the original source.
+
+  3. This Copyright notice may not be removed or altered from any
+     source or altered source distribution.
+
+The Contributing Authors and Group 42, Inc. specifically permit, without
+fee, and encourage the use of this source code as a component to
+supporting the PNG file format in commercial products.  If you use this
+source code in a product, acknowledgment is not required but would be
+appreciated.
+
+END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
+
+TRADEMARK:
+
+The name "libpng" has not been registered by the Copyright owner
+as a trademark in any jurisdiction.  However, because libpng has
+been distributed and maintained world-wide, continually since 1995,
+the Copyright owner claims "common-law trademark protection" in any
+jurisdiction where common-law trademark is recognized.
+
+OSI CERTIFICATION:
+
+Libpng is OSI Certified Open Source Software.  OSI Certified Open Source is
+a certification mark of the Open Source Initiative. OSI has not addressed
+the additional disclaimers inserted at version 1.0.7.
+
+EXPORT CONTROL:
+
+The Copyright owner believes that the Export Control Classification
+Number (ECCN) for libpng is EAR99, which means not subject to export
+controls or International Traffic in Arms Regulations (ITAR) because
+it is open source, publicly available software, that does not contain
+any encryption software.  See the EAR, paragraphs 734.3(b)(3) and
+734.7(b).
+
+Glenn Randers-Pehrson
+glennrp at users.sourceforge.net
+March 16, 2017
+
+---------------------------------------------------------------------------
+
+When compiled with libsndfile support:
+
+---------------------------------------------------------------------------
+
+GNU LESSER GENERAL PUBLIC LICENSE
+
+License text available at: https://www.gnu.org/licenses/lgpl.html
+
+---------------------------------------------------------------------------
+
+When compiled with libtiff support:
+
+---------------------------------------------------------------------------
+
+Copyright (c) 1988-1997 Sam Leffler
+Copyright (c) 1991-1997 Silicon Graphics, Inc.
+
+Permission to use, copy, modify, distribute, and sell this software and
+its documentation for any purpose is hereby granted without fee, provided
+that (i) the above copyright notices and this permission notice appear in
+all copies of the software and related documentation, and (ii) the names of
+Sam Leffler and Silicon Graphics may not be used in any advertising or
+publicity relating to the software without the specific, prior written
+permission of Sam Leffler and Silicon Graphics.
+
+THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+OF THIS SOFTWARE.
+
+---------------------------------------------------------------------------
+
+When compiled with libwrap support:
+
+---------------------------------------------------------------------------
+
+/************************************************************************
+* Copyright 1995 by Wietse Venema.  All rights reserved.  Some individual
+* files may be covered by other copyrights.
+*
+* This material was originally written and compiled by Wietse Venema at
+* Eindhoven University of Technology, The Netherlands, in 1990, 1991,
+* 1992, 1993, 1994 and 1995.
+*
+* Redistribution and use in source and binary forms are permitted
+* provided that this entire copyright notice is duplicated in all such
+* copies.
+*
+* This software is provided "as is" and without any expressed or implied
+* warranties, including, without limitation, the implied warranties of
+* merchantibility and fitness for any particular purpose.
+************************************************************************/
+
+---------------------------------------------------------------------------
+
+When compiled with libxml support:
+
+---------------------------------------------------------------------------
+
+The MIT License
+
+License text available at:
+https://opensource.org/licenses/mit-license.html
+
+---------------------------------------------------------------------------
+
+When compiled with openssl support:
+
+---------------------------------------------------------------------------
+
+  The OpenSSL toolkit stays under a double license, i.e. both the conditions of
+  the OpenSSL License and the original SSLeay license apply to the toolkit.
+  See below for the actual license texts.
+
+  OpenSSL License
+  ---------------
+
+/* ====================================================================
+ * Copyright (c) 1998-2017 The OpenSSL Project.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ *    software must display the following acknowledgment:
+ *    "This product includes software developed by the OpenSSL Project
+ *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ *    endorse or promote products derived from this software without
+ *    prior written permission. For written permission, please contact
+ *    openssl-core at openssl.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ *    nor may "OpenSSL" appear in their names without prior written
+ *    permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ *    acknowledgment:
+ *    "This product includes software developed by the OpenSSL Project
+ *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay at cryptsoft.com).  This product includes software written by Tim
+ * Hudson (tjh at cryptsoft.com).
+ *
+ */
+
+ Original SSLeay License
+ -----------------------
+
+/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay at cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to.  The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh at cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *    "This product includes cryptographic software written by
+ *     Eric Young (eay at cryptsoft.com)"
+ *    The word 'cryptographic' can be left out if the rouines from the library
+ *    being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ *    the apps directory (application code) you must include an acknowledgement:
+ *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed.  i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+---------------------------------------------------------------------------
+
+When compiled with zlib support:
+
+---------------------------------------------------------------------------
+
+ (C) 1995-2017 Jean-loup Gailly and Mark Adler
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+
+  Jean-loup Gailly        Mark Adler
+  jloup at gzip.org          madler at alumni.caltech.edu
+
+If you use the zlib library in a product, we would appreciate *not* receiving
+lengthy legal documents to sign.  The sources are provided for free but without
+warranty of any kind.  The library has been entirely written by Jean-loup
+Gailly and Mark Adler; it does not include third-party code.
+
+If you redistribute modified sources, we would appreciate that you include in
+the file ChangeLog history information documenting your changes.  Please read
+the FAQ for more information on the distribution of modified source versions.
+
+---------------------------------------------------------------------------
diff --git a/CREDITS b/CREDITS
index b83ff57..851b835 100644
--- a/CREDITS
+++ b/CREDITS
@@ -5,6 +5,9 @@ We would like to thank the following individuals, companies and organizations
 (in alphabetical order) for supporting the development and maintenance of the
 Open Source DICOM Toolkit DCMTK:
 
+Carl Zeiss Meditec: The preparation and publication of the DCMTK 3.6.2 release 
+  as well as several extensions in wlmscpfs and dcmqrscp were supported by
+  funding from Carl Zeiss Meditec AG (Muenchen, Germany).
 
 DKFZ: The work on the DCMTK module "dcmrt" was supported in part by funding
   from the Deutsches Krebsforschungszentrum (Heidelberg, Germany).
@@ -55,4 +58,4 @@ YXLON: The work on the initial version of the DICONDE data dictionary was
 Please note that this list does not claim to be exhaustive.  Just send us an
 email if you think that you or your company/organization should also be listed.
 
-DCMTK Team, 2017-01-31
+DCMTK Team, 2017-04-20
diff --git a/INSTALL b/INSTALL
index 4cdf279..8f95525 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,35 +1,21 @@
-
 ==================================
 DICOM TOOLKIT (DCMTK) INSTALLATION
 ==================================
 
--------------------------------------------------------------------------------
- IMPORTANT NOTE FOR SNAPSHOT AND CURRENT DEVELOPMENT VERSION 3.6.1_DEV
--------------------------------------------------------------------------------
- Please note that most sections of this document refer to the official release
- DCMTK 3.6.0, i.e. they are not yet updated for the changes of the latest
- development version 3.6.1.  This will be done for the next release, which will
- probably be called version 3.6.2.
-
- The toolkit should compile on Linux systems with gcc 4.7.2 to 4.9.2 since
- this is our main development platform.  Also on Windows systems, it usually
- works with VisualStudio 2008 to 2013.  However, there is no guarantee that
- the software also compiles on your system.
--------------------------------------------------------------------------------
-
 
 PRE-REQUISITES
 ==============
 
 The DICOM toolkit (DCMTK) needs to be compiled with a C++ compiler.  We
-recommend using the GNU C++ compiler in versions higher than 2.95 (most of the
-development was done using GNU C++ 4.1.2 on Linux 2.6).  The software is also
-known to compile using the SUNPro C++ compiler, the Intel C++ compiler and the
-Microsoft Visual C++ compiler.
+recommend using the GNU C++ compiler in versions higher than 4.2.1 (most of the
+development was done using GNU C++ 4.9.2 on Linux 3.16).  The software is also
+known to compile using the SUNPro C++ compiler, Clang and Microsoft Visual
+Studio.
 
 Compatibility with other C++ compilers is unknown, however, we have tried to
-keep language demands to a minimum (newer C++ features such as ANSI C++ Library,
-Exceptions and RTTI have been avoided).
+keep language demands to a minimum (newer C++ features such as Exceptions and
+RTTI have been avoided and fall back implementations for all used STL classes
+are provided).
 
 You will need several hundred Mbytes of disk space to compile all the software.
 
@@ -41,24 +27,35 @@ Microsoft Windows
 -----------------
 
 The DCMTK software can be compiled under a native Microsoft Windows environment
-(see section "BUILDING (Windows)" below for more information).
+(see section "Microsoft Windows with CMake" below for more information).
 
-The current release successfully compiles on the following systems:
+The current release successfully compiles on the following operating system /
+hardware / compiler combinations:
 
-   Windows XP      / Intel x86    / Microsoft Visual C++ 6.0 (Service Pack 6)
-   Windows XP      / Intel x86    / Microsoft Visual C++ 2005 Standard (VS 8)
-   Windows XP      / Intel x86    / Microsoft Visual C++ 2008 Express (VS 9)
-   Windows XP      / Intel x86    / Microsoft Visual C++ 2010 Express (VS 10)
-   Windows Vista   / Intel x86    / Microsoft Visual C++ 2008 Professional (VS 9)
+   Windows 7       / Intel x86    / Microsoft Visual C++ 2005 Express (VS 8)
+   Windows 7       / Intel x86    / Microsoft Visual C++ 2008 Express (VS 9)
    Windows 7       / Intel x86    / Microsoft Visual C++ 2010 Express (VS 10)
+   Windows 7       / Intel x86    / Microsoft Visual C++ 2012 Express (VS 11)
+   Windows 7       / Intel x86    / Microsoft Visual C++ 2013 Express (VS 12)
+   Windows 7       / Intel x86    / Microsoft Visual C++ 2015 Community (VS 14)
+   Windows 7       / Intel x86    / Microsoft Visual C++ 2017 Community (VS 15)
+   Windows 7       / Intel x86    / MinGW gcc 4.9.1 (i686-w64-mingw32)
    Windows 7       / amd64|x86_64 / Microsoft Visual C++ 2010 Express (VS 10)
-   Windows 7       / amd64|x86_64 / Microsoft Visual C++ 2010 Ultimate (VS 10)
-
-The dcmqrscp tool has been ported to Windows, but does not yet support
-multi-processing (i.e. multiple clients concurrently) under Windows.  The
-worklist WWW scripts require an HTTP server and a Perl interpreter and have
-not been tested under Windows (file locking interaction with the wlmscpfs
-server may or may not work).
+   Windows 7       / amd64|x86_64 / Microsoft Visual C++ 2012 Express (VS 11)
+   Windows 7       / amd64|x86_64 / Microsoft Visual C++ 2013 Express (VS 12)
+   Windows 7       / amd64|x86_64 / Microsoft Visual C++ 2015 Community (VS 14)
+   Windows 7       / amd64|x86_64 / Microsoft Visual C++ 2017 Community (VS 15)
+   Windows 7       / amd64|x86_64 / MinGW gcc 4.9.1 (x86_64-w64-mingw32)
+   Windows 8.1     / Intel x86    / Microsoft Visual C++ 2008 Express (VS 9)
+   Windows 8.1     / Intel x86    / Microsoft Visual C++ 2010 Express (VS 10)
+   Windows 8.1     / Intel x86    / Microsoft Visual C++ 2012 Express (VS 11)
+   Windows 8.1     / Intel x86    / Microsoft Visual C++ 2015 Express (VS 14)
+   Windows 8.1     / Intel x86    / Microsoft Visual C++ 2017 Community (VS 15)
+   Windows 8.1     / amd64|x86_64 / Microsoft Visual C++ 2010 Express (VS 10)
+   Windows 8.1     / amd64|x86_64 / Microsoft Visual C++ 2012 Express (VS 11)
+   Windows 8.1     / amd64|x86_64 / Microsoft Visual C++ 2015 Express (VS 14)
+   Windows 8.1     / amd64|x86_64 / Microsoft Visual C++ 2017 Community (VS 15)
+   Windows 10      / amd64|x86_64 / Microsoft Visual C++ 2015 Community (VS 14)
 
 Unix (or lookalikes)
 --------------------
@@ -67,123 +64,72 @@ The current DCMTK software release successfully compiles on the following
 operating system / hardware / compiler combinations using the instructions
 given below:
 
-   FreeBSD 6.4     / Intel x86    / GNU gcc 3.4.6
-   FreeBSD 7.3     / Intel x86    / GNU gcc 4.2.1
-   FreeBSD 8.1     / Intel x86    / GNU gcc 4.2.1
-   FreeBSD 8.1     / amd64|x86_64 / GNU gcc 4.2.1
-   HP-UX 10.20     / HP PA-RISC   / GNU gcc 2.95.3    (see note *1,*2)
-   IRIX 6.3        / SGI O2       / GNU gcc 2.95.3    (see note *1)
-   Linux 2.4.20    / Intel x86    / GNU gcc 2.95.3    (RedHat 7.3)
-   Linux 2.4.21    / Intel x86    / GNU gcc 3.4.6     (CentOS 3.9)
-   Linux 2.6.18    / Intel x86    / GNU gcc 4.1.2     (Debian 4.0)
-   Linux 2.6.18    / amd64|x86_64 / Intel Compiler 11.1 (Scientific Linux 5.5)
-   Linux 2.6.18    / amd64|x86_64 / GNU gcc 4.1.2     (Debian 4.0)
-   Linux 2.6.18    / amd64|x86_64 / GNU gcc 4.5.2     (CentOS 5.5)
-   Linux 2.6.26    / amd64|x86_64 / GNU gcc 4.3.2     (Debian 5.0)
-   Linux 2.6.32    / amd64|x86_64 / GNU gcc 4.4.4     (RHEL 6.0)
-   Linux 2.6.34    / amd64|x86_64 / Intel Compiler 11.1 (SuSE 11.3, see note *3)
-   Linux 2.6.35    / amd64|x86_64 / GNU gcc 4.4.5     (Ubuntu 10.10)
-   MacOS X 10.4.10 / amd64|x86_64 / Apple gcc 4.0.1   (see note *10)
-   MacOS X 10.6.5  / amd64|x86_64 / Apple gcc 4.2.1   (see note *10)
-   OpenBSD 4.4     / Intel x86    / GNU gcc 3.3.5 propolice
-   Solaris 9       / Sun Sparc    / SunPro CC 5.8     (Sun Studio 11)
-   Solaris 10      / Sun Sparc    / SunPro CC 5.9     (Sun Studio 12u2)
-   Solaris 10      / Sun Sparc    / GNU gcc 3.4.3
-   Windows XP      / Intel x86    / CygWin 1.7.7-1    (gcc 3.4.4 and 4.3.4)
-   Windows XP      / Intel x86    / MinGW/MSys 1.0.11 (gcc 4.5.0)
-
-Earlier releases are known to also compile on the following platforms which
-are not available to us for testing purposes any more:
-
-   FreeBSD 4.11    / Intel x86    / GNU gcc 2.95.4
-   FreeBSD 6.0     / Intel x86    / GNU gcc 3.4.4
-   HP-UX 9.05      / HP PA 1.1    / GNU gcc 2.7.2.1
-   IBM AIX 3.2     / RS 6000      / IBM AIX XL C++ Compiler/6000 V1.0
-   IRIX 5.3        / SGI Indy     / GNU gcc 2.95.2    (see note *1)
-   IRIX 6.5        / SGI Onyx     / GNU gcc 2.95.2    (see note *4)
-   IRIX 6.5        / SGI Onyx     / MIPSpro 7.3.1.1m  (see note *4)
-   Linux 2.0.33    / Intel x86    / GNU gcc 2.7.2.1
-   Linux 2.2.16    / IBM S/390    / GNU gcc 2.95.2
-   Linux 2.2.16    / Intel x86    / GNU gcc 2.95.2
-   Linux 2.4.20    / Intel x86    / GNU gcc 2.95.4, 3.2.3, 3.3.6, 3.4.5 and 4.0.3 (Debian)
-   Linux 2.6.1     / amd64|x86_64 / GNU gcc 4.0       (Fedora Core 4)
-   MacOS X 10.1.5  / Power Mac G4 / Apple gcc-934.3   (gcc 2.95.2, see note *5)
-   MacOS X 10.3.3  / Power Mac G4 / Apple gcc-1640    (gcc 3.3)
-   MacOS X 10.4.3  / Power Mac G4 / Apple gcc 4.0.1
-   NetBSD 1.6.2    / Intel x86    / GNU gcc 2.95.3
-   NetBSD 2.1      / Intel x86    / GNU gcc 3.3.3
-   NeXTStep 3.3    / Intel x86    / NeXT/GNU gcc 2.5.8 (see note *6)
-   OpenBSD 3.8     / Intel x86    / GNU gcc 3.3.5 propolice
-   OSF/1 4.0       / DEC Alpha    / Compaq C++ V6.3-002 (see note *7)
-   OSF/1 4.0       / DEC Alpha    / GNU gcc 2.95.3
-   QNX 6.2.1       / Intel x86    / GNU gcc 2.95.3    (see note *8)
-   Solaris 2.5.1   / Sun Sparc    / GNU egcs 1.1.2    (egcs-2.91.66)
-   Solaris 2.5.1   / Sun Sparc    / Sun SC 2.0.1      (SunPro C++ 3.0.1)
-   Solaris 2.5.1   / Sun Sparc    / SunPro CC 4.2
-   Solaris 7       / Sun Sparc    / GNU gcc 2.95.3
-   Solaris 7       / Sun Sparc    / SunPro CC 4.2
-   Solaris 8       / Sun Sparc    / GNU gcc 3.2.3, 3.4
-   Solaris 8       / Sun Sparc    / SunPro CC 5.2     (Sun WorkShop 6 update 1)
-   Solaris 9       / Sun Sparc    / SunPro CC 5.2     (Sun WorkShop 6 update 1)
-   Solaris 10      / Intel x86    / SunPro CC 5.8     (Sun Studio 11)
-   SunOS 4.1.3     / Sun Sparc    / GNU gcc 2.7.2
-   Ultrix 4.4      / DEC MIPS     / GNU gcc 2.95.2    (see notes *1,*9)
-   Windows 9x      / Intel x86    / Microsoft Visual C++ 5.0
-   Windows NT 4.0  / Intel x86    / Microsoft Visual C++ 6.0 (Service Pack 6)
-   Windows XP      / Intel x86    / Microsoft Visual C++ .NET 2003 (VS 7.1)
-   Windows XP      / Intel x86    / CygWin 1.5.18     (gcc 3.4.4)
-   Windows XP      / Intel x86    / MinGW/MSys 1.0.10 (gcc 3.4.2)
+   FreeBSD 10.1    / amd64|x86_64 / Clang 3.4.1
+   Linux 4.11.9    / amd64|x86_64 / Clang 4.0.1       (Arch Linux)
+   Linux 4.11.9    / amd64|x86_64 / GNU gcc 7.1.1     (Arch Linux)
+   Linux 3.10.0    / amd64|x86_64 / Clang 3.4.2       (CentOS 7.3)
+   Linux 3.10.0    / amd64|x86_64 / GNU gcc 4.8.5     (CentOS 7.3)
+   Linux 3.16.0    / amd64|x86_64 / Clang 3.5.0       (Debian 8.8)
+   Linux 3.2.0     / amd64|x86_64 / GNU gcc 4.4.7     (Debian 7.11)
+   Linux 3.2.0     / amd64|x86_64 / GNU gcc 4.7.2     (Debian 7.11)
+   Linux 3.2.0     / amd64|x86_64 / GNU gcc 4.8.4     (Debian 7.11)
+   Linux 3.19.0    / amd64|x86_64 / Clang 3.9.1       (Linux Mint 17.3)
+   Linux 3.19.0    / amd64|x86_64 / GNU gcc 4.8.5     (Linux Mint 17.3)
+   Linux 3.19.0    / amd64|x86_64 / GNU gcc 5.4.1     (Linux Mint 17.3)
+   Linux 3.19.0    / amd64|x86_64 / GNU gcc 6.3.0     (Linux Mint 17.3)
+   Linux 4.9.0     / Intel x86    / Clang 3.8.1       (Debian 9.0)
+   Linux 4.9.0     / Intel x86    / GNU gcc 6.3.0     (Debian 9.0)
+   Linux 4.10.0    / amd64|x86_64 / GNU gcc 6.3.0     (Ubuntu 17.04)
+   Linux 4.10.0    / amd64|x86_64 / Clang 4.0.0       (Ubuntu 17.04)
+   MacOS X 14.4.0  / amd64|x86_64 / Apple Clang 6.0
+   NetBSD 7.0      / amd64|x86_64 / Clang 4.0.0
+   NetBSD 7.0      / amd64|x86_64 / GNU gcc 4.8.5
+   OpenBSD 6.0     / amd64|x86_64 / Clang 3.8.0
+   OpenBSD 6.0     / amd64|x86_64 / GNU gcc 4.2.1
+   OpenIndiana     / Intel x86    / Clang 4.0.0       (OpenIndiana 2017.04)
+   OpenIndiana     / Intel x86    / GNU gcc 4.9.4     (OpenIndiana 2017.04)
+   QNX 6.5         / Intel x86    / GNU gcc 4.4.2     (see note *1)
+   Solaris 11.3    / Intel x86    / GNU gcc 4.8.2
+   Solaris 11.3    / Intel x86    / SunPro CC 5.14    (Oracle Developer Studio 12.5)
+   Solaris 11.3    / Intel x86    / SunPro CC 5.15    (Oracle Developer Studio 12.6)
+   Windows 7       / amd64|x86_64 / CygWin 2.8.0      (gcc 6.3.0)
+
+Other Platforms
+---------------
+
+Earlier releases of the DCMTK are known to also compile on further platforms
+which are not available to us for testing purposes any more, e.g. AIX, HP-UX,
+IRIX, NeXTStep, OSF/1, Solaris/SunOS, Ultrix.  Also the Intel C++ Compiler and
+other compilers might still work but we haven't tested them this time.
+
+Cross Compiling
+---------------
+
+The current DCMTK release can be cross-compiled targeting the following
+platforms:
+
+  Android          / arm64        / GNU gcc 4.9.2     (API 24, ABI arm64-v8a)
+  Windows 7        / Intel x86    / MinGW gcc 4.9.1
+  Windows 7        / amd64|x86_64 / MinGW gcc 4.9.1
+
+Cross compiling support with running configuration and unit tests is currently
+only provided using CMake and requires the use of the Android emulator or Wine
+when targeting Android or Windows respectively.  Other versions of Android will
+most likely also work, but the above mentioned one is currently the only one
+that is being regularly tested.
+
+Of course, GNU Autoconf also provides cross compiling support and using it for
+various platforms might also work but probably not out of the box, i.e. some
+customization is needed and you have to find a way to provide the information
+from the configuration tests that need to be run on the target hardware
+yourself.
 
 Platform Notes
 --------------
 
-(*1) The dcmimage/dcmimgle module makes intensive use of inlined templates.
-     Depending on the compiler and the available virtual memory, compilation
-     might fail if this module is compiled with optimization.  Compilation
-     succeeds if the optimizer and any automatic inlining of code are switched
-     off.  For example GNU gcc might require that the -O option is removed and
-     -fno-default-inline is added to the CXXFLAGS setting in the file
-     "config/Makefile.def", which is created by configure (see below).
-(*2) HP-UX 10.2 requires DCMTK to be configured with --disable-lfs, i.e.
-     without large file support.
-(*3) Building with Intel Compiler Suite 11.1 requires GNU C++ Standard Library
-     version 4.3.
-(*4) IRIX 6 users are recommended to consult SGI's Notes on building Open
-     Source software on IRIX, available from: http://freeware.sgi.com/howto.html
-     In short, after running configure, the following modifications are
-     required in "config/Makefile.def" before DCMTK can be compiled:
-       - remove "-lsocket -lnsl" from LIBS
-     On IRIX, DCMTK should be built using GNU make (gmake), not with the IRIX
-     specific pmake/smake/make commands.
-(*5) MacOS X 10.1 requires DCMTK to be configured with --disable-threads
-     because certain re-entrant Posix functions such as localtime_r are not
-     available.
-(*6) The NeXT gcc 2.5.8 compiler provides only very limited support for C++
-     templates and, therefore, might fail to compile the dcmimage/dcmimgle
-     module ("internal compiler error").  The gcc compiler also does not
-     properly support the "protected" derivation of classes which is used in
-     the dcmsr module.  However, modules and applications that were present in
-     earlier releases of DCMTK still compile.
-(*7) Might require -O0 in order to compile "dcmsr/libsrc/dsrdoctr.cc".
-(*8) The libz.so included in QNX 6.2.1 is missing the zlibVersion()
-     function.  This will cause the DCMTK compile to fail if configured with
-     --with-zlib.  It has already been corrected in QNX's internal cvs
-     repository.  Earlier QNX versions (6.2.0) and future versions (6.3.x)
-     should work fine.  As a temporary measure it is possible to link against
-     /usr/lib/libz.so.1 which does include that function, or to disable zlib
-     support in DCMTK by calling configure --without-zlib.
-(*9) Requires -fpermissive when compiled with GNU gcc due to the X11R5 header
-     files which are not ANSI compliant.
-(*10) For MacOS X 10.4 and 10.6 the OFSemaphore class is not available since it
-     is compiling but not working on MacOS X.  The reason is that semaphores
-     must be named in MacOS X and thus the current implementation fails to
-     construct semaphores in the OFSemaphore constructor.  However, the toolkit
-     so far does not make any use of this class.
-
-Please note: Due to resource limitations it is not practical for us to ensure
-that the newest release of DCMTK is problem free under all the above
-combinations.  Currently, our main development environment is Linux 2.6 using
-GNU C++ 4.1.2 and DCMTK should always compile on this platform.
+(*1) QNX 6.5 requires to remove or disable the define "HAVE_IEEEFP_H" in
+     "config/include/dcmtk/config/osconfig.h" after running the configure
+     process but before starting the compilation.
 
 
 OPENSSL SUPPORT
@@ -194,9 +140,9 @@ One", i.e. DICOM network transmission "tunneled" through a secure TLSv1
 transport connection.  DCMTK relies on the OpenSSL toolkit (www.openssl.org)
 for the underlying cryptographic routines and the TLS protocol implementation.
 This release of DCMTK is known to compile with the OpenSSL releases 0.9.8 to
-1.0.0, although other releases may work as well.
+1.1.0f, although other releases may work as well.
 
-When using autoconf, if support for security enhancements is desired, a compiled
+When using Autoconf, if support for security enhancements is desired, a compiled
 version of the OpenSSL libraries and include files must be available during
 compilation of DCMTK.  By default, DCMTK checks whether OpenSSL is installed
 in the standard path and enables support automatically if present.
@@ -216,39 +162,37 @@ ZLIB SUPPORT
 Starting with release 3.5.2, DCMTK supports the "Deflated Explicit VR Little
 Endian" Transfer Syntax, i.e. ZIP-compressed network transmission and media
 storage.  DCMTK relies on the zlib toolkit (www.zlib.org) for the underlying
-compression routines.  This release of DCMTK is known to compile with the
-zlib releases 1.2.3 to 1.2.5, although other releases may work as well.
+compression routines.  This release of DCMTK is known to compile with the zlib
+releases 1.2.3 to 1.2.11, although other releases may work as well.
 
-When using autoconf, if support for zlib compression is desired, a compiled
+When using Autoconf, if support for zlib compression is desired, a compiled
 version of the zlib library and include files must be available during
-compilation of DCMTK.  By default, DCMTK checks whether zlib is installed
-in the standard path and enables support automatically if present.
+compilation of DCMTK.  By default, DCMTK checks whether zlib is installed in
+the standard path and enables support automatically if present.
 
-When using CMake, a compiled version of the zlib libraries and include
-files must be available during compilation of DCMTK.  See discussion on CMake
-below.
+When using CMake, a compiled version of the zlib libraries and include files
+must be available during compilation of DCMTK.  See discussion on CMake below.
 
 
 LIBTIFF SUPPORT
 ===============
 
-Starting with release 3.5.1, DCMTK supports the conversion of DICOM images
-to TIFF.  DCMTK relies on the libtiff toolkit (www.libtiff.org) for this
-purpose.  This release of DCMTK is known to compile with the libtiff releases
-3.7.4 to 3.9.4, although other releases may work as well.  However, libtiff
-releases prior to version 3.7.0 will not work since the TIFFCleanup() function
-was not yet available.  On Windows, libtiff 3.7.4 or higher is required due to
+Starting with release 3.5.1, DCMTK supports the conversion of DICOM images to
+TIFF.  DCMTK relies on the libtiff toolkit (www.libtiff.org) for this purpose.
+This release of DCMTK is known to compile with the libtiff releases 3.7.4 to
+4.0.8, although other releases may work as well.  However, libtiff releases
+prior to version 3.7.0 will not work since the TIFFCleanup() function was not
+yet available.  On Windows, libtiff 3.7.4 or higher is required due to
 incompatible API changes in libtiff.
 
-When using autoconf, if support for TIFF export is desired, a compiled version
+When using Autoconf, if support for TIFF export is desired, a compiled version
 of the libtiff libraries and include files must be available during compilation
 of DCMTK, and the libtiff support must be switched on explicitly.  By default,
 DCMTK checks whether libtiff is installed in the standard path and enables
 support automatically if present.
 
-When using CMake, a compiled version of the libtiff libraries and include
-files must be available during compilation of DCMTK.  See discussion on CMake
-below.
+When using CMake, a compiled version of the libtiff libraries and include files
+must be available during compilation of DCMTK.  See discussion on CMake below.
 
 
 LIBPNG SUPPORT
@@ -257,14 +201,13 @@ LIBPNG SUPPORT
 Starting with release 3.5.3, DCMTK supports the conversion of DICOM images to
 PNG.  DCMTK relies on the libpng toolkit (www.libpng.org) for this purpose.
 This release of DCMTK is known to compile with the current libpng releases
-1.2.8 to 1.4.3, although other releases may work as well.
+1.2.8 to 1.6.30, although other releases may work as well.
 
-When using autoconf, if support for PNG export is desired, a compiled version of
+When using Autoconf, if support for PNG export is desired, a compiled version of
 the libpng libraries and include files must be available during compilation of
-DCMTK, and the libpng support must be switched on explicitly.  By default,
-DCMTK checks whether libpng is installed in the standard path and enables
-support automatically if present.  It should be noted that libpng requires
-zlib.
+DCMTK, and the libpng support must be switched on explicitly.  By default, DCMTK
+checks whether libpng is installed in the standard path and enables support
+automatically if present.  It should be noted that libpng requires zlib.
 
 When using CMake, a compiled version of the libpng libraries and include
 files must be available during compilation of DCMTK.  See discussion on CMake
@@ -277,16 +220,16 @@ LIBXML2 SUPPORT
 Starting with release 3.5.3, DCMTK supports the conversion of XML documents to
 DICOM files.  DCMTK relies on the libxml2 toolkit (www.libxml.org) for this
 purpose.  This release of DCMTK is known to compile with the libxml2 releases
-2.6.26 to 2.7.7, although other releases may work as well.
+2.6.26 to 2.9.4, although other releases may work as well.
 
-When using autoconf, if support for XML import is desired, a compiled version of
+When using Autoconf, if support for XML import is desired, a compiled version of
 the libxml2 (and possibly iconv) libraries and include files must be available
 during compilation of DCMTK.  By default, DCMTK checks whether libxml2 is
 installed in the standard path and enables support automatically if present.
 
-When using CMake, if support for XML import is desired, a compiled version
-of the libxml2 (and possibly iconv) libraries and include files must be
-available during compilation of DCMTK.  See discussion on CMake below.
+When using CMake, if support for XML import is desired, a compiled version of
+the libxml2 (and possibly iconv) libraries and include files must be available
+during compilation of DCMTK.  See discussion on CMake below.
 
 
 TCP WRAPPER (LIBWRAP) SUPPORT
@@ -299,29 +242,50 @@ allows to enforce host-based access control via the "/etc/hosts.deny" and
 "/etc/hosts.allow" configuration files.  See hosts_access(5) man page for
 details.
 
-When using autoconf, if support for TCP wrappers is desired, a compiled version
+When using Autoconf, if support for TCP wrappers is desired, a compiled version
 of the libwrap library and include file <tcpd.h> must be available during
 compilation of DCMTK.  By default, DCMTK checks whether libwrap is installed
 in the standard path and enables support automatically if present.
 
+When using CMake, if support for TCP wrappers is desired, a compiled version of
+the libwrap library and include file <tcpd.h> must be available during
+compilation of DCMTK.  See discussion on CMake below.
+
 Since DCMTK uses the TCP wrappers from C++ code, an ANSI C compatible header
 file <tcpd.h> is required.  The official release 7.6 of the TCP wrappers
 library is not ANSI C compatible and does not work with DCMTK (i.e. will not be
 recognized by DCMTK's configure script).  However, many current Linux and BSD
 distributions ship with an ANSI C compatible header file.
 
-When using CMake, TCP wrappers are currently not supported.
 
+Character Set Conversion Support
+================================
+
+Starting with release 3.6.2, DCMTK supports the conversion between different
+character encodings, e.g. UTF-8 and ISO Latin 1.  For this purpose, DCMTK relies
+on one of the following alternatives to be available for being used as the
+underlying implementation: libiconv, the ICU library or the iconv functionality
+included in the C standard library.
+
+DCMTK detects the availability of these implementations and (in case multiple
+ones are available) chooses one of them automatically as follows: the libiconv
+implementation is currently preferred since its integration is most mature.  If
+it is not available, the ICU implementation is the next best choice.  Otherwise
+the iconv implementation from the C standard library will be selected (if the
+used C standard library provides it).  This choice can be overridden via the
+"--enable-charconv" argument (Autoconf) or "DCMTK_ENABLE_CHARSET_CONVERSION"
+(CMake).  Selecting an implementation that is not available will be ignored,
+i.e. the user choice will be overridden.
 
 LIBICONV SUPPORT
-================
+----------------
 
-Starting with release 3.6.2, DCMTK supports the conversion between different
-character encodings.  For this purpose, DCMTK relies on the libiconv toolkit
-(www.gnu.org/s/libiconv/).  This release of DCMTK is known to compile with the
-libiconv release 1.14, although other releases may work as well.
+The libiconv toolkit (www.gnu.org/s/libiconv/) may be used as DCMTK's underlying
+character set conversion implementation.  This release of DCMTK is known to
+compile with the libiconv releases 1.14 to 1.15, although other releases may
+work as well.
 
-When using autoconf, if support for libiconv conversion is desired, a compiled
+When using Autoconf, if support for libiconv conversion is desired, a compiled
 version of the libiconv library and include files must be available during
 compilation of DCMTK.  Please note that DCMTK also needs the bundled copy of
 libcharset.  By default, DCMTK checks whether libiconv and libcharset are
@@ -331,24 +295,118 @@ When using CMake, a compiled version of the libiconv and libcharset libraries
 and include files must be available during compilation of DCMTK.  See discussion
 on CMake below.
 
+ICU SUPPORT
+-----------
+
+DCMTK supports the International Components for Unicode (ICU) library as an
+alternative to the above mentioned libiconv.  This release of DCMTK is known to
+compile with the ICU releases 58.2 to 59.1, although other releases may work as
+well.
+
+The ICU may be easier to integrate on some more modern Linux distributions
+(e.g. Arch Linux) and Windows than the libiconv but (due to the way it is
+currently integrated) lacks support for converting the following character sets:
+
+  ISO 2022 IR 87
+  ISO 2022 IR 159
+
+Furthermore, the ICU-based implementation currently does not support
+transliteration.
+
+When using Autoconf, if support for character set conversion using ICU is
+desired, a compiled version of the ICU libraries and include files must be
+available during compilation of DCMTK.  By default, DCMTK checks whether ICU is
+installed in the standard path and enables support automatically if present.
+
+When using CMake, if support for character set conversion using ICU is desired,
+a compiled version of the ICU libraries and include files must be available
+during compilation of DCMTK.  See discussion on CMake below.
+
+Support for iconv provided in the C standard library
+----------------------------------------------------
+
+DCMTK allows using the iconv implementation provided as part of the C standard
+library on some platforms.  Building DCMTK with this implementation may be
+easier and reduce additional runtime dependencies, but this option should be
+used with caution: the iconv implementations from different C standard libraries
+may vary with regards to the supported character sets and functionalities.
+
+If possible, the libiconv implementation should be preferred.  Most importantly
+the iconv implementation provided by the C standard library on OpenIndiana does
+not support conversion to whatever character set the terminal is currently
+using, which we consider essential and, therefore, strongly suggest not to use
+this implementation on OpenIndiana.
+
+Known Issues
+------------
+
+If both the iconv implementation from the C standard library and the libiconv
+are available in the default search paths, the wrong <iconv.h> might be included
+independently from the user choice (--enable-charconv resp.
+DCMTK_ENABLE_CHARSET_CONVERSION).
+
+DCMTK currently has no mechanism to force including a certain <iconv.h> instead,
+so this has to be achieved by manually modifying the include paths and/or
+DCMTK's code.  Some platforms (e.g. Arch Linux) even rename the <iconv.h>
+provided as part of libiconv to <libiconv.h> or the like to avoid name
+collisions.  In this case, the user has to modify DCMTK's source code to include
+the correct file, since we currently don't provide a configuration test for it.
+
+
+Using the native STL
+====================
+
+DCMTK can be configured to use the STL (Standard Template Library) features
+provided by the compiler / runtime environment instead of its own fallback
+implementations that are used by default.
+
+This can be achieved with the "--enable-stl" argument (Autoconf) or by setting
+"DCMTK_ENABLE_STL" to "ON" (CMake).  This will, however, not forcibly enable
+using the native STL features but instead trigger running several configuration
+tests for detecting whether the individual features work as expected/required
+by DCMTK.  It is for example known that the implementations of std::list and
+std::vector provided by some versions of Visual Studio 2005 have a serious bug
+that might lead to segmentation fault and std::error_code is currently not
+implemented correctly on any version of Visual Studio we know about.
+
+It is furthermore possible to enable or disable individual STL features
+independently of the setting provided by "--enable-stl" or "DCMTK_ENABLE_STL"
+respectively: use "--enable-stl-<feature>", "--disable-stl-<feature>" and/or
+"DCMTK_ENABLE_STL_<FEATURE> (ON/OFF)" as appropriate, e.g.
+"--disable-stl-vector" or "-DDCMTK_ENABLE_STL_STRING=ON".
+
 
 C++11 SUPPORT
 =============
-DCMTK can be enabled to use the C++11 STL.  This is controlled by the macro
-"DCMTK_USE_CXX11_STL", described in "config/docs/macros.txt" (or
-"/usr/local/share/doc/dcmtk/macros.txt").
 
+DCMTK can be configured to use several C++11 features (e.g. move semantics,
+variadic templates and the like) instead of its own workarounds and fallback
+implementations.  This can be achieved with the "--enable-cxx11" argument
+(Autoconf) or by setting "DCMTK_ENABLE_CXX11" to "ON" (CMake).
+
+Enabling C++11 will change some parts of DCMTK's API, so a C++11 build of DCMTK
+is potentially incompatible with a classic build of DCMTK.  This setting is,
+therefore, stored in "config/include/dcmtk/config/osconfig.h" and verified when
+compiling DCMTK itself or any program that includes it.
+
+Enabling C++11 support will not forcibly enable using the C++11 features but
+instead trigger running some configuration tests and only truly enable it if
+all of them pass.
+
+Please note that this setting does not depend on enabling the STL features but
+not all combinations (e.g. enabling C++11 but disabling std::string) may work.
 
-BUILDING (Unix with autoconf)
+
+BUILDING (Unix with Autoconf)
 =============================
 
-GNU autoconf is used to configure the software for the hardware / operating
-system you are using.  You do not need to obtain GNU autoconf to compile and
+GNU Autoconf is used to configure the software for the hardware / operating
+system you are using.  You do not need to obtain GNU Autoconf to compile and
 install this software.  All the necessary configure scripts are included in
 this distribution.  The configure scripts examine your system capabilities and
 automatically generate include files and Makefiles.
 
-Perform the following steps from the top-level (dcmtk-3.6.0) directory to
+Perform the following steps from the top-level (dcmtk-3.6.2) directory to
 compile and install the software:
 
 Step 1:
@@ -372,26 +430,28 @@ in which OpenSSL is installed.  This is usually the directory that has been
 used as --prefix when compiling and installing OpenSSL.
 
 For example, if you wish to enable the security enhancements, and OpenSSL is
-installed in "/usr/local/apps/openssl-1.0.0", then you should start configure
+installed in "/usr/local/apps/openssl-1.1.0f", then you should start configure
 as:
 
-    ./configure --with-opensslinc=/usr/local/apps/openssl-1.0.0
+    ./configure --with-opensslinc=/usr/local/apps/openssl-1.1.0f
 
 Configure will assume that the OpenSSL include files are installed in
-"/usr/local/apps/openssl-1.0.0/include" and will expect the library in
-"/usr/local/apps/openssl-1.0.0/lib".  Appropriate options will be passed to
+"/usr/local/apps/openssl-1.1.0f/include" and will expect the library in
+"/usr/local/apps/openssl-1.1.0f/lib".  Appropriate options will be passed to
 the compiler and the linker.
 
 Support for zlib, libtiff, libpng, libxml2, libwrap and libiconv can be enabled
 in a similar way (in case these libraries are not installed in the standard
 path):
 
-    ./configure --with-libzlibinc=/usr/local/apps/zlib-1.2.5
-                --with-libtiffinc=/usr/local/apps/libtiff-3.9.4
-                --with-libpnginc=/usr/local/apps/libpng-1.4.3
-                --with-libxmlinc=/usr/local/apps/libxml-2.7.7
+    ./configure --with-libzlibinc=/usr/local/apps/zlib-1.2.11
+                --with-libtiffinc=/usr/local/apps/libtiff-4.0.8
+                --with-libpnginc=/usr/local/apps/libpng-1.6.30
+                --with-libxmlinc=/usr/local/apps/libxml2-2.9.4
                 --with-libwrapinc=/usr/local/apps/tcp_wrappers-7.6
-                --with-libiconvinc=/usr/local/apps/libiconv-1.14
+                --with-libiconvinc=/usr/local/apps/libiconv-1.15
+           <or>
+                --with-libicuinc=/usr/local/apps/icu-59.1
 
 Different configure options can be combined in any order.  configure --help
 will print a list of all existing configure options.  configure --help=short
@@ -406,6 +466,20 @@ options are:
   --disable-lfs           compile without LFS support
   --enable-std-includes   use C++ ANSI standard includes
   --disable-std-includes  use old C++ includes
+  --enable-private-tags   enable private tag dictionary
+  --disable-private-tags  don't enable private tag dictionary (default)
+  --enable-external-dict  enable loading of external dictionary (default)
+  --disable-external-dict don't load external dictionary
+  --enable-builtin-dict   enable loading of built-in dictionary
+  --disable-builtin-dict  don't load built-in dictionary (default)
+  --disable-rpath         do not hardcode runtime library paths
+  --enable-charconv=TYPE  enable character set conversion support
+                          (libiconv/libicu/stdlibc/auto=default)
+  --disable-charconv      disable character set conversion support
+  --enable-cxx11          use C++11
+  --disable-cxx11         do not use C++11 (default)
+  --enable-stl            use C++ STL
+  --disable-stl           do not use C++ STL (default)
 
 Step 2:
     make all
@@ -443,13 +517,13 @@ following commands:
 This generates a new Makefile and configure script in the top-level toolkit
 directory.
 
-Solving configuration and compilation problems:
+Solving configuration and compilation problems
+----------------------------------------------
 
 The configure script might not be able to guess the correct compiler and
 compiler flags to use.  For example, we have noticed that use of the -pedantic
-flag to the GNU C++ compiler causes compilation errors on some systems (e.g.
-SunOS 4.1.3) due to system include files with incorrect ANSI function
-prototypes.
+flag to the GNU C++ compiler causes compilation errors on some systems due to
+system include files with incorrect ANSI function prototypes.
 
 You can set environment variables to initialize configure before it is called
 (before Step 1 above):
@@ -482,20 +556,78 @@ directories.  In detail, these "CMakeLists.txt" files will serve as an input to
 CMake which will generate suitable build files for all of DCMTK's projects from
 these files.
 
+DCMTK 3.6.2 requires CMake version 2.8.3 or later.  We recommend using the
+latest stable release of CMake (currently version 3.8.2) since newer versions
+of CMake often provide better output in case of errors and are generally easier
+to use (for example by providing better support for detecting the availability
+of third party libraries).  If possible, use the CMake version your operating
+system provides with its package manager.
+
 More info about building the DCMTK with CMake can be found in DCMTK's wiki:
 
   http://support.dcmtk.org/wiki/dcmtk/howto/cmakeconfiguration
 
+CMake and shared libraries
+--------------------------
+
+The CMake build system allows for building shared libraries instead of static
+libraries.  On Windows systems, these are dynamic link libraries (.dll).
+On Unix systems, these are shared objects (.so).  To enable this, set the
+"BUILD_SHARED_LIB" option to "ON".
+
+Additionally, it is possible to produce a single shared library for the whole
+toolkit.  This mode is controlled by the "BUILD_SINGLE_SHARED_LIBRARY" option.
+If you don't want the whole toolkit in a single shared library, the
+"DCMTK_MODULES" cache variable can be modified to select a subset of the
+available modules.  Please note that this option is marked as advanced and thus
+is hidden by default.  Also, when building a single shared library, applications
+and tests cannot be built.
+
+Default value for CMAKE_BUILD_TYPE
+----------------------------------
+
+CMAKE_BUILD_TYPE is set to value "Release" if none is specified by the
+selected build file generator.  For those generators that support multiple
+configuration types (e.g. Debug, Release), CMAKE_CONFIGURATION_TYPES holds
+possible values.  For other generators, this value is empty, and for those
+generators the build type is fixated by CMake and cannot be changed otherwise.
+Please note that Visual Studio (seemingly) ignores CMAKE_BUILD_TYPE and always
+starts off using "Debug", so you should best change it to "Release" manually
+before starting the build process.
+
+To disable the CMAKE_BUILD_TYPE default value, set CMAKE_BUILD_TYPE to value
+"None" during CMake configuration, e.g. use "-DCMAKE_BUILD_TYPE:STRING=None"
+on the command line.  This may be useful if the compiler flags should be
+controlled manually (e.g. as defined in environment variables like CXXFLAGS)
+and no CMake defaults related to the selected configuration type kick in.
+
+DCMTKConfig.cmake AND DCMTKTargets.cmake
+----------------------------------------
+
+CMake permits to write files that describe the DCMTK build configuration
+(DCMTConfig.cmake) as well as all targets (executables and libraries) that have
+been produced (DCMTKTargets.cmake).  Those files can be utilized by external
+projects by using CMake's find_package() mechanism in "CONFIG" mode in order to
+adapt their own build configuration, and directly make use of all available
+target libraries and executables.
+
+On systems using CMake versions equal or greater than 2.8.8, these files are
+written during installation to the installation directory's subfolder "/cmake"
+on Windows systems, and "/lib/cmake/dcmtk" on Unix-like systems.  Additionally,
+these files are written to the main directory of CMake's build tree during the
+build, with all content (e.g. the include paths within DCMTConfig.cmake)
+pointing to the correct values for the build tree.  Thus even a DCMTK build tree
+can be used by external projects that process these two files.
+
+On systems using CMake versions lower than 2.8.8, only a simplified
+DCMTKConfig.cmake is created, which is only available in the install tree.
+DCMTKTargets.cmake is not created at all.
 
 Microsoft Windows with CMake
 ----------------------------
 
-Starting with DCMTK 3.5.4, no project files for Visual Studio are provided
-anymore.  Project files for all supported compilers can be generated with
-CMake.
-
-In order to be able to use CMake for configuration purposes in DCMTK, perform
-the following steps to install CMake on your machine:
+Using CMake is the only supported way to compile DCMTK for Windows.  For being
+able to do so, perform the following steps to install CMake on your machine:
 
 1. Go to http://www.cmake.org/ to download the latest release version of CMake
    for Windows.
@@ -503,18 +635,18 @@ the following steps to install CMake on your machine:
    Follow all install instructions appropriately.
 
 In order to manually configure the support for the above mentioned external
-libraries (OpenSSL, zlib, libtiff, libpng, libxml2 and libiconv) through CMake,
-perform the following steps:
+libraries (OpenSSL, zlib, libtiff, libpng, libxml2 and libiconv or ICU) through
+CMake, perform the following steps:
 
 1. Go Start -> Programs -> CMake -> "CMake" or "CMake (cmake-gui)" to start the
    CMake utility through which the configuration can be done.
 2. In the entry field "Where is the source code:" enter the directory in which
-   the DCMTK source code resides, e.g. "C:\dcmtk-3.6.0".
+   the DCMTK source code resides, e.g. "C:\dcmtk-3.6.2".
 3. In the entry field "Where to build the binaries:" enter the directory in
-   which the libraries and binaries are to be built, e.g. "C:\dcmtk-bin".
+   which the libraries and binaries are to be built, e.g. "C:\dcmtk-msvc15".
 4. In the combobox "Build for:" or "Specify the generator for this project:"
    select the corresponding development environment which shall be used to
-   compile DCMTK.
+   compile DCMTK (e.g. "Visual Studio 15 2017 Win64").
 5. Go "Configure".  (CMake will look for a corresponding compiler, read in all
    of DCMTK's "CMakeLists.txt" files and perform some tests.  The variables in
    the tabular area will be displayed in red.  These variables can now be set
@@ -523,28 +655,28 @@ perform the following steps:
    example, in order to turn on libxml2 support, set the value of variable
    "DCMTK_WITH_XML" to "ON" and set the value of variable "WITH_LIBXMLINC"
    to the path where the include files and libraries of libxml2 can be found,
-   e.g. "C:\libxml2-2.7.7".  The support of all other external libraries can
+   e.g. "C:\libxml2-2.9.4".  The support of all other external libraries can
    be turned on in a similar way:
 
      libpng support:
        set "DCMTK_WITH_PNG" to "ON" and
-       set "WITH_LIBPNGINC" e.g. to "C:\libpng-1.4.2"
+       set "WITH_LIBPNGINC" e.g. to "C:\libpng-1.6.30"
 
      libtiff support:
        set "DCMTK_WITH_TIFF" to "ON" and
-       set "WITH_LIBTIFFINC" e.g. to "C:\tiff-3.9.2"
+       set "WITH_LIBTIFFINC" e.g. to "C:\libtiff-4.0.8"
 
      OpenSSL support:
        set "DCMTK_WITH_OPENSSL" to "ON" and
-       set "WITH_OPENSSLINC" e.g. to "C:\openssl-1.0.0"
+       set "WITH_OPENSSLINC" e.g. to "C:\openssl-1.1.0f"
 
      zlib support:
        set "DCMTK_WITH_ZLIB" to "ON" and
-       set "WITH_ZLIBINC" e.g. to "C:\zlib-1.2.5"
+       set "WITH_ZLIBINC" e.g. to "C:\zlib-1.2.11"
 
      libiconv support:
        set "DCMTK_WITH_ICONV" to "ON" and
-       set "WITH_LIBICONVINC" e.g. to "C:\libiconv-1.14"
+       set "WITH_LIBICONVINC" e.g. to "C:\libiconv-1.15"
 
    In order to turn the support of a certain external library off, set the
    value of the corresponding variable ("DCMTK_WITH_XML", "DCMTK_WITH_PNG",
@@ -556,46 +688,53 @@ perform the following steps:
    specified in "WITH_LIBXMLINC", "WITH_LIBPNGINC", "WITH_LIBTIFFINC",
    "WITH_OPENSSLINC", "WITH_ZLIBINC" or "WITH_LIBICONVINC".)
 
-   (Please note also that the library files of all external libraries are
-   always expected in directory named "lib" below the directory which is
-   specified in "WITH_LIBXMLINC", "WITH_LIBPNGINC", "WITH_LIBTIFFINC",
-   "WITH_OPENSSLINC", "WITH_ZLIBINC" or "WITH_LIBICONV".  Moreover, note that
-   the following filenames must be used for the corresponding lib files:
+   (Please note also that the library files of all external libraries are always
+   expected in directory named "lib" below the directory which is specified in
+   "WITH_LIBXMLINC", "WITH_LIBPNGINC", "WITH_LIBTIFFINC", "WITH_OPENSSLINC",
+   "WITH_ZLIBINC" or "WITH_LIBICONV".  Moreover, note that the following
+   filenames must be used for the corresponding lib files:
 
      libxml2:
-       "iconv_d.lib"    - debug version
-       "iconv_o.lib"    - release version (optimized)
-       "libxml2_d.lib"  - debug version
-       "libxml2_o.lib"  - release version (optimized)
+       "iconv_d.lib"       - debug version
+       "iconv_o.lib"       - release version (optimized)
+       "libxml2_d.lib"     - debug version
+       "libxml2_o.lib"     - release version (optimized)
 
      libpng:
-       "libpng_d.lib"   - debug version
-       "libpng_o.lib"   - release version (optimized)
+       "libpng_d.lib"      - debug version
+       "libpng_o.lib"      - release version (optimized)
 
      libtiff:
-       "libtiff_d.lib"  - debug version
-       "libtiff_o.lib"  - release version (optimized)
+       "libtiff_d.lib"     - debug version
+       "libtiff_o.lib"     - release version (optimized)
 
      openssl:
-       "libeay32_d.lib" - debug version
-       "libeay32_o.lib" - release version (optimized)
-       "ssleay32_d.lib" - debug version
-       "ssleay32_o.lib" - release version (optimized)
+       "dcmtkcrypto_d.lib" - debug version
+       "dcmtkcrypto_o.lib" - release version (optimized)
+       "dcmtkssl_d.lib"    - debug version
+       "dcmtkssl_o.lib"    - release version (optimized)
 
      zlib:
-       "zlib_d.lib"     - debug version
-       "zlib_o.lib"     - release version (optimized)
+       "zlib_d.lib"        - debug version
+       "zlib_o.lib"        - release version (optimized)
 
      libiconv:
-       "libiconv_d.lib" - debug version
-       "libiconv_o.lib" - release version (optimized)
-       "libchset_d.lib" - debug version
-       "libchset_o.lib" - release version (optimized)
+       "libiconv_d.lib"    - debug version
+       "libiconv_o.lib"    - release version (optimized)
+       "libchset_d.lib"    - debug version
+       "libchset_o.lib"    - release version (optimized)
+
+   The ICU is integrated using CMake's "find_package()" mechanism, which is
+   somewhat different to the handmade scripts employed for the other libraries.
+   If you want to use the ICU instead of libiconv, you have to include it by
+   setting the appropriate variables for the "FindICU" module, see
+   https://cmake.org/cmake/help/latest/module/FindICU.html .
 
    The debug versions of all libraries must be compiled for the multithread
    debug version of the runtime (/MTd), the release version must be compiled
    for the non-debug multithread runtime (/MT).  Precompiled versions of all
    libraries can be downloaded from http://dicom.offis.de/dcmtk#lib-win.)
+
 7. Go "Configure" a second time.  (CMake will adjust the configuration
    according to the displayed specifications.)
 8. Go "OK" or "Generate".  (CMake will generate new project files in the
@@ -623,14 +762,7 @@ Known limitations of DCMTK on the Windows platform.
 
 1. The dcmqrscp tool cannot spark multiple processes.  Every association must
    be handled completely before a new association is possible.
-2. On Windows 95, dcmqrscp always uses exclusive file locking (the LockFileEx
-   API call is available on Windows NT only).  This is no problem if only a
-   single process exists.
-3. Most applications will only work if the computer has configured TCP/IP, a
-   network name and a TCP/IP address.  If SLIP or PPP is used the applications
-   can only work if a connection to a provider exists (since the IP addresses
-   and hostnames are given dynamically).
-4. Visual C++ contains two different implementations of I/O streams which
+2. Visual C++ contains two different implementations of I/O streams which
    should never be mixed within one application because this may cause
    application errors that are hard to find.  The old, now deprecated
    implementation uses the traditional cfront header files <iostream.h> etc.
@@ -638,13 +770,7 @@ Known limitations of DCMTK on the Windows platform.
    DCMTK can be configured to use either of the two interfaces.  This behavior
    can be changed in "config/include/dcmtk/config/osconfig.h" in the build
    directory where the symbol USE_STD_CXX_INCLUDES is declared.
-
-   NOTE: Previous releases of DCMTK (3.5.1 and older) used the old interface
-         when compiled with Visual C++ 6.0.  When updating software that uses
-         DCMTK as a library, make sure that the use of the iostream library is
-         consistent throughout the complete application!
-
-5. DCMTK does not compile when UNICODE or _UNICODE is defined because the
+3. DCMTK does not compile when UNICODE or _UNICODE is defined because the
    VisualStudio compiler then uses the Unicode version instead of the ANSI
    version for all Windows API functions (i.e. type wchar_t instead of char
    for all character string parameters and return values).
@@ -653,73 +779,39 @@ Known limitations of DCMTK on the Windows platform.
 Unix with CMake
 ---------------
 
-Starting with DCMTK 3.6.0, CMake can also be used for non-Windows systems.
-
-NOTE: This is not (yet) the recommended way since this mechanism is not as
-      mature and stable as the above described approach using GNU autoconf.
-      Please feel free to test it and report any issue.  Due to this, it is only
-      sparsely documented.  See the previous section on building the DCMTK with
-      CMake on Windows platforms, but note that details may differ.
-
-
-CMake and shared libraries
---------------------------
-
-The CMake build system allows building shared libraries instead of static
-libraries.  On Windows systems, these are dynamic link libraries (.dll).
-On Unix systems, these are shared objects (.so).  To enable this, set the
-"BUILD_SHARED_LIB" option to "ON".
-
-Additionally, it is possible to produce a single shared library for the whole
-toolkit.  This mode is controlled by the "BUILD_SINGLE_SHARED_LIBRARY" option.
-If you don't want the whole toolkit in a single shared library, the
-"DCMTK_MODULES" cache variable can be modified to select a subset of the
-available modules.  Please note that this option is marked as advanced and thus
-is hidden by default.  Also, when building a single shared library, applications
-and tests cannot be built.
-
-Please note that support for shared libraries is still pretty new in DCMTK and
-thus not that mature.
-
-
-Default value for CMAKE_BUILD_TYPE
-----------------------------------
-
-CMAKE_BUILD_TYPE is set to value "Release" if none is specified by the
-selected build file generator. For those generators that support multiple
-configuration types (e.g. Debug, Release), CMAKE_CONFIGURATION_TYPES holds
-possible values.  For other generators this value is empty, and for those
-generators the build type is controlled at CMake time by CMAKE_BUILD_TYPE.
-
-To disable the CMAKE_BUILD_TYPE default value, set CMAKE_BUILD_TYPE to value
-"None" during CMake configuration, e.g. use "-DCMAKE_BUILD_TYPE:STRING=None"
-on the command line.  This may be useful if the compiler flags should be
-controlled manually (e.g. as defined in environment variables like CXXFLAGS)
-and no CMake defaults related to the selected configuration type kick in.
-
-
-DCMTKConfig.cmake AND DCMTKTargets.cmake
-----------------------------------------
-
-CMake permits to write files that describe the DCMTK build configuration
-(DCMTConfig.cmake) as well as all targets (executables and libraries) that have
-been produced (DCMTKTargets.cmake).  Those files can be utilized by external
-projects by using CMake' find_package() mechanism in "CONFIG" mode in order to
-adapt their own build configuration, and directly make use of all available
-target libraries and executables.
-
-On systems using CMake versions equal or greater than 2.8.8, these files are
-written during installation to the installation directory's subfolder
-/cmake on Windows systems, and /lib/cmake/dcmtk on Unix-like systems.
-Additionally, these files are already written to the main directory of CMake's
-build tree during the build, with all content (e.g. the include paths within
-DCMTConfig.cmake) pointing to the correct values for the build tree.  Thus even
-a DCMTK build tree can be used by external projects that process these two
-files.
-
-On systems using CMake versions lower than 2.8.8, only a simplified
-DCMTKConfig.cmake is created, which is only available in the install tree.
-DCMTKTargets.cmake is not created at all.
+We have polished our CMake configuration for DCMTK release 3.6.2 and consider
+it a full replacement for Autoconf that should be compatible or provide even
+better support on some platforms (e.g. Android).
+
+One key difference when using CMake for building on Unix like systems is that we
+use the "find_package()" mechanism for all external libraries and not just the
+ICU.  Most Unix like systems provide a package manager or even if not at least
+have a consistent approach for where the libraries and include files are
+installed such that the CMake "find_package()" mechanism typically finds them
+out of the box.
+
+If that does not work or you want to use a different version of a library than
+the one in the default search paths, you should look at the documentation of the
+respective "find_package()" module to find out which variables need to be
+modified, e.g. "FindZLIB" to control which version of the zlib will be used:
+https://cmake.org/cmake/help/latest/module/FindZLIB.html .
+
+The typical way to build DCMTK on Unix like systems with CMake is as follows
+(if not using the GUI, in that case look at the description for Windows above):
+
+    mkdir dcmtk-gcc-`g++ -dumpversion`
+    cd dcmtk-gcc-<TAB>
+    cmake ../dcmtk-3.6.2
+    make -j8
+    make DESTDIR=../dcmtk-3.6.2-install install
+
+The above commands assume that the DCMTK source code was extracted to the
+current working directory into a folder named dcmtk-3.6.2 and that the GNU gcc
+compiler will be used (note that clang++ -dumpversion will give wrong results).
+DCMTK will be configured using CMake with the default options, detecting and
+including all available support libraries and then compiled using eight CPU
+cores (adjust as needed).  The result will be installed to the directory
+"dcmtk-3.6.2-install" next to the source code directory.
 
 
 HTML DOCUMENTATION AND MAN PAGES
@@ -728,16 +820,16 @@ HTML DOCUMENTATION AND MAN PAGES
 Most DCMTK modules have been documented with Doxygen (www.doxygen.org), a free
 source code documentation system similar to Javadoc.  Unix users who have
 Doxygen installed can create a hypertext documentation with "make html" in the
-"dcmtk-3.6.0" or "doxygen" directory; Windows and other CMake users should
+"dcmtk-3.6.2" or "doxygen" directory; Windows and other CMake users should
 build the "DOXYGEN" subproject.  A project file for Microsoft's HTML Help
 Workshop can also be generated allowing to create a single CHM file (compressed
 HTML) from the documentation.  Other output formats (e.g. LaTeX) can be enabled
 by changing the configuration file in the "doxygen" directory.
 
-At the current time, dcmimage, dcmimgle, dcmjpeg, dcmpstat, dcmrt, dcmsign,
-dcmsr, dcmtls, dcmwlm and ofstd are completely documented, dcmdata, dcmjpls,
-dcmnet and oflog are almost completely documented.  See FAQ entry: "Where is
-rest of the documentation?"
+At the current time, dcmfg, dcmiod, dcmimage, dcmimgle, dcmjpeg, dcmpmap,
+dcmpstat, dcmrt, dcmseg, dcmsign, dcmsr, dcmtls, dcmtract, dcmwlm and ofstd are
+completely documented; dcmdata, dcmjpls, dcmnet and oflog are almost completely
+documented.  See FAQ entry: "Where is rest of the documentation?"
 
 On Unix platforms, man pages for all command line tools are installed during
 the "make install" step.  In order to use them, just add the directory (e.g.
@@ -765,17 +857,20 @@ RUNNING THE TEST SUITE
 ======================
 
 DCMTK comes with a test suite that verifies that the toolkit works as expected.
-The tests are contained in a module's "tests" subdirectory.
+The tests are contained in a module's "tests" subdirectory.  Some tests are
+marked as exhaustive and are only run if explicitly enabled, see below.
 
 When using configure for building DCMTK, all tests can be run via "make check".
 If a test fails, make will stop and the failure reason of the test which failed
-should be visible.
+should be visible.  Additionally, you may run the exhaustive unit tests by
+typing "make check-exhaustive".
 
 You can also run the test suite with CMake.  However, the steps needed for
 running the test suite depend on the generator used.  The Visual Studio
 generators will create a "RUN_TESTS" subproject.  Building this project will
 call CTest and run all tests.  When using the Makefile generator, "make test"
-runs the test suite.  Other generators should use a similar approach.
+runs the test suite.  Additionally, you may run the exhaustive unit tests by
+typing "make test-exhaustive".  Other generators should use a similar approach.
 
 For closer inspection, individual tests can be run directly.  The Makefiles
 will build the test runner for each module as "<module>/tests/tests".  CMake
@@ -787,7 +882,7 @@ For more information, call this program with the --help option.
 
 Have fun.
 
-M. Eichelberg, J. Riesmeier, M. Onken, U. Schlachter, J. Schlamelcher
+M. Eichelberg, J. Riesmeier, M. Onken, J. Schlamelcher
 DCMTK Development Team, Oldenburg, Germany.
 
-Last revised: 2015-09-18 (Riesmeier)
+Last revised: 2017-07-14 (Schlamelcher)
diff --git a/VERSION b/VERSION
index a2f470f..b727628 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.6.1_20170228
+3.6.2
diff --git a/config/Makefile.def.in b/config/Makefile.def.in
index b5edc49..fe1b0f5 100644
--- a/config/Makefile.def.in
+++ b/config/Makefile.def.in
@@ -52,7 +52,8 @@ DEBUG = @DEBUG@
 #
 
 # We want the old behavior of OFString(NULL) for now, no crashes.
-GLOBALDEFS = @DEFS@ -DDCMTK_BUILD_DATE=\"2017-02-28\" -DUSE_NULL_SAFE_OFSTRING -DDCMTK_BUILD_IN_PROGRESS
+GLOBALDEFS = @DEFS@ -DUSE_NULL_SAFE_OFSTRING -DDCMTK_BUILD_IN_PROGRESS
+# -DDCMTK_BUILD_DATE=\"YYYY-MM-DD\"
 
 #
 # ARCH defines special machine architecture compiler settings
diff --git a/config/Makefile.in b/config/Makefile.in
index 429aa04..ad1e511 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -63,7 +63,7 @@ distclean:
 include/dcmtk/config/arith.h: arith
 	./arith $@
 
-arith: arith.cc
-	$(CXX) $(CXXFLAGS) -Iinclude -I../ofstd/include -I../ofstd/libsrc -o$@ $@.cc
+arith: tests/arith.cc
+	$(CXX) $(CXXFLAGS) -Iinclude -I../ofstd/include -I../ofstd/libsrc -o$@ tests/$@.cc
 
 dependencies: include/dcmtk/config/arith.h
diff --git a/config/aclocal.m4 b/config/aclocal.m4
index 78e457e..827d609 100644
--- a/config/aclocal.m4
+++ b/config/aclocal.m4
@@ -1116,7 +1116,7 @@ fi
 
 dnl AC_INCLUDE_MATH_H_AS_CXX checks if <math.h> must be included as a C++
 dnl   include file (i.e. without extern "C"). Some sytems (Win32, HP/UX 10)
-dnl   use C++ language features in <math.h>
+dnl   use C++ language features in <math.h>.
 
 dnl AC_INCLUDE_MATH_H_AS_CXX(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_INCLUDE_MATH_H_AS_CXX,
@@ -1411,7 +1411,8 @@ fi
 
 
 dnl AC_CXX_LIBC_H_EXTERN_C checks if <libc.h> and <math.h> cause a problem if
-dnl   libc.h is included extern "C" and math.h is not. This is the case on QNX 6.2.x
+dnl   libc.h is included extern "C" and math.h is not. This is the case on QNX
+dnl   6.2.x and 6.5.x.
 
 AC_DEFUN([AC_CXX_LIBC_H_EXTERN_C],
 [AH_TEMPLATE([INCLUDE_LIBC_H_AS_CXX], [Define if libc.h should be treated as a C++ header])
@@ -1419,10 +1420,10 @@ AC_CACHE_CHECK(whether libc.h should be treated as a C++ header,
 ac_cv_cxx_libc_h_is_cxx,
 [AC_LANG_SAVE
  AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <math.h>
-extern "C" {
+ AC_TRY_COMPILE([extern "C" {
 #include <libc.h>
-}],[int i = 0],
+}
+#include <math.h>],[int i = 0],
  ac_cv_cxx_libc_h_is_cxx=no, ac_cv_cxx_libc_h_is_cxx=yes)
  AC_LANG_RESTORE
 ])
@@ -1552,7 +1553,7 @@ AC_TYPEDEF_HELPER([$1],[],[AC_DEFINE_UNQUOTED(AC_TYPEDEF_TEMP, [1], [Define `$1'
 # when _LARGEFILE64_SOURCE is defined
 #
 AC_DEFUN([AC_LFS64],
-[ AH_TEMPLATE([HAVE_LFS_SUPPORT], [Define if LFS (large file support) is available])
+[ AH_TEMPLATE([DCMTK_ENABLE_LFS], [Select LFS mode (defined above) that shall be used or don't define it])
   AH_TEMPLATE([_LARGEFILE64_SOURCE], [Define to enable LFS64 (explicit large file support) if available])
   AC_MSG_CHECKING([for explicit large file support])
   ac_cv_lfs64_support=no
@@ -1565,7 +1566,7 @@ AC_DEFUN([AC_LFS64],
 
   if test "$ac_cv_lfs64_support" = yes; then
     AC_MSG_RESULT([yes])
-    AC_DEFINE(HAVE_LFS_SUPPORT,, [Define if LFS (large file support) is available])
+    AC_DEFINE(DCMTK_ENABLE_LFS, DCMTK_LFS64, [Select LFS mode (defined above) that shall be used or don't define it])
     AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Define to enable LFS64 (explicit large file support) if available])
   else
     AC_MSG_RESULT([no])
@@ -1648,7 +1649,7 @@ AC_DEFUN([MY_AC_SYS_LARGEFILE],
   fi
 
   ac_cv_lfs64_support=no
-  AH_TEMPLATE([HAVE_LFS_SUPPORT], [Define if LFS (large file support) is available])
+  AH_TEMPLATE([DCMTK_ENABLE_LFS], [Select LFS mode (defined above) that shall be used or don't define it])
   MY_AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
     ac_cv_sys_file_offset_bits,
     [Number of bits in a file offset, on hosts where this is settable.],
@@ -1659,7 +1660,7 @@ AC_DEFUN([MY_AC_SYS_LARGEFILE],
     [MY_AC_SYS_LARGEFILE_TEST_INCLUDES])
 
   if test "$ac_cv_lfs_support" = yes; then
-    AC_DEFINE(HAVE_LFS_SUPPORT,, [Define if LFS (large file support) is available])
+    AC_DEFINE(DCMTK_ENABLE_LFS, DCMTK_LFS, [Select LFS mode (defined above) that shall be used or don't define it])
   fi
 
 ])# MY_AC_SYS_LARGEFILE
@@ -1888,31 +1889,6 @@ AC_DEFUN([AC_CHECK_ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES],
     fi
 ])
 
-AC_DEFUN([AC_CHECK_ALIGNAS_SUPPORTS_TYPEDEFS],
-[
-    AC_MSG_CHECKING([whether alignas supports typedefs])
-    AC_LINK_IFELSE(
-    [
-        AC_LANG_SOURCE(
-        [
-            int main()
-            {
-                typedef char type[[16]] alignas(4);
-                return 0;
-            }
-        ])
-    ],
-    [dcmtk_alignas_supports_typedefs=[yes]],
-    [dcmtk_alignas_supports_typedefs=[no]]
-    )
-    if test "$dcmtk_alignas_supports_typedefs" = yes; then
-        AC_MSG_RESULT([yes])
-        AC_DEFINE($1,[1],[Define if alignas supports typedefs])
-    else
-        AC_MSG_RESULT([no])
-    fi
-])
-
 AC_DEFUN([AC_CHECK_DEFAULT_CONSTRUCTOR_DETECTION_VIA_SFINAE],
 [
     AC_MSG_CHECKING([whether the compiler supports default constructor detection via SFINAE])
diff --git a/config/configure b/config/configure
index 61c0388..0518b65 100755
--- a/config/configure
+++ b/config/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dcmtk 3.6.1.
+# Generated by GNU Autoconf 2.69 for dcmtk 3.6.2.
 #
 # Report bugs to <bugs at dcmtk.org>.
 #
@@ -579,9 +579,9 @@ MAKEFLAGS=
 
 # Identity of this package.
 PACKAGE_NAME='dcmtk'
-PACKAGE_TARNAME='dcmtk-3.6.1'
-PACKAGE_VERSION='3.6.1'
-PACKAGE_STRING='dcmtk 3.6.1'
+PACKAGE_TARNAME='dcmtk-3.6.2'
+PACKAGE_VERSION='3.6.2'
+PACKAGE_STRING='dcmtk 3.6.2'
 PACKAGE_BUGREPORT='bugs at dcmtk.org'
 PACKAGE_URL='http://www.dcmtk.org/'
 
@@ -634,6 +634,7 @@ MATHLIBS
 PNGLIBS
 TIFFLIBS
 OPENSSLLIBS
+HAVE_CXX11
 CHARCONVLIBS
 CHARCONVINCLUDES
 ICU_CONFIG
@@ -743,7 +744,19 @@ with_libiconv
 with_libicuinc
 with_libicu
 enable_charconv
-with_cxx11_stl
+enable_cxx11
+enable_stl
+enable_stl_vector
+enable_stl_algorithm
+enable_stl_limits
+enable_stl_list
+enable_stl_map
+enable_stl_memory
+enable_stl_stack
+enable_stl_string
+enable_stl_type_traits
+enable_stl_tuple
+enable_stl_system_error
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1298,7 +1311,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures dcmtk 3.6.1 to adapt to many kinds of systems.
+\`configure' configures dcmtk 3.6.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1363,7 +1376,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dcmtk 3.6.1:";;
+     short | recursive ) echo "Configuration of dcmtk 3.6.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1389,6 +1402,36 @@ Optional Features:
   --enable-charconv=TYPE  enable character set conversion support
                           (libiconv/libicu/stdlibc/auto=default)
   --disable-charconv      disable character set conversion support
+  --enable-cxx11          use C++11
+  --disable-cxx11         do not use C++11 (default)
+  --enable-stl            use C++ STL
+  --disable-stl           do not use C++ STL (default)
+  --enable-stl-vector     use C++ STL vector
+  --disable-stl-vector    do not use C++ STL vector
+  --enable-stl-algorithm  use C++ STL algorithm
+  --disable-stl-algorithm do not use C++ STL algorithm
+  --enable-stl-limits     use C++ STL limits
+  --disable-stl-limits    do not use C++ STL limits
+  --enable-stl-list       use C++ STL list
+  --disable-stl-list      do not use C++ STL list
+  --enable-stl-map        use C++ STL map
+  --disable-stl-map       do not use C++ STL map
+  --enable-stl-memory     use C++ STL memory
+  --disable-stl-memory    do not use C++ STL memory
+  --enable-stl-stack      use C++ STL stack
+  --disable-stl-stack     do not use C++ STL stack
+  --enable-stl-string     use C++ STL string
+  --disable-stl-string    do not use C++ STL string
+  --enable-stl-type-traits
+                          use C++ STL type-traits
+  --disable-stl-type-traits
+                          do not use C++ STL type-traits
+  --enable-stl-tuple      use C++ STL tuple
+  --disable-stl-tuple     do not use C++ STL tuple
+  --enable-stl-system-error
+                          use C++ STL system_error
+  --disable-stl-system_error
+                          do not use C++ STL system_error
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1421,8 +1464,6 @@ Optional Packages:
   --with-libicuinc=DIR    location of libicu includes and libraries
   --with-libicu           include libicu support (default: auto)
   --without-libicu        don't include libicu support
-  --with-cxx11-stl        enable C++11 STL
-  --without-cxx11-stl     disable C++11 STL (default)
 
 Some influential environment variables:
   CC          C compiler command
@@ -1504,7 +1545,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-dcmtk configure 3.6.1
+dcmtk configure 3.6.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2364,7 +2405,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by dcmtk $as_me 3.6.1, which was
+It was created by dcmtk $as_me 3.6.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2717,10 +2758,78 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 ac_config_headers="$ac_config_headers include/dcmtk/config/osconfig.h"
 
 
+# ===========================================================================
+#  https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
+#
+# DESCRIPTION
+#
+#   Check for baseline language coverage in the compiler for the specified
+#   version of the C++ standard.  If necessary, add switches to CXX and
+#   CXXCPP to enable support.  VERSION may be '11' (for the C++11 standard)
+#   or '14' (for the C++14 standard).
+#
+#   The second argument, if specified, indicates whether you insist on an
+#   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
+#   -std=c++11).  If neither is specified, you get whatever works, with
+#   preference for an extended mode.
+#
+#   The third argument, if specified 'mandatory' or if left unspecified,
+#   indicates that baseline support for the specified C++ standard is
+#   required and that the macro should error out if no mode with that
+#   support is found.  If specified 'optional', then configuration proceeds
+#   regardless, after defining HAVE_CXX${VERSION} if and only if a
+#   supporting mode is found.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Benjamin Kosnik <bkoz at redhat.com>
+#   Copyright (c) 2012 Zack Weinberg <zackw at panix.com>
+#   Copyright (c) 2013 Roy Stogner <roystgnr at ices.utexas.edu>
+#   Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov at google.com>
+#   Copyright (c) 2015 Paul Norman <penorman at mac.com>
+#   Copyright (c) 2015 Moritz Klammler <moritz at klammler.eu>
+#   Copyright (c) 2016 Krzesimir Nowak <qdlacz at gmail.com>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.  This file is offered as-is, without any
+#   warranty.
+
+#serial 7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
-PACKAGE_VERSION_NUMBER=361
+
+
+
+PACKAGE_VERSION_NUMBER=362
 PACKAGE_VERSION_SUFFIX=""
-PACKAGE_DATE="DEV"
+PACKAGE_DATE="2017-07-14"
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5936,7 +6045,7 @@ _ACEOF
 fi
 done
 
-for ac_func in uname cuserid getlogin
+for ac_func in uname cuserid getlogin getlogin_r
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -6112,6 +6221,17 @@ _ACEOF
 fi
 done
 
+for ac_func in readdir_r
+do :
+  ac_fn_c_check_func "$LINENO" "readdir_r" "ac_cv_func_readdir_r"
+if test "x$ac_cv_func_readdir_r" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_READDIR_R 1
+_ACEOF
+
+fi
+done
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
 if ${ac_cv_sys_largefile_source+:} false; then :
@@ -8587,10 +8707,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <math.h>
 extern "C" {
 #include <libc.h>
 }
+#include <math.h>
 int
 main ()
 {
@@ -8995,6 +9115,10 @@ $as_echo "#define HAVE_PTHREAD_RWLOCK /**/" >>confdefs.h
 	  ;;
 	*-*-netbsdelf2*)
 	  ;;
+	*-*-netbsd*)
+	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CXXFLAGS"
+	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CFLAGS"
+	  ;;
 	*-*-darwin*)
 	  	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS"
 	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS"
@@ -9046,6 +9170,10 @@ $as_echo "#define HAVE_PTHREAD_RWLOCK /**/" >>confdefs.h
 	  ;;
 	*-*-netbsdelf2*)
 	  ;;
+	*-*-netbsd*)
+	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CXXFLAGS"
+	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CFLAGS"
+	  ;;
 	*-*-darwin*)
 	  	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS"
 	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS"
@@ -9144,7 +9272,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_LFS_SUPPORT /**/" >>confdefs.h
+$as_echo "#define DCMTK_ENABLE_LFS DCMTK_LFS64" >>confdefs.h
 
 
 $as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
@@ -9364,7 +9492,7 @@ rm -f conftest*
 
   if test "$ac_cv_lfs_support" = yes; then
 
-$as_echo "#define HAVE_LFS_SUPPORT /**/" >>confdefs.h
+$as_echo "#define DCMTK_ENABLE_LFS DCMTK_LFS" >>confdefs.h
 
   fi
 
@@ -9892,6 +10020,69 @@ $as_echo "$ac_cv_have___func___macro" >&6; }
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking prototype for feenableexcept (in fenv.h)" >&5
+$as_echo_n "checking prototype for feenableexcept (in fenv.h)... " >&6; }
+
+:
+
+ac_includes=""
+for ac_header in fenv.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo feenableexcept | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct feenableexcept(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
+  cat >>confdefs.h <<_ACEOF
+#define $ac_tr_prototype 1
+_ACEOF
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking prototype for _stricmp (in string.h)" >&5
 $as_echo_n "checking prototype for _stricmp (in string.h)... " >&6; }
 
@@ -10870,6 +11061,69 @@ else
 $as_echo "no" >&6; }
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking prototype for gethostbyaddr_r (in libc.h unistd.h stdlib.h netdb.h)" >&5
+$as_echo_n "checking prototype for gethostbyaddr_r (in libc.h unistd.h stdlib.h netdb.h)... " >&6; }
+
+:
+
+ac_includes=""
+for ac_header in libc.h unistd.h stdlib.h netdb.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo gethostbyaddr_r | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct gethostbyaddr_r(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
+  cat >>confdefs.h <<_ACEOF
+#define $ac_tr_prototype 1
+_ACEOF
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking prototype for gethostid (in libc.h unistd.h stdlib.h netdb.h)" >&5
 $as_echo_n "checking prototype for gethostid (in libc.h unistd.h stdlib.h netdb.h)... " >&6; }
 
@@ -12595,6 +12849,7 @@ fi
 fi
 
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use C++ standard includes" >&5
 $as_echo_n "checking whether to use C++ standard includes... " >&6; }
 ac_use_std_includes="auto"
@@ -12656,7 +12911,7 @@ if ${ac_cv_check_std_namespace+:} false; then :
 else
   ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5'
 cat > conftest.$ac_ext <<EOF
-#line 12659 "configure"
+#line 12914 "configure"
 #include "confdefs.h"
 
 #include <iostream>
@@ -13128,7 +13383,7 @@ if ${ac_cv_check_class_template+:} false; then :
 else
   ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5'
 cat > conftest.$ac_ext <<EOF
-#line 13131 "configure"
+#line 13386 "configure"
 #include "confdefs.h"
 
 template <class T>
@@ -13200,7 +13455,7 @@ if ${ac_cv_check_static_template_method+:} false; then :
 else
   ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5'
 cat > conftest.$ac_ext <<EOF
-#line 13203 "configure"
+#line 13458 "configure"
 #include "confdefs.h"
 
 void additive(int & i)
@@ -13272,7 +13527,7 @@ if ${ac_cv_check_function_template+:} false; then :
 else
   ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5'
 cat > conftest.$ac_ext <<EOF
-#line 13275 "configure"
+#line 13530 "configure"
 #include "confdefs.h"
 
 template <class T>
@@ -14367,6 +14622,7 @@ if test "${LIBXMLCFLAGS+set}" = set; then
   CXXFLAGS="$LIBXMLCFLAGS $CXXFLAGS"
   CFLAGS="$LIBXMLCFLAGS $CFLAGS"
 fi
+LIBXMLLIBS=`xml2-config --libs 2>/dev/null`
 
 XMLLIBS=""
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libxml support" >&5
@@ -14381,7 +14637,7 @@ $as_echo "yes" >&6; }
 
 $as_echo "#define WITH_LIBXML /**/" >>confdefs.h
 
-    XMLLIBS="-lxml2"
+    XMLLIBS=$LIBXMLLIBS
     ;;
   *)
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -14390,7 +14646,7 @@ $as_echo "no" >&6; }
   esac
 else
    SAVELIBS="$LIBS"
-  LIBS="$LIBS -lxml2 $ZLIBLIBS"
+  LIBS="$LIBS $LIBXMLLIBS"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <libxml/parser.h>
@@ -14408,7 +14664,7 @@ $as_echo "yes" >&6; }
 
 $as_echo "#define WITH_LIBXML /**/" >>confdefs.h
 
-      XMLLIBS="-lxml2"
+      XMLLIBS=$LIBXMLLIBS
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -14649,7 +14905,7 @@ else
 int
 main ()
 {
-iconv_t cd = iconv_open("", ""); iconv(cd, NULL, NULL, NULL, NULL); iconv_close(cd);
+iconv_t cd = iconv_open("", ""); iconv(cd, 0, 0, 0, 0); iconv_close(cd);
   ;
   return 0;
 }
@@ -14678,7 +14934,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 int
 main ()
 {
-iconv_t cd = iconv_open("", ""); const char *in = 0; iconv(cd, &in, NULL, NULL, NULL); iconv_close(cd);
+iconv_t cd = iconv_open("", ""); const char *in = 0; iconv(cd, &in, 0, 0, 0); iconv_close(cd);
   ;
   return 0;
 }
@@ -14982,116 +15238,1252 @@ _ACEOF
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++11 STL should be used" >&5
-$as_echo_n "checking if the C++11 STL should be used... " >&6; }
 
-# Check whether --with-cxx11-stl was given.
-if test "${with_cxx11_stl+set}" = set; then :
-  withval=$with_cxx11_stl;  case "$withval" in
+ac_enable_cxx11="no"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable C++11 support" >&5
+$as_echo_n "checking whether to enable C++11 support... " >&6; }
+# Check whether --enable-cxx11 was given.
+if test "${enable_cxx11+set}" = set; then :
+  enableval=$enable_cxx11;  case "$enableval" in
   yes)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
+     ax_cxx_compile_alternatives="11 0x"    ax_cxx_compile_cxx11_required=false
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+  ac_success=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
+$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
+if ${ax_cv_cxx_compile_cxx11+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-$as_echo "#define DCMTK_USE_CXX11_STL /**/" >>confdefs.h
 
-    ;;
-  *)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    ;;
-  esac
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
 
-fi
+#ifndef __cplusplus
 
+#error "This is not a C++ compiler"
 
+#elif __cplusplus < 201103L
 
+#error "This is not a C++11 compiler"
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_add_and_fetch" >&5
-$as_echo_n "checking for __sync_add_and_fetch... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+#else
 
+namespace cxx11
+{
 
-            int main(){return __sync_add_and_fetch((int *)0, 0);}
+  namespace test_static_assert
+  {
 
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
 
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  dcmtk_have_sync_fn=yes
-else
-  dcmtk_have_sync_fn=no
+  }
 
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    if test "$dcmtk_have_sync_fn" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+  namespace test_final_override
+  {
 
-$as_echo "#define HAVE_SYNC_ADD_AND_FETCH 1" >>confdefs.h
+    struct Base
+    {
+      virtual void f() {}
+    };
 
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    fi
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
 
+  }
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_sub_and_fetch" >&5
-$as_echo_n "checking for __sync_sub_and_fetch... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  namespace test_double_right_angle_brackets
+  {
 
+    template < typename T >
+    struct check {};
 
-            int main(){return __sync_sub_and_fetch((int *)0, 0);}
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
 
+  }
 
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  dcmtk_have_sync_fn=yes
-else
-  dcmtk_have_sync_fn=no
+  namespace test_decltype
+  {
 
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    if test "$dcmtk_have_sync_fn" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
 
-$as_echo "#define HAVE_SYNC_SUB_AND_FETCH 1" >>confdefs.h
+  }
 
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    fi
+  namespace test_type_deduction
+  {
 
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __alignof__" >&5
-$as_echo_n "checking for __alignof__... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
 
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
 
-            int main(){char c[__alignof__(int)];return 0;}
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      static constexpr auto value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+#endif  // __cplusplus >= 201103L
+
+
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ax_cv_cxx_compile_cxx11=yes
+else
+  ax_cv_cxx_compile_cxx11=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
+$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
+  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
+    ac_success=yes
+  fi
+
+
+
+    if test x$ac_success = xno; then
+                for alternative in ${ax_cxx_compile_alternatives}; do
+      for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
+        cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
+if eval \${$cachevar+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_CXX="$CXX"
+           CXX="$CXX $switch"
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201103L
+
+#error "This is not a C++11 compiler"
+
+#else
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      static constexpr auto value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+#endif  // __cplusplus >= 201103L
+
+
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval $cachevar=yes
+else
+  eval $cachevar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+           CXX="$ac_save_CXX"
+fi
+eval ac_res=\$$cachevar
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+        if eval test x\$$cachevar = xyes; then
+          CXX="$CXX $switch"
+          if test -n "$CXXCPP" ; then
+            CXXCPP="$CXXCPP $switch"
+          fi
+          ac_success=yes
+          break
+        fi
+      done
+      if test x$ac_success = xyes; then
+        break
+      fi
+    done
+  fi
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  if test x$ax_cxx_compile_cxx11_required = xtrue; then
+    if test x$ac_success = xno; then
+      as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
+    fi
+  fi
+  if test x$ac_success = xno; then
+    HAVE_CXX11=0
+    { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
+$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
+  else
+    HAVE_CXX11=1
+
+$as_echo "#define HAVE_CXX11 1" >>confdefs.h
+
+  fi
+
+
+   if test "$HAVE_CXX11 == 1"; then
+     ac_enable_cxx11="yes"
+   fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable C++11 support" >&5
+$as_echo_n "checking whether to enable C++11 support... " >&6; }
+   ;;
+
+  *)
+   ac_enable_cxx11="no"
+   ;;
+  esac
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_cxx11" >&5
+$as_echo "$ac_enable_cxx11" >&6; }
+
+
+
+ac_enable_stl="no"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL support" >&5
+$as_echo_n "checking whether to enable STL support... " >&6; }
+# Check whether --enable-stl was given.
+if test "${enable_stl+set}" = set; then :
+  enableval=$enable_stl;  case "$enableval" in
+  yes)
+   ac_enable_stl="yes"
+   ;;
+
+  *)
+    ac_enable_stl="no"
+    ;;
+  esac
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl" >&5
+$as_echo "$ac_enable_stl" >&6; }
+
+
+ac_enable_stl_vector="auto"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL vector support" >&5
+$as_echo_n "checking whether to enable STL vector support... " >&6; }
+# Check whether --enable-stl-vector was given.
+if test "${enable_stl_vector+set}" = set; then :
+  enableval=$enable_stl_vector;  case "$enableval" in
+  yes)
+   ac_enable_stl_vector="yes"
+   ;;
+
+  *)
+    ac_enable_stl_vector="no"
+    ;;
+  esac
+
+fi
+
+if test "$ac_enable_stl_vector" = "auto"; then
+  ac_enable_stl_vector="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_vector" = "yes"; then
+  if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "tests/vector.cc"
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+
+$as_echo "#define HAVE_STL_VECTOR /**/" >>confdefs.h
+
+else
+  ac_enable_stl_vector="unsupported -> no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_vector" >&5
+$as_echo "$ac_enable_stl_vector" >&6; }
+
+ac_enable_stl_algorithm="auto"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL algorithm support" >&5
+$as_echo_n "checking whether to enable STL algorithm support... " >&6; }
+# Check whether --enable-stl-algorithm was given.
+if test "${enable_stl_algorithm+set}" = set; then :
+  enableval=$enable_stl_algorithm;  case "$enableval" in
+  yes)
+   ac_enable_stl_algorithm="yes"
+   ;;
+
+  *)
+    ac_enable_stl_algorithm="no"
+    ;;
+  esac
+
+fi
+
+if test "$ac_enable_stl_algorithm" = "auto"; then
+  ac_enable_stl_algorithm="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_algorithm" = "yes"; then
+  if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "tests/algo.cc"
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+
+$as_echo "#define HAVE_STL_ALGORITHM /**/" >>confdefs.h
+
+else
+  ac_enable_stl_algorithm="unsupported -> no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_algorithm" >&5
+$as_echo "$ac_enable_stl_algorithm" >&6; }
+
+ac_enable_stl_limits="auto"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL limits support" >&5
+$as_echo_n "checking whether to enable STL limits support... " >&6; }
+# Check whether --enable-stl-limits was given.
+if test "${enable_stl_limits+set}" = set; then :
+  enableval=$enable_stl_limits;  case "$enableval" in
+  yes)
+   ac_enable_stl_limits="yes"
+   ;;
+
+  *)
+    ac_enable_stl_limits="no"
+    ;;
+  esac
+
+fi
+
+if test "$ac_enable_stl_limits" = "auto"; then
+  ac_enable_stl_limits="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_limits" = "yes"; then
+  if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "tests/limits.cc"
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+
+$as_echo "#define HAVE_STL_LIMITS /**/" >>confdefs.h
+
+else
+  ac_enable_stl_limits="unsupported -> no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_limits" >&5
+$as_echo "$ac_enable_stl_limits" >&6; }
+
+ac_enable_stl_list="auto"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL list support" >&5
+$as_echo_n "checking whether to enable STL list support... " >&6; }
+# Check whether --enable-stl-list was given.
+if test "${enable_stl_list+set}" = set; then :
+  enableval=$enable_stl_list;  case "$enableval" in
+  yes)
+   ac_enable_stl_list="yes"
+   ;;
+
+  *)
+    ac_enable_stl_list="no"
+    ;;
+  esac
+
+fi
+
+if test "$ac_enable_stl_list" = "auto"; then
+  ac_enable_stl_list="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_list" = "yes"; then
+  if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "tests/list.cc"
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+
+$as_echo "#define HAVE_STL_LIST /**/" >>confdefs.h
+
+else
+  ac_enable_stl_list="unsupported -> no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_list" >&5
+$as_echo "$ac_enable_stl_list" >&6; }
+
+ac_enable_stl_map="auto"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL map support" >&5
+$as_echo_n "checking whether to enable STL map support... " >&6; }
+# Check whether --enable-stl-map was given.
+if test "${enable_stl_map+set}" = set; then :
+  enableval=$enable_stl_map;  case "$enableval" in
+  yes)
+   ac_enable_stl_map="yes"
+   ;;
+
+  *)
+    ac_enable_stl_map="no"
+    ;;
+  esac
+
+fi
+
+if test "$ac_enable_stl_map" = "auto"; then
+  ac_enable_stl_map="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_map" = "yes"; then
+  if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "tests/map.cc"
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+
+$as_echo "#define HAVE_STL_MAP /**/" >>confdefs.h
+
+else
+  ac_enable_stl_map="unsupported -> no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_map" >&5
+$as_echo "$ac_enable_stl_map" >&6; }
+
+ac_enable_stl_memory="auto"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL memory support" >&5
+$as_echo_n "checking whether to enable STL memory support... " >&6; }
+# Check whether --enable-stl-memory was given.
+if test "${enable_stl_memory+set}" = set; then :
+  enableval=$enable_stl_memory;  case "$enableval" in
+  yes)
+   ac_enable_stl_memory="yes"
+   ;;
+
+  *)
+    ac_enable_stl_memory="no"
+    ;;
+  esac
+
+fi
+
+if test "$ac_enable_stl_memory" = "auto"; then
+  ac_enable_stl_memory="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_memory" = "yes"; then
+  if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "tests/memory.cc"
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+
+$as_echo "#define HAVE_STL_MEMORY /**/" >>confdefs.h
+
+else
+  ac_enable_stl_memory="unsupported -> no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_memory" >&5
+$as_echo "$ac_enable_stl_memory" >&6; }
+
+ac_enable_stl_stack="auto"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL stack support" >&5
+$as_echo_n "checking whether to enable STL stack support... " >&6; }
+# Check whether --enable-stl-stack was given.
+if test "${enable_stl_stack+set}" = set; then :
+  enableval=$enable_stl_stack;  case "$enableval" in
+  yes)
+   ac_enable_stl_stack="yes"
+   ;;
+
+  *)
+    ac_enable_stl_stack="no"
+    ;;
+  esac
+
+fi
+
+if test "$ac_enable_stl_stack" = "auto"; then
+  ac_enable_stl_stack="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_stack" = "yes"; then
+  if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "tests/stack.cc"
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+
+$as_echo "#define HAVE_STL_STACK /**/" >>confdefs.h
+
+else
+  ac_enable_stl_stack="unsupported -> no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_stack" >&5
+$as_echo "$ac_enable_stl_stack" >&6; }
+
+ac_enable_stl_string="auto"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL string support" >&5
+$as_echo_n "checking whether to enable STL string support... " >&6; }
+# Check whether --enable-stl-string was given.
+if test "${enable_stl_string+set}" = set; then :
+  enableval=$enable_stl_string;  case "$enableval" in
+  yes)
+   ac_enable_stl_string="yes"
+   ;;
+
+  *)
+    ac_enable_stl_string="no"
+    ;;
+  esac
+
+fi
+
+if test "$ac_enable_stl_string" = "auto"; then
+  ac_enable_stl_string="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_string" = "yes"; then
+  if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "tests/string.cc"
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+
+$as_echo "#define HAVE_STL_STRING /**/" >>confdefs.h
+
+else
+  ac_enable_stl_string="unsupported -> no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_string" >&5
+$as_echo "$ac_enable_stl_string" >&6; }
+
+ac_enable_stl_type_traits="auto"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL type-traits support" >&5
+$as_echo_n "checking whether to enable STL type-traits support... " >&6; }
+# Check whether --enable-stl-type-traits was given.
+if test "${enable_stl_type_traits+set}" = set; then :
+  enableval=$enable_stl_type_traits;  case "$enableval" in
+  yes)
+   ac_enable_stl_type_traits="yes"
+   ;;
+
+  *)
+    ac_enable_stl_type_traits="no"
+    ;;
+  esac
+
+fi
+
+if test "$ac_enable_stl_type_traits" = "auto"; then
+  ac_enable_stl_type_traits="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_type_traits" = "yes"; then
+  if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "tests/ttraits.cc"
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+
+$as_echo "#define HAVE_STL_TYPE_TRAITS /**/" >>confdefs.h
+
+else
+  ac_enable_stl_type_traits="unsupported -> no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_type_traits" >&5
+$as_echo "$ac_enable_stl_type_traits" >&6; }
+
+ac_enable_stl_tuple="auto"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL tuple support" >&5
+$as_echo_n "checking whether to enable STL tuple support... " >&6; }
+# Check whether --enable-stl-tuple was given.
+if test "${enable_stl_tuple+set}" = set; then :
+  enableval=$enable_stl_tuple;  case "$enableval" in
+  yes)
+   ac_enable_stl_tuple="yes"
+   ;;
+
+  *)
+    ac_enable_stl_tuple="no"
+    ;;
+  esac
+
+fi
+
+if test "$ac_enable_stl_tuple" = "auto"; then
+  ac_enable_stl_tuple="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_tuple" = "yes"; then
+  if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "tests/tuple.cc"
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+
+$as_echo "#define HAVE_STL_TUPLE /**/" >>confdefs.h
+
+else
+  ac_enable_stl_tuple="unsupported -> no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_tuple" >&5
+$as_echo "$ac_enable_stl_tuple" >&6; }
+
+ac_enable_stl_system_error="auto"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL system_error support" >&5
+$as_echo_n "checking whether to enable STL system_error support... " >&6; }
+# Check whether --enable-stl-system-error was given.
+if test "${enable_stl_system_error+set}" = set; then :
+  enableval=$enable_stl_system_error;  case "$enableval" in
+  yes)
+   ac_enable_stl_system_error="yes"
+   ;;
+
+  *)
+    ac_enable_stl_system_error="no"
+    ;;
+  esac
+
+fi
+
+if test "$ac_enable_stl_system_error" = "auto"; then
+  ac_enable_stl_system_error="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_system_error" = "yes"; then
+  if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "tests/syserr.cc"
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+
+$as_echo "#define HAVE_STL_SYSTEM_ERROR /**/" >>confdefs.h
+
+else
+  ac_enable_stl_system_error="unsupported -> no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_system_error" >&5
+$as_echo "$ac_enable_stl_system_error" >&6; }
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_add_and_fetch" >&5
+$as_echo_n "checking for __sync_add_and_fetch... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+            int main(){return __sync_add_and_fetch((int *)0, 0);}
 
 
 _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
-  dcmtk_have_alignof=yes
+  dcmtk_have_sync_fn=yes
 else
-  dcmtk_have_alignof=no
+  dcmtk_have_sync_fn=no
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-    if test "$dcmtk_have_alignof" = yes; then
+    if test "$dcmtk_have_sync_fn" = yes; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_GNU_ALIGNOF 1" >>confdefs.h
+$as_echo "#define HAVE_SYNC_ADD_AND_FETCH 1" >>confdefs.h
 
     else
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -15099,29 +16491,29 @@ $as_echo "no" >&6; }
     fi
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((aligned))" >&5
-$as_echo_n "checking for __attribute__((aligned))... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_sub_and_fetch" >&5
+$as_echo_n "checking for __sync_sub_and_fetch... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-            int main(){__attribute__((aligned(4))) char c[16];return 0;}
+            int main(){return __sync_sub_and_fetch((int *)0, 0);}
 
 
 _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
-  dcmtk_have_attribute_aligned=yes
+  dcmtk_have_sync_fn=yes
 else
-  dcmtk_have_attribute_aligned=no
+  dcmtk_have_sync_fn=no
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-    if test "$dcmtk_have_attribute_aligned" = yes; then
+    if test "$dcmtk_have_sync_fn" = yes; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h
+$as_echo "#define HAVE_SYNC_SUB_AND_FETCH 1" >>confdefs.h
 
     else
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -15129,35 +16521,59 @@ $as_echo "no" >&6; }
     fi
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((aligned)) supports templates" >&5
-$as_echo_n "checking whether __attribute__((aligned)) supports templates... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __alignof__" >&5
+$as_echo_n "checking for __alignof__... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-            template<typename T>
-            struct test { typedef T type __attribute__((aligned(4))); };
-            int main()
-            {
-                test<char>::type i;
-                return 0;
-            }
+            int main(){char c[__alignof__(int)];return 0;}
 
 
 _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
-  dcmtk_attribute_aligned_supports_templates=yes
+  dcmtk_have_alignof=yes
 else
-  dcmtk_attribute_aligned_supports_templates=no
+  dcmtk_have_alignof=no
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-    if test "$dcmtk_attribute_aligned_supports_templates" = yes; then
+    if test "$dcmtk_have_alignof" = yes; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES 1" >>confdefs.h
+$as_echo "#define HAVE_GNU_ALIGNOF 1" >>confdefs.h
+
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    fi
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((aligned))" >&5
+$as_echo_n "checking for __attribute__((aligned))... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+            int main(){__attribute__((aligned(4))) char c[16];return 0;}
+
+
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  dcmtk_have_attribute_aligned=yes
+else
+  dcmtk_have_attribute_aligned=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    if test "$dcmtk_have_attribute_aligned" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h
 
     else
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -15165,33 +16581,35 @@ $as_echo "no" >&6; }
     fi
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether alignas supports typedefs" >&5
-$as_echo_n "checking whether alignas supports typedefs... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((aligned)) supports templates" >&5
+$as_echo_n "checking whether __attribute__((aligned)) supports templates... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
+            template<typename T>
+            struct test { typedef T type __attribute__((aligned(4))); };
             int main()
             {
-                typedef char type[16] alignas(4);
+                test<char>::type i;
                 return 0;
             }
 
 
 _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
-  dcmtk_alignas_supports_typedefs=yes
+  dcmtk_attribute_aligned_supports_templates=yes
 else
-  dcmtk_alignas_supports_typedefs=no
+  dcmtk_attribute_aligned_supports_templates=no
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-    if test "$dcmtk_alignas_supports_typedefs" = yes; then
+    if test "$dcmtk_attribute_aligned_supports_templates" = yes; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define ALIGNAS_SUPPORTS_TYPEDEFS 1" >>confdefs.h
+$as_echo "#define ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES 1" >>confdefs.h
 
     else
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -15816,7 +17234,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by dcmtk $as_me 3.6.1, which was
+This file was extended by dcmtk $as_me 3.6.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15879,7 +17297,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-dcmtk config.status 3.6.1
+dcmtk config.status 3.6.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/config/configure.in b/config/configure.in
index 681ee68..b80d6db 100644
--- a/config/configure.in
+++ b/config/configure.in
@@ -1,16 +1,18 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(dcmtk, 3.6.1, [bugs at dcmtk.org], [dcmtk-3.6.1], [http://www.dcmtk.org/])
+AC_INIT(dcmtk, 3.6.2, [bugs at dcmtk.org], [dcmtk-3.6.2], [http://www.dcmtk.org/])
 AC_PREREQ(2.60)
 AC_CONFIG_SRCDIR(Makefile.in)
 AC_CONFIG_HEADER(include/dcmtk/config/osconfig.h)
 
+m4_include([stdcxx.m4])
+
 dnl -------------------------------------------------------
 dnl Additional Package Information
 dnl -------------------------------------------------------
 
-PACKAGE_VERSION_NUMBER=361
+PACKAGE_VERSION_NUMBER=362
 PACKAGE_VERSION_SUFFIX=""
-PACKAGE_DATE="DEV"
+PACKAGE_DATE="2017-07-14"
 
 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_NUMBER,${PACKAGE_VERSION_NUMBER},[Define to the version number of this package.])
 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_SUFFIX,"${PACKAGE_VERSION_SUFFIX}",[Define to the version suffix of this package.])
@@ -98,14 +100,12 @@ AH_TOP([#ifndef OSCONFIG_H
 #ifdef __MINGW32__
 #define HAVE_WINDOWS_H 1
 #define HAVE_WINSOCK_H 1
-#define NO_IOS_BASE_ASSIGN 1
 #define ENVIRONMENT_PATH_SEPARATOR ';'
 #endif])
 
-AH_BOTTOM([#if defined(DCMTK_USE_CXX11_STL) && defined(__cplusplus) && __cplusplus < 201103L
+AH_BOTTOM([#if defined(HAVE_CXX11) && defined(__cplusplus) && __cplusplus < 201103L
 #error\
- DCMTK was configured to use the C++11 STL, but your compiler is not configured\
- for building with C++11 features.
+DCMTK was configured to use C++11 features, but your compiler does not or was not configured to provide them.
 #endif
 
 #endif /* OSCONFIG_H */])
@@ -250,7 +250,7 @@ AC_CHECK_FUNCS(getpid mktemp tempnam tmpnam getenv mkstemp)
 AC_CHECK_FUNCS(stat)
 AC_CHECK_FUNCS(malloc_debug)
 AC_CHECK_FUNCS(strerror strdup bzero index rindex access)
-AC_CHECK_FUNCS(uname cuserid getlogin)
+AC_CHECK_FUNCS(uname cuserid getlogin getlogin_r)
 AC_CHECK_FUNCS(usleep)
 AC_CHECK_FUNCS(flock lockf)
 AC_CHECK_FUNCS(listen connect setsockopt getsockopt select)
@@ -265,6 +265,7 @@ AC_CHECK_FUNCS(strlcpy strlcat)
 AC_CHECK_FUNCS(vsnprintf)
 AC_CHECK_FUNCS(mbstowcs wcstombs)
 AC_CHECK_FUNCS(popen pclose)
+AC_CHECK_FUNCS(readdir_r)
 AC_FUNC_FSEEKO
 
 
@@ -648,6 +649,10 @@ if test $THREADSUPPORT = posix ; then
 	  ;;
 	*-*-netbsdelf2*)
 	  ;;
+	*-*-netbsd*)
+	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CXXFLAGS"
+	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CFLAGS"
+	  ;;
 	*-*-darwin*)
 	  dnl On Mac OS X we need to have _DARWIN_C_SOURCE defined to enable UNIX standard API for system headers
 	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS"
@@ -693,6 +698,10 @@ if test $THREADSUPPORT = posix ; then
 	  ;;
 	*-*-netbsdelf2*)
 	  ;;
+	*-*-netbsd*)
+	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CXXFLAGS"
+	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CFLAGS"
+	  ;;
 	*-*-darwin*)
 	  dnl On Mac OS X we need to have _DARWIN_C_SOURCE source defined to enable UNIX standard API for system headers
 	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS"
@@ -774,6 +783,7 @@ dnl The following AC_CHECK_* macros _must_ have corresponding entries in
 dnl the acconfig.h file.  This is because the macros are specific to the
 dnl DCMTK project and are not supported by GNU autoheader.
 
+AC_CHECK_PROTOTYPE(feenableexcept, fenv.h)
 AC_CHECK_PROTOTYPE(_stricmp, string.h)
 AC_CHECK_PROTOTYPE(accept, sys/types.h sys/socket.h)
 if test $ac_cv_prototype_accept = yes ; then
@@ -791,6 +801,7 @@ AC_CHECK_PROTOTYPE(std::isnan, cmath)
 AC_CHECK_PROTOTYPE(flock, sys/file.h)
 AC_CHECK_PROTOTYPE(gethostbyname, libc.h unistd.h stdlib.h netdb.h)
 AC_CHECK_PROTOTYPE(gethostbyname_r, libc.h unistd.h stdlib.h netdb.h)
+AC_CHECK_PROTOTYPE(gethostbyaddr_r, libc.h unistd.h stdlib.h netdb.h)
 AC_CHECK_PROTOTYPE(gethostid, libc.h unistd.h stdlib.h netdb.h)
 AC_CHECK_PROTOTYPE(gethostname, unistd.h libc.h stdlib.h netdb.h)
 AC_CHECK_PROTOTYPE(getsockname, sys/types.h sys/socket.h)
@@ -826,6 +837,7 @@ if test $ac_cv_header_math_h = yes ; then
 AC_INCLUDE_MATH_H_AS_CXX
 fi
 
+
 dnl -------------------------------------------------------
 dnl Checks for the usage of standard C++ headers.
 dnl -------------------------------------------------------
@@ -1134,6 +1146,7 @@ if test "${LIBXMLCFLAGS+set}" = set; then
   CXXFLAGS="$LIBXMLCFLAGS $CXXFLAGS"
   CFLAGS="$LIBXMLCFLAGS $CFLAGS"
 fi
+LIBXMLLIBS=`xml2-config --libs 2>/dev/null`
 
 XMLLIBS=""
 AC_MSG_CHECKING(whether to include libxml support)
@@ -1144,18 +1157,18 @@ AS_HELP_STRING([--without-libxml], [don't include libxml support])],
   yes)
     AC_MSG_RESULT(yes)
     AC_DEFINE(WITH_LIBXML, , [Define if we are compiling with libxml support.])
-    XMLLIBS="-lxml2"
+    XMLLIBS=$LIBXMLLIBS
     ;;
   *)
     AC_MSG_RESULT(no)
     ;;
   esac ],
 [ SAVELIBS="$LIBS"
-  LIBS="$LIBS -lxml2 $ZLIBLIBS"
+  LIBS="$LIBS $LIBXMLLIBS"
   AC_TRY_LINK([#include <libxml/parser.h>], [(void) xmlInitParser()],
     [ AC_MSG_RESULT(yes)
       AC_DEFINE(WITH_LIBXML, , [Define if we are compiling with libxml support.])
-      XMLLIBS="-lxml2" ],
+      XMLLIBS=$LIBXMLLIBS ],
     [AC_MSG_RESULT(no)])
   LIBS="$SAVELIBS"] )
 
@@ -1261,7 +1274,7 @@ AS_HELP_STRING([--without-libiconv], [don't include libiconv support])],
   esac ],
 [ SAVELIBS="$LIBS"
   LIBS="$LIBS -liconv -lcharset"
-  AC_TRY_LINK([#include <iconv.h>], [iconv_t cd = iconv_open("", ""); iconv(cd, NULL, NULL, NULL, NULL); iconv_close(cd);],
+  AC_TRY_LINK([#include <iconv.h>], [iconv_t cd = iconv_open("", ""); iconv(cd, 0, 0, 0, 0); iconv_close(cd);],
     [ WITH_LIBICONV=yes
       AC_DEFINE(WITH_LIBICONV)
       ICONVLIBS="-liconv -lcharset" ])
@@ -1271,7 +1284,7 @@ AC_MSG_RESULT($WITH_LIBICONV)
 AC_MSG_CHECKING(whether the second argument to iconv() is const)
 SAVELIBS="$LIBS"
 LIBS="$LIBS $ICONVLIBS"
-AC_TRY_COMPILE([#include <iconv.h>], [iconv_t cd = iconv_open("", ""); const char *in = 0; iconv(cd, &in, NULL, NULL, NULL); iconv_close(cd);],
+AC_TRY_COMPILE([#include <iconv.h>], [iconv_t cd = iconv_open("", ""); const char *in = 0; iconv(cd, &in, 0, 0, 0); iconv_close(cd);],
   [ AC_MSG_RESULT(yes)
     AC_DEFINE(LIBICONV_SECOND_ARGUMENT_CONST, , [Define if the second argument to iconv() is const.]) ],
   [AC_MSG_RESULT(no)])
@@ -1337,7 +1350,11 @@ dnl -------------------------------------------------------
 AH_VERBATIM([DCMTK_CHARSET_CONVERSION_CONSTANTS], [/* character set conversion constants. */
 #define DCMTK_CHARSET_CONVERSION_ICU 1
 #define DCMTK_CHARSET_CONVERSION_ICONV 2
-#define DCMTK_CHARSET_CONVERSION_STDLIBC_ICONV 3])
+#define DCMTK_CHARSET_CONVERSION_STDLIBC_ICONV 3
+
+/* LFS mode constants. */
+#define DCMTK_LFS 1
+#define DCMTK_LFS64 2])
 
 CHARCONVINCLUDES=""
 CHARCONVLIBS=""
@@ -1413,25 +1430,313 @@ if [[ ! -z "$DCMTK_ENABLE_CHARSET_CONVERSION" ]]; then
     [Define to select character set conversion implementation.])
 fi
 
+
 dnl -------------------------------------------------------
-dnl C++11 support
+dnl include config test code from config/tests
 dnl -------------------------------------------------------
 
-AC_MSG_CHECKING(if the C++11 STL should be used)
-AC_ARG_WITH(cxx11-stl,
-[  --with-cxx11-stl        enable C++11 STL
-  --without-cxx11-stl     disable C++11 STL (default)],
-[ case "$withval" in
+ac_enable_cxx11="no"
+AC_MSG_CHECKING(whether to enable C++11 support)
+AC_ARG_ENABLE(cxx11,
+[  --enable-cxx11          use C++11
+  --disable-cxx11         do not use C++11 (default)],
+[ case "$enableval" in
   yes)
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(DCMTK_USE_CXX11_STL, , [Enable or disable C++11 while building DCMTK.])
+   AC_MSG_RESULT()
+   AX_CXX_COMPILE_STDCXX([11], [noext], [optional])
+   if test "$HAVE_CXX11 == 1"; then
+     ac_enable_cxx11="yes"
+   fi
+   AC_MSG_CHECKING(whether to enable C++11 support)
+   ;;
+
+  *)
+   ac_enable_cxx11="no"
+   ;;
+  esac ]
+)
+AC_MSG_RESULT($ac_enable_cxx11)
+
+
+dnl -------------------------------------------------------
+dnl Enable/disable STL support.
+dnl -------------------------------------------------------
+
+ac_enable_stl="no"
+AC_MSG_CHECKING(whether to enable STL support)
+AC_ARG_ENABLE(stl,
+[  --enable-stl            use C++ STL
+  --disable-stl           do not use C++ STL (default)],
+[ case "$enableval" in
+  yes)
+   ac_enable_stl="yes"
+   ;;
+
+  *)
+    ac_enable_stl="no"
     ;;
+  esac ]
+)
+AC_MSG_RESULT($ac_enable_stl)
+
+
+ac_enable_stl_vector="auto"
+AC_MSG_CHECKING(whether to enable STL vector support)
+AC_ARG_ENABLE(stl-vector,
+[  --enable-stl-vector     use C++ STL vector
+  --disable-stl-vector    do not use C++ STL vector],
+[ case "$enableval" in
+  yes)
+   ac_enable_stl_vector="yes"
+   ;;
+
   *)
-    AC_MSG_RESULT(no)
+    ac_enable_stl_vector="no"
     ;;
-  esac ],
-  AC_MSG_RESULT(no)
+  esac]
+)
+if test "$ac_enable_stl_vector" = "auto"; then
+  ac_enable_stl_vector="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_vector" = "yes"; then
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/vector.cc"]])], [AC_DEFINE(HAVE_STL_VECTOR, , [Define if STL's vector should be used.])], [ac_enable_stl_vector="unsupported -> no"])
+fi
+AC_MSG_RESULT($ac_enable_stl_vector)
+
+ac_enable_stl_algorithm="auto"
+AC_MSG_CHECKING(whether to enable STL algorithm support)
+AC_ARG_ENABLE(stl-algorithm,
+[  --enable-stl-algorithm  use C++ STL algorithm
+  --disable-stl-algorithm do not use C++ STL algorithm],
+[ case "$enableval" in
+  yes)
+   ac_enable_stl_algorithm="yes"
+   ;;
+
+  *)
+    ac_enable_stl_algorithm="no"
+    ;;
+  esac ]
 )
+if test "$ac_enable_stl_algorithm" = "auto"; then
+  ac_enable_stl_algorithm="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_algorithm" = "yes"; then
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/algo.cc"]])], [AC_DEFINE(HAVE_STL_ALGORITHM, , [Define if STL's algorithm should be used.])], [ac_enable_stl_algorithm="unsupported -> no"])
+fi
+AC_MSG_RESULT($ac_enable_stl_algorithm)
+
+ac_enable_stl_limits="auto"
+AC_MSG_CHECKING(whether to enable STL limits support)
+AC_ARG_ENABLE(stl-limits,
+[  --enable-stl-limits     use C++ STL limits
+  --disable-stl-limits    do not use C++ STL limits],
+[ case "$enableval" in
+  yes)
+   ac_enable_stl_limits="yes"
+   ;;
+
+  *)
+    ac_enable_stl_limits="no"
+    ;;
+  esac ]
+)
+if test "$ac_enable_stl_limits" = "auto"; then
+  ac_enable_stl_limits="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_limits" = "yes"; then
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/limits.cc"]])], [AC_DEFINE(HAVE_STL_LIMITS, , [Define if STL's limits should be used.])], [ac_enable_stl_limits="unsupported -> no"])
+fi
+AC_MSG_RESULT($ac_enable_stl_limits)
+
+ac_enable_stl_list="auto"
+AC_MSG_CHECKING(whether to enable STL list support)
+AC_ARG_ENABLE(stl-list,
+[  --enable-stl-list       use C++ STL list
+  --disable-stl-list      do not use C++ STL list],
+[ case "$enableval" in
+  yes)
+   ac_enable_stl_list="yes"
+   ;;
+
+  *)
+    ac_enable_stl_list="no"
+    ;;
+  esac ]
+)
+if test "$ac_enable_stl_list" = "auto"; then
+  ac_enable_stl_list="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_list" = "yes"; then
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/list.cc"]])], [AC_DEFINE(HAVE_STL_LIST, , [Define if STL's list should be used.])], [ac_enable_stl_list="unsupported -> no"])
+fi
+AC_MSG_RESULT($ac_enable_stl_list)
+
+ac_enable_stl_map="auto"
+AC_MSG_CHECKING(whether to enable STL map support)
+AC_ARG_ENABLE(stl-map,
+[  --enable-stl-map        use C++ STL map
+  --disable-stl-map       do not use C++ STL map],
+[ case "$enableval" in
+  yes)
+   ac_enable_stl_map="yes"
+   ;;
+
+  *)
+    ac_enable_stl_map="no"
+    ;;
+  esac ]
+)
+if test "$ac_enable_stl_map" = "auto"; then
+  ac_enable_stl_map="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_map" = "yes"; then
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/map.cc"]])], [AC_DEFINE(HAVE_STL_MAP, , [Define if STL's map should be used.])], [ac_enable_stl_map="unsupported -> no"])
+fi
+AC_MSG_RESULT($ac_enable_stl_map)
+
+ac_enable_stl_memory="auto"
+AC_MSG_CHECKING(whether to enable STL memory support)
+AC_ARG_ENABLE(stl-memory,
+[  --enable-stl-memory     use C++ STL memory
+  --disable-stl-memory    do not use C++ STL memory],
+[ case "$enableval" in
+  yes)
+   ac_enable_stl_memory="yes"
+   ;;
+
+  *)
+    ac_enable_stl_memory="no"
+    ;;
+  esac ]
+)
+if test "$ac_enable_stl_memory" = "auto"; then
+  ac_enable_stl_memory="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_memory" = "yes"; then
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/memory.cc"]])], [AC_DEFINE(HAVE_STL_MEMORY, , [Define if STL's memory should be used.])], [ac_enable_stl_memory="unsupported -> no"])
+fi
+AC_MSG_RESULT($ac_enable_stl_memory)
+
+ac_enable_stl_stack="auto"
+AC_MSG_CHECKING(whether to enable STL stack support)
+AC_ARG_ENABLE(stl-stack,
+[  --enable-stl-stack      use C++ STL stack
+  --disable-stl-stack     do not use C++ STL stack],
+[ case "$enableval" in
+  yes)
+   ac_enable_stl_stack="yes"
+   ;;
+
+  *)
+    ac_enable_stl_stack="no"
+    ;;
+  esac ]
+)
+if test "$ac_enable_stl_stack" = "auto"; then
+  ac_enable_stl_stack="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_stack" = "yes"; then
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/stack.cc"]])], [AC_DEFINE(HAVE_STL_STACK, , [Define if STL's stack should be used.])], []ac_enable_stl_stack="unsupported -> no")
+fi
+AC_MSG_RESULT($ac_enable_stl_stack)
+
+ac_enable_stl_string="auto"
+AC_MSG_CHECKING(whether to enable STL string support)
+AC_ARG_ENABLE(stl-string,
+[  --enable-stl-string     use C++ STL string
+  --disable-stl-string    do not use C++ STL string],
+[ case "$enableval" in
+  yes)
+   ac_enable_stl_string="yes"
+   ;;
+
+  *)
+    ac_enable_stl_string="no"
+    ;;
+  esac ]
+)
+if test "$ac_enable_stl_string" = "auto"; then
+  ac_enable_stl_string="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_string" = "yes"; then
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/string.cc"]])], [AC_DEFINE(HAVE_STL_STRING, , [Define if STL's string should be used.])], [ac_enable_stl_string="unsupported -> no"])
+fi
+AC_MSG_RESULT($ac_enable_stl_string)
+
+ac_enable_stl_type_traits="auto"
+AC_MSG_CHECKING(whether to enable STL type-traits support)
+AC_ARG_ENABLE(stl-type-traits,
+[  --enable-stl-type-traits
+                          use C++ STL type-traits
+  --disable-stl-type-traits
+                          do not use C++ STL type-traits],
+[ case "$enableval" in
+  yes)
+   ac_enable_stl_type_traits="yes"
+   ;;
+
+  *)
+    ac_enable_stl_type_traits="no"
+    ;;
+  esac ]
+)
+if test "$ac_enable_stl_type_traits" = "auto"; then
+  ac_enable_stl_type_traits="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_type_traits" = "yes"; then
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/ttraits.cc"]])], [AC_DEFINE(HAVE_STL_TYPE_TRAITS, , [Define if STL's type traits should be used.])], [ac_enable_stl_type_traits="unsupported -> no"])
+fi
+AC_MSG_RESULT($ac_enable_stl_type_traits)
+
+ac_enable_stl_tuple="auto"
+AC_MSG_CHECKING(whether to enable STL tuple support)
+AC_ARG_ENABLE(stl-tuple,
+[  --enable-stl-tuple      use C++ STL tuple
+  --disable-stl-tuple     do not use C++ STL tuple],
+[ case "$enableval" in
+  yes)
+   ac_enable_stl_tuple="yes"
+   ;;
+
+  *)
+    ac_enable_stl_tuple="no"
+    ;;
+  esac ]
+)
+if test "$ac_enable_stl_tuple" = "auto"; then
+  ac_enable_stl_tuple="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_tuple" = "yes"; then
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/tuple.cc"]])], [AC_DEFINE(HAVE_STL_TUPLE, , [Define if STL's tuple should be used.])], [ac_enable_stl_tuple="unsupported -> no"])
+fi
+AC_MSG_RESULT($ac_enable_stl_tuple)
+
+ac_enable_stl_system_error="auto"
+AC_MSG_CHECKING(whether to enable STL system_error support)
+AC_ARG_ENABLE(stl-system-error,
+[  --enable-stl-system-error
+                          use C++ STL system_error
+  --disable-stl-system_error
+                          do not use C++ STL system_error],
+[ case "$enableval" in
+  yes)
+   ac_enable_stl_system_error="yes"
+   ;;
+
+  *)
+    ac_enable_stl_system_error="no"
+    ;;
+  esac ]
+)
+if test "$ac_enable_stl_system_error" = "auto"; then
+  ac_enable_stl_system_error="$ac_enable_stl"
+fi
+if test "$ac_enable_stl_system_error" = "yes"; then
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/syserr.cc"]])], [AC_DEFINE(HAVE_STL_SYSTEM_ERROR, , [Define if STL's system_error should be used.])], [ac_enable_stl_system_error="unsupported -> no"])
+fi
+AC_MSG_RESULT($ac_enable_stl_system_error)
+
 
 dnl -------------------------------------------------------
 dnl Test for some additional functions and keywords
@@ -1442,7 +1747,6 @@ AC_CHECK_SYNC_FN([__sync_sub_and_fetch],[HAVE_SYNC_SUB_AND_FETCH])
 AC_CHECK_ALIGNOF([HAVE_GNU_ALIGNOF])
 AC_CHECK_ATTRIBUTE_ALIGNED([HAVE_ATTRIBUTE_ALIGNED])
 AC_CHECK_ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES([ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES])
-AC_CHECK_ALIGNAS_SUPPORTS_TYPEDEFS([ALIGNAS_SUPPORTS_TYPEDEFS])
 AC_CHECK_DEFAULT_CONSTRUCTOR_DETECTION_VIA_SFINAE([HAVE_DEFAULT_CONSTRUCTOR_DETECTION_VIA_SFINAE])
 
 dnl -------------------------------------------------------
diff --git a/config/docs/CMakeLists.txt b/config/docs/CMakeLists.txt
index eb46e4c..e2e3bd1 100644
--- a/config/docs/CMakeLists.txt
+++ b/config/docs/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(FILES config.txt dirstruc.txt envvars.txt macros.txt modules.txt DESTINATION ${DCMTK_INSTALL_DOCDIR} COMPONENT doc)
+INSTALL(FILES config.txt dirstruc.txt envvars.txt macros.txt modules.txt DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc)
diff --git a/config/docs/cxx11.dox b/config/docs/cxx11.dox
index b774289..ad47739 100644
--- a/config/docs/cxx11.dox
+++ b/config/docs/cxx11.dox
@@ -14,18 +14,21 @@ directly supports, for example:
 
 \li OFunique_ptr (std::unique_ptr)
 \li OFshared_ptr (std::shared_ptr)
+\li OFnumeric_limits (std::numeric_limits)
+\li OFtuple (std::tuple)
+\li OFerror_code (std::error_code)
 
 Since not every compiler supports C++11, legacy implementations for the
 respective functionality have been created, which are enabled <i>by default</i>.
 
 If you use C++11 in your project, you may want to use the native C++11 classes
-instead, so you don't need to convert your objects to use them with DCMTK.  To
-do so, you need to configure DCMTK to use the C++11 STL, which is described
-below.
+and features instead, so you don't need to convert your objects to use them
+with DCMTK.  To do so, you need to configure DCMTK to use the C++11 STL, which
+is described below.
 
-<h1>Enabling DCMTK to use the C++11 STL</h1>
+<h1>Enabling DCMTK to use C++11</h1>
 
-By enabling DCMTK to use the C++11 STL, you gain the following advantages:
+By enabling DCMTK to use C++11, you gain the following advantages:
 
 \li DCMTK will use available C++11 features instead of its only legacy
     implementations.  These are probably more efficient and complete.
@@ -33,15 +36,15 @@ By enabling DCMTK to use the C++11 STL, you gain the following advantages:
     DCMTK to assist you when checking for API/ABI (in-)compatibility between
     C++11 and non C++11 builds.
 
-Trying to include a DCMTK build with C++11 STL enabled from a non C++11
+Trying to include a DCMTK build with C++11 enabled from a non C++11
 environment will give you the following error message:
 
 @verbatim
-DCMTK was configured to use the C++11 STL, but your compiler is not configured for building with C++11 features.
+DCMTK was configured to use C++11 features, but your compiler does not or was not configured to provide them.
 @endverbatim
 
-To reduce DCMTK's implementation complexity, the C++11 STL shall only be used if
-your compiler <i>conforms closely</i> to the C++11 Standard.  As far as we know,
+To reduce DCMTK's implementation complexity, C++11 shall only be used if your
+compiler <i>conforms closely</i> to the C++11 Standard.  As far as we know,
 this is currently true for the following compilers:
 
 \li GNU C++ Compiler (g++) Version 4.8.1 or later.
@@ -52,65 +55,85 @@ Autoconf, see the appropriate section below:
 
 <h2>CMake</h2>
 
-CMake detects the C++11 compilers mentioned above and knows how to enable C++11
-features on these compilers.  If your compiler was detected successfully, CMake
-will give you the following message during configure:
+Request building with C++11 features by setting the option
+<kbd>DCMTK_ENABLE_CXX11</kbd> to <i>On</i>, for example via:
 
 @verbatim
-Info: Your compiler supports C++11. You may enable C++11 features via "DCMTK_USE_CXX11_STL" to create a C++11 build of DCMTK.
+cmake ... -DDCMTK_ENABLE_CXX11:BOOL=ON ...
 @endverbatim
 
-As mentioned in this message, you may enable the C++11 STL by setting
-<kbd>DCMTK_USE_CXX11_STL</kbd>, for example via:
+CMake detects the C++11 compilers and knows how to enable C++11 features on
+Clang, GCC and Intel compilers.  You can override the assumed compiler flags
+(for example to enable C++14 instead) by modifying
+<kbd>DCMTK_CXX11_FLAGS</kbd>, for example:
 
 @verbatim
-cmake ... -DDCMTK_USE_CXX11_STL:BOOL=ON
+cmake ... -DDCMTK_ENABLE_CXX11:BOOL=ON -DDCMTK_CXX11_FLAGS=-std=c++14 ...
 @endverbatim
 
-Doing so will give you the following message during configure:
+CMake will then perform basic checks to ensure the compiler is configured
+correctly and conforms closely enough to C++11 standard.  If everything
+works CMake will print something like this:
 
 @verbatim
-Info: Configured DCMTK to use native C++11 features.
+-- Checking whether the compiler supports C++11
+-- Checking whether the compiler supports C++11 -- yes
+-- Info: C++11 features enabled
 @endverbatim
 
-You may need to override the flags to enable C++11, for example to enable C++14
-instead.  Doing so can be done via <kbd>DCMTK_CXX11_FLAGS</kbd>, for example:
+<h3>Unsupported Compilers</h3>
+
+If our CMake setup does not know how to enable C++11 on your compiler, it will
+simply assume that no configuration is required (e.g. for Visual Studio).  If
+this is not appropriate you have to set <kbd>DCMTK_CXX11_FLAGS</kbd> manually
+as mentioned above.
+If you enable C++11 via <kbd>DCMTK_ENABLE_CXX11</kbd> for an unsupported
+compiler, CMake will simply set the flags provided via
+<kbd>DCMTK_CXX11_FLAGS</kbd> (if any) and still run the C++11 compatibility
+test to the compiler conforms closely enough to the C++11 standard for being
+able to compile DCMTK.  If it doesn't, CMake will give an output similar to
+this one:
 
 @verbatim
-cmake ... -DDCMTK_USE_CXX11_STL:BOOL=ON -DDCMTK_CXX11_FLAGS=-std=c++14
+-- Checking whether the compiler supports C++11
+-- Checking whether the compiler supports C++11 -- no
+-- Info: C++11 features disabled
 @endverbatim
 
-<h3>Unsupported Compilers</h3>
+At this point you will not be able to enable C++11 features for the given
+compiler, since building DCMTK would fail if you did.  If you are sure that
+your compiler supports C++11, you should try setting different flags as
+<kbd>DCMTK_CXX11_FLAGS</kbd>.
 
-If CMake does not know how to enable C++11 on your compiler or your compiler
-does not support C++11 completely, you will see the following warning message
-when you try to enable <kbd>DCMTK_USE_CXX11_STL</kbd> anyway:
+<h2>GNU Autoconf</h2>
+
+Our GNU Autoconf setup understands the switches <kbd>\--enable-cxx11</kbd>,
+and <kbd>\--disable-cxx11</kbd> that may be used to configure DCMTK to use
+C++11 features.  If you run
 
 @verbatim
-DCMTK has been configured to use the C++11 STL, but the compiler does not seem to support C++11.
-Override this warning by setting DCMTK_CXX11_FLAGS to tell DCMTK how to enable C++11 support for your compiler.
+configure --enable-cxx11
 @endverbatim
 
-As the message states, you need to take care about configuring your compiler for
-C++11 manually, for example by setting <kbd>CMAKE_CXX_FLAGS</kbd> appropriately.
-Setting <kbd>DCMTK_CXX11_FLAGS</kbd> instead will have the same result (CMake
-will set <kbd>CMAKE_CXX_FLAGS</kbd> based on <kbd>DCMTK_CXX_FLAGS</kbd>), but
-the warning goes away and instead you will see the following output:
+our Autoconf script will try to determine the required compiler flags for
+enabling C++11 features (if any) and perform configuration tests to ensure
+the compiler conforms closely enough to the C++11 standard.  If everything
+works it will give you an output similar to this one:
 
 @verbatim
-Info: Enabling C++11 support with custom flags "< YOUR FLAGS >" for a potentially unsupported compiler.
+checking whether to enable C++11 support...
+checking whether c++ supports C++11 features by default... no
+checking whether c++ supports C++11 features with -std=c++11... yes
+checking whether to enable C++11 support... yes
 @endverbatim
 
-<h2>GNU Autoconf</h2>
-
-Our GNU Autoconf setup understands the argument <kbd>\--with-cxx11-stl</kbd>,
-that may be used to configure DCMTK to use the C++11 STL.  But this only enables
-API/ABI checks and maps DCMTK's functionalities to the respective STL ones.  You
-still need to configure your compiler for C++11 manually, for example by setting
-the CXXFLAGS like this when using GCC 4.9:
+Otherwise, it will still disable C++11 features with an output like this:
 
 @verbatim
-./configure --with-cxx11-stl CXXFLAGS=-std=c++11
+checking whether to enable C++11 support...
+checking whether c++ supports C++11 features by default... no
+checking whether c++ supports C++11 features with -std=c++11... no
+checking whether to enable C++11 support... no
 @endverbatim
 
 */
diff --git a/config/docs/macros.txt b/config/docs/macros.txt
index 0133ee3..d50b7b9 100644
--- a/config/docs/macros.txt
+++ b/config/docs/macros.txt
@@ -55,13 +55,6 @@ DCMTK_GUI
     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
@@ -75,6 +68,15 @@ DISABLE_COMPRESSION_EXTENSION
   Explanation: Disables the support of compression (various transfer
     syntaxes) in dcmqrdb, a feature which is still experimental.
 
+DISABLE_FF_JPEG_BITSTREAM_PADDING
+  Affected: dcmjpeg, dcmjpls
+  Type of modification: Disables feature
+  Explanation: Starting with release 3.6.2, DCMTK pads JPEG and JPEG-LS
+    bitstreams that have odd length with an "extended" end of image (EOI)
+    marker, writing ff/ff/d9 instead of adding a zero byte after the
+    EOI marker, i.e. writing ff/d9/00. The old behaviour can be restored
+    by defining this macro.
+
 DISABLE_NAGLE_ALGORITHM
   Affected: dcmnet
   Type of modification: Disables feature
@@ -171,61 +173,6 @@ EXPERIMENTAL_READ_FROM_FILE
   Explanation: When this macro is defined, the relatively new function
     createValueFromTempFile() is used for reading large binary data files.
 
-HAVE_STD_STRING
-  Affected: ofstd
-  Type of modification: Activates feature
-  Explanation: When this macro is defined, the ANSI C++ standard string
-    class is used instead of DCMTK's own implementation.
-
-HAVE_STL
-  Affected: ofstd
-  Type of modification: Activates feature
-  Explanation: When this macro is defined, the STL (standard template
-    library) list, map, stack, vector and auto_ptr classes as well as
-    the STL algorithms are used instead of DCMTK's own implementations.
-
-HAVE_STL_ALGORITHMS
-  Affected: ofstd
-  Type of modification: Activates feature
-  Explanation: When this macro is defined, the STL (standard template
-    library) algorithms are used instead of DCMTK's own implementation.
-    Also see HAVE_STL.
-
-HAVE_STL_AUTO_PTR
-  Affected: ofstd
-  Type of modification: Activates feature
-  Explanation: When this macro is defined, the STL (standard template
-    library) auto_ptr class is used instead of DCMTK's own implementation.
-    Also see HAVE_STL.
-
-HAVE_STL_LIST
-  Affected: ofstd
-  Type of modification: Activates feature
-  Explanation: When this macro is defined, the STL (standard template
-    library) list class is used instead of DCMTK's own implementation.
-    Also see HAVE_STL.
-
-HAVE_STL_MAP
-  Affected: ofstd
-  Type of modification: Activates feature
-  Explanation: When this macro is defined, the STL (standard template
-    library) map class is used instead of DCMTK's own implementation.
-    Also see HAVE_STL.
-
-HAVE_STL_STACK
-  Affected: ofstd
-  Type of modification: Activates feature
-  Explanation: When this macro is defined, the STL (standard template
-    library) stack class is used instead of DCMTK's own implementation.
-    Also see HAVE_STL.
-
-HAVE_STL_VECTOR
-  Affected: ofstd
-  Type of modification: Activates feature
-  Explanation: When this macro is defined, the STL (standard template
-    library) vector class is used instead of DCMTK's own implementation.
-    Also see HAVE_STL.
-
 LOCK_IMAGE_FILES
   Affected: dcmpstat, dcmqrdb
   Type of modification: Activates experimental or rarely used feature
@@ -244,14 +191,6 @@ NO_GET_SUPPORT
   Type of modification: Disables feature
   Explanation: Disables the experimental C-GET support in dcmqrdb.
 
-NO_IOS_BASE_ASSIGN
-  Affected: all command line tools
-  Type of modification: Disables feature
-  Explanation: On Win32 platforms, the prepareCmdLineArgs() function
-    maps cout to cerr by assignment.  This does not work with all
-    iostream implementations and can, therefore, be disabled with this
-    macro.
-
 NO_PATIENTSTUDYONLY_SUPPORT
   Affected: dcmqrdb
   Type of modification: Disables feature
@@ -385,6 +324,15 @@ USE_NULL_SAFE_OFSTRING
     HAVE_STD_STRING is also defined.  Currently, this macro is always defined
     by DCMTK's Makefiles.  This will change in future releases.
 
+USE_WIN32_CREATE_MUTEX
+  Affected: ofstd
+  Type of modification: Activates alternative implementation
+  Explanation: Starting with DCMTK 3.6.2, the Win32 version of the
+    OFMutex class uses critical sections instead of Win32 mutexes, because
+    critical sections are much faster. Their only drawback is that they
+    cannot be shared across processes. Users who want to revert to the
+    behavior of older DCMTK releases can define this macro.
+
 USING_STD_NAMESPACE
   Affected: all modules
   Type of modification: Re-activated behavior of earlier DCMTK releases
diff --git a/config/include/dcmtk/config/osconfig.h.in b/config/include/dcmtk/config/osconfig.h.in
index 269b04a..aab5f42 100644
--- a/config/include/dcmtk/config/osconfig.h.in
+++ b/config/include/dcmtk/config/osconfig.h.in
@@ -20,13 +20,9 @@
 #ifdef __MINGW32__
 #define HAVE_WINDOWS_H 1
 #define HAVE_WINSOCK_H 1
-#define NO_IOS_BASE_ASSIGN 1
 #define ENVIRONMENT_PATH_SEPARATOR ';'
 #endif
 
-/* Define if alignas supports typedefs */
-#undef ALIGNAS_SUPPORTS_TYPEDEFS
-
 /* Define if __attribute__((aligned)) supports templates */
 #undef ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES
 
@@ -48,15 +44,19 @@
 #define DCMTK_CHARSET_CONVERSION_ICONV 2
 #define DCMTK_CHARSET_CONVERSION_STDLIBC_ICONV 3
 
+/* LFS mode constants. */
+#define DCMTK_LFS 1
+#define DCMTK_LFS64 2
+
 /* Define to select character set conversion implementation. */
 #undef DCMTK_ENABLE_CHARSET_CONVERSION
 
+/* Select LFS mode (defined above) that shall be used or don't define it */
+#undef DCMTK_ENABLE_LFS
+
 /* Define the DCMTK default path. */
 #undef DCMTK_PREFIX
 
-/* Enable or disable C++11 while building DCMTK. */
-#undef DCMTK_USE_CXX11_STL
-
 /* Empty default data dictionary path for the dcmdata library package. */
 #undef DCM_DICT_DEFAULT_PATH
 
@@ -149,6 +149,9 @@
 /* Define to 1 if you have the `cuserid' function. */
 #undef HAVE_CUSERID
 
+/* define if the compiler supports basic C++11 syntax */
+#undef HAVE_CXX11
+
 /* Define if bool is a built-in type */
 #undef HAVE_CXX_BOOL
 
@@ -271,6 +274,9 @@
 /* Define to 1 if you have the `getlogin' function. */
 #undef HAVE_GETLOGIN
 
+/* Define to 1 if you have the `getlogin_r' function. */
+#undef HAVE_GETLOGIN_R
+
 /* Define to 1 if you have the `getpid' function. */
 #undef HAVE_GETPID
 
@@ -358,9 +364,6 @@
 /* Define to 1 if you have the `itoa' function. */
 #undef HAVE_ITOA
 
-/* Define if LFS (large file support) is available */
-#undef HAVE_LFS_SUPPORT
-
 /* Define to 1 if you have the <libc.h> header file. */
 #undef HAVE_LIBC_H
 
@@ -557,12 +560,19 @@ typedef unsigned short ushort;
    sys/socket.h */
 #undef HAVE_PROTOTYPE_CONNECT
 
+/* Define if your system has a prototype for feenableexcept in fenv.h */
+#undef HAVE_PROTOTYPE_FEENABLEEXCEPT
+
 /* Define if your system has a prototype for finite in math.h */
 #undef HAVE_PROTOTYPE_FINITE
 
 /* Define if your system has a prototype for flock in sys/file.h */
 #undef HAVE_PROTOTYPE_FLOCK
 
+/* Define if your system has a prototype for gethostbyaddr_r in libc.h
+   unistd.h stdlib.h netdb.h */
+#undef HAVE_PROTOTYPE_GETHOSTBYADDR_R
+
 /* Define if your system has a prototype for gethostbyname in libc.h unistd.h
    stdlib.h netdb.h */
 #undef HAVE_PROTOTYPE_GETHOSTBYNAME
@@ -677,6 +687,9 @@ typedef unsigned short ushort;
 /* Define if OpenSSL provides the RAND_egd function. */
 #undef HAVE_RAND_EGD
 
+/* Define to 1 if you have the `readdir_r' function. */
+#undef HAVE_READDIR_R
+
 /* define if the compiler supports reinterpret_cast<> */
 #undef HAVE_REINTERPRET_CAST
 
@@ -756,6 +769,39 @@ typedef unsigned short ushort;
 /* Define if the compiler supports std::nothrow */
 #undef HAVE_STD__NOTHROW
 
+/* Define if STL's algorithm should be used. */
+#undef HAVE_STL_ALGORITHM
+
+/* Define if STL's limits should be used. */
+#undef HAVE_STL_LIMITS
+
+/* Define if STL's list should be used. */
+#undef HAVE_STL_LIST
+
+/* Define if STL's map should be used. */
+#undef HAVE_STL_MAP
+
+/* Define if STL's memory should be used. */
+#undef HAVE_STL_MEMORY
+
+/* Define if STL's stack should be used. */
+#undef HAVE_STL_STACK
+
+/* Define if STL's string should be used. */
+#undef HAVE_STL_STRING
+
+/* Define if STL's system_error should be used. */
+#undef HAVE_STL_SYSTEM_ERROR
+
+/* Define if STL's tuple should be used. */
+#undef HAVE_STL_TUPLE
+
+/* Define if STL's type traits should be used. */
+#undef HAVE_STL_TYPE_TRAITS
+
+/* Define if STL's vector should be used. */
+#undef HAVE_STL_VECTOR
+
 /* Define to 1 if you have the `strchr' function. */
 #undef HAVE_STRCHR
 
@@ -1102,10 +1148,9 @@ typedef unsigned short ushort;
 /* Define to int if undefined. */
 #undef socklen_t
 
-#if defined(DCMTK_USE_CXX11_STL) && defined(__cplusplus) && __cplusplus < 201103L
+#if defined(HAVE_CXX11) && defined(__cplusplus) && __cplusplus < 201103L
 #error\
- DCMTK was configured to use the C++11 STL, but your compiler is not configured\
- for building with C++11 features.
+DCMTK was configured to use C++11 features, but your compiler does not or was not configured to provide them.
 #endif
 
 #endif /* OSCONFIG_H */
diff --git a/config/stdcxx.m4 b/config/stdcxx.m4
new file mode 100644
index 0000000..f99ce54
--- /dev/null
+++ b/config/stdcxx.m4
@@ -0,0 +1,980 @@
+# ===========================================================================
+#  https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
+#
+# DESCRIPTION
+#
+#   Check for baseline language coverage in the compiler for the specified
+#   version of the C++ standard.  If necessary, add switches to CXX and
+#   CXXCPP to enable support.  VERSION may be '11' (for the C++11 standard)
+#   or '14' (for the C++14 standard).
+#
+#   The second argument, if specified, indicates whether you insist on an
+#   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
+#   -std=c++11).  If neither is specified, you get whatever works, with
+#   preference for an extended mode.
+#
+#   The third argument, if specified 'mandatory' or if left unspecified,
+#   indicates that baseline support for the specified C++ standard is
+#   required and that the macro should error out if no mode with that
+#   support is found.  If specified 'optional', then configuration proceeds
+#   regardless, after defining HAVE_CXX${VERSION} if and only if a
+#   supporting mode is found.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Benjamin Kosnik <bkoz at redhat.com>
+#   Copyright (c) 2012 Zack Weinberg <zackw at panix.com>
+#   Copyright (c) 2013 Roy Stogner <roystgnr at ices.utexas.edu>
+#   Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov at google.com>
+#   Copyright (c) 2015 Paul Norman <penorman at mac.com>
+#   Copyright (c) 2015 Moritz Klammler <moritz at klammler.eu>
+#   Copyright (c) 2016 Krzesimir Nowak <qdlacz at gmail.com>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.  This file is offered as-is, without any
+#   warranty.
+
+#serial 7
+
+dnl  This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
+dnl  (serial version number 13).
+
+AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
+  m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
+        [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
+        [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
+        [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
+  m4_if([$2], [], [],
+        [$2], [ext], [],
+        [$2], [noext], [],
+        [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
+  m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
+        [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
+        [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
+        [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
+  AC_LANG_PUSH([C++])dnl
+  ac_success=no
+  AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
+  ax_cv_cxx_compile_cxx$1,
+  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+    [ax_cv_cxx_compile_cxx$1=yes],
+    [ax_cv_cxx_compile_cxx$1=no])])
+  if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
+    ac_success=yes
+  fi
+
+  m4_if([$2], [noext], [], [dnl
+  if test x$ac_success = xno; then
+    for alternative in ${ax_cxx_compile_alternatives}; do
+      switch="-std=gnu++${alternative}"
+      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+      AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+                     $cachevar,
+        [ac_save_CXX="$CXX"
+         CXX="$CXX $switch"
+         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+          [eval $cachevar=yes],
+          [eval $cachevar=no])
+         CXX="$ac_save_CXX"])
+      if eval test x\$$cachevar = xyes; then
+        CXX="$CXX $switch"
+        if test -n "$CXXCPP" ; then
+          CXXCPP="$CXXCPP $switch"
+        fi
+        ac_success=yes
+        break
+      fi
+    done
+  fi])
+
+  m4_if([$2], [ext], [], [dnl
+  if test x$ac_success = xno; then
+    dnl HP's aCC needs +std=c++11 according to:
+    dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
+    dnl Cray's crayCC needs "-h std=c++11"
+    for alternative in ${ax_cxx_compile_alternatives}; do
+      for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
+        cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+        AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+                       $cachevar,
+          [ac_save_CXX="$CXX"
+           CXX="$CXX $switch"
+           AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+            [eval $cachevar=yes],
+            [eval $cachevar=no])
+           CXX="$ac_save_CXX"])
+        if eval test x\$$cachevar = xyes; then
+          CXX="$CXX $switch"
+          if test -n "$CXXCPP" ; then
+            CXXCPP="$CXXCPP $switch"
+          fi
+          ac_success=yes
+          break
+        fi
+      done
+      if test x$ac_success = xyes; then
+        break
+      fi
+    done
+  fi])
+  AC_LANG_POP([C++])
+  if test x$ax_cxx_compile_cxx$1_required = xtrue; then
+    if test x$ac_success = xno; then
+      AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
+    fi
+  fi
+  if test x$ac_success = xno; then
+    HAVE_CXX$1=0
+    AC_MSG_NOTICE([No compiler with C++$1 support was found])
+  else
+    HAVE_CXX$1=1
+    AC_DEFINE(HAVE_CXX$1,1,
+              [define if the compiler supports basic C++$1 syntax])
+  fi
+  AC_SUBST(HAVE_CXX$1)
+])
+
+
+dnl  Test body for checking C++11 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+)
+
+
+dnl  Test body for checking C++14 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+)
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_17
+)
+
+dnl  Tests for new features in C++11
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
+
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201103L
+
+#error "This is not a C++11 compiler"
+
+#else
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      static constexpr auto value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+#endif  // __cplusplus >= 201103L
+
+]])
+
+
+dnl  Tests for new features in C++14
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
+
+// If the compiler admits that it is not ready for C++14, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201402L
+
+#error "This is not a C++14 compiler"
+
+#else
+
+namespace cxx14
+{
+
+  namespace test_polymorphic_lambdas
+  {
+
+    int
+    test()
+    {
+      const auto lambda = [](auto&&... args){
+        const auto istiny = [](auto x){
+          return (sizeof(x) == 1UL) ? 1 : 0;
+        };
+        const int aretiny[] = { istiny(args)... };
+        return aretiny[0];
+      };
+      return lambda(1, 1L, 1.0f, '1');
+    }
+
+  }
+
+  namespace test_binary_literals
+  {
+
+    constexpr auto ivii = 0b0000000000101010;
+    static_assert(ivii == 42, "wrong value");
+
+  }
+
+  namespace test_generalized_constexpr
+  {
+
+    template < typename CharT >
+    constexpr unsigned long
+    strlen_c(const CharT *const s) noexcept
+    {
+      auto length = 0UL;
+      for (auto p = s; *p; ++p)
+        ++length;
+      return length;
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("x") == 1UL, "");
+    static_assert(strlen_c("test") == 4UL, "");
+    static_assert(strlen_c("another\0test") == 7UL, "");
+
+  }
+
+  namespace test_lambda_init_capture
+  {
+
+    int
+    test()
+    {
+      auto x = 0;
+      const auto lambda1 = [a = x](int b){ return a + b; };
+      const auto lambda2 = [a = lambda1(x)](){ return a; };
+      return lambda2();
+    }
+
+  }
+
+  namespace test_digit_separators
+  {
+
+    constexpr auto ten_million = 100'000'000;
+    static_assert(ten_million == 100000000, "");
+
+  }
+
+  namespace test_return_type_deduction
+  {
+
+    auto f(int& x) { return x; }
+    decltype(auto) g(int& x) { return x; }
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static constexpr auto value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static constexpr auto value = true;
+    };
+
+    int
+    test()
+    {
+      auto x = 0;
+      static_assert(is_same<int, decltype(f(x))>::value, "");
+      static_assert(is_same<int&, decltype(g(x))>::value, "");
+      return x;
+    }
+
+  }
+
+}  // namespace cxx14
+
+#endif  // __cplusplus >= 201402L
+
+]])
+
+
+dnl  Tests for new features in C++17
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
+
+// If the compiler admits that it is not ready for C++17, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus <= 201402L
+
+#error "This is not a C++17 compiler"
+
+#else
+
+#if defined(__clang__)
+  #define REALLY_CLANG
+#else
+  #if defined(__GNUC__)
+    #define REALLY_GCC
+  #endif
+#endif
+
+#include <initializer_list>
+#include <utility>
+#include <type_traits>
+
+namespace cxx17
+{
+
+#if !defined(REALLY_CLANG)
+  namespace test_constexpr_lambdas
+  {
+
+    // TODO: test it with clang++ from git
+
+    constexpr int foo = [](){return 42;}();
+
+  }
+#endif // !defined(REALLY_CLANG)
+
+  namespace test::nested_namespace::definitions
+  {
+
+  }
+
+  namespace test_fold_expression
+  {
+
+    template<typename... Args>
+    int multiply(Args... args)
+    {
+      return (args * ... * 1);
+    }
+
+    template<typename... Args>
+    bool all(Args... args)
+    {
+      return (args && ...);
+    }
+
+  }
+
+  namespace test_extended_static_assert
+  {
+
+    static_assert (true);
+
+  }
+
+  namespace test_auto_brace_init_list
+  {
+
+    auto foo = {5};
+    auto bar {5};
+
+    static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
+    static_assert(std::is_same<int, decltype(bar)>::value);
+  }
+
+  namespace test_typename_in_template_template_parameter
+  {
+
+    template<template<typename> typename X> struct D;
+
+  }
+
+  namespace test_fallthrough_nodiscard_maybe_unused_attributes
+  {
+
+    int f1()
+    {
+      return 42;
+    }
+
+    [[nodiscard]] int f2()
+    {
+      [[maybe_unused]] auto unused = f1();
+
+      switch (f1())
+      {
+      case 17:
+        f1();
+        [[fallthrough]];
+      case 42:
+        f1();
+      }
+      return f1();
+    }
+
+  }
+
+  namespace test_extended_aggregate_initialization
+  {
+
+    struct base1
+    {
+      int b1, b2 = 42;
+    };
+
+    struct base2
+    {
+      base2() {
+        b3 = 42;
+      }
+      int b3;
+    };
+
+    struct derived : base1, base2
+    {
+        int d;
+    };
+
+    derived d1 {{1, 2}, {}, 4};  // full initialization
+    derived d2 {{}, {}, 4};      // value-initialized bases
+
+  }
+
+  namespace test_general_range_based_for_loop
+  {
+
+    struct iter
+    {
+      int i;
+
+      int& operator* ()
+      {
+        return i;
+      }
+
+      const int& operator* () const
+      {
+        return i;
+      }
+
+      iter& operator++()
+      {
+        ++i;
+        return *this;
+      }
+    };
+
+    struct sentinel
+    {
+      int i;
+    };
+
+    bool operator== (const iter& i, const sentinel& s)
+    {
+      return i.i == s.i;
+    }
+
+    bool operator!= (const iter& i, const sentinel& s)
+    {
+      return !(i == s);
+    }
+
+    struct range
+    {
+      iter begin() const
+      {
+        return {0};
+      }
+
+      sentinel end() const
+      {
+        return {5};
+      }
+    };
+
+    void f()
+    {
+      range r {};
+
+      for (auto i : r)
+      {
+        [[maybe_unused]] auto v = i;
+      }
+    }
+
+  }
+
+  namespace test_lambda_capture_asterisk_this_by_value
+  {
+
+    struct t
+    {
+      int i;
+      int foo()
+      {
+        return [*this]()
+        {
+          return i;
+        }();
+      }
+    };
+
+  }
+
+  namespace test_enum_class_construction
+  {
+
+    enum class byte : unsigned char
+    {};
+
+    byte foo {42};
+
+  }
+
+  namespace test_constexpr_if
+  {
+
+    template <bool cond>
+    int f ()
+    {
+      if constexpr(cond)
+      {
+        return 13;
+      }
+      else
+      {
+        return 42;
+      }
+    }
+
+  }
+
+  namespace test_selection_statement_with_initializer
+  {
+
+    int f()
+    {
+      return 13;
+    }
+
+    int f2()
+    {
+      if (auto i = f(); i > 0)
+      {
+        return 3;
+      }
+
+      switch (auto i = f(); i + 4)
+      {
+      case 17:
+        return 2;
+
+      default:
+        return 1;
+      }
+    }
+
+  }
+
+#if !defined(REALLY_CLANG)
+  namespace test_template_argument_deduction_for_class_templates
+  {
+
+    // TODO: test it with clang++ from git
+
+    template <typename T1, typename T2>
+    struct pair
+    {
+      pair (T1 p1, T2 p2)
+        : m1 {p1},
+          m2 {p2}
+      {}
+
+      T1 m1;
+      T2 m2;
+    };
+
+    void f()
+    {
+      [[maybe_unused]] auto p = pair{13, 42u};
+    }
+
+  }
+#endif // !defined(REALLY_CLANG)
+
+  namespace test_non_type_auto_template_parameters
+  {
+
+    template <auto n>
+    struct B
+    {};
+
+    B<5> b1;
+    B<'a'> b2;
+
+  }
+
+#if !defined(REALLY_CLANG)
+  namespace test_structured_bindings
+  {
+
+    // TODO: test it with clang++ from git
+
+    int arr[2] = { 1, 2 };
+    std::pair<int, int> pr = { 1, 2 };
+
+    auto f1() -> int(&)[2]
+    {
+      return arr;
+    }
+
+    auto f2() -> std::pair<int, int>&
+    {
+      return pr;
+    }
+
+    struct S
+    {
+      int x1 : 2;
+      volatile double y1;
+    };
+
+    S f3()
+    {
+      return {};
+    }
+
+    auto [ x1, y1 ] = f1();
+    auto& [ xr1, yr1 ] = f1();
+    auto [ x2, y2 ] = f2();
+    auto& [ xr2, yr2 ] = f2();
+    const auto [ x3, y3 ] = f3();
+
+  }
+#endif // !defined(REALLY_CLANG)
+
+#if !defined(REALLY_CLANG)
+  namespace test_exception_spec_type_system
+  {
+
+    // TODO: test it with clang++ from git
+
+    struct Good {};
+    struct Bad {};
+
+    void g1() noexcept;
+    void g2();
+
+    template<typename T>
+    Bad
+    f(T*, T*);
+
+    template<typename T1, typename T2>
+    Good
+    f(T1*, T2*);
+
+    static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
+
+  }
+#endif // !defined(REALLY_CLANG)
+
+  namespace test_inline_variables
+  {
+
+    template<class T> void f(T)
+    {}
+
+    template<class T> inline T g(T)
+    {
+      return T{};
+    }
+
+    template<> inline void f<>(int)
+    {}
+
+    template<> int g<>(int)
+    {
+      return 5;
+    }
+
+  }
+
+}  // namespace cxx17
+
+#endif  // __cplusplus <= 201402L
+
+]])
\ No newline at end of file
diff --git a/config/tests/algo.cc b/config/tests/algo.cc
new file mode 100644
index 0000000..395c102
--- /dev/null
+++ b/config/tests/algo.cc
@@ -0,0 +1,58 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Thorben Hasenpusch
+ *
+ *  Purpose: Rudimentary tests for a working <algorithm> implementation
+ */
+
+#include <algorithm>
+#include <vector>
+
+struct X {
+    int *n;
+
+    void operator()(int x)
+    {
+        ++*n;
+    }
+};
+
+int main()
+{
+    std::vector<int> vec;
+    vec.push_back(1);
+    vec.push_back(2);
+
+    int n = 0;
+
+    X x;
+    x.n = &n;
+
+    std::for_each(vec.begin(), vec.end(), x);
+
+    if (n != 2) {
+        return -1;
+    }
+
+    if (std::find(vec.begin(), vec.end(), 44) != vec.end()) {
+        return -1;
+    }
+
+    if (std::adjacent_find(vec.begin(), vec.end()) != vec.end()) {
+        return -1;
+    }
+
+    return 0;
+}
diff --git a/config/arith.cc b/config/tests/arith.cc
similarity index 95%
rename from config/arith.cc
rename to config/tests/arith.cc
index 7806944..b23d18a 100644
--- a/config/arith.cc
+++ b/config/tests/arith.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2014, OFFIS e.V.
+ *  Copyright (C) 2014-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,18 +27,34 @@
 #define INCLUDE_CMATH
 #define INCLUDE_CSETJMP
 #define INCLUDE_CSIGNAL
-#include "math.cc"
+#include "../math.cc"
 
 #ifdef HAVE_FENV_H
 // For controlling floating point exceptions on Unix like systems.
 #include <fenv.h>
 #endif
 
+#ifdef HAVE_IEEEFP_H
+// For controlling floating point exceptions on Unix like systems
+// that don't have feenableexcept and fedisableexcept.
+#include <ieeefp.h>
+#endif
+
 #ifdef __APPLE__
 // For controlling floating point exceptions on OS X.
 #include <xmmintrin.h>
 #endif
 
+#ifdef HAVE_SETJMP_H
+// For setjmp for the SunPro compiler
+#include <setjmp.h>
+#endif
+
+#ifdef HAVE_SIGNAL_H
+// For signal for the SunPro compiler
+#include <signal.h>
+#endif
+
 // hackish definition of cout, as we can't depend on
 // OFConsole.
 #define COUT STD_NAMESPACE cout
@@ -116,6 +132,7 @@ static int test_modulo()
 template<typename FN>
 static int test_trap( const FN& fn )
 {
+    register_signals();
 #ifndef _WIN32
     // On Unix like systems, we use the
     // longjmp-module specifically designed for
@@ -319,8 +336,11 @@ static void provoke_snan()
     _controlfp( _controlfp(0,0) & ~_EM_INVALID, _MCW_EM );
 #elif defined(__APPLE__)
     _MM_SET_EXCEPTION_MASK( _MM_GET_EXCEPTION_MASK() & ~_MM_MASK_INVALID );
-#elif defined(HAVE_FENV_H)
+#elif defined(HAVE_FENV_H) && defined(HAVE_PROTOTYPE_FEENABLEEXCEPT)
     feenableexcept( FE_INVALID );
+#elif defined(HAVE_IEEEFP_H)
+    fp_except cw = fpgetmask();
+    fpsetmask(cw | FP_X_INV | FP_X_DZ | FP_X_OFL);
 #endif
     // Visual Studio will emit an exception the moment
     // we assign a signaling NaN to another float variable
@@ -346,8 +366,11 @@ static int test_snan( STD_NAMESPACE ostream& out, const char* name )
     feclearexcept( FE_INVALID );
 #ifdef __APPLE__
     _MM_SET_EXCEPTION_MASK( _MM_GET_EXCEPTION_MASK() | _MM_MASK_INVALID );
-#else
+#elif defined(HAVE_FENV_H) && defined(HAVE_PROTOTYPE_FEENABLEEXCEPT)
     fedisableexcept( FE_INVALID );
+#elif defined(HAVE_IEEEFP_H)
+    fp_except cw = fpgetmask();
+    fpsetmask(cw & ~(FP_X_INV | FP_X_DZ | FP_X_OFL));
 #endif
 #endif
     // Print and return the result
@@ -383,13 +406,6 @@ static void test_iec559( STD_NAMESPACE ostream& out, const char* name, int reqs
     );
 }
 
-#ifndef _WIN32
-template<typename T>
-static int is_subnormal( T t )
-{
-    return !STD_NAMESPACE isnormal( t );
-}
-#else
 static int is_subnormal( float f )
 {
 // Wine does not implement _fpclassf, so don't use it when cross compiling for Windows
@@ -397,15 +413,18 @@ static int is_subnormal( float f )
 #if defined(HAVE_PROTOTYPE__FPCLASSF) && !( defined(DCMTK_CROSS_COMPILING) && defined(_WIN32) )
     return ( _fpclassf( f ) & ( _FPCLASS_ND | _FPCLASS_PD ) ) != 0;
 #else
-    return (((unsigned char*)&f)[(FLT_MANT_DIG - 1) / 8] & (1u << ((FLT_MANT_DIG - 1) % 8))) == 0;
+    return f != 0.0f && ( f < 0.0f ? -f < FLT_MIN : f < FLT_MIN );
 #endif
 }
 
 static int is_subnormal( double d )
 {
+#ifdef _WIN32
     return ( _fpclass( d ) & ( _FPCLASS_ND | _FPCLASS_PD ) ) != 0;
-}
+#else
+    return d != 0.0 && ( d < 0.0 ? -d < DBL_MIN : d < DBL_MIN );
 #endif
+}
 
 template<typename T>
 static void test_subnormal( STD_NAMESPACE ostream& out, const char* name )
@@ -536,7 +555,6 @@ int main( int argc, char** argv )
               << STD_NAMESPACE setw(7) << STD_NAMESPACE internal << "TRAPS"
               << STD_NAMESPACE setw(7) << STD_NAMESPACE internal << "MODULO" << OFendl;
 
-    register_signals();
     inspect<char>( out, "char" );
     inspect<signed char>( out, "signed char" );
     inspect<unsigned char>( out, "unsigned char" );
diff --git a/config/tests/cxx11.cc b/config/tests/cxx11.cc
new file mode 100644
index 0000000..e1d023d
--- /dev/null
+++ b/config/tests/cxx11.cc
@@ -0,0 +1,303 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Thorben Hasenpusch
+ *
+ *  Purpose: Presents constructs that every C++11 compliant
+ *           compiler should be able to compile.
+ */
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201103L
+
+#error "This is not a C++11 compiler"
+
+#else
+
+int main()
+{
+    return 0;
+}
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      static constexpr auto value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+#endif  // __cplusplus >= 201103L
diff --git a/config/tests/lfs.c b/config/tests/lfs.c
new file mode 100644
index 0000000..b7441c0
--- /dev/null
+++ b/config/tests/lfs.c
@@ -0,0 +1,30 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Jan Schlamelcher
+ *
+ *  Purpose: Testing for large file support (LFS)
+ */
+
+#include <sys/types.h>
+/* Check that off_t can represent 2**63 - 1 correctly. */
+/* We can't simply define LARGE_OFF_T to be 9223372036854775807, */
+/* since some C++ compilers masquerading as C compilers */
+/* incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+int main()
+{
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1];
+  return 0;
+}
diff --git a/config/tests/lfs64.cc b/config/tests/lfs64.cc
new file mode 100644
index 0000000..f6cd329
--- /dev/null
+++ b/config/tests/lfs64.cc
@@ -0,0 +1,29 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Jan Schlamelcher
+ *
+ *  Purpose: Testing for explicit large file support (LFS64)
+ */
+
+#define _LARGEFILE64_SOURCE
+#include <stdio.h>
+
+using namespace std;
+
+int main()
+{
+  FILE *f = fopen64("name", "r");
+  return 0;
+}
diff --git a/config/tests/limits.cc b/config/tests/limits.cc
new file mode 100644
index 0000000..b3aa762
--- /dev/null
+++ b/config/tests/limits.cc
@@ -0,0 +1,44 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Thorben Hasenpusch
+ *
+ *  Purpose: Rudimentary tests for a working <limits> implementation.
+ */
+
+#include <limits>
+#include <climits>
+
+int main()
+{
+    if (!std::numeric_limits<signed char>::is_signed) {
+        return -1;
+    }
+
+    if (std::numeric_limits<float>::is_iec559) {
+        if (!std::numeric_limits<float>::has_infinity) {
+            return -1;
+        }
+    }
+
+    if (std::numeric_limits<int>::max() != INT_MAX) {
+        return -1;
+    }
+
+    if (std::numeric_limits<int>::digits != CHAR_BIT * sizeof(int) - 1) {
+        return -1;
+    }
+
+    return 0;
+}
diff --git a/config/tests/list.cc b/config/tests/list.cc
new file mode 100644
index 0000000..110d593
--- /dev/null
+++ b/config/tests/list.cc
@@ -0,0 +1,69 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Thorben Hasenpusch
+ *
+ *  Purpose: Rudimentary tests for a working <list> implementation.
+ */
+
+#include <list>
+
+int main()
+{
+    std::list<int> l;
+
+    if (!l.empty()) {
+        return -1;
+    }
+
+    l.push_back(18);
+    l.push_back(22);
+    l.push_front(2);
+
+    if (*l.begin() != 2) {
+        return -1;
+    }
+
+    l.reverse();
+
+    if (*l.begin() != 22) {
+        return -1;
+    }
+
+    int sum = 0;
+    for (std::list<int>::iterator it = l.begin(); it != l.end(); ++it) {
+        sum += *it;
+    }
+
+    if (sum != 42) {
+        return -1;
+    }
+
+    // ensure iterators are NOT invalidated by swap()
+    std::list<int>::iterator it = l.begin();
+    std::list<int> m;
+    m.push_back(23);
+    l.swap(m);
+    if (it != m.begin()) {
+        return -1;
+    }
+
+    // test whether we can compare const and mutable iterators
+    std::list<int>::const_iterator cit = m.begin();
+    if (it != cit) {
+        return -1;
+    }
+
+    return 0;
+}
diff --git a/config/tests/map.cc b/config/tests/map.cc
new file mode 100644
index 0000000..408df65
--- /dev/null
+++ b/config/tests/map.cc
@@ -0,0 +1,59 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Thorben Hasenpusch
+ *
+ *  Purpose: Rudimentary tests for a working <map> implementation.
+ */
+
+#include <map>
+
+int main()
+{
+    std::map<int, int> m;
+
+    if (!m.empty()) {
+        return -1;
+    }
+
+    m[3] = 555;
+    m[66] = 2;
+    m[42] = 42;
+
+    if (m.size() != 3) {
+        return -1;
+    }
+
+    if (m[3] != 555) {
+        return -1;
+    }
+
+    if (m[42] != 42) {
+        return -1;
+    }
+
+    m.erase(m.find(3));
+
+    if (m.find(3) != m.end()) {
+        return -1;
+    }
+
+    m.clear();
+
+    if (!m.empty()) {
+        return -1;
+    }
+
+    return 0;
+}
diff --git a/config/tests/memory.cc b/config/tests/memory.cc
new file mode 100644
index 0000000..d7656fe
--- /dev/null
+++ b/config/tests/memory.cc
@@ -0,0 +1,55 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Thorben Hasenpusch
+ *
+ *  Purpose: Rudimentary tests for a working <memory> implementation.
+ */
+
+#include <memory>
+
+int main()
+{
+    int *p = new int(55);
+
+    std::unique_ptr<int> pp(p);
+
+    if (*p != *pp) {
+        return -1;
+    }
+
+    if (p != pp.get()) {
+        return -1;
+    }
+
+    pp.release();
+
+    std::shared_ptr<int> s_p(p);
+    std::shared_ptr<int> s_p2(s_p);
+    std::shared_ptr<int> s_p3(s_p2);
+
+    if (s_p.get() != s_p3.get()) {
+        return -1;
+    }
+
+    if (s_p.use_count() != 3) {
+        return -1;
+    }
+
+    if (*s_p != *s_p3) {
+        return -1;
+    }
+
+    return 0;
+}
diff --git a/config/tests/stack.cc b/config/tests/stack.cc
new file mode 100644
index 0000000..bbb8e75
--- /dev/null
+++ b/config/tests/stack.cc
@@ -0,0 +1,44 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Thorben Hasenpusch
+ *
+ *  Purpose: Rudimentary tests for a working <stack> implementation.
+ */
+
+#include <stack>
+
+int main()
+{
+    std::stack<int> s;
+
+    if (!s.empty()) {
+        return -1;
+    }
+
+    s.push(1);
+    s.push(2);
+    s.push(3);
+
+    s.pop();
+    s.pop();
+
+    s.push(42);
+
+    if (s.top() != 42) {
+        return -1;
+    }
+
+    return 0;
+}
diff --git a/config/tests/string.cc b/config/tests/string.cc
new file mode 100644
index 0000000..4dd40fe
--- /dev/null
+++ b/config/tests/string.cc
@@ -0,0 +1,49 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Thorben Hasenpusch
+ *
+ *  Purpose: Rudimentary tests for a working <string> implementation.
+ */
+
+#include <string>
+
+int main()
+{
+    std::string s = "TEST";
+
+    if (s[1] != 'E') {
+        return -1;
+    }
+
+    s += "HAHA";
+
+    if (s[5] != 'A') {
+        return -1;
+    }
+
+    std::string sub = s.substr(4);
+
+    if ("HAHA" != sub) {
+        return -1;
+    }
+
+    s.replace(0, 4, "HAHA");
+
+    if (s != "HAHAHAHA") {
+        return -1;
+    }
+
+    return 0;
+}
diff --git a/config/tests/syserr.cc b/config/tests/syserr.cc
new file mode 100644
index 0000000..1a5e848
--- /dev/null
+++ b/config/tests/syserr.cc
@@ -0,0 +1,58 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Thorben Hasenpusch
+ *
+ *  Purpose: Rudimentary tests for a working <system_error> implementation.
+ */
+
+#include <system_error>
+
+#include <cstring>
+
+#ifdef _WIN32
+#include <Windows.h>
+#endif
+
+int main()
+{
+    // Not much to test, really.
+
+    if (strcmp(std::generic_category().name(), "generic") != 0) {
+        return -1;
+    }
+
+    if (strcmp(std::system_category().name(), "system") != 0) {
+        return -1;
+    }
+
+#ifdef _WIN32
+    // Visual Studio might be using strerror for both categories.
+
+    // Test with the highest numbered WINAPI error code; highly unlikely that there exists an equal-numbered errno.
+    std::system_error system_err(ERROR_API_UNAVAILABLE, std::system_category());
+    std::system_error generic_err(ERROR_API_UNAVAILABLE, std::generic_category());
+
+    // The system error message should be retrieved using FormatMessage(),
+    // while the generic error message should be retrieved with strerror and be something like "unknown error",
+    // since it isn't a valid errno.
+    // The point is, these two should result in different messages.
+
+    if (strcmp(system_err.what(), generic_err.what()) == 0) {
+        // Visual Studio messed up, what a surprise...
+        return -1;
+    }
+#endif
+    return 0;
+}
diff --git a/config/tests/ttraits.cc b/config/tests/ttraits.cc
new file mode 100644
index 0000000..3be4e0f
--- /dev/null
+++ b/config/tests/ttraits.cc
@@ -0,0 +1,65 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Thorben Hasenpusch
+ *
+ *  Purpose: Rudimentary tests for a working <type_traits> implementation.
+ */
+
+#include <type_traits>
+
+class A{};
+
+class B{ virtual ~B(); };
+
+int main()
+{
+    if (!std::is_void<void>::value) {
+        return -1;
+    }
+
+    if (!std::is_pointer<void *>::value) {
+        return -1;
+    }
+
+    if (!std::is_class<A>::value) {
+        return -1;
+    }
+
+    if (!std::is_volatile<volatile int>::value) {
+        return -1;
+    }
+
+    if (!std::is_empty<A>::value) {
+        return -1;
+    }
+
+    if (!std::has_virtual_destructor<B>::value) {
+        return -1;
+    }
+
+    if (std::is_empty<B>::value) {
+        return -1;
+    }
+
+    if (std::is_const<std::remove_const<const int>>::value) {
+        return -1;
+    }
+
+    if (!std::is_same<std::enable_if<std::is_empty<A>::value, int>::type, int>::value) {
+        return -1;
+    }
+
+    return 0;
+}
diff --git a/config/tests/tuple.cc b/config/tests/tuple.cc
new file mode 100644
index 0000000..b7516e0
--- /dev/null
+++ b/config/tests/tuple.cc
@@ -0,0 +1,47 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Thorben Hasenpusch
+ *
+ *  Purpose: Rudimentary tests for a working <tuple> implementation.
+ */
+
+#include <tuple>
+
+int main()
+{
+    auto tuple = std::make_tuple(1, "TEST");
+
+    if (std::get<0>(tuple) != 1) {
+        return -1;
+    }
+
+    if (std::tuple_size<decltype(tuple)>::value != 2) {
+        return -1;
+    }
+
+    int n;
+    const char *p;
+    std::tie(n, p) = tuple;
+
+    if (n != 1) {
+        return -1;
+    }
+
+    // ensure std::tuple can take at least 50 template arguments, otherwise
+    // our own implementation is superior
+    std::tuple<int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int> t;
+
+    return 0;
+}
diff --git a/config/tests/vector.cc b/config/tests/vector.cc
new file mode 100644
index 0000000..3d676a9
--- /dev/null
+++ b/config/tests/vector.cc
@@ -0,0 +1,96 @@
+/*
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  config
+ *
+ *  Author:  Thorben Hasenpusch
+ *
+ *  Purpose: Rudimentary tests for a working <vector> implementation.
+ */
+
+#include <vector>
+
+struct Recursive : std::vector<Recursive>
+{
+    int i;
+};
+
+int main()
+{
+    std::vector<int> v;
+
+    v.push_back(1);
+    v.push_back(2);
+    v.push_back(3);
+
+    if (v.size() != 3) {
+        return -1;
+    }
+
+    if (v[2] != 3) {
+        return -1;
+    }
+
+    v.erase(v.begin());
+
+    if (v[0] != 2) {
+        return -1;
+    }
+
+    v.pop_back();
+
+    if (v.size() != 1) {
+        return -1;
+    }
+
+    v.clear();
+
+    v.push_back(42);
+    v.push_back(13);
+
+    v.resize(1);
+
+    if (v.size() != 1 || v[0] != 42) {
+        return -1;
+    }
+
+    if (v.front() != v[0]) {
+        return -1;
+    }
+
+    if (v.back() != v[v.size() - 1]) {
+        return -1;
+    }
+
+    // ensure iterators are NOT invalidated by swap()
+    std::vector<int>::iterator it = v.begin();
+    std::vector<int> w;
+    w.push_back(23);
+    v.swap(w);
+    if (it != w.begin()) {
+        return -1;
+    }
+
+    // test if recursive vector structures can be constructed without causing
+    // a stack overflow
+    if (std::vector<Recursive>().size() != 0) {
+        return -1;
+    }
+
+    // test whether we can compare const and mutable iterators
+    std::vector<int>::const_iterator cit = w.begin();
+    if (it != cit) {
+        return -1;
+    }
+
+    return 0;
+}
diff --git a/dcmdata/CMakeLists.txt b/dcmdata/CMakeLists.txt
index 3a78f5d..ded9ea9 100644
--- a/dcmdata/CMakeLists.txt
+++ b/dcmdata/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmdata)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmdata_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${ZLIB_INCDIR})
+INCLUDE_DIRECTORIES("${dcmdata_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" ${ZLIB_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc libi2d apps include docs data tests)
diff --git a/dcmdata/apps/Makefile.dep b/dcmdata/apps/Makefile.dep
index 03bd851..b0d4f21 100644
--- a/dcmdata/apps/Makefile.dep
+++ b/dcmdata/apps/Makefile.dep
@@ -18,7 +18,10 @@ dcm2json.o: dcm2json.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -36,10 +39,10 @@ dcm2json.o: dcm2json.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
@@ -55,8 +58,6 @@ dcm2json.o: dcm2json.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -80,8 +81,7 @@ dcm2json.o: dcm2json.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrof.h ../include/dcmtk/dcmdata/dcvrod.h \
  ../include/dcmtk/dcmdata/dcvrol.h ../include/dcmtk/dcmdata/cmdlnarg.h \
  ../include/dcmtk/dcmdata/dcjson.h \
- ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h
+ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcm2pdf.o: dcm2pdf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dctypes.h \
@@ -102,7 +102,10 @@ dcm2pdf.o: dcm2pdf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -120,10 +123,10 @@ dcm2pdf.o: dcm2pdf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
@@ -139,8 +142,6 @@ dcm2pdf.o: dcm2pdf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -184,7 +185,10 @@ dcm2xml.o: dcm2xml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -202,10 +206,10 @@ dcm2xml.o: dcm2xml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
@@ -221,8 +225,6 @@ dcm2xml.o: dcm2xml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -245,8 +247,7 @@ dcm2xml.o: dcm2xml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrfl.h ../include/dcmtk/dcmdata/dcvrfd.h \
  ../include/dcmtk/dcmdata/dcvrof.h ../include/dcmtk/dcmdata/dcvrod.h \
  ../include/dcmtk/dcmdata/dcvrol.h ../include/dcmtk/dcmdata/cmdlnarg.h \
- ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h
+ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcmconv.o: dcmconv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dctypes.h \
@@ -267,7 +268,10 @@ dcmconv.o: dcmconv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -285,10 +289,10 @@ dcmconv.o: dcmconv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
@@ -304,8 +308,6 @@ dcmconv.o: dcmconv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -329,8 +331,7 @@ dcmconv.o: dcmconv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrof.h ../include/dcmtk/dcmdata/dcvrod.h \
  ../include/dcmtk/dcmdata/dcvrol.h ../include/dcmtk/dcmdata/cmdlnarg.h \
  ../include/dcmtk/dcmdata/dcostrmz.h ../include/dcmtk/dcmdata/dcistrmz.h \
- ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h
+ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcmcrle.o: dcmcrle.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dctypes.h \
@@ -351,7 +352,10 @@ dcmcrle.o: dcmcrle.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -369,10 +373,10 @@ dcmcrle.o: dcmcrle.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
@@ -388,8 +392,6 @@ dcmcrle.o: dcmcrle.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -433,7 +435,10 @@ dcmdrle.o: dcmdrle.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -451,10 +456,10 @@ dcmdrle.o: dcmdrle.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
@@ -470,8 +475,6 @@ dcmdrle.o: dcmdrle.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -515,7 +518,10 @@ dcmdump.o: dcmdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -533,10 +539,10 @@ dcmdump.o: dcmdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
@@ -552,8 +558,6 @@ dcmdump.o: dcmdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -577,8 +581,7 @@ dcmdump.o: dcmdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrof.h ../include/dcmtk/dcmdata/dcvrod.h \
  ../include/dcmtk/dcmdata/dcvrol.h ../include/dcmtk/dcmdata/cmdlnarg.h \
  ../include/dcmtk/dcmdata/dcistrmz.h \
- ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h
+ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcmftest.o: dcmftest.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcmetinf.h ../include/dcmtk/dcmdata/dcitem.h \
@@ -595,6 +598,7 @@ dcmftest.o: dcmftest.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -607,7 +611,9 @@ dcmftest.o: dcmftest.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -649,7 +655,10 @@ dcmgpdir.o: dcmgpdir.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -667,10 +676,10 @@ dcmgpdir.o: dcmgpdir.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
@@ -686,8 +695,6 @@ dcmgpdir.o: dcmgpdir.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -732,7 +739,10 @@ dcmodify.o: dcmodify.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -750,9 +760,9 @@ dcmodify.o: dcmodify.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcpath.h ../include/dcmtk/dcmdata/dcdatset.h \
@@ -774,6 +784,7 @@ dump2dcm.o: dump2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
@@ -791,7 +802,9 @@ dump2dcm.o: dump2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -817,8 +830,6 @@ dump2dcm.o: dump2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -862,6 +873,7 @@ img2dcm.o: img2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcfilefo.h \
  ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
@@ -879,7 +891,9 @@ img2dcm.o: img2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -927,7 +941,10 @@ mdfconen.o: mdfconen.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -945,9 +962,9 @@ mdfconen.o: mdfconen.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h mdfdsman.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dctk.h \
@@ -963,8 +980,6 @@ mdfconen.o: mdfconen.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \
  ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -1010,7 +1025,10 @@ mdfdsman.o: mdfdsman.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1028,9 +1046,9 @@ mdfdsman.o: mdfdsman.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dcswap.h \
@@ -1045,8 +1063,6 @@ mdfdsman.o: mdfdsman.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -1090,7 +1106,10 @@ pdf2dcm.o: pdf2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1108,10 +1127,10 @@ pdf2dcm.o: pdf2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
@@ -1127,8 +1146,6 @@ pdf2dcm.o: pdf2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -1172,7 +1189,10 @@ xml2dcm.o: xml2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1190,10 +1210,10 @@ xml2dcm.o: xml2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
@@ -1209,8 +1229,6 @@ xml2dcm.o: xml2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
diff --git a/dcmdata/apps/Makefile.in b/dcmdata/apps/Makefile.in
index c68bb0c..b91ee58 100644
--- a/dcmdata/apps/Makefile.in
+++ b/dcmdata/apps/Makefile.in
@@ -18,7 +18,7 @@ oflogdir = $(top_srcdir)/../oflog
 LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include
 LIBDIRS = -L$(top_srcdir)/libi2d -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc \
 	-L$(oflogdir)/libsrc
-LOCALLIBS = -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS)
+LOCALLIBS = -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 LIBI2D = -li2d
 
 objs = dcmftest.o dcmconv.o dcmdump.o dump2dcm.o dcmgpdir.o dcm2xml.o \
@@ -33,46 +33,46 @@ all: $(progs)
 
 # Note: dcmftest does not need LOCALLIBS on most platforms, but on OSF1 it is required.
 dcmftest: dcmftest.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcmconv: dcmconv.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcmdump: dcmdump.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dump2dcm: dump2dcm.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcmgpdir: dcmgpdir.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcmcrle: dcmcrle.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcmdrle: dcmdrle.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcm2xml: dcm2xml.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 xml2dcm: xml2dcm.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(XMLLIBS) $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(XMLLIBS) $(LOCALLIBS) $(LIBS)
 
 dcmodify: dcmodify.o mdfconen.o mdfdsman.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o mdfconen.o mdfdsman.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o mdfconen.o mdfdsman.o $(LOCALLIBS) $(LIBS)
 
 pdf2dcm: pdf2dcm.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcm2pdf: dcm2pdf.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 img2dcm: img2dcm.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LIBI2D) $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LIBI2D) $(LOCALLIBS) $(LIBS)
 
 dcm2json: dcm2json.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 install: install-bin
 
diff --git a/dcmdata/apps/dcm2json.cc b/dcmdata/apps/dcm2json.cc
index 3a6c8c5..14d4321 100644
--- a/dcmdata/apps/dcm2json.cc
+++ b/dcmdata/apps/dcm2json.cc
@@ -51,8 +51,7 @@ static OFCondition writeFile(STD_NAMESPACE ostream &out,
     DcmFileFormat *dfile,
     const E_FileReadMode readMode,
     const OFBool format,
-    const OFBool printMetaheaderInformation,
-    const OFBool checkAllStrings)
+    const OFBool printMetaInfo)
 {
     OFCondition result = EC_IllegalParameter;
     if ((ifname != NULL) && (dfile != NULL))
@@ -65,18 +64,18 @@ static OFCondition writeFile(STD_NAMESPACE ostream &out,
         {
             result = format
             ?
-                dset->writeJson(out, DcmJsonFormatPretty(printMetaheaderInformation))
+                dset->writeJson(out, DcmJsonFormatPretty(printMetaInfo))
             :
-                dset->writeJson(out, DcmJsonFormatCompact(printMetaheaderInformation))
+                dset->writeJson(out, DcmJsonFormatCompact(printMetaInfo))
             ;
         }
         else
         {
             result = format
             ?
-                dfile->writeJson(out, DcmJsonFormatPretty(printMetaheaderInformation))
+                dfile->writeJson(out, DcmJsonFormatPretty(printMetaInfo))
             :
-                dfile->writeJson(out, DcmJsonFormatCompact(printMetaheaderInformation))
+                dfile->writeJson(out, DcmJsonFormatCompact(printMetaInfo))
             ;
         }
     }
@@ -88,7 +87,6 @@ static OFCondition writeFile(STD_NAMESPACE ostream &out,
 
 int main(int argc, char *argv[])
 {
-    OFBool opt_checkAllStrings = OFFalse;
     OFBool opt_format = OFTrue;
     OFBool opt_addMetaInformation = OFFalse;
 
@@ -123,9 +121,9 @@ int main(int argc, char *argv[])
 
     cmd.addGroup("output options:");
       cmd.addSubGroup("output format:");
-        cmd.addOption("--formatted-code",     "+fc", "output file with human readable formatting (def.)");
-        cmd.addOption("--compact-code",       "-fc", "output without formatting (single line of code)");
-        cmd.addOption("--write-meta",         "+m",  "write data set with meta information");
+        cmd.addOption("--formatted-code",     "+fc", "enable whitespace formatting (default)");
+        cmd.addOption("--compact-code",       "-fc", "print only required characters");
+        cmd.addOption("--write-meta",         "+m",  "write data set with meta information\n(warning: not conforming to the DICOM standard)");
 
     /* evaluate command line */
     prepareCmdLineArgs(argc, argv, OFFIS_CONSOLE_APPLICATION);
@@ -195,7 +193,10 @@ int main(int argc, char *argv[])
 
         /* meta option */
         if (cmd.findOption("--write-meta"))
+        {
+            app.checkConflict("--write-meta", "--read-dataset", opt_readMode == ERM_dataset);
             opt_addMetaInformation = OFTrue;
+        }
     }
 
     /* print resource identifier */
@@ -252,8 +253,7 @@ int main(int argc, char *argv[])
                     if (stream.good())
                     {
                         /* write content in JSON format to file */
-                        if (writeFile(stream, ifname, &dfile, opt_readMode, opt_format,
-                            opt_addMetaInformation, opt_checkAllStrings).bad())
+                        if (writeFile(stream, ifname, &dfile, opt_readMode, opt_format, opt_addMetaInformation).bad())
                             result = 2;
                     }
                     else
@@ -262,8 +262,7 @@ int main(int argc, char *argv[])
                 else
                 {
                     /* write content in JSON format to standard output */
-                    if (writeFile(COUT, ifname, &dfile, opt_readMode, opt_format,
-                        opt_addMetaInformation, opt_checkAllStrings).bad())
+                    if (writeFile(COUT, ifname, &dfile, opt_readMode, opt_format, opt_addMetaInformation).bad())
                         result = 3;
                 }
             }
diff --git a/dcmdata/apps/dcmconv.cc b/dcmdata/apps/dcmconv.cc
index 46556df..601143c 100644
--- a/dcmdata/apps/dcmconv.cc
+++ b/dcmdata/apps/dcmconv.cc
@@ -26,10 +26,6 @@
 #define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofconapp.h"
@@ -84,12 +80,6 @@ static DcmTagKey parseTagKey(const char *tagName)
 
 int main(int argc, char *argv[])
 {
-
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
   const char *opt_ifname = NULL;
   const char *opt_ofname = NULL;
 
@@ -210,6 +200,7 @@ int main(int argc, char *argv[])
 #ifdef WITH_ZLIB
       cmd.addOption("--write-xfer-deflated", "+td",    "write with deflated explicit VR little endian TS");
 #endif
+      cmd.addOption("--write-xfer-ge",       "+tg",    "write private GE LEI with big endian pixel TS\n(non-standard)");
     cmd.addSubGroup("post-1993 value representations:");
       cmd.addOption("--enable-new-vr",       "+u",     "enable support for new VRs (UN/UT) (default)");
       cmd.addOption("--disable-new-vr",      "-u",     "disable support for new VRs, convert to OB");
@@ -496,6 +487,7 @@ int main(int argc, char *argv[])
 #ifdef WITH_ZLIB
       if (cmd.findOption("--write-xfer-deflated")) opt_oxfer = EXS_DeflatedLittleEndianExplicit;
 #endif
+      if (cmd.findOption("--write-xfer-ge")) opt_oxfer = EXS_PrivateGE_LEI_WithBigEndianPixelData;
       cmd.endOptionBlock();
 
       cmd.beginOptionBlock();
diff --git a/dcmdata/apps/dcmcrle.cc b/dcmdata/apps/dcmcrle.cc
index 58f75b3..511f2f4 100644
--- a/dcmdata/apps/dcmcrle.cc
+++ b/dcmdata/apps/dcmcrle.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2014, OFFIS e.V.
+ *  Copyright (C) 2002-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,10 +26,6 @@
 #define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofconapp.h"
@@ -56,11 +52,6 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"
 int main(int argc, char *argv[])
 {
 
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
   const char *opt_ifname = NULL;
   const char *opt_ofname = NULL;
 
diff --git a/dcmdata/apps/dcmdrle.cc b/dcmdata/apps/dcmdrle.cc
index 30c6dc5..52086ff 100644
--- a/dcmdata/apps/dcmdrle.cc
+++ b/dcmdata/apps/dcmdrle.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2014, OFFIS e.V.
+ *  Copyright (C) 2002-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,10 +26,6 @@
 #define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofconapp.h"
@@ -56,11 +52,6 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"
 int main(int argc, char *argv[])
 {
 
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
   const char *opt_ifname = NULL;
   const char *opt_ofname = NULL;
 
diff --git a/dcmdata/apps/dcmdump.cc b/dcmdata/apps/dcmdump.cc
index bd3a760..3ba4643 100644
--- a/dcmdata/apps/dcmdump.cc
+++ b/dcmdata/apps/dcmdump.cc
@@ -55,12 +55,6 @@ static OFLogger dcmdumpLogger = OFLog::getLogger("dcmtk.apps." OFFIS_CONSOLE_APP
 static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"
   OFFIS_DCMTK_VERSION " " OFFIS_DCMTK_RELEASEDATE " $";
 
-#ifdef HAVE_GUSI_H
-/* needed for Macintosh */
-#include <GUSI.h>
-#include <SIOUX.h>
-#endif
-
 static int dumpFile(STD_NAMESPACE ostream &out,
                     const OFFilename &ifname,
                     const E_FileReadMode readMode,
@@ -69,6 +63,7 @@ static int dumpFile(STD_NAMESPACE ostream &out,
                     const OFBool loadIntoMemory,
                     const OFBool stopOnErrors,
                     const OFBool convertToUTF8,
+                    const DcmTagKey &stopParsingAtElement,
                     const char *pixelDirectory);
 
 // ********************************************
@@ -162,18 +157,7 @@ DCMTK_MAIN_FUNCTION
     const char *scanPattern = "";
     const char *pixelDirectory = NULL;
     OFBool convertToUTF8 = OFFalse;
-
-#ifdef HAVE_GUSI_H
-    /* needed for Macintosh */
-    /* set options for the Metrowerks CodeWarrior SIOUX console */
-    SIOUXSettings.autocloseonquit = OFFalse;
-    SIOUXSettings.asktosaveonclose = OFFalse;
-    SIOUXSettings.showstatusline = OFTrue;
-    SIOUXSettings.setupmenus = OFTrue;
-    /* set options for the GUSI sockets library */
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
+    DcmTagKey stopParsingBeforeElement = DCM_UndefinedTagKey;
 
     OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION, "Dump DICOM file and data set", rcsid);
     OFCommandLine cmd;
@@ -250,6 +234,8 @@ DCMTK_MAIN_FUNCTION
       cmd.addSubGroup("other parsing options:");
         cmd.addOption("--stop-after-elem",     "+st", 1, "[t]ag: \"gggg,eeee\" or dictionary name",
                                                          "stop parsing after element specified by t");
+        cmd.addOption("--stop-before-elem",    "+sb", 1, "[t]ag: \"gggg,eeee\" or dictionary name",
+                                                         "stop parsing before element specified by t");
       cmd.addSubGroup("automatic data correction:");
         cmd.addOption("--enable-correction",   "+dc",    "enable automatic data correction (default)");
         cmd.addOption("--disable-correction",  "-dc",    "disable automatic data correction");
@@ -597,6 +583,7 @@ DCMTK_MAIN_FUNCTION
       if (cmd.findOption("--ignore-errors")) stopOnErrors = OFFalse;
       cmd.endOptionBlock();
 
+      cmd.beginOptionBlock();
       if (cmd.findOption("--stop-after-elem"))
       {
         const char *tagName = NULL;
@@ -607,6 +594,17 @@ DCMTK_MAIN_FUNCTION
         else
           app.printError("no valid key given for option --stop-after-elem");
       }
+      if (cmd.findOption("--stop-before-elem"))
+      {
+        const char *tagName = NULL;
+        app.checkValue(cmd.getValue(tagName));
+        DcmTagKey key = parseTagKey(tagName);
+        if (key != DCM_UndefinedTagKey)
+          stopParsingBeforeElement = key;
+        else
+          app.printError("no valid key given for option --stop-before-elem");
+      }
+      cmd.endOptionBlock();
 
       if (cmd.findOption("--search", 0, OFCommandLine::FOM_FirstFromLeft))
       {
@@ -720,7 +718,7 @@ DCMTK_MAIN_FUNCTION
         /* print header with filename */
         COUT << "# " << OFFIS_CONSOLE_APPLICATION << " (" << fileCounter << "/" << count << "): " << current << OFendl;
       }
-      errorCount += dumpFile(COUT, current, readMode, xfer, printFlags, loadIntoMemory, stopOnErrors, convertToUTF8, pixelDirectory);
+      errorCount += dumpFile(COUT, current, readMode, xfer, printFlags, loadIntoMemory, stopOnErrors, convertToUTF8, stopParsingBeforeElement, pixelDirectory);
     }
 
     return errorCount;
@@ -765,6 +763,7 @@ static int dumpFile(STD_NAMESPACE ostream &out,
                     const OFBool loadIntoMemory,
                     const OFBool stopOnErrors,
                     const OFBool convertToUTF8,
+                    const DcmTagKey &stopParsingAtElement,
                     const char *pixelDirectory)
 {
     int result = 0;
@@ -778,7 +777,17 @@ static int dumpFile(STD_NAMESPACE ostream &out,
     DcmFileFormat dfile;
     DcmObject *dset = &dfile;
     if (readMode == ERM_dataset) dset = dfile.getDataset();
-    OFCondition cond = dfile.loadFile(ifname, xfer, EGL_noChange, OFstatic_cast(Uint32, maxReadLength), readMode);
+    OFCondition cond;
+
+    if (stopParsingAtElement == DCM_UndefinedTagKey)
+    {
+        cond = dfile.loadFile(ifname, xfer, EGL_noChange, OFstatic_cast(Uint32, maxReadLength), readMode);
+    }
+    else
+    {
+        // instead of using loadFile(), we call loadFileUntilTag().
+        cond = dfile.loadFileUntilTag(ifname, xfer, EGL_noChange, OFstatic_cast(Uint32, maxReadLength), readMode, stopParsingAtElement);
+    }
     if (cond.bad())
     {
         OFLOG_ERROR(dcmdumpLogger, OFFIS_CONSOLE_APPLICATION << ": " << cond.text()
diff --git a/dcmdata/apps/dump2dcm.cc b/dcmdata/apps/dump2dcm.cc
index a2181cf..a863df7 100644
--- a/dcmdata/apps/dump2dcm.cc
+++ b/dcmdata/apps/dump2dcm.cc
@@ -87,9 +87,6 @@
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
 
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/ofconapp.h"
@@ -461,9 +458,8 @@ putFileContentsIntoElement(DcmElement *elem, const char *filename)
         /* read binary file into the buffer */
         if (fread(buf, 1, len, f) != len)
         {
-            char errBuf[256];
             OFLOG_ERROR(dump2dcmLogger, "error reading binary data file: " << filename
-                << ": " << OFStandard::strerror(errno, errBuf, sizeof(errBuf)));
+                << ": " << OFStandard::getLastSystemErrorCode().message());
             ec = EC_CorruptedData;
         }
         else if (evr == EVR_OW)
@@ -532,7 +528,7 @@ insertIntoSet(DcmStack &stack, const E_TransferSyntax xfer, const DcmTagKey &tag
         else if (newTagVR == EVR_pixelItem)
             newElement = new DcmPixelItem(DCM_PixelItemTag);
         else
-            newElementError = DcmItem::newDicomElement(newElement, tag);
+            newElementError = DcmItem::newDicomElementWithVR(newElement, tag);
 
         if (newElementError == EC_Normal)
         {
@@ -791,10 +787,6 @@ readDumpFile(DcmMetaInfo *metaheader, DcmDataset *dataset,
 
 int main(int argc, char *argv[])
 {
-#ifdef HAVE_GUSI_H
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
 
     OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION , "Convert ASCII dump to DICOM file", rcsid);
     OFCommandLine cmd;
diff --git a/dcmdata/apps/pdf2dcm.cc b/dcmdata/apps/pdf2dcm.cc
index 9132008..4b72e2c 100644
--- a/dcmdata/apps/pdf2dcm.cc
+++ b/dcmdata/apps/pdf2dcm.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2005-2014, OFFIS e.V.
+ *  Copyright (C) 2005-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,10 +27,6 @@
 #define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 BEGIN_EXTERN_C
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>       /* for O_RDONLY */
@@ -311,12 +307,6 @@ static void createIdentifiers(
 
 int main(int argc, char *argv[])
 {
-
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
   const char *opt_ifname = NULL;
   const char *opt_ofname = NULL;
 
diff --git a/dcmdata/apps/xml2dcm.cc b/dcmdata/apps/xml2dcm.cc
index 6da18d9..39b01ca 100644
--- a/dcmdata/apps/xml2dcm.cc
+++ b/dcmdata/apps/xml2dcm.cc
@@ -198,7 +198,7 @@ static OFCondition createNewElement(xmlNodePtr current,
             if (dcmEVR != EVR_UNKNOWN)
                 dcmTag.setVR(dcmVR);
             /* create DICOM element */
-            result = DcmItem::newDicomElement(newElem, dcmTag);
+            result = DcmItem::newDicomElementWithVR(newElem, dcmTag);
         } else {
             OFLOG_WARN(xml2dcmLogger, "invalid 'tag' attribute (" << elemTag << "), ignoring node");
             result = EC_InvalidTag;
@@ -278,10 +278,7 @@ static OFCondition putElementContent(xmlNodePtr current,
                         /* read binary file into the buffer */
                         if (fread(buf, 1, OFstatic_cast(size_t, fileSize), f) != fileSize)
                         {
-                            char errBuf[256];
-                            const char *text = OFStandard::strerror(errno, errBuf, sizeof(errBuf));
-                            if (text == NULL) text = "(unknown error code)";
-                            OFLOG_ERROR(xml2dcmLogger, "error reading binary data file: " << filename << ": " << text);
+                            OFLOG_ERROR(xml2dcmLogger, "error reading binary data file: " << filename << ": " << OFStandard::getLastSystemErrorCode().message());
                             result = EC_CorruptedData;
                         }
                         else if (dcmEVR == EVR_OW)
diff --git a/dcmdata/data/CMakeLists.txt b/dcmdata/data/CMakeLists.txt
index 976506b..0879cda 100644
--- a/dcmdata/data/CMakeLists.txt
+++ b/dcmdata/data/CMakeLists.txt
@@ -1,2 +1,9 @@
 # declare installation files
-INSTALL(FILES dicom.dic acrnema.dic private.dic diconde.dic dcm2xml.dtd dumppat.txt SC.dump VLP.dump DESTINATION ${DCMTK_INSTALL_DATDIR} COMPONENT data)
+INSTALL(FILES dicom.dic acrnema.dic private.dic diconde.dic dcm2xml.dtd dumppat.txt SC.dump VLP.dump DESTINATION "${DCMTK_INSTALL_DATDIR}" COMPONENT data)
+
+# add paths to the dictionaries to a CMake variable for being used by the unit tests
+SET(DCMTK_DICOM_DICTIONARIES
+  "${CMAKE_CURRENT_SOURCE_DIR}/dicom.dic"
+  "${CMAKE_CURRENT_SOURCE_DIR}/private.dic"
+  CACHE INTERNAL "paths to the DICOM data dictionaries"
+)
diff --git a/dcmdata/data/dicom.dic b/dcmdata/data/dicom.dic
index cbe39e2..3d9e89c 100644
--- a/dcmdata/data/dicom.dic
+++ b/dcmdata/data/dicom.dic
@@ -21,13 +21,12 @@
 # DICONDE (Digital Imaging and Communication in Nondestructive Evaluation) and
 # DICOS (Digital Imaging and Communications in Security) standard.
 #
-# Generated automatically from DICOM PS 3.6-2016e and PS 3.7-2016e
-# File created on 2016-11-23 13:16:19 by J. Riesmeier on thinkpad.
-# File updated manually on 2017-01-31 by J. Riesmeier.
+# Generated automatically from DICOM PS 3.6-2017b and PS 3.7-2017b
+# File created on 2017-06-15 10:31:09 by J. Riesmeier on thinkpad.
 #
 # In addition, the data dictionary entries from the following final text
 # supplements and correction items (CP) have been incorporated:
-# - CP 1619
+# - (none)
 #
 # Each line represents an entry in the data dictionary.  Each line has 5 fields
 # (Tag, VR, Name, VM, Version).  Entries need not be in ascending tag order.
@@ -44,7 +43,7 @@
 #
 # Comments have a '#' at the beginning of the line.
 #
-# Tag       VR  Name            VM  Version
+# Tag		VR	Name			VM	Version
 #
 (0000,0000)	UL	CommandGroupLength	1	DICOM
 (0000,0002)	UI	AffectedSOPClassUID	1	DICOM
@@ -304,7 +303,10 @@
 (0010,0217)	LO	StrainSource	1	DICOM
 (0010,0218)	UT	StrainAdditionalInformation	1	DICOM
 (0010,0219)	SQ	StrainCodeSequence	1	DICOM
-(0010,1000)	LO	OtherPatientIDs	1-n	DICOM
+(0010,0221)	SQ	GeneticModificationsSequence	1	DICOM
+(0010,0222)	UC	GeneticModificationsDescription	1	DICOM
+(0010,0223)	LO	GeneticModificationsNomenclature	1	DICOM
+(0010,0229)	SQ	GeneticModificationsCodeSequence	1	DICOM
 (0010,1001)	PN	OtherPatientNames	1-n	DICOM
 (0010,1002)	SQ	OtherPatientIDsSequence	1	DICOM
 (0010,1005)	PN	PatientBirthName	1	DICOM
@@ -319,7 +321,6 @@
 (0010,1060)	PN	PatientMotherBirthName	1	DICOM
 (0010,1080)	LO	MilitaryRank	1	DICOM
 (0010,1081)	LO	BranchOfService	1	DICOM
-(0010,1090)	LO	MedicalRecordLocator	1	DICOM
 (0010,1100)	SQ	ReferencedPatientPhotoSequence	1	DICOM
 (0010,2000)	LO	MedicalAlerts	1-n	DICOM
 (0010,2110)	LO	Allergies	1-n	DICOM
@@ -1566,6 +1567,25 @@
 (0022,1529)	FL	YCoordinatesCenterPixelViewAngle	1	DICOM
 (0022,1530)	UL	NumberOfMapPoints	1	DICOM
 (0022,1531)	OF	TwoDimensionalToThreeDimensionalMapData	1	DICOM
+(0022,1612)	SQ	DerivationAlgorithmSequence	1	DICOM
+(0022,1615)	SQ	OphthalmicImageTypeCodeSequence	1	DICOM
+(0022,1616)	LO	OphthalmicImageTypeDescription	1	DICOM
+(0022,1618)	SQ	ScanPatternTypeCodeSequence	1	DICOM
+(0022,1620)	SQ	ReferencedSurfaceMeshIdentificationSequence	1	DICOM
+(0022,1622)	CS	OphthalmicVolumetricPropertiesFlag	1	DICOM
+(0022,1624)	FL	OphthalmicAnatomicReferencePointXCoordinate	1	DICOM
+(0022,1626)	FL	OphthalmicAnatomicReferencePointYCoordinate	1	DICOM
+(0022,1628)	SQ	OphthalmicEnFaceImageQualityRatingSequence	1	DICOM
+(0022,1630)	DS	QualityThreshold	1	DICOM
+(0022,1640)	SQ	OCTBscanAnalysisAcquisitionParametersSequence	1	DICOM
+(0022,1642)	UL	NumberofBscansPerFrame	1	DICOM
+(0022,1643)	FL	BscanSlabThickness	1	DICOM
+(0022,1644)	FL	DistanceBetweenBscanSlabs	1	DICOM
+(0022,1645)	FL	BscanCycleTime	1	DICOM
+(0022,1646)	FL	BscanCycleTimeVector	1-n	DICOM
+(0022,1649)	FL	AscanRate	1	DICOM
+(0022,1650)	FL	BscanRate	1	DICOM
+(0022,1658)	UL	SurfaceMeshZPixelOffset	1	DICOM
 (0024,0010)	FL	VisualFieldHorizontalExtent	1	DICOM
 (0024,0011)	FL	VisualFieldVerticalExtent	1	DICOM
 (0024,0012)	CS	VisualFieldShape	1	DICOM
@@ -2058,6 +2078,7 @@
 (0040,4073)	UR	StorageURL	1	DICOM
 (0040,4074)	SQ	XDSStorageSequence	1	DICOM
 (0040,8302)	DS	EntranceDoseInmGy	1	DICOM
+(0040,8303)	CS	EntranceDoseDerivation	1	DICOM
 (0040,9092)	SQ	ParametricMapFrameTypeSequence	1	DICOM
 (0040,9094)	SQ	ReferencedImageRealWorldValueMappingSequence	1	DICOM
 (0040,9096)	SQ	RealWorldValueMappingSequence	1	DICOM
@@ -2507,7 +2528,7 @@
 (0068,62D0)	US	HPGLDocumentID	1	DICOM
 (0068,62D5)	LO	HPGLDocumentLabel	1	DICOM
 (0068,62E0)	SQ	ViewOrientationCodeSequence	1	DICOM
-(0068,62F0)	FD	ViewOrientationModifier	9	DICOM
+(0068,62F0)	SQ	ViewOrientationModifierCodeSequence	1	DICOM
 (0068,62F2)	FD	HPGLDocumentScaling	1	DICOM
 (0068,6300)	OB	HPGLDocument	1	DICOM
 (0068,6310)	US	HPGLContourPenNumber	1	DICOM
@@ -2672,9 +2693,13 @@
 (0070,1203)	US	InputSequencePositionIndex	1	DICOM
 (0070,1204)	CS	Crop	1	DICOM
 (0070,1205)	US	CroppingSpecificationIndex	1-n	DICOM
-(0070,1206)	CS	CompositingMethod	1	DICOM
 (0070,1207)	US	VolumetricPresentationInputNumber	1	DICOM
 (0070,1208)	CS	ImageVolumeGeometry	1	DICOM
+(0070,1209)	UI	VolumetricPresentationInputSetUID	1	DICOM
+(0070,120A)	SQ	VolumetricPresentationInputSetSequence	1	DICOM
+(0070,120B)	CS	GlobalCrop	1	DICOM
+(0070,120C)	US	GlobalCroppingSpecificationIndex	1-n	DICOM
+(0070,120D)	CS	RenderingMethod	1	DICOM
 (0070,1301)	SQ	VolumeCroppingSequence	1	DICOM
 (0070,1302)	CS	VolumeCroppingMethod	1	DICOM
 (0070,1303)	FD	BoundingBoxCrop	6	DICOM
@@ -2692,6 +2717,18 @@
 (0070,150D)	OD	VolumetricCurvePoints	1	DICOM
 (0070,1511)	FD	MPRViewHeightDirection	3	DICOM
 (0070,1512)	FD	MPRViewHeight	1	DICOM
+(0070,1602)	CS	RenderProjection	1	DICOM
+(0070,1603)	FD	ViewpointPosition	3	DICOM
+(0070,1604)	FD	ViewpointLookAtPoint	3	DICOM
+(0070,1605)	FD	ViewpointUpDirection	3	DICOM
+(0070,1606)	FD	RenderFieldOfView	6	DICOM
+(0070,1607)	FD	SamplingStepSize	1	DICOM
+(0070,1701)	CS	ShadingStyle	1	DICOM
+(0070,1702)	FD	AmbientReflectionIntensity	1	DICOM
+(0070,1703)	FD	LightDirection	3	DICOM
+(0070,1704)	FD	DiffuseReflectionIntensity	1	DICOM
+(0070,1705)	FD	SpecularReflectionIntensity	1	DICOM
+(0070,1706)	FD	Shininess	1	DICOM
 (0070,1801)	SQ	PresentationStateClassificationComponentSequence	1	DICOM
 (0070,1802)	CS	ComponentType	1	DICOM
 (0070,1803)	SQ	ComponentInputSequence	1	DICOM
@@ -2709,6 +2746,21 @@
 (0070,1A03)	FD	RecommendedAnimationRate	1	DICOM
 (0070,1A04)	SQ	AnimationCurveSequence	1	DICOM
 (0070,1A05)	FD	AnimationStepSize	1	DICOM
+(0070,1A06)	FD	SwivelRange	1	DICOM
+(0070,1A07)	OD	VolumetricCurveUpDirections	1	DICOM
+(0070,1A08)	SQ	VolumeStreamSequence	1	DICOM
+(0070,1A09)	LO	RGBATransferFunctionDescription	1	DICOM
+(0070,1B01)	SQ	AdvancedBlendingSequence	1	DICOM
+(0070,1B02)	US	BlendingInputNumber	1	DICOM
+(0070,1B03)	SQ	BlendingDisplayInputSequence	1	DICOM
+(0070,1B04)	SQ	BlendingDisplaySequence	1	DICOM
+(0070,1B06)	CS	BlendingMode	1	DICOM
+(0070,1B07)	CS	TimeSeriesBlending	1	DICOM
+(0070,1B08)	CS	GeometryForDisplay	1	DICOM
+(0070,1B11)	SQ	ThresholdSequence	1	DICOM
+(0070,1B12)	SQ	ThresholdValueSequence	1	DICOM
+(0070,1B13)	CS	ThresholdType	1	DICOM
+(0070,1B14)	FD	ThresholdValue	1	DICOM
 (0072,0002)	SH	HangingProtocolName	1	DICOM
 (0072,0004)	LO	HangingProtocolDescription	1	DICOM
 (0072,0006)	CS	HangingProtocolLevel	1	DICOM
@@ -2909,7 +2961,7 @@
 (0076,0020)	SQ	ProcedureTypeCodeSequence	1	DICOM
 (0076,0030)	LO	SurgicalTechnique	1	DICOM
 (0076,0032)	SQ	ComponentTypesSequence	1	DICOM
-(0076,0034)	CS	ComponentTypeCodeSequence	1	DICOM
+(0076,0034)	SQ	ComponentTypeCodeSequence	1	DICOM
 (0076,0036)	CS	ExclusiveComponentType	1	DICOM
 (0076,0038)	CS	MandatoryComponentType	1	DICOM
 (0076,0040)	SQ	ComponentSequence	1	DICOM
@@ -3334,6 +3386,7 @@
 (300A,007B)	LT	FractionPattern	1	DICOM
 (300A,0080)	IS	NumberOfBeams	1	DICOM
 (300A,0082)	DS	BeamDoseSpecificationPoint	3	DICOM
+(300A,0083)	UI	ReferencedDoseReferenceUID	1	DICOM
 (300A,0084)	DS	BeamDose	1	DICOM
 (300A,0086)	DS	BeamMeterset	1	DICOM
 (300A,008B)	CS	BeamDoseMeaning	1	DICOM
@@ -3887,7 +3940,9 @@
 (0008,225A)	SQ	RETIRED_AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial	1	DICOM/retired
 (0008,225C)	SQ	RETIRED_OnAxisBackgroundAnatomicStructureCodeSequenceTrial	1	DICOM/retired
 (0008,4000)	LT	RETIRED_IdentifyingComments	1	DICOM/retired
+(0010,1000)	LO	RETIRED_OtherPatientIDs	1-n	DICOM/retired
 (0010,1050)	LO	RETIRED_InsurancePlanIdentification	1-n	DICOM/retired
+(0010,1090)	LO	RETIRED_MedicalRecordLocator	1	DICOM/retired
 (0014,0023)	ST	RETIRED_CADFileFormat	1	DICOM/retired
 (0014,0024)	ST	RETIRED_ComponentReferenceSystem	1	DICOM/retired
 (0014,0045)	ST	RETIRED_MaterialPropertiesFileFormatRetired	1	DICOM/retired
@@ -4146,6 +4201,7 @@
 (0070,0050)	US	RETIRED_DisplayedAreaTopLeftHandCornerTrial	2	DICOM/retired
 (0070,0051)	US	RETIRED_DisplayedAreaBottomRightHandCornerTrial	2	DICOM/retired
 (0070,0067)	US	RETIRED_GraphicLayerRecommendedDisplayRGBValue	3	DICOM/retired
+(0070,1206)	CS	RETIRED_CompositingMethod	1	DICOM/retired
 (0074,1024)	IS	RETIRED_BeamOrderIndexTrial	1	DICOM/retired
 (0074,1038)	DS	RETIRED_DoubleExposureMetersetTrial	1	DICOM/retired
 (0074,103A)	DS	RETIRED_DoubleExposureFieldDeltaTrial	4	DICOM/retired
@@ -4296,15 +4352,6 @@
 #
 #---------------------------------------------------------------------------
 #
-# Correction Item 1619
-#
-(0010,0221)	SQ	GeneticModificationsSequence	1	DICOM/CP_1619
-(0010,0222)	UC	GeneticModificationsDescription	1	DICOM/CP_1619
-(0010,0223)	LO	GeneticModificationsNomenclature	1	DICOM/CP_1619
-(0010,0229)	SQ	GeneticModificationsCodeSequence	1	DICOM/CP_1619
-#
-#---------------------------------------------------------------------------
-#
 # Private Creator Data Elements
 #
 (0009-o-FFFF,0000)	UL	PrivateGroupLength	1	PRIVATE
diff --git a/dcmdata/docs/CMakeLists.txt b/dcmdata/docs/CMakeLists.txt
index 4c37c72..b01d755 100644
--- a/dcmdata/docs/CMakeLists.txt
+++ b/dcmdata/docs/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(FILES datadict.txt DESTINATION ${DCMTK_INSTALL_DOCDIR} COMPONENT doc)
+INSTALL(FILES datadict.txt DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc)
diff --git a/dcmdata/docs/dcm2json.man b/dcmdata/docs/dcm2json.man
index 4479445..f432b05 100644
--- a/dcmdata/docs/dcm2json.man
+++ b/dcmdata/docs/dcm2json.man
@@ -6,13 +6,13 @@
 \page dcm2json dcm2json: Convert DICOM file and data set to JSON
 \endif
 
-\section synopsis SYNOPSIS
+\section dcm2json_synopsis SYNOPSIS
 
 \verbatim
 dcm2json [options] dcmfile-in [jsonfile-out]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcm2json_description DESCRIPTION
 
 The \b dcm2json utility converts the contents of a DICOM file (file format or
 raw data set) to JSON (JavaScript Object Notation).  The output refers to the
@@ -26,7 +26,7 @@ whenever possible (using the \b dcmconv utility).  It is also possible to use
 the \e -f and <em>-t[ieb]</em> options to force \b dcm2json to read a data set
 with a particular transfer syntax.
 
-\section parameters PARAMETERS
+\section dcm2json_parameters PARAMETERS
 
 \verbatim
 dcmfile-in    DICOM input filename to be converted
@@ -34,11 +34,10 @@ dcmfile-in    DICOM input filename to be converted
 jsonfile-out  JSON output filename (default: stdout)
 \endverbatim
 
-\section options OPTIONS
+\section dcm2json_options OPTIONS
 
-\subsection general_options general options
+\subsection dcm2json_general_options general options
 \verbatim
-
   -h    --help
           print this help text and exit
 
@@ -65,7 +64,7 @@ jsonfile-out  JSON output filename (default: stdout)
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcm2json_input_options input options
 \verbatim
 input file format:
 
@@ -96,21 +95,25 @@ input transfer syntax:
           read with implicit VR little endian TS
 \endverbatim
 
-\subsection output_options output options
+\subsection dcm2json_output_options output options
 \verbatim
 output format:
 
   +fc   --formatted-code
-          output file with human readable formatting (default)
+          enable whitespace formatting (default)
+
+          # prints additional spaces and newlines for increased
+          # readability
 
   -fc   --compact-code
-          output without formatting (single line of code)
+          print only required characters
 
   +m    --write-meta
           write data set with meta information
+          (warning: not conforming to the DICOM standard)
 \endverbatim
 
-\section json_format JSON Format
+\section dcm2json_json_format JSON Format
 
 The basic structure of the JSON output created from a DICOM file looks like
 the following (see DICOM Part 18 Section F for details):
@@ -120,7 +123,7 @@ the following (see DICOM Part 18 Section F for details):
     "00080005": {
         "vr": "CS",
         "Value": [
-            "ISO_IR192"
+            "ISO_IR 192"
         ]
     },
     "00080020": {
@@ -271,7 +274,7 @@ the following (see DICOM Part 18 Section F for details):
 }
 \endverbatim
 
-\subsection bulk_data Bulk Data
+\subsection dcm2json_bulk_data Bulk Data
 
 Binary data, i.e. DICOM element values with Value Representations (VR) of OB
 or OW, as well as OD, OF and UN values are by default not written to the JSON
@@ -280,26 +283,15 @@ Unique Identifier (UUID) is being generated and written as an value of a
 BulkDataURI JSON element.  So far, there is no possibility to write an
 additional file to hold the binary data for each of the binary data chunks.
 
-\section notes NOTES
-
-\subsection character_encoding Character Encoding
+\section dcm2json_notes NOTES
 
-The JSON encoding is determined automatically from the DICOM attribute
-(0008,0005) "Specific Character Set" using the following mapping:
+\subsection dcm2json_character_encoding Character Encoding
 
-\verbatim
-ISO Latin 1   "ISO_IR 100"  =>  "UTF-8"
-ISO Latin 2   "ISO_IR 101"  =>  "UTF-8"
-ISO Latin 3   "ISO_IR 109"  =>  "UTF-8"
-ISO Latin 4   "ISO_IR 110"  =>  "UTF-8"
-ISO Latin 5   "ISO_IR 148"  =>  "UTF-8"
-Cyrillic      "ISO_IR 144"  =>  "UTF-8"
-Arabic        "ISO_IR 127"  =>  "UTF-8"
-Greek         "ISO_IR 126"  =>  "UTF-8"
-Hebrew        "ISO_IR 138"  =>  "UTF-8"
-\endverbatim
+\b dcm2json always tries to output in UTF-8 encoding.  If this is not possible,
+e.g. because there is no support for character set conversion, ASCII is used
+instead (which is a subset of UTF-8).
 
-\section logging LOGGING
+\section dcm2json_logging 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
@@ -318,7 +310,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcm2json_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -340,7 +332,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcm2json_environment ENVIRONMENT
 
 The \b dcm2json utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -356,7 +348,7 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section copyright COPYRIGHT
+\section dcm2json_copyright COPYRIGHT
 
 Copyright (C) 2016-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmdata/docs/dcm2pdf.man b/dcmdata/docs/dcm2pdf.man
index b0400a6..d508af6 100644
--- a/dcmdata/docs/dcm2pdf.man
+++ b/dcmdata/docs/dcm2pdf.man
@@ -6,20 +6,20 @@
 \page dcm2pdf dcm2pdf: Extract PDF file from DICOM encapsulated PDF
 \endif
 
-\section synopsis SYNOPSIS
+\section dcm2pdf_synopsis SYNOPSIS
 
 \verbatim
 dcm2pdf [options] dcmfile-in pdffile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dcm2pdf_description DESCRIPTION
 
 The \b dcm2pdf utility reads a DICOM file of the Encapsulated PDF Storage SOP
 Class (\e dcmfile-in), extracts the embedded PDF document and writes it to an
 output file (\e pdffile-out).  Optionally a command can be executed after the
 creation of the PDF file.
 
-\section parameters PARAMETERS
+\section dcm2pdf_parameters PARAMETERS
 
 \verbatim
 dcmfile-in   DICOM input filename
@@ -27,9 +27,9 @@ dcmfile-in   DICOM input filename
 pdffile-out  PDF output filename
 \endverbatim
 
-\section options OPTIONS
+\section dcm2pdf_options OPTIONS
 
-\subsection general_options general options
+\subsection dcm2pdf_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -57,7 +57,7 @@ pdffile-out  PDF output filename
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcm2pdf_input_options input options
 \verbatim
 input file format:
 
@@ -128,13 +128,13 @@ bitstream format of deflated input:
          expect deflated zlib bitstream
 \endverbatim
 
-\subsection execution_options execution options
+\subsection dcm2pdf_execution_options execution options
 \verbatim
   -x   --exec  [c]ommand: string
          execute command c after PDF extraction
 \endverbatim
 
-\section notes NOTES
+\section dcm2pdf_notes NOTES
 
 Option \e --exec allows for the execution of a certain command line after the
 creation of the PDF document.  The command line to be executed is passed to
@@ -143,7 +143,7 @@ placeholder '\#f', which will be replaced by the PDF filename at run time.
 The specified command line is executed in the foreground, i.e. \b pdf2dcm will
 be blocked until the command terminates.
 
-\section logging LOGGING
+\section dcm2pdf_logging 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
@@ -162,7 +162,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcm2pdf_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -184,7 +184,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcm2pdf_environment ENVIRONMENT
 
 The \b dcm2pdf utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -200,11 +200,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dcm2pdf_see_also SEE ALSO
 
 <b>pdf2dcm</b>(1)
 
-\section copyright COPYRIGHT
+\section dcm2pdf_copyright COPYRIGHT
 
 Copyright (C) 2007-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmdata/docs/dcm2xml.man b/dcmdata/docs/dcm2xml.man
index b5b1129..6910e83 100644
--- a/dcmdata/docs/dcm2xml.man
+++ b/dcmdata/docs/dcm2xml.man
@@ -6,13 +6,13 @@
 \page dcm2xml dcm2xml: Convert DICOM file and data set to XML
 \endif
 
-\section synopsis SYNOPSIS
+\section dcm2xml_synopsis SYNOPSIS
 
 \verbatim
 dcm2xml [options] dcmfile-in [xmlfile-out]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcm2xml_description DESCRIPTION
 
 The \b dcm2xml utility converts the contents of a DICOM file (file format or
 raw data set) to XML (Extensible Markup Language).  There are two output
@@ -29,7 +29,7 @@ whenever possible (using the \b dcmconv utility).  It is also possible to use
 the \e -f and <em>-t[ieb]</em> options to force \b dcm2xml to read a data set
 with a particular transfer syntax.
 
-\section parameters PARAMETERS
+\section dcm2xml_parameters PARAMETERS
 
 \verbatim
 dcmfile-in   DICOM input filename to be converted
@@ -37,9 +37,9 @@ dcmfile-in   DICOM input filename to be converted
 xmlfile-out  XML output filename (default: stdout)
 \endverbatim
 
-\section options OPTIONS
+\section dcm2xml_options OPTIONS
 
-\subsection general_options general options
+\subsection dcm2xml_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -67,7 +67,7 @@ xmlfile-out  XML output filename (default: stdout)
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcm2xml_input_options input options
 \verbatim
 input file format:
 
@@ -109,7 +109,7 @@ long tag values:
           set threshold for long values to k kbytes
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcm2xml_processing_options processing options
 \verbatim
 specific character set:
 
@@ -134,7 +134,7 @@ specific character set:
           # (see output of --version on which one is available)
 \endverbatim
 
-\subsection output_options output options
+\subsection dcm2xml_output_options output options
 \verbatim
 general XML format:
 
@@ -183,7 +183,7 @@ encoding of binary data:
           encode binary data as Base64 (RFC 2045, MIME)
 \endverbatim
 
-\section dcmtk_format DCMTK Format
+\section dcm2xml_dcmtk_format DCMTK Format
 
 The basic structure of the DCMTK-specific XML output created from a DICOM file
 looks like the following:
@@ -229,7 +229,7 @@ looks like the following:
 
 The "file-format" and "meta-header" tags are absent for DICOM data sets.
 
-\subsection xml_encoding XML Encoding
+\subsection dcm2xml_xml_encoding XML Encoding
 
 Attributes with very large value fields (e.g. pixel data) are not loaded by
 default.  They can be identified by the additional attribute "loaded" with a
@@ -253,12 +253,12 @@ length e.g. because of non-significant padding that has been removed.  If this
 attribute is missing in "sequence" or "item" start tags, the corresponding
 DICOM element has been stored with undefined length.
 
-\section native_format Native DICOM Model Format
+\section dcm2xml_native_format Native DICOM Model Format
 
 The description of the Native DICOM Model format can be found in the DICOM
 standard, part 19 ("Application Hosting").
 
-\subsection bulk_data Bulk Data
+\subsection dcm2xml_bulk_data Bulk Data
 
 Binary data, i.e. DICOM element values with Value Representations (VR) of OB
 or OW, as well as OD, OF and UN values are by default not written to the XML
@@ -276,7 +276,7 @@ for encoding binary data as Base64.  Currently, the command line option
 \e --encode-base64 enables this encoding for the following VRs: OB, OD, OF, OW,
 and UN.
 
-\subsection known_issues Known Issues
+\subsection dcm2xml_known_issues Known Issues
 
 In addition to what is written in the above section on "Bulk Data", there are
 further known issues with the current implementation of the Native DICOM Model
@@ -285,9 +285,9 @@ or UN are currently never written as bulk data, although it might be useful,
 e.g. for very long text elements (especially UT) or very long numeric fields
 (of various VRs).
 
-\section notes NOTES
+\section dcm2xml_notes NOTES
 
-\subsection character_encoding Character Encoding
+\subsection dcm2xml_character_encoding Character Encoding
 
 The XML encoding is determined automatically from the DICOM attribute
 (0008,0005) "Specific Character Set" using the following mapping:
@@ -319,7 +319,7 @@ data set to UTF-8 encoding prior to the conversion to XML format.  This is also
 useful for DICOMDIR files where each directory record can have a different
 character set.
 
-\section logging LOGGING
+\section dcm2xml_logging 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
@@ -338,7 +338,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcm2xml_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -360,7 +360,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcm2xml_environment ENVIRONMENT
 
 The \b dcm2xml utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -376,15 +376,15 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dcm2xml_files FILES
 
 <em>\<datadir\>/dcm2xml.dtd</em> - Document Type Definition (DTD) file
 
-\section see_also SEE ALSO
+\section dcm2xml_see_also SEE ALSO
 
 <b>xml2dcm</b>(1), <b>dcmconv</b>(1)
 
-\section copyright COPYRIGHT
+\section dcm2xml_copyright COPYRIGHT
 
 Copyright (C) 2002-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmdata/docs/dcmconv.man b/dcmdata/docs/dcmconv.man
index f142f03..3c94731 100644
--- a/dcmdata/docs/dcmconv.man
+++ b/dcmdata/docs/dcmconv.man
@@ -6,18 +6,18 @@
 \page dcmconv dcmconv: Convert DICOM file encoding
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmconv_synopsis SYNOPSIS
 
 \verbatim
 dcmconv [options] dcmfile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmconv_description DESCRIPTION
 
 The \b dcmconv utility reads a DICOM file (\e dcmfile-in), performs an encoding
 conversion and writes the converted data to an output file (\e dcmfile-out).
 
-\section parameters PARAMETERS
+\section dcmconv_parameters PARAMETERS
 
 \verbatim
 dcmfile-in   DICOM input filename to be converted
@@ -25,9 +25,9 @@ dcmfile-in   DICOM input filename to be converted
 dcmfile-out  DICOM output filename to write to
 \endverbatim
 
-\section options OPTIONS
+\section dcmconv_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmconv_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -55,7 +55,7 @@ dcmfile-out  DICOM output filename to write to
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmconv_input_options input options
 \verbatim
 input file format:
 
@@ -203,7 +203,7 @@ bitstream format of deflated input:
          expect deflated zlib bitstream
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcmconv_processing_options processing options
 \verbatim
 specific character set:
 
@@ -238,7 +238,7 @@ other processing options:
          remove elements with invalid group number
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmconv_output_options output options
 \verbatim
 output file format:
 
@@ -268,6 +268,10 @@ output transfer syntax:
   +td  --write-xfer-deflated
          write with deflated explicit VR little endian TS
 
+  +tg  --write-xfer-ge
+         write private GE implicit VR little endian
+         with big endian pixel data TS (non-standard)
+
 post-1993 value representations:
 
   +u   --enable-new-vr
@@ -320,7 +324,7 @@ deflate compression level (only with --write-xfer-deflated):
          0=uncompressed, 1=fastest, 9=best compression
 \endverbatim
 
-\section logging LOGGING
+\section dcmconv_logging 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
@@ -339,7 +343,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmconv_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -361,7 +365,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmconv_environment ENVIRONMENT
 
 The \b dcmconv utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -377,11 +381,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dcmconv_see_also SEE ALSO
 
 <b>dcmdump</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmconv_copyright COPYRIGHT
 
 Copyright (C) 1994-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmdata/docs/dcmcrle.man b/dcmdata/docs/dcmcrle.man
index 09b749c..7501280 100644
--- a/dcmdata/docs/dcmcrle.man
+++ b/dcmdata/docs/dcmcrle.man
@@ -6,19 +6,19 @@
 \page dcmcrle dcmcrle: Encode DICOM file to RLE transfer syntax
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmcrle_synopsis SYNOPSIS
 
 \verbatim
 dcmcrle [options] dcmfile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmcrle_description DESCRIPTION
 
 The \b dcmcrle utility reads an uncompressed DICOM image (\e dcmfile-in),
 performs RLE compression (i.e. conversion to an encapsulated DICOM transfer
 syntax) and writes the converted image to an output file (\e dcmfile-out).
 
-\section parameters PARAMETERS
+\section dcmcrle_parameters PARAMETERS
 
 \verbatim
 dcmfile-in   DICOM input filename to be converted
@@ -26,9 +26,9 @@ dcmfile-in   DICOM input filename to be converted
 dcmfile-out  DICOM output filename
 \endverbatim
 
-\section options OPTIONS
+\section dcmcrle_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmcrle_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -56,7 +56,7 @@ dcmfile-out  DICOM output filename
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmcrle_input_options input options
 \verbatim
 input file format:
 
@@ -87,7 +87,7 @@ input transfer syntax:
          read with implicit VR little endian TS
 \endverbatim
 
-\subsection enc_pix_data_encoding_opt encapsulated pixel data encoding options
+\subsection dcmcrle_enc_pix_data_encoding_opt encapsulated pixel data encoding options
 \verbatim
 pixel data fragmentation:
 
@@ -121,7 +121,7 @@ SOP Instance UID:
          always assign new UID
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmcrle_output_options output options
 \verbatim
 post-1993 value representations:
 
@@ -163,14 +163,14 @@ data set trailing padding:
          and items on multiple of i bytes
 \endverbatim
 
-\section notes NOTES
+\section dcmcrle_notes NOTES
 
 Please note that the DICOM standard does not allow for storing the pixel data
 with multiple fragments per frame (when RLE compression is used).  So limiting
 the fragment size with option \e --fragment-size (or \e +fs) may result in a
 non-standard conformant DICOM image.
 
-\section transfer_syntaxes TRANSFER SYNTAXES
+\section dcmcrle_transfer_syntaxes TRANSFER SYNTAXES
 
 \b dcmcrle supports the following transfer syntaxes for input
 (\e dcmfile-in):
@@ -191,7 +191,7 @@ BigEndianExplicitTransferSyntax                1.2.840.10008.1.2.2
 RLELosslessTransferSyntax                      1.2.840.10008.1.2.5
 \endverbatim
 
-\section logging LOGGING
+\section dcmcrle_logging 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
@@ -210,7 +210,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmcrle_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -232,7 +232,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmcrle_environment ENVIRONMENT
 
 The \b dcmcrle utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -248,11 +248,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dcmcrle_see_also SEE ALSO
 
 <b>dcmdrle</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmcrle_copyright COPYRIGHT
 
 Copyright (C) 2002-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmdata/docs/dcmdata.dox b/dcmdata/docs/dcmdata.dox
index 54fd9ad..99fa20e 100644
--- a/dcmdata/docs/dcmdata.dox
+++ b/dcmdata/docs/dcmdata.dox
@@ -19,6 +19,7 @@ Here are some further classes that are of interest:
 \section Tools
 
 This module contains the following command line tools:
+\li \ref dcm2json
 \li \ref dcm2pdf
 \li \ref dcm2xml
 \li \ref dcmconv
@@ -32,7 +33,6 @@ This module contains the following command line tools:
 \li \ref img2dcm
 \li \ref pdf2dcm
 \li \ref xml2dcm
-\li \ref dcm2json
 
 \section Files
 
diff --git a/dcmdata/docs/dcmdrle.man b/dcmdata/docs/dcmdrle.man
index e884f0b..4dea8e3 100644
--- a/dcmdata/docs/dcmdrle.man
+++ b/dcmdata/docs/dcmdrle.man
@@ -6,19 +6,19 @@
 \page dcmdrle dcmdrle: Decode RLE-compressed DICOM file
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmdrle_synopsis SYNOPSIS
 
 \verbatim
 dcmdrle [options] dcmfile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmdrle_description DESCRIPTION
 
 The \b dcmdrle utility reads a RLE-compressed DICOM image (\e dcmfile-in),
 decompresses the image data (i.e. conversion to a native DICOM transfer syntax)
 and writes the converted image to an output file (\e dcmfile-out).
 
-\section parameters PARAMETERS
+\section dcmdrle_parameters PARAMETERS
 
 \verbatim
 dcmfile-in   DICOM input filename to be converted
@@ -26,9 +26,9 @@ dcmfile-in   DICOM input filename to be converted
 dcmfile-out  DICOM output filename
 \endverbatim
 
-\section options OPTIONS
+\section dcmdrle_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmdrle_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -56,7 +56,7 @@ dcmfile-out  DICOM output filename
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmdrle_input_options input options
 
 \verbatim
 input file format:
@@ -76,7 +76,7 @@ input file format:
   # but unfortunately it does.
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcmdrle_processing_options processing options
 \verbatim
 SOP Instance UID:
 
@@ -99,7 +99,7 @@ RLE byte segment order:
   # images with more than one byte per sample.
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmdrle_output_options output options
 \verbatim
 output file format:
 
@@ -160,7 +160,7 @@ data set trailing padding (not with --write-dataset):
          and items on multiple of i bytes
 \endverbatim
 
-\section transfer_syntaxes TRANSFER SYNTAXES
+\section dcmdrle_transfer_syntaxes TRANSFER SYNTAXES
 
 \b dcmdrle supports the following transfer syntaxes for input
 (\e dcmfile-in):
@@ -184,7 +184,7 @@ LittleEndianExplicitTransferSyntax             1.2.840.10008.1.2.1
 BigEndianExplicitTransferSyntax                1.2.840.10008.1.2.2
 \endverbatim
 
-\section logging LOGGING
+\section dcmdrle_logging 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
@@ -203,7 +203,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmdrle_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -225,7 +225,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmdrle_environment ENVIRONMENT
 
 The \b dcmdrle utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -241,11 +241,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dcmdrle_see_also SEE ALSO
 
 <b>dcmcrle</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmdrle_copyright COPYRIGHT
 
 Copyright (C) 2002-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany
 
diff --git a/dcmdata/docs/dcmdump.man b/dcmdata/docs/dcmdump.man
index 54175e9..2fa40ad 100644
--- a/dcmdata/docs/dcmdump.man
+++ b/dcmdata/docs/dcmdump.man
@@ -6,13 +6,13 @@
 \page dcmdump dcmdump: Dump DICOM file and data set
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmdump_synopsis SYNOPSIS
 
 \verbatim
 dcmdump [options] dcmfile-in...
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmdump_description DESCRIPTION
 
 The \b dcmdump utility dumps the contents of a DICOM file (file format or raw
 data set) to stdout in textual form.  Attributes with very large value fields
@@ -30,15 +30,15 @@ whenever possible (using the \b dcmconv utility).  It is also possible to use
 the \e -f and <em>-t[ieb]</em> options to force \b dcmdump to read a dataset
 with a particular transfer syntax.
 
-\section parameters PARAMETERS
+\section dcmdump_parameters PARAMETERS
 
 \verbatim
 dcmfile-in  DICOM input file or directory to be dumped
 \endverbatim
 
-\section options OPTIONS
+\section dcmdump_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmdump_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -66,7 +66,7 @@ dcmfile-in  DICOM input file or directory to be dumped
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmdump_input_options input options
 \verbatim
 input file format:
 
@@ -224,6 +224,12 @@ other parsing options:
   +st  --stop-after-elem  [t]ag: "gggg,eeee" or dictionary name
          stop parsing after element specified by t
 
+  +sb  --stop-before-elem [t]ag: "gggg,eeee" or dictionary name
+         stop parsing before element specified by t
+
+         # only considers elements on main dataset level and also
+         # works if the given tag is not present in the file
+
 automatic data correction:
 
   +dc  --enable-correction
@@ -241,7 +247,7 @@ bitstream format of deflated input:
          expect deflated zlib bitstream
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcmdump_processing_options processing options
 \verbatim
 specific character set:
 
@@ -253,7 +259,7 @@ specific character set:
          # (see output of --version on which one is available)
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmdump_output_options output options
 \verbatim
 printing:
 
@@ -343,7 +349,7 @@ writing:
          (little endian, filename created automatically)
 \endverbatim
 
-\section notes NOTES
+\section dcmdump_notes NOTES
 
 Adding directories as a parameter to the command line only makes sense if
 option \e --scan-directories is also given.  If the files in the provided
@@ -354,7 +360,7 @@ directories, and, if any other patterns are specified on the command line
 outside the \e --scan-pattern option (e.g. in order to select further
 files), these do not apply to the specified directories.
 
-\section logging LOGGING
+\section dcmdump_logging 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
@@ -373,7 +379,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmdump_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -395,7 +401,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmdump_environment ENVIRONMENT
 
 The \b dcmdump utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -411,11 +417,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dcmdump_see_also SEE ALSO
 
 <b>dump2dcm</b>(1), <b>dcmconv</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmdump_copyright COPYRIGHT
 
 Copyright (C) 1994-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmdata/docs/dcmftest.man b/dcmdata/docs/dcmftest.man
index c5c3d82..159ccaa 100644
--- a/dcmdata/docs/dcmftest.man
+++ b/dcmdata/docs/dcmftest.man
@@ -6,24 +6,24 @@
 \page dcmftest dcmftest: Test if file uses DICOM part 10 format
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmftest_synopsis SYNOPSIS
 
 \verbatim
 dcmftest file...
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmftest_description DESCRIPTION
 
 The \b dcmftest utility checks whether the files specified on the command line
 are DICOM files in part 10 format (with meta-header).
 
-\section parameters PARAMETERS
+\section dcmftest_parameters PARAMETERS
 
 \verbatim
 dcmfile-in  DICOM input filename to be dumped
 \endverbatim
 
-\section notes NOTES
+\section dcmftest_notes NOTES
 
 All files specified on the command line are checked for the presence of the
 DICOM "magic word" 'DICM' at byte position 128.  No attempt is made to parse
@@ -33,12 +33,12 @@ with a return code corresponding to the number of files found to be non-DICOM,
 i.e. if all files pass as DICOM files, the return value is 0.  This behavior
 is intended for use in shell script programming.
 
-\section see_also SEE ALSO
+\section dcmftest_see_also SEE ALSO
 
 <b>dcmgpdir</b>(1), <b>dcmmkdir</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmftest_copyright COPYRIGHT
 
 Copyright (C) 1997-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
-*/
\ No newline at end of file
+*/
diff --git a/dcmdata/docs/dcmgpdir.man b/dcmdata/docs/dcmgpdir.man
index ff287ab..34993f6 100644
--- a/dcmdata/docs/dcmgpdir.man
+++ b/dcmdata/docs/dcmgpdir.man
@@ -6,13 +6,13 @@
 \page dcmgpdir dcmgpdir: Create a general purpose DICOMDIR
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmgpdir_synopsis SYNOPSIS
 
 \verbatim
 dcmgpdir [options] [dcmfile-in...]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmgpdir_description DESCRIPTION
 
 The \b dcmgpdir utility creates a \e DICOMDIR file from the specified
 referenced DICOM files according to the DICOM Part 11 Media Storage
@@ -27,15 +27,15 @@ Currently, the following profiles are supported:
 Media Storage Application Profiles than the general purpose one (e.g. the
 cardio profiles require the use of icon images).
 
-\section parameters PARAMETERS
+\section dcmgpdir_parameters PARAMETERS
 
 \verbatim
 dcmfile-in  referenced DICOM file (or directory to be scanned)
 \endverbatim
 
-\section options OPTIONS
+\section dcmgpdir_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmgpdir_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -63,7 +63,7 @@ dcmfile-in  referenced DICOM file (or directory to be scanned)
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmgpdir_input_options input options
 \verbatim
 DICOMDIR identifiers:
 
@@ -104,7 +104,7 @@ reading:
           # possibly not available on all systems
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcmgpdir_processing_options processing options
 \verbatim
 consistency check:
 
@@ -141,7 +141,7 @@ other checks:
           (just warn)
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmgpdir_output_options output options
 \verbatim
 DICOMDIR file:
 
@@ -196,7 +196,7 @@ length encoding in sequences and items:
           write with undefined lengths
 \endverbatim
 
-\section notes NOTES
+\section dcmgpdir_notes NOTES
 
 All files specified on the command line (or discovered by recursively examining
 the contents of directories with the \e +r option) are first evaluated for
@@ -219,7 +219,7 @@ Please note that this update process might be slower than just appending new
 entries.  However, it makes sure that additional information that is required
 for the selected application profile is also added to existing records.
 
-\subsection scanning_directories Scanning Directories
+\subsection dcmgpdir_scanning_directories Scanning Directories
 
 Adding files from directories is possible by using option \e --recurse.  If no
 further command line parameters are given, the directory specified by option
@@ -233,7 +233,7 @@ other patterns are specified on the command line outside the
 \e --input-directory option (e.g. in order to select further files), these do
 not apply to the specified directories.
 
-\section logging LOGGING
+\section dcmgpdir_logging 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
@@ -252,7 +252,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmgpdir_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -274,7 +274,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmgpdir_environment ENVIRONMENT
 
 The \b dcmgpdir utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -290,11 +290,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dcmgpdir_see_also SEE ALSO
 
 <b>dcmmkdir</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmgpdir_copyright COPYRIGHT
 
 Copyright (C) 1996-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmdata/docs/dcmodify.man b/dcmdata/docs/dcmodify.man
index b203180..f876431 100644
--- a/dcmdata/docs/dcmodify.man
+++ b/dcmdata/docs/dcmodify.man
@@ -6,13 +6,13 @@
 \page dcmodify dcmodify: Modify DICOM files
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmodify_synopsis SYNOPSIS
 
 \verbatim
 dcmodify [options] dcmfile-in...
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmodify_description DESCRIPTION
 
 \b dcmodify is a tool that allows one to modify, insert and delete tags and
 items in DICOM files.  Sequences and tags with a value multiplicity > 1 are
@@ -63,15 +63,15 @@ would exist, the rest (4) would be inserted.
 Please note that there are some issues concerning the modification of private
 tags (see PRIVATE TAGS section) and for changing UIDs (CHANGING UIDs section).
 
-\section parameters PARAMETERS
+\section dcmodify_parameters PARAMETERS
 
 \verbatim
 dcmfile-in  DICOM input filename(s) to be modified
 \endverbatim
 
-\section options OPTIONS
+\section dcmodify_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmodify_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -99,7 +99,7 @@ dcmfile-in  DICOM input filename(s) to be modified
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmodify_input_options input options
 \verbatim
 input file format:
 
@@ -157,7 +157,7 @@ bitstream format of deflated input:
           expect deflated zlib bitstream
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcmodify_processing_options processing options
 \verbatim
 backup input files:
 
@@ -229,7 +229,7 @@ error handling:
           having a VR of UN
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmodify_output_options output options
 \verbatim
 output file format:
 
@@ -293,13 +293,13 @@ data set trailing padding (not with --write-dataset):
           multiple of i bytes
 \endverbatim
 
-\section private_tags PRIVATE TAGS
+\section dcmodify_private_tags PRIVATE TAGS
 
 There are some issues you have to consider when working with private tags.
 However, the insertion or modification of a reservation tag (gggg,00xx) should
 always work.
 
-\subsection private_insertions Insertions
+\subsection dcmodify_private_insertions Insertions
 
 If you wish to insert a private tag (not a reservation with gggg,00xx), be
 sure, that you've listed it in your dictionary (see
@@ -319,7 +319,7 @@ the tag then cannot be found in the dictionary.
 See description above how inserting values into elements with unknown VR
 are handled.
 
-\subsection private_modifications Modifications
+\subsection dcmodify_private_modifications Modifications
 
 If you modify a private tags value, \b dcmodify won't check its VR against the
 dictionary.  So please be careful to enter only values that match the tag's VR.
@@ -332,7 +332,7 @@ it.  Then \b dcmodify uses your dictionary entry to determine the right VR
 Also, see description above how inserting values into elements with unknown VR
 are handled.
 
-\subsection private_deletions Deletions
+\subsection dcmodify_private_deletions Deletions
 
 When you use \b dcmodify to delete a private reservation tag, please note that
 \b dcmodify won't touch the private tags that are under this reservation.  The
@@ -341,7 +341,7 @@ associated private tags.
 
 For the deletion of private non-reservation tags there are no special issues.
 
-\section changing_uids CHANGING UIDS
+\section dcmodify_changing_uids CHANGING UIDS
 
 \b dcmodify will automatically correct 'Media Storage SOP Class UID' and
 'Media Storage SOP Instance UID' in the metaheader, if you make changes to the
@@ -362,7 +362,7 @@ When choosing the \e -gin option, the related metaheader tag ('Media Storage
 SOP Instance UID') is updated automatically.  This behavior cannot be
 disabled.
 
-\section creating_new_files CREATING NEW FILES
+\section dcmodify_creating_new_files CREATING NEW FILES
 
 Option \e --create-file lets \b dcmodify create a file if it does not already
 exist on disk. This can be used in order to create files from scratch by
@@ -375,7 +375,7 @@ is not permitted together with \e --create. This way, at least the metaheader
 is written and no file with zero byte length is created in a case where no
 insertions are performed in the \b dcmodify call.
 
-\section element_values_from_file ELEMENT VALUES FROM FILE
+\section dcmodify_element_values_from_file ELEMENT VALUES FROM FILE
 
 In order to read the element value from a file instead of specifying it on the
 command line, option \e -mf and \e -if can be used.  Please note that for OW
@@ -383,7 +383,7 @@ elements, the data is expected to be little endian ordered and will be swapped
 if necessary.  The file size should always be an even number of bytes, i.e. no
 automatic padding is performed.
 
-\section wildcards WILDCARDS
+\section dcmodify_wildcards WILDCARDS
 
 \b dcmodify also permits the usage of a wildcard character "*" for item numbers
 in path expressions, e.g. "ContentSequence[*].CodeValue" selects all "Code
@@ -397,7 +397,7 @@ The options \e -ma and \e -ea for modifying or deleting all occurrences of a
 DICOM element based on its tag do not accept any wildcards but only work on
 single elements (i.e. a single dictionary name or tag key).
 
-\section examples EXAMPLES
+\section dcmodify_examples EXAMPLES
 
 \verbatim
 -i   --insert:
@@ -507,7 +507,7 @@ single elements (i.e. a single dictionary name or tag key).
 
 \endverbatim
 
-\section error_handling ERROR HANDLING
+\section dcmodify_error_handling ERROR HANDLING
 
 \b dcmodify tries executing each modify operation given on command line: If
 one returns an error, the others are being performed anyway.  However in case
@@ -522,7 +522,7 @@ treated as being successful.  That does make sense if someone wants to be sure
 that specific tags are not present in the file or that - if they exist - that
 they are set to a specific value.
 
-\section logging LOGGING
+\section dcmodify_logging 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
@@ -541,7 +541,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmodify_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -563,7 +563,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmodify_environment ENVIRONMENT
 
 The \b dcmodify utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -579,7 +579,7 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section copyright COPYRIGHT
+\section dcmodify_copyright COPYRIGHT
 
 Copyright (C) 2003-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmdata/docs/dump2dcm.man b/dcmdata/docs/dump2dcm.man
index 98f2e13..b1ad195 100644
--- a/dcmdata/docs/dump2dcm.man
+++ b/dcmdata/docs/dump2dcm.man
@@ -6,20 +6,20 @@
 \page dump2dcm dump2dcm: Convert ASCII dump to DICOM file
 \endif
 
-\section synopsis SYNOPSIS
+\section dump2dcm_synopsis SYNOPSIS
 
 \verbatim
 dump2dcm [options] dumpfile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dump2dcm_description DESCRIPTION
 
 The \b dump2dcm utility converts an ASCII dump file to a DICOM file.  The
 dump file has the same format as the output of \b dcmdump.  Thus it is possible
 to capture the output of \b dcmdump into a file, modify some attributes and
 create a new DICOM file.
 
-\section parameters PARAMETERS
+\section dump2dcm_parameters PARAMETERS
 
 \verbatim
 dumpfile-in  dump input filename
@@ -27,9 +27,9 @@ dumpfile-in  dump input filename
 dcmfile-out  DICOM output filename
 \endverbatim
 
-\section options OPTIONS
+\section dump2dcm_options OPTIONS
 
-\subsection general_options general options
+\subsection dump2dcm_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -57,7 +57,7 @@ dcmfile-out  DICOM output filename
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dump2dcm_input_options input options
 \verbatim
 input file format:
 
@@ -81,7 +81,7 @@ other input options:
          maximum line length m (default: 4096)
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dump2dcm_processing_options processing options
 \verbatim
 unique identifiers:
 
@@ -95,7 +95,7 @@ unique identifiers:
          overwrite existing UIDs
 \endverbatim
 
-\subsection output_options output options
+\subsection dump2dcm_output_options output options
 \verbatim
 output file format:
 
@@ -178,9 +178,9 @@ deflate compression level (only with --write-xfer-deflated):
          0=uncompressed, 1=fastest, 9=best compression
 \endverbatim
 
-\section notes NOTES
+\section dump2dcm_notes NOTES
 
-\subsection notes_description Dump File Description
+\subsection dump2dcm_notes_description Dump File Description
 
 The input file can be an output of \b dcmdump (default indented format only).
 One element (tag, VR, value) must be written into one line separated by
@@ -231,7 +231,7 @@ Value: There are several rules for writing values:
           not detected.
 \endverbatim
 
-\subsection notes_example Example
+\subsection dump2dcm_notes_example Example
 
 \verbatim
  (0008,0020) DA [19921012]            #  8, 1 StudyDate
@@ -243,13 +243,13 @@ Value: There are several rules for writing values:
  (0002,0001) OB 01\\00
 \endverbatim
 
-\subsection limitations Limitations
+\subsection dump2dcm_limitations Limitations
 
 Please note that \b dump2dcm currently does not fully support DICOMDIR files.
 Specifically, the value of the various offset data elements is not updated
 automatically by this tool.
 
-\section logging LOGGING
+\section dump2dcm_logging 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
@@ -268,7 +268,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dump2dcm_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -290,7 +290,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dump2dcm_environment ENVIRONMENT
 
 The \b dump2dcm utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -306,11 +306,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dump2dcm_see_also SEE ALSO
 
 <b>dcmdump</b>(1)
 
-\section copyright COPYRIGHT
+\section dump2dcm_copyright COPYRIGHT
 
 Copyright (C) 1996-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmdata/docs/img2dcm.man b/dcmdata/docs/img2dcm.man
index 53c6d07..dbae263 100644
--- a/dcmdata/docs/img2dcm.man
+++ b/dcmdata/docs/img2dcm.man
@@ -6,13 +6,13 @@
 \page img2dcm img2dcm: Convert standard image formats into DICOM format
 \endif
 
-\section synopsis SYNOPSIS
+\section img2dcm_synopsis SYNOPSIS
 
 \verbatim
 img2dcm [options] imgfile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section img2dcm_description DESCRIPTION
 
 The \b img2dcm tool serves as a conversion tool from a standard image format
 like JPEG or BMP to DICOM. Different output SOP Classes can be selected. The
@@ -22,15 +22,15 @@ for the resulting DICOM object. \b img2dcm can also be configured to invent
 missing DICOM type 1 and type 2 attributes to work even without any template
 dataset.
 
-\section parameters PARAMETERS
+\section img2dcm_parameters PARAMETERS
 \verbatim
 imgfile-in   image file to be imported
 
 dcmfile-out  DICOM output file
 \endverbatim
 
-\section options OPTIONS
-\subsection general_options general options
+\section img2dcm_options OPTIONS
+\subsection img2dcm_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -58,7 +58,7 @@ dcmfile-out  DICOM output file
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection img2dcm_input_options input options
 \verbatim
 general:
 
@@ -92,7 +92,7 @@ JPEG format:
           keep APPn sections (except JFIF)
 \endverbatim
 
-\subsection processing_options processing options
+\subsection img2dcm_processing_options processing options
 \verbatim
 attribute checking:
 
@@ -132,7 +132,7 @@ other processing options:
           add further attribute
 \endverbatim
 
-\subsection output_options output options
+\subsection img2dcm_output_options output options
 \verbatim
 target SOP class:
 
@@ -182,9 +182,9 @@ data set trailing padding (not with --write-dataset):
           and items on multiple of i bytes
 \endverbatim
 
-\section notes NOTES
+\section img2dcm_notes NOTES
 
-\subsection attribute_sources Attribute Sources
+\subsection img2dcm_attribute_sources Attribute Sources
 
 For converting a general image format into DICOM format, the \b img2dcm
 application may be fed with some additional input for filling mandatory (and
@@ -247,7 +247,7 @@ order:
     notation has to be used. Details on this path notation can be found in the
     documentation of \b dcmodify.
 
-\subsection uids UIDs
+\subsection img2dcm_uids UIDs
 
 New Study and Series Instance UIDs are generated <b>if necessary</b> after
 applying the \e --study-from and \e --series options. If Study Instance UID or
@@ -260,7 +260,7 @@ be the desirable behavior for most use cases. However, if a certain SOP
 Instance UID should be inserted into the new object, the \e --key option should
 be used.
 
-\subsection input_templates Input Templates
+\subsection img2dcm_input_templates Input Templates
 
 For supporting the conversion into DICOM, \b img2dcm comes with some
 pre-defined templates which can be used for the \e --dataset-from option (see
@@ -278,12 +278,12 @@ attributes are present which should be part of the constructed DICOM object.
 The SOP Class UID and the Pixel Data attributes (including attributes like
 Rows, Columns etc.) are not copied but replaced by \b img2dcm during conversion.
 
-\subsection input_plugins Input Plugins
+\subsection img2dcm_input_plugins Input Plugins
 
 The \b img2dcm application currently supports the JPEG and the BMP image format
 as input.
 
-\subsubsection jpeg_input_plugin JPEG Input Plugin
+\subsubsection img2dcm_jpeg_input_plugin JPEG Input Plugin
 
 For JPEG, the original JPEG from the source file is not decoded but extracted
 and slightly transformed (e. g. JFIF header is cut off) to allow fast
@@ -333,7 +333,7 @@ does the trick. It should also be slightly faster than cutting off APPn
 information, because it is not necessary to scan the whole JPEG stream for
 such data. JFIF information is \b always removed by \b img2dcm.
 
-\subsubsection bmp_input_plugin BMP Input Plugin
+\subsubsection img2dcm_bmp_input_plugin BMP Input Plugin
 
 \b img2dcm supports BMP as input format. However, so far only the most common
 BMP images are supported.  In particular, BMP images which use bit fields or
@@ -341,7 +341,7 @@ run length encoding will be rejected. Such images are uncommon. All input images
 will be converted into a DICOM image with RGB color model and a bit depth of 24.
 There are no specific options for fine-tuning BMP format conversion.
 
-\subsection output_plugins Output Plugins
+\subsection img2dcm_output_plugins Output Plugins
 
 The desired output SOP Class can be selected on the command line. Currently,
 an export plugin for the Secondary Capture Image SOP class (default, option
@@ -357,7 +357,7 @@ classes are differentiated from each other by color depth (1/8/16) and the
 fact whether the image is black/white or color. That is why \b img2dcm decides
 during conversion, which output SOP class is suitable for a given source image.
 
-\section examples EXAMPLES
+\section img2dcm_examples EXAMPLES
 
 Here are some examples that show how the \b img2dcm application can be used.
 
@@ -421,7 +421,7 @@ object's resulting JPEG stream. Further, \e --insist-on-jfif will force
 
 </ol>
 
-\section logging LOGGING
+\section img2dcm_logging 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
@@ -440,7 +440,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section img2dcm_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -462,7 +462,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section img2dcm_environment ENVIRONMENT
 
 The \b img2dcm utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -478,18 +478,18 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section img2dcm_files FILES
 
 <em>\<datadir\>/SC.dump</em> - Sample dump file for Secondary Capture images
 \n<em>\<datadir\>/VLP.dump</em> - Sample dump file for Visible Light Photographic
 images
 
-\section see_also SEE ALSO
+\section img2dcm_see_also SEE ALSO
 
 <b>dcm2pnm</b>(1), <b>dcmj2pnm</b>(1), <b>dump2dcm</b>(1), <b>dcmconv</b>(1),
 <b>dcmodify</b>(1)
 
-\section copyright COPYRIGHT
+\section img2dcm_copyright COPYRIGHT
 
 Copyright (C) 2007-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmdata/docs/pdf2dcm.man b/dcmdata/docs/pdf2dcm.man
index 377cfec..ca61c82 100644
--- a/dcmdata/docs/pdf2dcm.man
+++ b/dcmdata/docs/pdf2dcm.man
@@ -6,19 +6,19 @@
 \page pdf2dcm pdf2dcm: Convert PDF file to DICOM
 \endif
 
-\section synopsis SYNOPSIS
+\section pdf2dcm_synopsis SYNOPSIS
 
 \verbatim
 pdf2dcm [options] pdffile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section pdf2dcm_description DESCRIPTION
 
 The \b pdf2dcm utility reads a PDF file (\e pdffile-in), converts it to a
 DICOM Encapsulated PDF Storage SOP instance and stores the converted data
 to an output file (\e dcmfile-out).
 
-\section parameters PARAMETERS
+\section pdf2dcm_parameters PARAMETERS
 
 \verbatim
 pdffile-in   PDF input filename to be converted
@@ -26,9 +26,9 @@ pdffile-in   PDF input filename to be converted
 dcmfile-out  DICOM output filename
 \endverbatim
 
-\section options OPTIONS
+\section pdf2dcm_options OPTIONS
 
-\subsection general_options general options
+\subsection pdf2dcm_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -56,7 +56,7 @@ dcmfile-out  DICOM output filename
          use config file f for the logger
 \endverbatim
 
-\subsection dicom_document_options DICOM document options
+\subsection pdf2dcm_dicom_document_options DICOM document options
 \verbatim
 burned-in annotation:
 
@@ -112,7 +112,7 @@ instance number:
          use instance number i
 \endverbatim
 
-\section logging LOGGING
+\section pdf2dcm_logging 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
@@ -131,7 +131,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section pdf2dcm_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -153,7 +153,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section pdf2dcm_environment ENVIRONMENT
 
 The \b pdf2dcm utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -169,11 +169,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section pdf2dcm_see_also SEE ALSO
 
 <b>dcm2pdf</b>(1)
 
-\section copyright COPYRIGHT
+\section pdf2dcm_copyright COPYRIGHT
 
 Copyright (C) 2005-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmdata/docs/xml2dcm.man b/dcmdata/docs/xml2dcm.man
index c54243b..a65e447 100644
--- a/dcmdata/docs/xml2dcm.man
+++ b/dcmdata/docs/xml2dcm.man
@@ -6,13 +6,13 @@
 \page xml2dcm xml2dcm: Convert XML document to DICOM file or data set
 \endif
 
-\section synopsis SYNOPSIS
+\section xml2dcm_synopsis SYNOPSIS
 
 \verbatim
 xml2dcm [options] xmlfile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section xml2dcm_description DESCRIPTION
 
 The \b xml2dcm utility converts the contents of an XML (Extensible Markup
 Language) document to DICOM file or data set.  The XML document is expected to
@@ -20,7 +20,7 @@ validate against the DTD (Document Type Definition) which is described in file
 <em>dcm2xml.dtd</em>.  An appropriate XML file can be created using the
 \b dcm2xml tool (option \e +Wb recommended to include binary data).
 
-\section parameters PARAMETERS
+\section xml2dcm_parameters PARAMETERS
 
 \verbatim
 xmlfile-in   XML input filename to be converted (stdin: "-")
@@ -28,9 +28,9 @@ xmlfile-in   XML input filename to be converted (stdin: "-")
 dcmfile-out  DICOM output filename
 \endverbatim
 
-\section options OPTIONS
+\section xml2dcm_options OPTIONS
 
-\subsection general_options general options
+\subsection xml2dcm_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -58,7 +58,7 @@ dcmfile-out  DICOM output filename
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection xml2dcm_input_options input options
 \verbatim
 input file format:
 
@@ -69,7 +69,7 @@ input file format:
          ignore file meta information
 \endverbatim
 
-\subsection processing_options processing options
+\subsection xml2dcm_processing_options processing options
 \verbatim
 validation:
 
@@ -91,7 +91,7 @@ unique identifiers:
          overwrite existing UIDs
 \endverbatim
 
-\subsection output_options output options
+\subsection xml2dcm_output_options output options
 \verbatim
 output file format:
 
@@ -166,7 +166,7 @@ deflate compression level (only with --write-xfer-deflated):
          0=uncompressed, 1=fastest, 9=best compression
 \endverbatim
 
-\section notes NOTES
+\section xml2dcm_notes NOTES
 
 The basic structure of the XML input expected looks like the following:
 
@@ -211,7 +211,7 @@ The basic structure of the XML input expected looks like the following:
 
 The "file-format" and "meta-header" tags may be absent for DICOM data sets.
 
-\subsection character_encoding Character Encoding
+\subsection xml2dcm_character_encoding Character Encoding
 
 The DICOM character encoding is determined automatically from the element with
 tag "0008,0005" (Specific Character Set) - if present.  The following
@@ -238,7 +238,7 @@ multiplicity).
 
 See \b dcm2xml documentation for more details on the XML structure.
 
-\subsection binary_data Binary Data
+\subsection xml2dcm_binary_data Binary Data
 
 Binary data can be encoded either as a sequence of hex numbers separated by a
 backslash "\" or in Base64 format (binary="base64").  In addition, binary data
@@ -254,14 +254,14 @@ expected to be little endian ordered and will be swapped if necessary.  No
 checks will be made to ensure that the amount of data is reasonable in terms
 of other attributes such as Rows or Columns.
 
-\subsection compression Compression
+\subsection xml2dcm_compression Compression
 
 If libxml is compiled with zlib support, the input file (\e xmlfile-in) can
 also be compressed with ZIP, which usually results in much smaller files.  See
 output of option \e --version in order to check whether zlib support is
 available.
 
-\subsection limitations Limitations
+\subsection xml2dcm_limitations Limitations
 
 Different versions of libxml might have different limits for the maximum
 length of an XML element value.  Therefore, it should be avoided to use very
@@ -271,7 +271,7 @@ Please note that \b xml2dcm currently does not fully support DICOMDIR files.
 Specifically, the value of the various offset data elements is not updated
 automatically by this tool.
 
-\section logging LOGGING
+\section xml2dcm_logging 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
@@ -290,7 +290,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section xml2dcm_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -312,7 +312,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section xml2dcm_environment ENVIRONMENT
 
 The \b xml2dcm utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -328,15 +328,15 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section xml2dcm_files FILES
 
 <em>\<datadir\>/dcm2xml.dtd</em> - Document Type Definition (DTD) file
 
-\section see_also SEE ALSO
+\section xml2dcm_see_also SEE ALSO
 
 <b>dcm2xml</b>(1)
 
-\section copyright COPYRIGHT
+\section xml2dcm_copyright COPYRIGHT
 
 Copyright (C) 2003-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmdata/include/CMakeLists.txt b/dcmdata/include/CMakeLists.txt
index fb1b52f..9537307 100644
--- a/dcmdata/include/CMakeLists.txt
+++ b/dcmdata/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmdata DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmdata DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmdata/include/dcmtk/dcmdata/dcbytstr.h b/dcmdata/include/dcmtk/dcmdata/dcbytstr.h
index ecb8686..4ec28f3 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcbytstr.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcbytstr.h
@@ -90,13 +90,15 @@ class DCMTK_DCMDATA_EXPORT DcmByteString: public DcmElement
      *  object (if applicable).
      *  @param  rhs the right hand side of the comparison
      *  @return 0 if the object values are equal.
-     *          -1 if either the value of the  first component that does not match
-     *          is lower in this object than in rhs, or all compared components match
-     *          but this object has fewer components than rhs. Also returned if rhs
-     *          cannot be casted to this object type.
-     *          1 if either the value of the first component that does not match
-     *          is greater in this object than in rhs object, or all compared
-     *          components match but the this component is longer.
+     *          -1 if this element has fewer components than the rhs element.
+     *          Also -1 if the value of the first component that does not match
+     *          is lower in this object than in rhs. Also returned if rhs
+     *          cannot be casted to this object type or both objects are of
+     *          different VR (i.e. the DcmEVR returned by the element's ident()
+     *          call are different).
+     *          1 if either this element has more components than the rhs element, or
+     *          if the first component that does not match is greater in this object than
+     *          in rhs object.
      */
     virtual int compare(const DcmElement& rhs) const;
 
@@ -291,6 +293,28 @@ class DCMTK_DCMDATA_EXPORT DcmByteString: public DcmElement
     virtual OFCondition writeJson(STD_NAMESPACE ostream &out,
                                   DcmJsonFormat &format);
 
+    /// @copydoc DcmElement::matches()
+    virtual OFBool matches(const DcmElement& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
+    /** perform attribute matching on a single pair of string values.
+     *  Compare two single string values using the attribute matching function appropriate for
+     *  this element's VR (Universal Matching, Single Value Matching, Wild Card Matching or
+     *  Range Matching).
+     *  @note This method is called by the other overload of matches() for each combination of
+     *    values in the key and candidate element (implementing multi value matching for
+     *    elements with VM>1).
+     *  @param key the key value to match against the candidate.
+     *  @param candidate the candidate value to match the key against.
+     *  @param enableWildCardMatching enable or disable wild card matching. Defaults to OFTrue,
+     *    which means wild card matching is performed if the element's VR supports it. Set to
+     *    OFFalse to force single value matching instead.
+     *  @return OFTrue if the candidate string matches the key string, OFFalse otherwise.
+     */
+    virtual OFBool matches(const OFString& key,
+                           const OFString& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
  protected:
 
     /** constructor. Create new element from given tag and length.
diff --git a/dcmdata/include/dcmtk/dcmdata/dcchrstr.h b/dcmdata/include/dcmtk/dcmdata/dcchrstr.h
index 741ab78..4abb828 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcchrstr.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcchrstr.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -138,6 +138,14 @@ class DCMTK_DCMDATA_EXPORT DcmCharString
     virtual OFCondition writeJson(STD_NAMESPACE ostream &out,
                                   DcmJsonFormat &format);
 
+    // ensure inherited overloads of matches take part in overload resolution
+    using DcmByteString::matches;
+
+    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    virtual OFBool matches(const OFString& key,
+                           const OFString& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
   protected:
 
     /** get value of the SpecificCharacterSet element of the surrounding dataset/item
diff --git a/dcmdata/include/dcmtk/dcmdata/dcdatset.h b/dcmdata/include/dcmtk/dcmdata/dcdatset.h
index 78a8beb..069ea11 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcdatset.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcdatset.h
@@ -185,6 +185,30 @@ class DCMTK_DCMDATA_EXPORT DcmDataset
                              const E_GrpLenEncoding glenc = EGL_noChange,
                              const Uint32 maxReadLength = DCM_MaxReadLength);
 
+    /** This function reads the information of all attributes which
+     *  are captured in the input stream and captures this information
+     *  in this->elementList, up to the attribute tag stopParsingAtElement.
+     *  Each attribute is represented as an
+     *  element in this list. Having read all information for this
+     *  particular data set or command, this function will also take
+     *  care of group length (according to what is specified in glenc)
+     *  and padding elements (don't change anything).
+     *  @param inStream      The stream which contains the information.
+     *  @param xfer          The transfer syntax which was used to encode
+     *                       the information in inStream.
+     *  @param glenc         Encoding type for group length; specifies what
+     *                       will be done with group length tags.
+     *  @param maxReadLength Maximum read length for reading an attribute value.
+     *  @param stopParsingAtElement parsing of the input stream is stopped when
+     *                       this tag key or any higher tag is encountered.
+     *  @return status, EC_Normal if successful, an error code otherwise
+     */
+    virtual OFCondition readUntilTag(DcmInputStream &inStream,
+                                     const E_TransferSyntax xfer = EXS_Unknown,
+                                     const E_GrpLenEncoding glenc = EGL_noChange,
+                                     const Uint32 maxReadLength = DCM_MaxReadLength,
+                                     const DcmTagKey &stopParsingAtElement = DCM_UndefinedTagKey);
+
     /** write dataset to a stream
      *  @param outStream DICOM output stream
      *  @param oxfer output transfer syntax (EXS_Unknown means use original)
@@ -297,6 +321,27 @@ class DCMTK_DCMDATA_EXPORT DcmDataset
                                  const E_GrpLenEncoding groupLength = EGL_noChange,
                                  const Uint32 maxReadLength = DCM_MaxReadLength);
 
+    /** load object from a DICOM file, up to the attribute tag stopParsingAtElement.
+     *  This method only supports DICOM objects stored as a dataset, i.e. without meta header.
+     *  Use DcmFileFormat::loadFile() to load files with meta header.
+     *  @param fileName name of the file to load (may contain wide chars if support enabled).
+     *    Since there are various constructors for the OFFilename class, a "char *", "OFString"
+     *    or "wchar_t *" can also be passed directly to this parameter.
+     *  @param readXfer transfer syntax used to read the data (auto detection if EXS_Unknown)
+     *  @param groupLength flag, specifying how to handle the group length tags
+     *  @param maxReadLength maximum number of bytes to be read for an element value.
+     *    Element values with a larger size are not loaded until their value is retrieved
+     *    (with getXXX()) or loadAllDataIntoMemory() is called.
+     *  @param stopParsingAtElement parsing of the input stream is stopped when
+     *                       this tag key or any higher tag is encountered.
+     *  @return status, EC_Normal if successful, an error code otherwise
+     */
+    virtual OFCondition loadFileUntilTag(const OFFilename &fileName,
+                                 const E_TransferSyntax readXfer = EXS_Unknown,
+                                 const E_GrpLenEncoding groupLength = EGL_noChange,
+                                 const Uint32 maxReadLength = DCM_MaxReadLength,
+                                 const DcmTagKey &stopParsingAtElement = DCM_UndefinedTagKey);
+
     /** save object to a DICOM file.
      *  This method only supports DICOM objects stored as a dataset, i.e. without meta header.
      *  Use DcmFileFormat::saveFile() to save files with meta header.
diff --git a/dcmdata/include/dcmtk/dcmdata/dcdeftag.h b/dcmdata/include/dcmtk/dcmdata/dcdeftag.h
index 53c22fd..b163259 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcdeftag.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcdeftag.h
@@ -4,7 +4,7 @@
 **
 **   User: joergr
 **   Host: thinkpad
-**   Date: 2017-01-31 14:11:01
+**   Date: 2017-06-15 10:51:06
 **   Prog: /home/joergr/Source/dcmtk-full/public/dcmdata/libsrc/mkdeftag
 **
 **   From: ../data/dicom.dic
@@ -17,12 +17,12 @@
 
 #include "dcmtk/dcmdata/dctagkey.h"
 
-#define DCM_DICT_DEFTAG_BUILD_DATE "2017-01-31 14:11:01"
+#define DCM_DICT_DEFTAG_BUILD_DATE "2017-06-15 10:51:06"
 
 
 /*
 ** Fixed Tags in ascending (gggg,eeee) order.
-** Number of entries: 4176
+** Number of entries: 4229
 ** Tags with a repeating component (repeating tags) are listed later.
 */
 #define DCM_CommandGroupLength                   DcmTagKey(0x0000, 0x0000)
@@ -342,7 +342,7 @@
 #define DCM_GeneticModificationsDescription      DcmTagKey(0x0010, 0x0222)
 #define DCM_GeneticModificationsNomenclature     DcmTagKey(0x0010, 0x0223)
 #define DCM_GeneticModificationsCodeSequence     DcmTagKey(0x0010, 0x0229)
-#define DCM_OtherPatientIDs                      DcmTagKey(0x0010, 0x1000)
+#define DCM_RETIRED_OtherPatientIDs              DcmTagKey(0x0010, 0x1000)
 #define DCM_OtherPatientNames                    DcmTagKey(0x0010, 0x1001)
 #define DCM_OtherPatientIDsSequence              DcmTagKey(0x0010, 0x1002)
 #define DCM_PatientBirthName                     DcmTagKey(0x0010, 0x1005)
@@ -358,7 +358,7 @@
 #define DCM_PatientMotherBirthName               DcmTagKey(0x0010, 0x1060)
 #define DCM_MilitaryRank                         DcmTagKey(0x0010, 0x1080)
 #define DCM_BranchOfService                      DcmTagKey(0x0010, 0x1081)
-#define DCM_MedicalRecordLocator                 DcmTagKey(0x0010, 0x1090)
+#define DCM_RETIRED_MedicalRecordLocator         DcmTagKey(0x0010, 0x1090)
 #define DCM_ReferencedPatientPhotoSequence       DcmTagKey(0x0010, 0x1100)
 #define DCM_MedicalAlerts                        DcmTagKey(0x0010, 0x2000)
 #define DCM_Allergies                            DcmTagKey(0x0010, 0x2110)
@@ -1669,6 +1669,25 @@
 #define DCM_YCoordinatesCenterPixelViewAngle     DcmTagKey(0x0022, 0x1529)
 #define DCM_NumberOfMapPoints                    DcmTagKey(0x0022, 0x1530)
 #define DCM_TwoDimensionalToThreeDimensionalMapData DcmTagKey(0x0022, 0x1531)
+#define DCM_DerivationAlgorithmSequence          DcmTagKey(0x0022, 0x1612)
+#define DCM_OphthalmicImageTypeCodeSequence      DcmTagKey(0x0022, 0x1615)
+#define DCM_OphthalmicImageTypeDescription       DcmTagKey(0x0022, 0x1616)
+#define DCM_ScanPatternTypeCodeSequence          DcmTagKey(0x0022, 0x1618)
+#define DCM_ReferencedSurfaceMeshIdentificationSequence DcmTagKey(0x0022, 0x1620)
+#define DCM_OphthalmicVolumetricPropertiesFlag   DcmTagKey(0x0022, 0x1622)
+#define DCM_OphthalmicAnatomicReferencePointXCoordinate DcmTagKey(0x0022, 0x1624)
+#define DCM_OphthalmicAnatomicReferencePointYCoordinate DcmTagKey(0x0022, 0x1626)
+#define DCM_OphthalmicEnFaceImageQualityRatingSequence DcmTagKey(0x0022, 0x1628)
+#define DCM_QualityThreshold                     DcmTagKey(0x0022, 0x1630)
+#define DCM_OCTBscanAnalysisAcquisitionParametersSequence DcmTagKey(0x0022, 0x1640)
+#define DCM_NumberofBscansPerFrame               DcmTagKey(0x0022, 0x1642)
+#define DCM_BscanSlabThickness                   DcmTagKey(0x0022, 0x1643)
+#define DCM_DistanceBetweenBscanSlabs            DcmTagKey(0x0022, 0x1644)
+#define DCM_BscanCycleTime                       DcmTagKey(0x0022, 0x1645)
+#define DCM_BscanCycleTimeVector                 DcmTagKey(0x0022, 0x1646)
+#define DCM_AscanRate                            DcmTagKey(0x0022, 0x1649)
+#define DCM_BscanRate                            DcmTagKey(0x0022, 0x1650)
+#define DCM_SurfaceMeshZPixelOffset              DcmTagKey(0x0022, 0x1658)
 #define DCM_VisualFieldHorizontalExtent          DcmTagKey(0x0024, 0x0010)
 #define DCM_VisualFieldVerticalExtent            DcmTagKey(0x0024, 0x0011)
 #define DCM_VisualFieldShape                     DcmTagKey(0x0024, 0x0012)
@@ -2284,6 +2303,7 @@
 #define DCM_StorageURL                           DcmTagKey(0x0040, 0x4073)
 #define DCM_XDSStorageSequence                   DcmTagKey(0x0040, 0x4074)
 #define DCM_EntranceDoseInmGy                    DcmTagKey(0x0040, 0x8302)
+#define DCM_EntranceDoseDerivation               DcmTagKey(0x0040, 0x8303)
 #define DCM_ParametricMapFrameTypeSequence       DcmTagKey(0x0040, 0x9092)
 #define DCM_ReferencedImageRealWorldValueMappingSequence DcmTagKey(0x0040, 0x9094)
 #define DCM_RealWorldValueMappingSequence        DcmTagKey(0x0040, 0x9096)
@@ -2799,7 +2819,7 @@
 #define DCM_HPGLDocumentID                       DcmTagKey(0x0068, 0x62d0)
 #define DCM_HPGLDocumentLabel                    DcmTagKey(0x0068, 0x62d5)
 #define DCM_ViewOrientationCodeSequence          DcmTagKey(0x0068, 0x62e0)
-#define DCM_ViewOrientationModifier              DcmTagKey(0x0068, 0x62f0)
+#define DCM_ViewOrientationModifierCodeSequence  DcmTagKey(0x0068, 0x62f0)
 #define DCM_HPGLDocumentScaling                  DcmTagKey(0x0068, 0x62f2)
 #define DCM_HPGLDocument                         DcmTagKey(0x0068, 0x6300)
 #define DCM_HPGLContourPenNumber                 DcmTagKey(0x0068, 0x6310)
@@ -2968,9 +2988,14 @@
 #define DCM_InputSequencePositionIndex           DcmTagKey(0x0070, 0x1203)
 #define DCM_Crop                                 DcmTagKey(0x0070, 0x1204)
 #define DCM_CroppingSpecificationIndex           DcmTagKey(0x0070, 0x1205)
-#define DCM_CompositingMethod                    DcmTagKey(0x0070, 0x1206)
+#define DCM_RETIRED_CompositingMethod            DcmTagKey(0x0070, 0x1206)
 #define DCM_VolumetricPresentationInputNumber    DcmTagKey(0x0070, 0x1207)
 #define DCM_ImageVolumeGeometry                  DcmTagKey(0x0070, 0x1208)
+#define DCM_VolumetricPresentationInputSetUID    DcmTagKey(0x0070, 0x1209)
+#define DCM_VolumetricPresentationInputSetSequence DcmTagKey(0x0070, 0x120a)
+#define DCM_GlobalCrop                           DcmTagKey(0x0070, 0x120b)
+#define DCM_GlobalCroppingSpecificationIndex     DcmTagKey(0x0070, 0x120c)
+#define DCM_RenderingMethod                      DcmTagKey(0x0070, 0x120d)
 #define DCM_VolumeCroppingSequence               DcmTagKey(0x0070, 0x1301)
 #define DCM_VolumeCroppingMethod                 DcmTagKey(0x0070, 0x1302)
 #define DCM_BoundingBoxCrop                      DcmTagKey(0x0070, 0x1303)
@@ -2988,6 +3013,18 @@
 #define DCM_VolumetricCurvePoints                DcmTagKey(0x0070, 0x150d)
 #define DCM_MPRViewHeightDirection               DcmTagKey(0x0070, 0x1511)
 #define DCM_MPRViewHeight                        DcmTagKey(0x0070, 0x1512)
+#define DCM_RenderProjection                     DcmTagKey(0x0070, 0x1602)
+#define DCM_ViewpointPosition                    DcmTagKey(0x0070, 0x1603)
+#define DCM_ViewpointLookAtPoint                 DcmTagKey(0x0070, 0x1604)
+#define DCM_ViewpointUpDirection                 DcmTagKey(0x0070, 0x1605)
+#define DCM_RenderFieldOfView                    DcmTagKey(0x0070, 0x1606)
+#define DCM_SamplingStepSize                     DcmTagKey(0x0070, 0x1607)
+#define DCM_ShadingStyle                         DcmTagKey(0x0070, 0x1701)
+#define DCM_AmbientReflectionIntensity           DcmTagKey(0x0070, 0x1702)
+#define DCM_LightDirection                       DcmTagKey(0x0070, 0x1703)
+#define DCM_DiffuseReflectionIntensity           DcmTagKey(0x0070, 0x1704)
+#define DCM_SpecularReflectionIntensity          DcmTagKey(0x0070, 0x1705)
+#define DCM_Shininess                            DcmTagKey(0x0070, 0x1706)
 #define DCM_PresentationStateClassificationComponentSequence DcmTagKey(0x0070, 0x1801)
 #define DCM_ComponentType                        DcmTagKey(0x0070, 0x1802)
 #define DCM_ComponentInputSequence               DcmTagKey(0x0070, 0x1803)
@@ -3005,6 +3042,21 @@
 #define DCM_RecommendedAnimationRate             DcmTagKey(0x0070, 0x1a03)
 #define DCM_AnimationCurveSequence               DcmTagKey(0x0070, 0x1a04)
 #define DCM_AnimationStepSize                    DcmTagKey(0x0070, 0x1a05)
+#define DCM_SwivelRange                          DcmTagKey(0x0070, 0x1a06)
+#define DCM_VolumetricCurveUpDirections          DcmTagKey(0x0070, 0x1a07)
+#define DCM_VolumeStreamSequence                 DcmTagKey(0x0070, 0x1a08)
+#define DCM_RGBATransferFunctionDescription      DcmTagKey(0x0070, 0x1a09)
+#define DCM_AdvancedBlendingSequence             DcmTagKey(0x0070, 0x1b01)
+#define DCM_BlendingInputNumber                  DcmTagKey(0x0070, 0x1b02)
+#define DCM_BlendingDisplayInputSequence         DcmTagKey(0x0070, 0x1b03)
+#define DCM_BlendingDisplaySequence              DcmTagKey(0x0070, 0x1b04)
+#define DCM_BlendingMode                         DcmTagKey(0x0070, 0x1b06)
+#define DCM_TimeSeriesBlending                   DcmTagKey(0x0070, 0x1b07)
+#define DCM_GeometryForDisplay                   DcmTagKey(0x0070, 0x1b08)
+#define DCM_ThresholdSequence                    DcmTagKey(0x0070, 0x1b11)
+#define DCM_ThresholdValueSequence               DcmTagKey(0x0070, 0x1b12)
+#define DCM_ThresholdType                        DcmTagKey(0x0070, 0x1b13)
+#define DCM_ThresholdValue                       DcmTagKey(0x0070, 0x1b14)
 #define DCM_HangingProtocolName                  DcmTagKey(0x0072, 0x0002)
 #define DCM_HangingProtocolDescription           DcmTagKey(0x0072, 0x0004)
 #define DCM_HangingProtocolLevel                 DcmTagKey(0x0072, 0x0006)
@@ -3686,6 +3738,7 @@
 #define DCM_FractionPattern                      DcmTagKey(0x300a, 0x007b)
 #define DCM_NumberOfBeams                        DcmTagKey(0x300a, 0x0080)
 #define DCM_BeamDoseSpecificationPoint           DcmTagKey(0x300a, 0x0082)
+#define DCM_ReferencedDoseReferenceUID           DcmTagKey(0x300a, 0x0083)
 #define DCM_BeamDose                             DcmTagKey(0x300a, 0x0084)
 #define DCM_BeamMeterset                         DcmTagKey(0x300a, 0x0086)
 #define DCM_RETIRED_BeamDosePointDepth           DcmTagKey(0x300a, 0x0088)
diff --git a/dcmdata/include/dcmtk/dcmdata/dcelem.h b/dcmdata/include/dcmtk/dcmdata/dcelem.h
index f478c1f..0dd220f 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcelem.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcelem.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -82,15 +82,18 @@ class DCMTK_DCMDATA_EXPORT DcmElement
      *  the object (if applicable).
      *  @param  rhs the right hand side of the comparison
      *  @return 0 if the object values are equal.
-     *          -1 if either the value of the first component that does not match
-     *          is lower in this object than in rhs, or all compared components match
-     *          but this object has fewer components than rhs. Also returned if rhs
+     *          -1 if this element has fewer components than the rhs element.
+     *          Also -1 if the value of the first component that does not match
+     *          is lower in this object than in rhs. Also returned if rhs
      *          cannot be casted to this object type or both objects are of
      *          different VR (i.e. the DcmEVR returned by the element's ident()
      *          call are different).
-     *          1 if either the value of the first component that does not match
-     *          is greater in this object than in rhs object, or all compared
-     *          components match but the this component is longer.
+     *          1 if either this element has more components than the rhs element, or
+     *          if the first component that does not match is greater in this object than
+     *          in rhs object.
+     *          If the function is overwritten by derived classes, the behaviour might
+     *          slightly change but all methods will return 0 on equality, and 1 or -1
+     *          if different.
      */
     virtual int compare(const DcmElement& rhs) const =0;
 
@@ -731,6 +734,41 @@ class DCMTK_DCMDATA_EXPORT DcmElement
     virtual OFCondition getDecompressedColorModel(DcmItem *dataset,
                                                   OFString &decompressedColorModel);
 
+    /** perform attribute matching.
+     *  Perform attribute matching on a candidate element using this element as the matching
+     *  key.
+     *  @note The given candidate element must refer to the same attribute kind, i.e. have the
+     *    same tag and VR. The method will return OFFalse if it doesn't.
+     *  @param candidate the candidate element to compare this element with.
+     *  @param enableWildCardMatching enable or disable wild card matching. Defaults to OFTrue,
+     *    which means wild card matching is performed if the element's VR supports it. Set to
+     *    OFFalse to force single value matching instead.
+     *  @return OFTrue if the candidate matches this element, OFFalse otherwise.
+     */
+    virtual OFBool matches(const DcmElement& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
+    /** perform combined attribute matching.
+     *  Combine the given Attributes to one pair of matching key and candidate respectively
+     *  and perform attribute matching on the result.
+     *  @note The DICOM standard currently defines combined attribute matching for the VR
+     *    DA in combination with TM, such that two attributes can be combined into a single
+     *    attribute with VR=DT before matching against another pair of attributes with VR
+     *    DA and TM. The method will return OFFalse if this element's VR is not DA or the
+     *    given attributes are not of VR TM, DA and TM respectively.
+     *  @param keySecond the second part of the matching key that will be combined with this
+     *    element.
+     *  @param candidateFirst the first part of the candidate that will be matched against this
+     *    this element + keySecond.
+     *  @param candidateSecond the second part of the candidate that will be combined with
+     *    candidateFirst for matching against this elemement + keySecond.
+     *  @return OFTrue if the combination of this elemement and keySecond match with the
+     *    combination of candidateFirst and candidateSecond. OFFalse otherwise.
+     */
+    virtual OFBool combinationMatches(const DcmElement& keySecond,
+                                      const DcmElement& candidateFirst,
+                                      const DcmElement& candidateSecond) const;
+
     /* --- static helper functions --- */
 
     /** scan string value for conformance with given value representation (VR)
diff --git a/dcmdata/include/dcmtk/dcmdata/dcfilefo.h b/dcmdata/include/dcmtk/dcmdata/dcfilefo.h
index 6d48e74..85a9d5a 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcfilefo.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcfilefo.h
@@ -185,6 +185,23 @@ class DCMTK_DCMDATA_EXPORT DcmFileFormat
                              const E_GrpLenEncoding glenc = EGL_noChange,
                              const Uint32 maxReadLength = DCM_MaxReadLength);
 
+    /** read object from a stream, up to the attribute tag stopParsingAtElement.
+     *  @param inStream DICOM input stream
+     *  @param xfer transfer syntax to use when parsing
+     *  @param glenc handling of group length parameters
+     *  @param maxReadLength attribute values larger than this value are skipped
+     *    while parsing and read later upon first access if the stream type supports
+     *    this.
+     *  @param stopParsingAtElement parsing of the input stream is stopped when
+     *                       this tag key or any higher tag is encountered.
+     *  @return EC_Normal if successful, an error code otherwise
+     */
+    virtual OFCondition readUntilTag(DcmInputStream &inStream,
+                                     const E_TransferSyntax xfer = EXS_Unknown,
+                                     const E_GrpLenEncoding glenc = EGL_noChange,
+                                     const Uint32 maxReadLength = DCM_MaxReadLength,
+                                     const DcmTagKey &stopParsingAtElement = DCM_UndefinedTagKey);
+
     /** write fileformat to a stream
      *  @param outStream DICOM output stream
      *  @param oxfer output transfer syntax
@@ -278,6 +295,31 @@ class DCMTK_DCMDATA_EXPORT DcmFileFormat
                                  const Uint32 maxReadLength = DCM_MaxReadLength,
                                  const E_FileReadMode readMode = ERM_autoDetect);
 
+    /** load object from a DICOM file, up to the attribute tag stopParsingAtElement.
+     *  This method supports DICOM objects stored as a file (with meta header) or as a
+     *  dataset (without meta header).  By default, the presence of a meta header is
+     *  detected automatically.
+     *  @param fileName name of the file to load (may contain wide chars if support enabled).
+     *    Since there are various constructors for the OFFilename class, a "char *", "OFString"
+     *    or "wchar_t *" can also be passed directly to this parameter.
+     *  @param readXfer transfer syntax used to read the data (auto detection if EXS_Unknown)
+     *  @param groupLength flag, specifying how to handle the group length tags
+     *  @param maxReadLength maximum number of bytes to be read for an element value.
+     *    Element values with a larger size are not loaded until their value is retrieved
+     *    (with getXXX()) or loadAllDataIntoMemory() is called.
+     *  @param readMode read file with or without meta header, i.e. as a fileformat or a
+     *    dataset.  Use ERM_fileOnly in order to force the presence of a meta header.
+     *  @param stopParsingAtElement parsing of the input stream is stopped when
+     *                       this tag key or any higher tag is encountered.
+     *  @return status, EC_Normal if successful, an error code otherwise
+     */
+    virtual OFCondition loadFileUntilTag(const OFFilename &fileName,
+                                 const E_TransferSyntax readXfer = EXS_Unknown,
+                                 const E_GrpLenEncoding groupLength = EGL_noChange,
+                                 const Uint32 maxReadLength = DCM_MaxReadLength,
+                                 const E_FileReadMode readMode = ERM_autoDetect,
+                                 const DcmTagKey &stopParsingAtElement = DCM_UndefinedTagKey);
+
     /** save object to a DICOM file.
      *  @param fileName name of the file to save (may contain wide chars if support enabled).
      *    Since there are various constructors for the OFFilename class, a "char *", "OFString"
diff --git a/dcmdata/include/dcmtk/dcmdata/dchashdi.h b/dcmdata/include/dcmtk/dcmdata/dchashdi.h
index e54fd84..081feca 100644
--- a/dcmdata/include/dcmtk/dcmdata/dchashdi.h
+++ b/dcmdata/include/dcmtk/dcmdata/dchashdi.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2011, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -142,7 +142,7 @@ public:
 
     /// comparison equality
     OFBool operator==(const DcmHashDictIterator& x) const
-        { return (hindex == x.hindex) && (iter == x.iter); }
+        { return iterating ? x.iterating && (hindex == x.hindex) && (iter == x.iter) : !x.iterating; }
 
     /// comparison non-equality
     OFBool operator!=(const DcmHashDictIterator& x) const
diff --git a/dcmdata/include/dcmtk/dcmdata/dcitem.h b/dcmdata/include/dcmtk/dcmdata/dcitem.h
index a06dfa0..c53e3ad 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcitem.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcitem.h
@@ -79,7 +79,7 @@ class DCMTK_DCMDATA_EXPORT DcmItem
      */
     DcmItem &operator=(const DcmItem &obj);
 
-    /** comparison operator that compares the normalized value of this object
+    /** comparison operator that compares the value of this object
      *  with a given object of the same type. The tag of the element is also
      *  considered as the first component that is compared, followed by the
      *  object types (VR, i.e. DCMTK'S EVR) and the comparison of all value
@@ -89,13 +89,15 @@ class DCMTK_DCMDATA_EXPORT DcmItem
      *  This may be an expensive operation.
      *  @param  rhs the right hand side of the comparison
      *  @return 0 if the object values are equal.
-     *          -1 if either the value of the  first component that does not match
-     *          is lower in this object than in rhs, or all compared components match
-     *          but this object has fewer components than rhs. Also returned if rhs
-     *          cannot be casted to this object type.
-     *          1 if either the value of the first component that does not match
-     *          is greater in this object than in rhs object, or all compared
-     *          components match but the this component is longer.
+     *          -1 if this element has fewer components than the rhs element.
+     *          Also -1 if the value of the first component that does not match
+     *          is lower in this object than in rhs. Also returned if rhs
+     *          cannot be casted to this object type or both objects are of
+     *          different VR (i.e. the DcmEVR returned by the element's ident()
+     *          call are different).
+     *          1 if either this element has more components than the rhs element, or
+     *          if the first component that does not match is greater in this object than
+     *          in rhs object.
      */
     virtual int compare(const DcmItem& rhs) const;
 
@@ -243,6 +245,28 @@ class DCMTK_DCMDATA_EXPORT DcmItem
                              const E_GrpLenEncoding glenc = EGL_noChange,
                              const Uint32 maxReadLength = DCM_MaxReadLength);
 
+    /** This function reads the information of all attributes which
+     *  are captured in the input stream and captures this information
+     *  in elementList, up to the attribute tag stopParsingAtElement.
+     *  Each attribute is represented as an element
+     *  in this list. If not all information for an attribute could be
+     *  read from the stream, the function returns EC_StreamNotifyClient.
+     *  @param inStream      The stream which contains the information.
+     *  @param ixfer         The transfer syntax which was used to encode
+     *                       the information in inStream.
+     *  @param glenc         Encoding type for group length; specifies
+     *                       what will be done with group length tags.
+     *  @param maxReadLength Maximum read length for reading an attribute value.
+     *  @param stopParsingAtElement parsing of the input stream is stopped when
+     *                       this tag key or any higher tag is encountered.
+     *  @return status, EC_Normal if successful, an error code otherwise
+     */
+    virtual OFCondition readUntilTag(DcmInputStream &inStream,
+                                     const E_TransferSyntax ixfer,
+                                     const E_GrpLenEncoding glenc = EGL_noChange,
+                                     const Uint32 maxReadLength = DCM_MaxReadLength,
+                                     const DcmTagKey &stopParsingAtElement = DCM_UndefinedTagKey);
+
     /** write object to a stream
      *  @param outStream DICOM output stream
      *  @param oxfer output transfer syntax
@@ -1211,20 +1235,45 @@ class DCMTK_DCMDATA_EXPORT DcmItem
                                    DcmItem *item,
                                    const signed long itemNum = -2);
 
-    /** creates new DICOM element from given attribute tag
+    /** creates new DICOM element from given attribute tag.
+     *  Creation of unknown attributes (e.g. private tag not being registered
+     *  in the dictionary) will result in a DcmElement instance of derived type
+     *  DcmOtherByteOtherWord.
      *  @param tag attribute tag of the element to be created
+     *  @param privateCreator private creator of the element, if element tag
+     *    is private (default: NULL, i.e. non-private DICOM standard tag)
      *  @return pointer to newly created element upon success, NULL pointer otherwise
+     *
      */
-     static DcmElement *newDicomElement(const DcmTagKey &tag);
+     static DcmElement *newDicomElement(const DcmTagKey &tag,
+                                        const char *privateCreator = NULL);
 
-    /** creates new DICOM element from given attribute tag
+    /** creates new DICOM element from given attribute tag.
+     *  Creation of unknown attributes (e.g. private tag not being registered
+     *  in the dictionary) will result in a DcmElement instance of derived type
+     *  DcmOtherByteOtherWord.
      *  @param newElement pointer to newly created element returned in this parameter
      *    upon success, NULL pointer otherwise
      *  @param tag attribute tag of the element to be created
+     *  @param privateCreator private creator of the element, if element tag
+     *    is private (default: NULL, i.e. non-private DICOM standard tag)
      *  @return EC_Normal upon success, an error code otherwise
      */
     static OFCondition newDicomElement(DcmElement *&newElement,
-                                       const DcmTagKey &tag);
+                                       const DcmTagKey &tag,
+                                       const char *privateCreator = NULL);
+
+    /** creates new DICOM element from given attribute tag and VR.
+     *  Creation of unknown attributes (e.g. private tag not being registered
+     *  in the dictionary) will result in a DcmElement instance of derived type
+     *  DcmOtherByteOtherWord.
+     *  @param newElement pointer to newly created element returned in this parameter
+     *    upon success, NULL pointer otherwise
+     *  @param tag attribute tag and VR of the element to be created
+     *  @return EC_Normal upon success, an error code otherwise
+     */
+     static OFCondition newDicomElementWithVR(DcmElement *&newElement,
+                                              const DcmTag &tag);
 
   protected:
 
diff --git a/dcmdata/include/dcmtk/dcmdata/dcjson.h b/dcmdata/include/dcmtk/dcmdata/dcjson.h
index 6fa0c27..ac7a2d2 100755
--- a/dcmdata/include/dcmtk/dcmdata/dcjson.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcjson.h
@@ -56,8 +56,8 @@
  *  @code{.cpp}
     struct CustomJsonFormat : DcmJsonFormatPretty
     {
-      CustomJsonFormat(const OFBool printMetaheaderInformation = OFTrue)
-      : DcmJsonFormatPretty(printMetaheaderInformation)
+      CustomJsonFormat(const OFBool printMetaInfo = OFTrue)
+      : DcmJsonFormatPretty(printMetaInfo)
       {
 
       }
@@ -196,10 +196,10 @@ public:
                                    OFString &value);
 
     /** Constructor
-     *  @param printMetaheaderInformation parameter that defines if meta information should be written
+     *  @param printMetaInfo parameter that defines if meta information should be written
      */
-    inline DcmJsonFormat(const OFBool printMetaheaderInformation)
-    : printMetaheaderInformation(printMetaheaderInformation)
+    inline DcmJsonFormat(const OFBool printMetaInfo)
+    : printMetaheaderInformation(printMetaInfo)
     {
 
     }
@@ -233,9 +233,9 @@ public:
      *  @code{.cpp}
         struct BulkDataURIJsonFormat : DcmJsonFormatPretty
         {
-          CustomJsonFormat(const OFBool printMetaheaderInformation = OFTrue,
+          CustomJsonFormat(const OFBool printMetaInfo = OFTrue,
                            ... bulkDataURIDatabase)
-          : DcmJsonFormatPretty(printMetaheaderInformation)
+          : DcmJsonFormatPretty(printMetaInfo)
           , TheDatabase(bulkDataURIDatabase)
           {
 
@@ -341,9 +341,9 @@ private:
 
 public:
     /** DcmJsonFormatPretty constructor
-     *  @param printMetaheaderInformation Enable/Disable including Metaheader in the output
+     *  @param printMetaInfo Enable/Disable including Metaheader in the output
      */
-    explicit DcmJsonFormatPretty(const OFBool printMetaheaderInformation = OFTrue);
+    explicit DcmJsonFormatPretty(const OFBool printMetaInfo = OFTrue);
 
     /** Indent to the specific level.
      *  @param out output stream to which the indention is written.
@@ -376,9 +376,9 @@ class DCMTK_DCMDATA_EXPORT DcmJsonFormatCompact : public DcmJsonFormat
 {
 public:
     /** DcmJsonFormatCompact constructor
-     *  @param printMetaheaderInformation Enable/Disable including Metaheader in the output
+     *  @param printMetaInfo Enable/Disable including Metaheader in the output
      */
-    explicit DcmJsonFormatCompact(const OFBool printMetaheaderInformation = OFTrue);
+    explicit DcmJsonFormatCompact(const OFBool printMetaInfo = OFTrue);
 
     /** Does nothing.
      *  @param out output stream to which the indention is written.
diff --git a/dcmdata/include/dcmtk/dcmdata/dcmatch.h b/dcmdata/include/dcmtk/dcmdata/dcmatch.h
index 31e1b7e..440b546 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcmatch.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcmatch.h
@@ -177,7 +177,7 @@ public:
     /** Test whether this object may be used for matching, i.e.\ whether it is not empty.
      *  @return OFTrue if this object may be used for matching, OFFalse otherwise.
      */
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
     explicit
 #endif
     operator OFBool() const;
diff --git a/dcmdata/include/dcmtk/dcmdata/dcpixel.h b/dcmdata/include/dcmtk/dcmdata/dcpixel.h
index 25a296c..26e9273 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcpixel.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcpixel.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2011, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -151,7 +151,7 @@ private:
     /// List of representations of pixel data
     DcmRepresentationList repList;
 
-    /// Iterator to the last dummy element in representation lis
+    /// Iterator to the last dummy element in representation list
     DcmRepresentationListIterator repListEnd;
 
     /// Iterator to the original representation. if an uncompressed
@@ -276,7 +276,21 @@ public:
       return new DcmPixelData(*this);
     }
 
-    /** Virtual object copying. This method can be used for DcmObject
+    /** comparison operator that compares the value of this element
+     *  with a given element of the same type (e.g. an DcmPixelData with a
+     *  DcmPixelData). The tag of the element is also considered as the first
+     *  component that is compared, followed by the object types (VR, i.e. DCMTK'S EVR).
+     *  The DcmPixelData implementation checks whether the uncompressed data of
+     *  both objects are identical, and if not provided, if the compressed data
+     *  of both objects is the same, by comparing the pixel items bytewise.
+     *  @param  rhs the right hand side of the comparison
+     *  @return 0 if the object values are equal.
+     *          -1 is returned if rhs is considered greater than this object.
+     *          1 is returned if rhs is considered smaller than this object.
+     */
+    virtual int compare(const DcmElement& rhs) const;
+
+    /** virtual object copying. This method can be used for DcmObject
      *  and derived classes to get a deep copy of an object. Internally
      *  the assignment operator is called if the given DcmObject parameter
      *  is of the same type as "this" object instance. If not, an error
diff --git a/dcmdata/include/dcmtk/dcmdata/dcpixseq.h b/dcmdata/include/dcmtk/dcmdata/dcpixseq.h
index ccb7db5..c19a9a8 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcpixseq.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcpixseq.h
@@ -48,6 +48,7 @@ class DcmPixelItem;
  *  the pixel data tag (7FE0,0010) and OB value representation with undefined length,
  *  and the "items" contained within the sequence are in fact pixel items (class DcmPixelItem)
  *  that contain no list of DICOM elements but raw compressed pixel data.
+ *  The first item in this pixel sequence must always be the offset table.
  */
 class DCMTK_DCMDATA_EXPORT DcmPixelSequence : public DcmSequenceOfItems
 {
@@ -234,7 +235,8 @@ public:
      *  @param offsetList list containing offset table entries.
      *    Upon success, an entry is appended to the list. The offset values are always even,
      *    so it is expected that odd length pixel items are padded later during writing.
-     *  @param compressedData pointer to compressed image data, must not be NULL
+     *    The offsets are not stored internally.
+     *  @param compressedData pointer to compressed image data (copied), must not be NULL
      *  @param compressedLen number of bytes of compressed image data
      *  @param fragmentSize maximum fragment size (in kbytes) for compression, 0 for unlimited.
      *  @return EC_Normal if successful, an error code otherwise
diff --git a/dcmdata/include/dcmtk/dcmdata/dcsequen.h b/dcmdata/include/dcmtk/dcmdata/dcsequen.h
index f4839db..f23f254 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcsequen.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcsequen.h
@@ -77,13 +77,15 @@ public:
      *  an expensive operation!
      *  @param  rhs the right hand side of the comparison
      *  @return 0 if the object values are equal.
-     *          -1 if either the value of the  first component that does not match
-     *          is lower in this object than in rhs, or all compared components match
-     *          but this object has fewer components than rhs. Also returned if rhs
-     *          cannot be casted to this object type.
-     *          1 if either the value of the first component that does not match
-     *          is greater in this object than in rhs object, or all compared
-     *          components match but the this component is longer.
+     *          -1 if this element has fewer components than the rhs element.
+     *          Also -1 if the value of the first component that does not match
+     *          is lower in this object than in rhs. Also returned if rhs
+     *          cannot be casted to this object type or both objects are of
+     *          different VR (i.e. the DcmEVR returned by the element's ident()
+     *          call are different).
+     *          1 if either this element has more components than the rhs element, or
+     *          if the first component that does not match is greater in this object than
+     *          in rhs object.
      */
     virtual int compare(const DcmElement& rhs) const;
 
diff --git a/dcmdata/include/dcmtk/dcmdata/dcspchrs.h b/dcmdata/include/dcmtk/dcmdata/dcspchrs.h
index d4d8fc0..eee88e2 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcspchrs.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcspchrs.h
@@ -65,7 +65,7 @@ class DCMTK_DCMDATA_EXPORT DcmSpecificCharacterSet
      *  @return OFTrue if selectCharacterSet() was successfully called before,
      *    OFFalse if not (or clear() has been called in the meantime).
      */
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
     explicit
 #endif
     operator OFBool() const;
diff --git a/dcmdata/include/dcmtk/dcmdata/dcuid.h b/dcmdata/include/dcmtk/dcmdata/dcuid.h
index dd5e307..0762a99 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcuid.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcuid.h
@@ -383,6 +383,11 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID
  */
 #define UID_XMLEncodingTransferSyntax "1.2.840.10008.1.2.6.2"
 
+/** Private transfer syntax defined by GE. This transfer syntax is identical to
+ *  Implicit VR Little Endian, except that Pixel Data are encoded in big endian.
+ */
+#define UID_PrivateGE_LEI_WithBigEndianPixelDataTransferSyntax "1.2.840.113619.5.2"
+
 /*
 ** Defined SOP Class UIDs according to DICOM standard
 */
@@ -437,6 +442,10 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID
 #define UID_XAXRFGrayscaleSoftcopyPresentationStateStorage         "1.2.840.10008.5.1.4.1.1.11.5"
 #define UID_GrayscalePlanarMPRVolumetricPresentationStateStorage   "1.2.840.10008.5.1.4.1.1.11.6"
 #define UID_CompositingPlanarMPRVolumetricPresentationStateStorage "1.2.840.10008.5.1.4.1.1.11.7"
+#define UID_AdvancedBlendingPresentationStateStorage               "1.2.840.10008.5.1.4.1.1.11.8"
+#define UID_VolumeRenderingVolumetricPresentationStateStorage      "1.2.840.10008.5.1.4.1.1.11.9"
+#define UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage "1.2.840.10008.5.1.4.1.1.11.10"
+#define UID_MultipleVolumeRenderingVolumetricPresentationStateStorage "1.2.840.10008.5.1.4.1.1.11.11"
 #define UID_XRayAngiographicImageStorage                           "1.2.840.10008.5.1.4.1.1.12.1"
 #define UID_EnhancedXAImageStorage                                 "1.2.840.10008.5.1.4.1.1.12.1.1"
 #define UID_XRayRadiofluoroscopicImageStorage                      "1.2.840.10008.5.1.4.1.1.12.2"
@@ -475,6 +484,8 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID
 #define UID_OphthalmicTomographyImageStorage                       "1.2.840.10008.5.1.4.1.1.77.1.5.4"
 #define UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage "1.2.840.10008.5.1.4.1.1.77.1.5.5"
 #define UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage "1.2.840.10008.5.1.4.1.1.77.1.5.6"
+#define UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage "1.2.840.10008.5.1.4.1.1.77.1.5.7"
+#define UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage "1.2.840.10008.5.1.4.1.1.77.1.5.8"
 #define UID_VLWholeSlideMicroscopyImageStorage                     "1.2.840.10008.5.1.4.1.1.77.1.6"
 #define UID_RETIRED_VLMultiFrameImageStorage                       "1.2.840.10008.5.1.4.1.1.77.2"
 #define UID_LensometryMeasurementsStorage                          "1.2.840.10008.5.1.4.1.1.78.1"
@@ -504,6 +515,7 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID
 #define UID_ImplantationPlanSRDocumentStorage                      "1.2.840.10008.5.1.4.1.1.88.70"
 #define UID_AcquisitionContextSRStorage                            "1.2.840.10008.5.1.4.1.1.88.71"
 #define UID_SimplifiedAdultEchoSRStorage                           "1.2.840.10008.5.1.4.1.1.88.72"
+#define UID_PatientRadiationDoseSRStorage                          "1.2.840.10008.5.1.4.1.1.88.73"
 #define UID_ContentAssessmentResultsStorage                        "1.2.840.10008.5.1.4.1.1.90.1"
 #define UID_EncapsulatedPDFStorage                                 "1.2.840.10008.5.1.4.1.1.104.1"
 #define UID_EncapsulatedCDAStorage                                 "1.2.840.10008.5.1.4.1.1.104.2"
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvr.h b/dcmdata/include/dcmtk/dcmdata/dcvr.h
index 87e4c13..ff49abf 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvr.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvr.h
@@ -337,7 +337,7 @@ public:
      */
     const char* getVRName() const ;
 
-    /** get symbolic standard VR name for this object
+    /** get symbolic standard VR name for this object.
      *  If this object manages a non-standard, internal VR such as EVR_ox,
      *  this method returns the name of the VR to which the internal VR will
      *  be mapped when writing the DICOM object.
@@ -375,7 +375,7 @@ public:
      */
     OFBool usesExtendedLengthEncoding() const;
 
-    /** check if VRs are equivalent
+    /** check if VRs are equivalent.
      *  VRs are considered equivalent if equal or if one of them is an internal
      *  VR and the other one is a possible standard VR to which the internal one
      *  maps.
@@ -388,14 +388,16 @@ public:
     ** (in bytes assuming single byte characters)
     */
 
-    /** return minimum length of a value with this VR (in bytes), assuming
-     *  single byte characters
+    /** return minimum length of a single value with this VR.
+     *  Whether the returned length is in bytes or characters can be determined
+     *  by isLengthInChar().
      *  @return minimum length of a value
      */
     Uint32 getMinValueLength() const;
 
-    /** return maximum length of a value with this VR (in bytes), assuming
-     *  single byte characters
+    /** return maximum length of a single value with this VR.
+     *  Whether the returned length is in bytes or characters can be determined
+     *  by isLengthInChar().
      *  @return maximum length of a value
      */
     Uint32 getMaxValueLength() const;
@@ -414,6 +416,12 @@ public:
      */
     const OFString& getDelimiterChars() const;
 
+    /** check whether the maximum or minimum length of a value with this VR is
+     *  in bytes or characters. See getMinValueLength() and getMaxValueLength().
+     *  @return true if length is stated in characters, false if in bytes
+     */
+    OFBool isLengthInChar() const;
+
 private:
     /// the enumerated VR value
     DcmEVR vr;
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrae.h b/dcmdata/include/dcmtk/dcmdata/dcvrae.h
index 1c25e81..ef8dd48 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrae.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrae.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2013, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -105,6 +105,14 @@ class DCMTK_DCMDATA_EXPORT DcmApplicationEntity
 	                                const unsigned long pos,
 	                                OFBool normalize = OFTrue);
 
+    // ensure inherited overloads of matches take part in overload resolution
+    using DcmByteString::matches;
+
+    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    virtual OFBool matches(const OFString& key,
+                           const OFString& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
     /* --- static helper functions --- */
 
     /** check whether given string value conforms to the VR "AE" (Application Entity)
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrat.h b/dcmdata/include/dcmtk/dcmdata/dcvrat.h
index b92d6a2..51ba17a 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrat.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrat.h
@@ -73,13 +73,15 @@ class DCMTK_DCMDATA_EXPORT DcmAttributeTag
      *  object (if applicable).
      *  @param  rhs the right hand side of the comparison
      *  @return 0 if the object values are equal.
-     *          -1 if either the value of the  first component that does not match
-     *          is lower in this object than in rhs, or all compared components match
-     *          but this object has fewer components than rhs. Also returned if rhs
-     *          cannot be casted to this object type.
-     *          1 if either the value of the first component that does not match
-     *          is greater in this object than in rhs object, or all compared
-     *          components match but the this component is longer.
+     *          -1 if this element has fewer components than the rhs element.
+     *          Also -1 if the value of the first component that does not match
+     *          is lower in this object than in rhs. Also returned if rhs
+     *          cannot be casted to this object type or both objects are of
+     *          different VR (i.e. the DcmEVR returned by the element's ident()
+     *          call are different).
+     *          1 if either this element has more components than the rhs element, or
+     *          if the first component that does not match is greater in this object than
+     *          in rhs object.
      */
     virtual int compare(const DcmElement& rhs) const;
 
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrcs.h b/dcmdata/include/dcmtk/dcmdata/dcvrcs.h
index 295eca3..27e1fe4 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrcs.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrcs.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2013, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -105,6 +105,14 @@ class DCMTK_DCMDATA_EXPORT DcmCodeString
                                     const unsigned long pos,
                                     OFBool normalize = OFTrue);
 
+    // ensure inherited overloads of matches take part in overload resolution
+    using DcmByteString::matches;
+
+    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    virtual OFBool matches(const OFString& key,
+                           const OFString& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
     /* --- static helper functions --- */
 
     /** check whether given value conforms to value representation CS (Code String).
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrda.h b/dcmdata/include/dcmtk/dcmdata/dcvrda.h
index ed75bda..8e21627 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrda.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrda.h
@@ -147,6 +147,19 @@ class DCMTK_DCMDATA_EXPORT DcmDate
                                     const unsigned long pos = 0,
                                     const OFBool supportOldFormat = OFTrue);
 
+    // ensure inherited overloads of matches take part in overload resolution
+    using DcmByteString::matches;
+
+    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    virtual OFBool matches(const OFString& key,
+                           const OFString& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
+    /// @copydoc DcmElement::combinationMatches()
+    virtual OFBool combinationMatches(const DcmElement& keySecond,
+                                      const DcmElement& candidateFirst,
+                                      const DcmElement& candidateSecond) const;
+
     /* --- static helper functions --- */
 
     /** get the current system date.
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrdt.h b/dcmdata/include/dcmtk/dcmdata/dcvrdt.h
index b900d6b..c5d49f2 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrdt.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrdt.h
@@ -170,6 +170,14 @@ class DCMTK_DCMDATA_EXPORT DcmDateTime
                                         const OFString &dateTimeSeparator = " ",
                                         const OFString &timeZoneSeparator = " ");
 
+    // ensure inherited overloads of matches take part in overload resolution
+    using DcmByteString::matches;
+
+    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    virtual OFBool matches(const OFString& key,
+                           const OFString& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
     /* --- static helper functions --- */
 
     /** get the current system date and time.
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrfd.h b/dcmdata/include/dcmtk/dcmdata/dcvrfd.h
index bde2163..485e304 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrfd.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrfd.h
@@ -205,6 +205,10 @@ class DCMTK_DCMDATA_EXPORT DcmFloatingPointDouble
      */
     virtual OFCondition verify(const OFBool autocorrect = OFFalse);
 
+    /// @copydoc DcmElement::matches()
+    virtual OFBool matches(const DcmElement& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
   protected:
 
     /** constructor. Create new element from given tag and length.
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrfl.h b/dcmdata/include/dcmtk/dcmdata/dcvrfl.h
index cf2d870..4b13ebd 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrfl.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrfl.h
@@ -69,13 +69,15 @@ class DCMTK_DCMDATA_EXPORT DcmFloatingPointSingle
      *  object (if applicable).
      *  @param  rhs the right hand side of the comparison
      *  @return 0 if the object values are equal.
-     *          -1 if either the value of the  first component that does not match
-     *          is lower in this object than in rhs, or all compared components match
-     *          but this object has fewer components than rhs. Also returned if rhs
-     *          cannot be casted to this object type.
-     *          1 if either the value of the first component that does not match
-     *          is greater in this object than in rhs object, or all compared
-     *          components match but the this component is longer.
+     *          -1 if this element has fewer components than the rhs element.
+     *          Also -1 if either the value of the first component that does not match
+     *          is lower in this object than in rhs. Also returned if rhs
+     *          cannot be casted to this object type or both objects are of
+     *          different VR (i.e. the DcmEVR returned by the element's ident()
+     *          call are different).
+     *          1 if either this element has more components than the rhs element, or
+     *          if the first component that does not match is greater in this object than
+     *          in rhs object.
      */
     virtual int compare(const DcmElement& rhs) const;
 
@@ -205,6 +207,10 @@ class DCMTK_DCMDATA_EXPORT DcmFloatingPointSingle
      */
     virtual OFCondition verify(const OFBool autocorrect = OFFalse);
 
+    /// @copydoc DcmElement::matches()
+    virtual OFBool matches(const DcmElement& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
   protected:
 
     /** constructor. Create new element from given tag and length.
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrlo.h b/dcmdata/include/dcmtk/dcmdata/dcvrlo.h
index 0834182..28b8f69 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrlo.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrlo.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -89,7 +89,9 @@ class DCMTK_DCMDATA_EXPORT DcmLongString
      */
     virtual DcmEVR ident() const;
 
-    /** check whether stored value conforms to the VR and to the specified VM
+    /** check whether stored value conforms to the VR and to the specified VM.
+     *  Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100).
+     *  All other specific character sets disable the check of the value representation.
      *  @param vm value multiplicity (according to the data dictionary) to be checked for.
      *    (See DcmElement::checkVM() for a list of valid values.)
      *  @param oldFormat parameter not used for this VR (only for DA, TM)
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrlt.h b/dcmdata/include/dcmtk/dcmdata/dcvrlt.h
index 50f324c..2709cf1 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrlt.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrlt.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -84,7 +84,9 @@ class DCMTK_DCMDATA_EXPORT DcmLongText
      */
     virtual DcmEVR ident() const;
 
-    /** check whether stored value conforms to the VR and to the specified VM
+    /** check whether stored value conforms to the VR and to the specified VM.
+     *  Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100).
+     *  All other specific character sets disable the check of the value representation.
      *  @param vm parameter not used for this VR
      *  @param oldFormat parameter not used for this VR (only for DA, TM)
      *  @return status of the check, EC_Normal if value is correct, an error code otherwise
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrobow.h b/dcmdata/include/dcmtk/dcmdata/dcvrobow.h
index 26e354a..7e0237f 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrobow.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrobow.h
@@ -61,16 +61,19 @@ class DCMTK_DCMDATA_EXPORT DcmOtherByteOtherWord
      *  considered as the first component that is compared, followed by the
      *  object types (VR, i.e. DCMTK'S EVR) and the comparison of all value
      *  components of the object, preferrably in the order declared in the
-     *  object (if applicable).
+     *  object (if applicable). The implementation for DcmOtherByteOtherWord
+     *  does compare the values of two elements in local endianness.
      *  @param  rhs the right hand side of the comparison
      *  @return 0 if the object values are equal.
-     *          -1 if either the value of the  first component that does not match
-     *          is lower in this object than in rhs, or all compared components match
-     *          but this object has fewer components than rhs. Also returned if rhs
-     *          cannot be casted to this object type.
-     *          1 if either the value of the first component that does not match
-     *          is greater in this object than in rhs object, or all compared
-     *          components match but the this component is longer.
+     *          -1 if this element has fewer components than the rhs element.
+     *          Also -1 if the value of the first component that does not match
+     *          is lower in this object than in rhs. Also returned if rhs
+     *          cannot be casted to this object type or both objects are of
+     *          different VR (i.e. the DcmEVR returned by the element's ident()
+     *          call are different).
+     *          1 if either this element has more components than the rhs element, or
+     *          if the first component that does not match is greater in this object than
+     *          in rhs object.
      */
     virtual int compare(const DcmElement& rhs) const;
 
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrpn.h b/dcmdata/include/dcmtk/dcmdata/dcvrpn.h
index 4264691..751f29a 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrpn.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrpn.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -89,7 +89,9 @@ class DCMTK_DCMDATA_EXPORT DcmPersonName
      */
     virtual DcmEVR ident() const;
 
-    /** check whether stored value conforms to the VR and to the specified VM
+    /** check whether stored value conforms to the VR and to the specified VM.
+     *  Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100).
+     *  All other specific character sets disable the check of the value representation.
      *  @param vm value multiplicity (according to the data dictionary) to be checked for.
      *    (See DcmElement::checkVM() for a list of valid values.)
      *  @param oldFormat parameter not used for this VR (only for DA, TM)
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrpobw.h b/dcmdata/include/dcmtk/dcmdata/dcvrpobw.h
index 3768c89..48b97f5 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrpobw.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrpobw.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -64,6 +64,27 @@ public:
       return new DcmPolymorphOBOW(*this);
     }
 
+    /** Comparison operator that compares the normalized value of this element
+     *  with a given element of the same type (e.g. an DcmPolymorphOBOW with a
+     *  DcmPolymorphOBOW). The tag of the element is also considered as the first
+     *  component that is compared, followed by the object types (VR, i.e. DCMTK'S EVR).
+     *  The DcmPolymorphOBOW implementation checks then whether the length of both
+     *  elements are equal  and if so continues comparing the values serialized to
+     *  Little Endian using memcpy.
+     *  @param  rhs the right hand side of the comparison
+     *  @return 0 if the object values are equal.
+     *          -1 if this element has fewer components than the rhs element.
+     *          Also -1 if the value of the first component that does not match
+     *          is lower in this object than in rhs. Also returned if rhs
+     *          cannot be casted to this object type or both objects are of
+     *          different VR (i.e. the DcmEVR returned by the element's ident()
+     *          call are different).
+     *          1 if either this element has more components than the rhs element, or
+     *          if the first component that does not match is greater in this object than
+     *          in rhs object.
+     */
+    virtual int compare(const DcmElement& rhs) const;
+
     /** Virtual object copying. This method can be used for DcmObject
      *  and derived classes to get a deep copy of an object. Internally
      *  the assignment operator is called if the given DcmObject parameter
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrsh.h b/dcmdata/include/dcmtk/dcmdata/dcvrsh.h
index d365ac9..7e572f6 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrsh.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrsh.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -90,7 +90,9 @@ class DCMTK_DCMDATA_EXPORT DcmShortString
      */
     virtual DcmEVR ident() const;
 
-    /** check whether stored value conforms to the VR and to the specified VM
+    /** check whether stored value conforms to the VR and to the specified VM.
+     *  Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100).
+     *  All other specific character sets disable the check of the value representation.
      *  @param vm value multiplicity (according to the data dictionary) to be checked for.
      *    (See DcmElement::checkVM() for a list of valid values.)
      *  @param oldFormat parameter not used for this VR (only for DA, TM)
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrsl.h b/dcmdata/include/dcmtk/dcmdata/dcvrsl.h
index 0d98493..5e221c3 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrsl.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrsl.h
@@ -69,13 +69,15 @@ class DCMTK_DCMDATA_EXPORT DcmSignedLong
      *  object (if applicable).
      *  @param  rhs the right hand side of the comparison
      *  @return 0 if the object values are equal.
-     *          -1 if either the value of the  first component that does not match
-     *          is lower in this object than in rhs, or all compared components match
-     *          but this object has fewer components than rhs. Also returned if rhs
-     *          cannot be casted to this object type.
-     *          1 if either the value of the first component that does not match
-     *          is greater in this object than in rhs object, or all compared
-     *          components match but the this component is longer.
+     *          -1 if this element has fewer components than the rhs element.
+     *          Also -1 if the value of the first component that does not match
+     *          is lower in this object than in rhs. Also returned if rhs
+     *          cannot be casted to this object type or both objects are of
+     *          different VR (i.e. the DcmEVR returned by the element's ident()
+     *          call are different).
+     *          1 if either this element has more components than the rhs element, or
+     *          if the first component that does not match is greater in this object than
+     *          in rhs object.
      */
     virtual int compare(const DcmElement& rhs) const;
 
@@ -202,6 +204,10 @@ class DCMTK_DCMDATA_EXPORT DcmSignedLong
      */
     virtual OFCondition verify(const OFBool autocorrect = OFFalse);
 
+    /// @copydoc DcmElement::matches()
+    virtual OFBool matches(const DcmElement& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
   protected:
 
     /** constructor. Create new element from given tag and length.
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrss.h b/dcmdata/include/dcmtk/dcmdata/dcvrss.h
index 47d94aa..1556b1a 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrss.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrss.h
@@ -63,13 +63,15 @@ class DCMTK_DCMDATA_EXPORT DcmSignedShort
      *  object (if applicable).
      *  @param  rhs the right hand side of the comparison
      *  @return 0 if the object values are equal.
-     *          -1 if either the value of the  first component that does not match
-     *          is lower in this object than in rhs, or all compared components match
-     *          but this object has fewer components than rhs. Also returned if rhs
-     *          cannot be casted to this object type.
-     *          1 if either the value of the first component that does not match
-     *          is greater in this object than in rhs object, or all compared
-     *          components match but the this component is longer.
+     *          -1 if this element has fewer components than the rhs element.
+     *          Also -1 if the value of the first component that does not match
+     *          is lower in this object than in rhs. Also returned if rhs
+     *          cannot be casted to this object type or both objects are of
+     *          different VR (i.e. the DcmEVR returned by the element's ident()
+     *          call are different).
+     *          1 if either this element has more components than the rhs element, or
+     *          if the first component that does not match is greater in this object than
+     *          in rhs object.
      */
     virtual int compare(const DcmElement& rhs) const;
 
@@ -202,6 +204,10 @@ class DCMTK_DCMDATA_EXPORT DcmSignedShort
      */
     virtual OFCondition verify(const OFBool autocorrect = OFFalse);
 
+    /// @copydoc DcmElement::matches()
+    virtual OFBool matches(const DcmElement& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
   protected:
 
     /** constructor. Create new element from given tag and length.
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrst.h b/dcmdata/include/dcmtk/dcmdata/dcvrst.h
index 4536249..490b6bb 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrst.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrst.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -85,7 +85,9 @@ class DCMTK_DCMDATA_EXPORT DcmShortText
      */
     virtual DcmEVR ident() const;
 
-    /** check whether stored value conforms to the VR and to the specified VM
+    /** check whether stored value conforms to the VR and to the specified VM.
+     *  Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100).
+     *  All other specific character sets disable the check of the value representation.
      *  @param vm parameter not used for this VR
      *  @param oldFormat parameter not used for this VR (only for DA, TM)
      *  @return status of the check, EC_Normal if value is correct, an error code otherwise
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrtm.h b/dcmdata/include/dcmtk/dcmdata/dcvrtm.h
index 0b72473..f475717 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrtm.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrtm.h
@@ -167,6 +167,14 @@ class DCMTK_DCMDATA_EXPORT DcmTime
                                     const OFBool createMissingPart = OFFalse,
                                     const OFBool supportOldFormat = OFTrue);
 
+    // ensure inherited overloads of matches take part in overload resolution
+    using DcmByteString::matches;
+
+    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    virtual OFBool matches(const OFString& key,
+                           const OFString& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
     /* --- static helper functions --- */
 
     /** get the current system time.
@@ -378,6 +386,9 @@ class DCMTK_DCMDATA_EXPORT DcmTime
 
 private:
 
+    /// give DcmDate access to our private parts, for combined date time range matching.
+    friend class DcmDate;
+
     /** parse the fragment part of a DICOM time string.
      *  @param string a pointer to the beginning of the fragment portion of a DICOM time string.
      *  @param size the size (in bytes) of the given string value.
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvruc.h b/dcmdata/include/dcmtk/dcmdata/dcvruc.h
index 3833240..f72add2 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvruc.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvruc.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, OFFIS e.V.
+ *  Copyright (C) 2015-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -86,7 +86,9 @@ class DCMTK_DCMDATA_EXPORT DcmUnlimitedCharacters
      */
     virtual DcmEVR ident() const;
 
-    /** check whether stored value conforms to the VR and to the specified VM
+    /** check whether stored value conforms to the VR and to the specified VM.
+     *  Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100).
+     *  All other specific character sets disable the check of the value representation.
      *  @param vm value multiplicity (according to the data dictionary) to be checked for.
      *    (See DcmElement::checkVM() for a list of valid values.)
      *  @param oldFormat parameter not used for this VR (only for DA, TM)
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrui.h b/dcmdata/include/dcmtk/dcmdata/dcvrui.h
index eba453f..8fc27e4 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrui.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrui.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2013, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrul.h b/dcmdata/include/dcmtk/dcmdata/dcvrul.h
index fa61c24..bb56d62 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrul.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrul.h
@@ -69,13 +69,15 @@ class DCMTK_DCMDATA_EXPORT DcmUnsignedLong
      *  object (if applicable).
      *  @param  rhs the right hand side of the comparison
      *  @return 0 if the object values are equal.
-     *          -1 if either the value of the  first component that does not match
-     *          is lower in this object than in rhs, or all compared components match
-     *          but this object has fewer components than rhs. Also returned if rhs
-     *          cannot be casted to this object type.
-     *          1 if either the value of the first component that does not match
-     *          is greater in this object than in rhs object, or all compared
-     *          components match but the this component is longer.
+     *          -1 if this element has fewer components than the rhs element.
+     *          Also -1 if the value of the first component that does not match
+     *          is lower in this object than in rhs. Also returned if rhs
+     *          cannot be casted to this object type or both objects are of
+     *          different VR (i.e. the DcmEVR returned by the element's ident()
+     *          call are different).
+     *          1 if either this element has more components than the rhs element, or
+     *          if the first component that does not match is greater in this object than
+     *          in rhs object.
      */
     virtual int compare(const DcmElement& rhs) const;
 
@@ -202,6 +204,10 @@ class DCMTK_DCMDATA_EXPORT DcmUnsignedLong
      */
     virtual OFCondition verify(const OFBool autocorrect = OFFalse);
 
+    /// @copydoc DcmElement::matches()
+    virtual OFBool matches(const DcmElement& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
   protected:
 
     /** constructor. Create new element from given tag and length.
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrur.h b/dcmdata/include/dcmtk/dcmdata/dcvrur.h
index c1913ad..7527379 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrur.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrur.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2014-2016, OFFIS e.V.
+ *  Copyright (C) 2014-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -120,6 +120,14 @@ class DCMTK_DCMDATA_EXPORT DcmUniversalResourceIdentifierOrLocator
     virtual OFCondition getOFStringArray(OFString &stringVal,
                                          OFBool normalize = OFTrue);
 
+    // ensure inherited overloads of matches take part in overload resolution
+    using DcmByteString::matches;
+
+    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    virtual OFBool matches(const OFString& key,
+                           const OFString& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
+
     /* --- static helper functions --- */
 
     /** check whether given string value conforms to the VR "UR" (Universal Resource Identifier
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrus.h b/dcmdata/include/dcmtk/dcmdata/dcvrus.h
index 5daebe5..7021833 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrus.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrus.h
@@ -59,13 +59,15 @@ class DCMTK_DCMDATA_EXPORT DcmUnsignedShort
      *  object (if applicable).
      *  @param  rhs the right hand side of the comparison
      *  @return 0 if the object values are equal.
-     *          -1 if either the value of the  first component that does not match
-     *          is lower in this object than in rhs, or all compared components match
-     *          but this object has fewer components than rhs. Also returned if rhs
-     *          cannot be casted to this object type.
-     *          1 if either the value of the first component that does not match
-     *          is greater in this object than in rhs object, or all compared
-     *          components match but the this component is longer.
+     *          -1 if this element has fewer components than the rhs element.
+     *          Also -1 if the value of the first component that does not match
+     *          is lower in this object than in rhs. Also returned if rhs
+     *          cannot be casted to this object type or both objects are of
+     *          different VR (i.e. the DcmEVR returned by the element's ident()
+     *          call are different).
+     *          1 if either this element has more components than the rhs element, or
+     *          if the first component that does not match is greater in this object than
+     *          in rhs object.
      */
     virtual int compare(const DcmElement& rhs) const;
 
@@ -202,6 +204,9 @@ class DCMTK_DCMDATA_EXPORT DcmUnsignedShort
      */
     virtual OFCondition verify(const OFBool autocorrect = OFFalse);
 
+    /// @copydoc DcmElement::matches()
+    virtual OFBool matches(const DcmElement& candidate,
+                           const OFBool enableWildCardMatching = OFTrue) const;
   protected:
 
     /** constructor. Create new element from given tag and length.
diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrut.h b/dcmdata/include/dcmtk/dcmdata/dcvrut.h
index 6836371..2a92423 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcvrut.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcvrut.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -86,7 +86,9 @@ class DCMTK_DCMDATA_EXPORT DcmUnlimitedText
      */
     virtual DcmEVR ident() const;
 
-    /** check whether stored value conforms to the VR and to the specified VM
+    /** check whether stored value conforms to the VR and to the specified VM.
+     *  Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100).
+     *  All other specific character sets disable the check of the value representation.
      *  @param vm parameter not used for this VR
      *  @param oldFormat parameter not used for this VR (only for DA, TM)
      *  @return status of the check, EC_Normal if value is correct, an error code otherwise
diff --git a/dcmdata/include/dcmtk/dcmdata/dcxfer.h b/dcmdata/include/dcmtk/dcmdata/dcxfer.h
index 486ea59..232b128 100644
--- a/dcmdata/include/dcmtk/dcmdata/dcxfer.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcxfer.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -118,7 +118,9 @@ typedef enum {
     /// HEVC/H.265 Main Profile / Level 5.1
     EXS_HEVCMainProfileLevel5_1 = 39,
     /// HEVC/H.265 Main 10 Profile / Level 5.1
-    EXS_HEVCMain10ProfileLevel5_1 = 40
+    EXS_HEVCMain10ProfileLevel5_1 = 40,
+    /// Private GE Little Endian Implicit with big endian pixel data
+    EXS_PrivateGE_LEI_WithBigEndianPixelData = 41
 } E_TransferSyntax;
 
 /** enumeration of byte orders
@@ -202,6 +204,9 @@ public:
     /// return byte order for this transfer syntax
     inline E_ByteOrder getByteOrder() const { return byteOrder; }
 
+    /// return byte order for this transfer syntax
+    inline E_ByteOrder getPixelDataByteOrder() const { return pixelDataByteOrder; }
+
     /// return name string for this transfer syntax
     inline const char* getXferName() const { return xferName; }
 
@@ -303,6 +308,9 @@ private:
     /// transfer syntax byte order
     E_ByteOrder         byteOrder;
 
+    /// transfer syntax byte order for pixel data
+    E_ByteOrder         pixelDataByteOrder;
+
     /// transfer syntax VR encoding (implicit/explicit)
     E_VRType            vrType;
 
diff --git a/dcmdata/libi2d/Makefile.dep b/dcmdata/libi2d/Makefile.dep
index 47ac005..963343d 100644
--- a/dcmdata/libi2d/Makefile.dep
+++ b/dcmdata/libi2d/Makefile.dep
@@ -19,7 +19,10 @@ i2d.o: i2d.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -37,10 +40,10 @@ i2d.o: i2d.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \
  ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmdata/dcobject.h \
@@ -81,7 +84,10 @@ i2dbmps.o: i2dbmps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -99,9 +105,9 @@ i2dbmps.o: i2dbmps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/libi2d/i2define.h \
@@ -128,6 +134,7 @@ i2djpgs.o: i2djpgs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \
  ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -141,7 +148,9 @@ i2djpgs.o: i2djpgs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -186,7 +195,10 @@ i2dplnsc.o: i2dplnsc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -204,10 +216,10 @@ i2dplnsc.o: i2dplnsc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \
  ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmdata/dcobject.h \
@@ -240,7 +252,10 @@ i2dplsc.o: i2dplsc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -258,10 +273,10 @@ i2dplsc.o: i2dplsc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \
  ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmdata/dcobject.h \
@@ -294,7 +309,10 @@ i2dplvlp.o: i2dplvlp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -312,10 +330,10 @@ i2dplvlp.o: i2dplvlp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \
  ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmdata/dcobject.h \
diff --git a/dcmdata/libi2d/i2d.cc b/dcmdata/libi2d/i2d.cc
index 137e02a..e3d963e 100644
--- a/dcmdata/libi2d/i2d.cc
+++ b/dcmdata/libi2d/i2d.cc
@@ -53,6 +53,8 @@ OFCondition Image2Dcm::convert(I2DImgSource *inputPlug,
     return EC_IllegalParameter;
 
   OFCondition cond;
+  resultDset = NULL;
+  OFunique_ptr<DcmDataset> tempDataset;
   DCMDATA_LIBI2D_DEBUG("Image2Dcm: Starting conversion of file: " << inputPlug->getImageFile());
 
   // If specified, copy DICOM template file to export file
@@ -65,20 +67,19 @@ OFCondition Image2Dcm::convert(I2DImgSource *inputPlug,
     // remove problematic attributes from dataset
     cleanupTemplate(dcmff.getDataset());
     // copy from input file
-    resultDset = new DcmDataset(*(dcmff.getDataset()));
+    tempDataset.reset(new DcmDataset(*(dcmff.getDataset())));
   }
   else // otherwise, start with an empty DICOM file
-    resultDset = new DcmDataset();
-  if (!resultDset)
+    tempDataset.reset(new DcmDataset());
+  if (!tempDataset.get())
     return EC_MemoryExhausted;
 
   // Read patient and study or series information if desired and write to export file
   if (m_readStudyLevel || m_readSeriesLevel)
   {
-    cond = applyStudyOrSeriesFromFile(resultDset);
+    cond = applyStudyOrSeriesFromFile(tempDataset.get());
     if (cond.bad())
     {
-      delete resultDset; resultDset = NULL;
       return cond;
     }
   }
@@ -86,28 +87,26 @@ OFCondition Image2Dcm::convert(I2DImgSource *inputPlug,
   // Increment instance number
   if (m_incInstNoFromFile)
   {
-    cond = incrementInstanceNumber(resultDset);
+    cond = incrementInstanceNumber(tempDataset.get());
     if (cond.bad())
     {
-      delete resultDset; resultDset = NULL;
       return cond;
     }
   }
 
   // Insert Latin 1 as standard character set if desired
   if (m_insertLatin1)
-    cond = insertLatin1(resultDset);
+    cond = insertLatin1(tempDataset.get());
   if (cond.bad())
     return cond;
 
   // Generate and insert UIDs as necessary
-  generateUIDs(resultDset);
+  generateUIDs(tempDataset.get());
 
   // Read and insert pixel data
-  cond = readAndInsertPixelData(inputPlug, resultDset, proposedTS);
+  cond = readAndInsertPixelData(inputPlug, tempDataset.get(), proposedTS);
   if (cond.bad())
   {
-    delete resultDset; resultDset = NULL;
     return cond;
   }
 
@@ -117,9 +116,9 @@ OFCondition Image2Dcm::convert(I2DImgSource *inputPlug,
   {
     if (srcIsLossy)
     {
-      cond = resultDset->putAndInsertOFStringArray(DCM_LossyImageCompression, "01");
+      cond = tempDataset->putAndInsertOFStringArray(DCM_LossyImageCompression, "01");
       if (cond.good() && !comprMethod.empty())
-        cond = resultDset->putAndInsertOFStringArray(DCM_LossyImageCompressionMethod, comprMethod);
+        cond = tempDataset->putAndInsertOFStringArray(DCM_LossyImageCompressionMethod, comprMethod);
       if (cond.bad()) return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to write attribute Lossy Image Compression and/or Lossy Image Compression Method to result dataset");
     }
   }
@@ -127,29 +126,32 @@ OFCondition Image2Dcm::convert(I2DImgSource *inputPlug,
     DCMDATA_LIBI2D_DEBUG("Image2Dcm: No information regarding lossy compression available");
 
   // Insert SOP Class specific attributes (and values)
-  cond = outPlug->convert(*resultDset);
+  cond = outPlug->convert(*tempDataset);
   if (cond.bad())
   {
-    delete resultDset; resultDset = NULL;
     return cond;
   }
 
   // At last, apply override keys on dataset
-  applyOverrideKeys(resultDset);
+  cond = applyOverrideKeys(tempDataset.get());
+  if (cond.bad())
+  {
+    return cond;
+  }
 
   // Do some very basic attribute checking (e. g. existence (type 2) and values (type 1))
   if (!m_disableAttribChecks)
   {
     OFString err;
-    err = isValid(*resultDset);
-    err += outPlug->isValid(*resultDset);
+    err = isValid(*tempDataset);
+    err += outPlug->isValid(*tempDataset);
     if (!err.empty())
     {
-      delete resultDset; resultDset = NULL;
       return makeOFCondition(OFM_dcmdata, 18, OF_error, err.c_str());
     }
   }
 
+  resultDset = tempDataset.release();
   return EC_Normal;
 }
 
diff --git a/dcmdata/libi2d/i2djpgs.cc b/dcmdata/libi2d/i2djpgs.cc
index d90eb4c..885cd99 100644
--- a/dcmdata/libi2d/i2djpgs.cc
+++ b/dcmdata/libi2d/i2djpgs.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2016, OFFIS e.V.
+ *  Copyright (C) 2007-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -396,7 +396,7 @@ OFCondition I2DJpegSource::copyJPEGStream(char*& pixelData,
   // Only pixel data up to 2^32 bytes is supported (DICOM) and maximum size for "new" operator = size_t
 
   if ( ( OFstatic_cast(unsigned long, filesize) > OFstatic_cast(unsigned long, 4294967294UL) ) ||
-       ( OFstatic_cast(unsigned long, filesize) > OFstatic_cast(unsigned long, OFstatic_cast(size_t, -1) ) ) )
+       ( OFstatic_cast(unsigned long, filesize) > OFstatic_cast(unsigned long, -1) ) )
   {
     DCMDATA_LIBI2D_ERROR("I2DJpegSource: JPEG file length longer than 2^32 bytes (or larger than size_t capacity), aborting");
     return EC_MemoryExhausted;
@@ -518,7 +518,7 @@ OFCondition I2DJpegSource::extractRawJPEGStream(char*& pixelData,
   // Allocate buffer for raw JPEG data
   // Only pixel data up to 2^32 bytes is supported (DICOM)
   if ( ( OFstatic_cast(unsigned long, rawStreamSize) > OFstatic_cast(unsigned long, 4294967294UL) ) ||
-       ( OFstatic_cast(unsigned long, rawStreamSize) > OFstatic_cast(unsigned long, OFstatic_cast(size_t, -1) ) ) )
+       ( OFstatic_cast(unsigned long, rawStreamSize) > OFstatic_cast(unsigned long, -1) ) )
   {
     DCMDATA_LIBI2D_ERROR("I2DJpegSource: Raw JPEG stream length longer than 2^32 bytes (or larger than size_t capacity), aborting");
     return EC_MemoryExhausted;
diff --git a/dcmdata/libsrc/CMakeLists.txt b/dcmdata/libsrc/CMakeLists.txt
index 9c40573..7965ebc 100644
--- a/dcmdata/libsrc/CMakeLists.txt
+++ b/dcmdata/libsrc/CMakeLists.txt
@@ -1,5 +1,7 @@
 # create library from source files
 
+INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
+
 DCMTK_ADD_LIBRARY(dcmdata
   cmdlnarg dcbytstr dcchrstr dccodec dcdatset dcdatutl dcddirif dcdicdir dcdicent
   dcdict dcdictbi dcdirrec dcelem dcerror dcfilefo dcfilter dchashdi dcistrma
@@ -32,7 +34,7 @@ DCMTK_TARGET_LINK_MODULES(mkdictbi ofstd oflog)
 DCMTK_TARGET_LINK_MODULES(mkdeftag ofstd oflog)
 
 ADD_CUSTOM_TARGET(updatedeftag
-        COMMAND mkdeftag -o ${dcmdata_SOURCE_DIR}/include/dcmtk/dcmdata/dcdeftag.h ${DICTIONARIES}
+        COMMAND mkdeftag -o "${dcmdata_SOURCE_DIR}/include/dcmtk/dcmdata/dcdeftag.h" ${DICTIONARIES}
         DEPENDS mkdeftag
         WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
         COMMENT "Generate a new include file of defined tags")
diff --git a/dcmdata/libsrc/Makefile.dep b/dcmdata/libsrc/Makefile.dep
index e512721..bc6d6fd 100644
--- a/dcmdata/libsrc/Makefile.dep
+++ b/dcmdata/libsrc/Makefile.dep
@@ -19,7 +19,10 @@ cmdlnarg.o: cmdlnarg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -37,10 +40,10 @@ cmdlnarg.o: cmdlnarg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h
 dcbytstr.o: dcbytstr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
@@ -55,6 +58,7 @@ dcbytstr.o: dcbytstr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dctagkey.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcbytstr.h \
  ../include/dcmtk/dcmdata/dctypes.h \
@@ -69,7 +73,9 @@ dcbytstr.o: dcbytstr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -89,7 +95,7 @@ dcbytstr.o: dcbytstr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
- ../include/dcmtk/dcmdata/dcstack.h
+ ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dcmatch.h
 dcchrstr.o: dcchrstr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
@@ -112,6 +118,7 @@ dcchrstr.o: dcchrstr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -124,7 +131,6 @@ dcchrstr.o: dcchrstr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -146,8 +152,8 @@ dcchrstr.o: dcchrstr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
  ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcjson.h \
- ../include/dcmtk/dcmdata/dcchrstr.h ../include/dcmtk/dcmdata/dcbytstr.h \
- ../include/dcmtk/dcmdata/dcelem.h
+ ../include/dcmtk/dcmdata/dcmatch.h ../include/dcmtk/dcmdata/dcchrstr.h \
+ ../include/dcmtk/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dcelem.h
 dccodec.o: dccodec.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dccodec.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -170,7 +176,10 @@ dccodec.o: dccodec.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -188,9 +197,9 @@ dccodec.o: dccodec.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -219,6 +228,7 @@ dcdatset.o: dcdatset.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dctagkey.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcdatset.h \
  ../include/dcmtk/dcmdata/dcitem.h \
@@ -235,7 +245,9 @@ dcdatset.o: dcdatset.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -284,7 +296,10 @@ dcdatutl.o: dcdatutl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -302,10 +317,10 @@ dcdatutl.o: dcdatutl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \
@@ -335,6 +350,7 @@ dcddirif.o: dcddirif.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -347,7 +363,7 @@ dcddirif.o: dcddirif.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -402,6 +418,7 @@ dcdicdir.o: dcdicdir.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -414,7 +431,7 @@ dcdicdir.o: dcdicdir.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -471,6 +488,7 @@ dcdict.o: dcdict.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdict.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../include/dcmtk/dcmdata/dchashdi.h ../include/dcmtk/dcmdata/dcdefine.h \
@@ -489,7 +507,9 @@ dcdict.o: dcdict.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -533,6 +553,7 @@ dcdirrec.o: dcdirrec.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -545,7 +566,9 @@ dcdirrec.o: dcdirrec.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -575,8 +598,6 @@ dcdirrec.o: dcdirrec.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcmetinf.h \
  ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcvrulup.h ../include/dcmtk/dcmdata/dcvrul.h \
  ../include/dcmtk/dcmdata/dcpixseq.h ../include/dcmtk/dcmdata/dcofsetl.h \
  ../include/dcmtk/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dcvrae.h \
@@ -600,8 +621,7 @@ dcdirrec.o: dcdirrec.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrof.h ../include/dcmtk/dcmdata/dcvrod.h \
  ../include/dcmtk/dcmdata/dcvrol.h ../include/dcmtk/dcmdata/cmdlnarg.h \
  ../include/dcmtk/dcmdata/dcspchrs.h \
- ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h
+ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcelem.o: dcelem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -616,6 +636,7 @@ dcelem.o: dcelem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dctagkey.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
@@ -634,7 +655,9 @@ dcelem.o: dcelem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -683,6 +706,7 @@ dcfilefo.o: dcfilefo.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
@@ -699,7 +723,9 @@ dcfilefo.o: dcfilefo.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -744,6 +770,7 @@ dcfilter.o: dcfilter.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
@@ -760,7 +787,9 @@ dcfilter.o: dcfilter.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -805,7 +834,10 @@ dchashdi.o: dchashdi.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -821,10 +853,10 @@ dchashdi.o: dchashdi.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h
 dcistrma.o: dcistrma.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcistrma.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -841,6 +873,7 @@ dcistrma.o: dcistrma.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -853,7 +886,9 @@ dcistrma.o: dcistrma.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -887,6 +922,7 @@ dcistrmb.o: dcistrmb.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -899,7 +935,9 @@ dcistrmb.o: dcistrmb.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -933,6 +971,7 @@ dcistrmf.o: dcistrmf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -945,7 +984,9 @@ dcistrmf.o: dcistrmf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -979,6 +1020,7 @@ dcistrmz.o: dcistrmz.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -991,7 +1033,9 @@ dcistrmz.o: dcistrmz.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1025,6 +1069,7 @@ dcitem.o: dcitem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1037,7 +1082,9 @@ dcitem.o: dcitem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1083,9 +1130,6 @@ dcitem.o: dcitem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrus.h ../include/dcmtk/dcmdata/dcvrut.h \
  ../include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../include/dcmtk/dcmdata/dcjson.h
 dcjson.o: dcjson.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -1125,7 +1169,10 @@ dclist.o: dclist.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1142,9 +1189,9 @@ dclist.o: dclist.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
 dcmatch.o: dcmatch.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -1158,6 +1205,7 @@ dcmatch.o: dcmatch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../include/dcmtk/dcmdata/dcmatch.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
@@ -1177,7 +1225,6 @@ dcmatch.o: dcmatch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1196,6 +1243,7 @@ dcmatch.o: dcmatch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dctagkey.h \
@@ -1204,7 +1252,10 @@ dcmatch.o: dcmatch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrdt.h \
  ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
  ../../ofstd/include/dcmtk/ofstd/oftime.h \
- ../include/dcmtk/dcmdata/dcvrtm.h
+ ../include/dcmtk/dcmdata/dcvrtm.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def
 dcmetinf.o: dcmetinf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
@@ -1219,6 +1270,7 @@ dcmetinf.o: dcmetinf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcmetinf.h ../include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../include/dcmtk/dcmdata/dctypes.h \
@@ -1233,7 +1285,9 @@ dcmetinf.o: dcmetinf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1272,6 +1326,7 @@ dcobject.o: dcobject.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dctagkey.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -1289,7 +1344,9 @@ dcobject.o: dcobject.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1329,7 +1386,10 @@ dcostrma.o: dcostrma.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1347,9 +1407,9 @@ dcostrma.o: dcostrma.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcostrmz.h ../include/dcmtk/dcmdata/dcerror.h
@@ -1375,7 +1435,10 @@ dcostrmb.o: dcostrmb.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1393,9 +1456,9 @@ dcostrmb.o: dcostrmb.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcerror.h
@@ -1421,7 +1484,10 @@ dcostrmf.o: dcostrmf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1439,9 +1505,9 @@ dcostrmf.o: dcostrmf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcerror.h
@@ -1467,7 +1533,10 @@ dcostrmz.o: dcostrmz.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1485,9 +1554,9 @@ dcostrmz.o: dcostrmz.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcerror.h
@@ -1508,6 +1577,7 @@ dcpath.o: dcpath.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1520,7 +1590,9 @@ dcpath.o: dcpath.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1570,7 +1642,10 @@ dcpcache.o: dcpcache.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1586,9 +1661,9 @@ dcpcache.o: dcpcache.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dcstack.h
 dcpixel.o: dcpixel.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -1619,7 +1694,10 @@ dcpixel.o: dcpixel.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1636,15 +1714,16 @@ dcpixel.o: dcpixel.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
  ../include/dcmtk/dcmdata/dccodec.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dclist.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcdeftag.h \
- ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dcpcache.h
+ ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dcpcache.h \
+ ../include/dcmtk/dcmdata/dcpxitem.h
 dcpixseq.o: dcpixseq.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
@@ -1662,6 +1741,7 @@ dcpixseq.o: dcpixseq.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
@@ -1678,7 +1758,9 @@ dcpixseq.o: dcpixseq.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1725,7 +1807,10 @@ dcpxitem.o: dcpxitem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1742,9 +1827,9 @@ dcpxitem.o: dcpxitem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcswap.h \
@@ -1772,7 +1857,10 @@ dcrleccd.o: dcrleccd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1790,9 +1878,9 @@ dcrleccd.o: dcrleccd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -1829,7 +1917,10 @@ dcrlecce.o: dcrlecce.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1847,9 +1938,9 @@ dcrlecce.o: dcrlecce.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -1884,7 +1975,10 @@ dcrlecp.o: dcrlecp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1902,9 +1996,9 @@ dcrlecp.o: dcrlecp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h
@@ -1931,7 +2025,10 @@ dcrledrg.o: dcrledrg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1949,9 +2046,9 @@ dcrledrg.o: dcrledrg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcrleccd.h ../include/dcmtk/dcmdata/dcrlecp.h
@@ -1978,7 +2075,10 @@ dcrleerg.o: dcrleerg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1996,9 +2096,9 @@ dcrleerg.o: dcrleerg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcrlecce.h ../include/dcmtk/dcmdata/dcrlecp.h
@@ -2030,7 +2130,10 @@ dcrlerp.o: dcrlerp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2047,9 +2150,9 @@ dcrlerp.o: dcrlerp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
 dcsequen.o: dcsequen.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -2066,6 +2169,7 @@ dcsequen.o: dcsequen.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dctagkey.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
@@ -2085,7 +2189,9 @@ dcsequen.o: dcsequen.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2130,6 +2236,7 @@ dcspchrs.o: dcspchrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -2142,7 +2249,6 @@ dcspchrs.o: dcspchrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2197,7 +2303,10 @@ dcswap.o: dcswap.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2215,9 +2324,9 @@ dcswap.o: dcswap.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h
 dctag.o: dctag.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -2268,7 +2377,10 @@ dctypes.o: dctypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2286,10 +2398,10 @@ dctypes.o: dctypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h
 dcuid.o: dcuid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
@@ -2312,7 +2424,10 @@ dcuid.o: dcuid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2330,10 +2445,10 @@ dcuid.o: dcuid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../ofstd/include/dcmtk/ofstd/ofcrc32.h \
  ../../ofstd/include/dcmtk/ofstd/ofnetdb.h
 dcvr.o: dcvr.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -2359,7 +2474,10 @@ dcvr.o: dcvr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2376,10 +2494,10 @@ dcvr.o: dcvr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h
 dcvrae.o: dcvrae.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrae.h ../include/dcmtk/dcmdata/dcbytstr.h \
  ../include/dcmtk/dcmdata/dctypes.h \
@@ -2401,7 +2519,10 @@ dcvrae.o: dcvrae.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2419,16 +2540,17 @@ dcvrae.o: dcvrae.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
- ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
+ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
+ ../include/dcmtk/dcmdata/dcmatch.h
 dcvras.o: dcvras.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvras.h ../include/dcmtk/dcmdata/dcbytstr.h \
  ../include/dcmtk/dcmdata/dctypes.h \
@@ -2450,7 +2572,10 @@ dcvras.o: dcvras.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2468,10 +2593,10 @@ dcvras.o: dcvras.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -2505,7 +2630,10 @@ dcvrat.o: dcvrat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2522,9 +2650,9 @@ dcvrat.o: dcvrat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
  ../include/dcmtk/dcmdata/dcjson.h
@@ -2549,7 +2677,10 @@ dcvrcs.o: dcvrcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2567,16 +2698,17 @@ dcvrcs.o: dcvrcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
- ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
+ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
+ ../include/dcmtk/dcmdata/dcmatch.h
 dcvrda.o: dcvrda.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrda.h ../include/dcmtk/dcmdata/dcbytstr.h \
  ../include/dcmtk/dcmdata/dctypes.h \
@@ -2598,7 +2730,10 @@ dcvrda.o: dcvrda.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2616,17 +2751,20 @@ dcvrda.o: dcvrda.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofdate.h
+ ../../ofstd/include/dcmtk/ofstd/ofdate.h \
+ ../include/dcmtk/dcmdata/dcvrtm.h \
+ ../../ofstd/include/dcmtk/ofstd/oftime.h \
+ ../include/dcmtk/dcmdata/dcmatch.h
 dcvrds.o: dcvrds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrds.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
@@ -2648,7 +2786,10 @@ dcvrds.o: dcvrds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2666,10 +2807,10 @@ dcvrds.o: dcvrds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -2698,7 +2839,10 @@ dcvrdt.o: dcvrdt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2716,10 +2860,10 @@ dcvrdt.o: dcvrdt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -2729,7 +2873,8 @@ dcvrdt.o: dcvrdt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
  ../../ofstd/include/dcmtk/ofstd/ofdate.h \
  ../../ofstd/include/dcmtk/ofstd/oftime.h \
- ../include/dcmtk/dcmdata/dcvrda.h ../include/dcmtk/dcmdata/dcvrtm.h
+ ../include/dcmtk/dcmdata/dcvrda.h ../include/dcmtk/dcmdata/dcvrtm.h \
+ ../include/dcmtk/dcmdata/dcmatch.h
 dcvrfd.o: dcvrfd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
@@ -2744,6 +2889,7 @@ dcvrfd.o: dcvrfd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvrfd.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -2761,7 +2907,9 @@ dcvrfd.o: dcvrfd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2792,6 +2940,7 @@ dcvrfl.o: dcvrfl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvrfl.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -2809,7 +2958,9 @@ dcvrfl.o: dcvrfl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2847,7 +2998,10 @@ dcvris.o: dcvris.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2865,10 +3019,10 @@ dcvris.o: dcvris.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -2899,7 +3053,10 @@ dcvrlo.o: dcvrlo.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2917,10 +3074,10 @@ dcvrlo.o: dcvrlo.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
@@ -2947,7 +3104,10 @@ dcvrlt.o: dcvrlt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2965,10 +3125,10 @@ dcvrlt.o: dcvrlt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -2989,6 +3149,7 @@ dcvrobow.o: dcvrobow.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../ofstd/include/dcmtk/ofstd/ofuuid.h \
  ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dctagkey.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvrobow.h \
@@ -3008,7 +3169,9 @@ dcvrobow.o: dcvrobow.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3054,7 +3217,10 @@ dcvrod.o: dcvrod.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3071,9 +3237,9 @@ dcvrod.o: dcvrod.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
  ../include/dcmtk/dcmdata/dcswap.h ../include/dcmtk/dcmdata/dcjson.h
@@ -3106,7 +3272,10 @@ dcvrof.o: dcvrof.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3123,9 +3292,9 @@ dcvrof.o: dcvrof.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dcswap.h
 dcvrol.o: dcvrol.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -3156,7 +3325,10 @@ dcvrol.o: dcvrol.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3173,9 +3345,9 @@ dcvrol.o: dcvrol.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
  ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dcswap.h
@@ -3202,7 +3374,10 @@ dcvrpn.o: dcvrpn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3220,10 +3395,10 @@ dcvrpn.o: dcvrpn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
@@ -3256,7 +3431,10 @@ dcvrpobw.o: dcvrpobw.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3273,9 +3451,9 @@ dcvrpobw.o: dcvrpobw.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
 dcvrsh.o: dcvrsh.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -3299,7 +3477,10 @@ dcvrsh.o: dcvrsh.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3317,10 +3498,10 @@ dcvrsh.o: dcvrsh.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -3355,7 +3536,10 @@ dcvrsl.o: dcvrsl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3372,9 +3556,9 @@ dcvrsl.o: dcvrsl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
 dcvrss.o: dcvrss.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -3404,7 +3588,10 @@ dcvrss.o: dcvrss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3421,9 +3608,9 @@ dcvrss.o: dcvrss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
 dcvrst.o: dcvrst.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -3447,7 +3634,10 @@ dcvrst.o: dcvrst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3465,10 +3655,10 @@ dcvrst.o: dcvrst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -3495,7 +3685,10 @@ dcvrtm.o: dcvrtm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3513,17 +3706,18 @@ dcvrtm.o: dcvrtm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcbytstr.h \
  ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
- ../../ofstd/include/dcmtk/ofstd/oftime.h
+ ../../ofstd/include/dcmtk/ofstd/oftime.h \
+ ../include/dcmtk/dcmdata/dcmatch.h
 dcvruc.o: dcvruc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvruc.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -3544,7 +3738,10 @@ dcvruc.o: dcvruc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3562,10 +3759,10 @@ dcvruc.o: dcvruc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcchrstr.h \
  ../include/dcmtk/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
@@ -3587,6 +3784,7 @@ dcvrui.o: dcvrui.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvrui.h ../include/dcmtk/dcmdata/dcbytstr.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -3600,7 +3798,9 @@ dcvrui.o: dcvrui.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3650,7 +3850,10 @@ dcvrul.o: dcvrul.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3667,9 +3870,9 @@ dcvrul.o: dcvrul.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
 dcvrulup.o: dcvrulup.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -3699,7 +3902,10 @@ dcvrulup.o: dcvrulup.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3716,9 +3922,9 @@ dcvrulup.o: dcvrulup.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
 dcvrur.o: dcvrur.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -3741,7 +3947,10 @@ dcvrur.o: dcvrur.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3759,16 +3968,17 @@ dcvrur.o: dcvrur.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcbytstr.h \
  ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
- ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
+ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
+ ../include/dcmtk/dcmdata/dcmatch.h
 dcvrus.o: dcvrus.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/dcmdata/dcvrus.h ../include/dcmtk/dcmdata/dcelem.h \
@@ -3796,7 +4006,10 @@ dcvrus.o: dcvrus.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3813,9 +4026,9 @@ dcvrus.o: dcvrus.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
 dcvrut.o: dcvrut.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -3838,7 +4051,10 @@ dcvrut.o: dcvrut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3856,10 +4072,10 @@ dcvrut.o: dcvrut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcchrstr.h \
  ../include/dcmtk/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
@@ -3884,6 +4100,7 @@ dcwcache.o: dcwcache.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcistrma.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -3897,7 +4114,9 @@ dcwcache.o: dcwcache.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3938,7 +4157,10 @@ dcxfer.o: dcxfer.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3956,10 +4178,10 @@ dcxfer.o: dcxfer.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcuid.h
@@ -3984,6 +4206,7 @@ mkdeftag.o: mkdeftag.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdicent.h ../include/dcmtk/dcmdata/dctagkey.h \
  ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h
@@ -4008,6 +4231,7 @@ mkdictbi.o: mkdictbi.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcdicent.h ../include/dcmtk/dcmdata/dctagkey.h \
  ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h
@@ -4028,6 +4252,7 @@ vrscan.o: vrscan.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -4040,7 +4265,9 @@ vrscan.o: vrscan.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
diff --git a/dcmdata/libsrc/cmdlnarg.cc b/dcmdata/libsrc/cmdlnarg.cc
index 1580391..6673a16 100644
--- a/dcmdata/libsrc/cmdlnarg.cc
+++ b/dcmdata/libsrc/cmdlnarg.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2012, OFFIS e.V.
+ *  Copyright (C) 1996-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -113,17 +113,11 @@ void prepareCmdLineArgs(int& /* argc */, char** /* argv */,
         int fderr = dup(fileno(stdout));
         if (fderr != fileno(stderr))
         {
-            char buf[256];
             DCMDATA_ERROR("INTERNAL ERROR: cannot map stderr to stdout: "
-                << OFStandard::strerror(errno, buf, sizeof(buf)));
+                << OFStandard::getLastSystemErrorCode().message());
         }
     }
 
-#ifndef NO_IOS_BASE_ASSIGN
-    /* make cout refer to cerr. This does not work with all iostream implementations :-( */
-    cout = cerr;
-#endif
-
     /* make stdout the same as stderr */
     *stdout = *stderr;
 
@@ -136,15 +130,13 @@ void prepareCmdLineArgs(int& /* argc */, char** /* argv */,
     /* make sure the buffering is removed */
     if (setvbuf(stdout, NULL, _IONBF, 0 ) != 0 )
     {
-        char buf[256];
         DCMDATA_ERROR("INTERNAL ERROR: cannot unbuffer stdout: "
-            << OFStandard::strerror(errno, buf, sizeof(buf)));
+            << OFStandard::getLastSystemErrorCode().message());
     }
     if (setvbuf(stderr, NULL, _IONBF, 0 ) != 0 )
     {
-        char buf[256];
         DCMDATA_ERROR("INTERNAL ERROR: cannot unbuffer stderr: "
-            << OFStandard::strerror(errno, buf, sizeof(buf)));
+            << OFStandard::getLastSystemErrorCode().message());
     }
 #endif /* __BORLANDC__ */
 #endif
diff --git a/dcmdata/libsrc/dcbytstr.cc b/dcmdata/libsrc/dcbytstr.cc
index 794d4b6..4d58c9a 100644
--- a/dcmdata/libsrc/dcbytstr.cc
+++ b/dcmdata/libsrc/dcbytstr.cc
@@ -27,6 +27,7 @@
 #include "dcmtk/dcmdata/dcjson.h"
 #include "dcmtk/dcmdata/dcbytstr.h"
 #include "dcmtk/dcmdata/dcvr.h"
+#include "dcmtk/dcmdata/dcmatch.h"
 
 #define INCLUDE_CSTDLIB
 #define INCLUDE_CSTDIO
@@ -152,8 +153,19 @@ int DcmByteString::compare(const DcmElement& rhs) const
     myThis = OFconst_cast(DcmByteString*, this);
     myRhs = OFstatic_cast(DcmByteString*, OFconst_cast(DcmElement*, &rhs));
 
-    /* iterate over all components and test equality */
+    /* check number of components. */
+    unsigned long rhsVM = myRhs->getVM();
     unsigned long thisVM = myThis->getVM();
+    if (thisVM < rhsVM)
+    {
+        return -1;
+    }
+    else if (thisVM > rhsVM)
+    {
+        return 1;
+    }
+
+    /* iterate over all components and test equality */
     for (unsigned long count = 0; count < thisVM; count++)
     {
         OFString val;
@@ -168,25 +180,9 @@ int DcmByteString::compare(const DcmElement& rhs) const
                     return result;
                 }
             }
-            else
-            {
-                break; // values equal until this point (rhs shorter)
-            }
         }
     }
-
-    /* we get here if all values are equal. Now look at the number of components. */
-    unsigned long rhsVM = myRhs->getVM();
-    if (thisVM < rhsVM)
-    {
-        return -1;
-    }
-    else if (thisVM > rhsVM)
-    {
-        return 1;
-    }
-
-    /* all values as well as VM equal: objects are equal */
+    /* all values equal */
     return 0;
 }
 
@@ -944,3 +940,32 @@ OFCondition DcmByteString::writeJson(STD_NAMESPACE ostream &out,
     /* always report success */
     return EC_Normal;
 }
+
+
+OFBool DcmByteString::matches(const DcmElement& candidate,
+                              const OFBool enableWildCardMatching) const
+{
+  if (ident() == candidate.ident())
+  {
+    // some const casts to call the getter functions, I do not modify the values, I promise!
+    DcmByteString& key = OFconst_cast(DcmByteString&,*this);
+    DcmElement& can = OFconst_cast(DcmElement&,candidate);
+    OFString a, b;
+    for (unsigned long ui = 0; ui < key.getVM(); ++ui)
+      for (unsigned long uj = 0; uj < can.getVM(); ++uj)
+        if( key.getOFString( a, ui, OFTrue ).good() && can.getOFString( b, uj, OFTrue ).good() && matches( a, b, enableWildCardMatching ) )
+          return OFTrue;
+    return key.getVM() == 0;
+  }
+  return OFFalse;
+}
+
+
+OFBool DcmByteString::matches(const OFString& key,
+                              const OFString& candidate,
+                              const OFBool enableWildCardMatching) const
+{
+  OFstatic_cast(void,enableWildCardMatching);
+  // Universal Matching || Single Value Matching
+  return key.empty() || key == candidate;
+}
diff --git a/dcmdata/libsrc/dcchrstr.cc b/dcmdata/libsrc/dcchrstr.cc
index 3f4d158..28c34e9 100644
--- a/dcmdata/libsrc/dcchrstr.cc
+++ b/dcmdata/libsrc/dcchrstr.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,6 +26,7 @@
 #include "dcmtk/dcmdata/dcitem.h"     /* for class DcmItem */
 #include "dcmtk/dcmdata/dcdeftag.h"   /* for tag definitions */
 #include "dcmtk/dcmdata/dcjson.h"     /* json helper classes */
+#include "dcmtk/dcmdata/dcmatch.h"
 
 //
 // This implementation does not support 16 bit character sets. Since 8 bit
@@ -267,3 +268,14 @@ const OFString& DcmCharString::getDelimiterChars() const
 {
     return DcmVR(EVR_UN).getDelimiterChars();
 }
+
+
+OFBool DcmCharString::matches(const OFString& key,
+                              const OFString& candidate,
+                              const OFBool enableWildCardMatching) const
+{
+  if (enableWildCardMatching)
+    return DcmAttributeMatching::wildCardMatching(key.c_str(), key.length(), candidate.c_str(), candidate.length());
+  else
+    return DcmByteString::matches(key, candidate, OFFalse);
+}
diff --git a/dcmdata/libsrc/dcdatset.cc b/dcmdata/libsrc/dcdatset.cc
index 61f4bc1..e5bb8ac 100644
--- a/dcmdata/libsrc/dcdatset.cc
+++ b/dcmdata/libsrc/dcdatset.cc
@@ -369,6 +369,15 @@ OFCondition DcmDataset::read(DcmInputStream &inStream,
                              const E_GrpLenEncoding glenc,
                              const Uint32 maxReadLength)
 {
+  return DcmDataset::readUntilTag(inStream, xfer, glenc, maxReadLength, DCM_UndefinedTagKey);
+}
+
+OFCondition DcmDataset::readUntilTag(DcmInputStream &inStream,
+                                     const E_TransferSyntax xfer,
+                                     const E_GrpLenEncoding glenc,
+                                     const Uint32 maxReadLength,
+                                     const DcmTagKey &stopParsingAtElement)
+{
     /* check if the stream variable reported an error */
     errorFlag = inStream.status();
     /* if the stream did not report an error but the stream */
@@ -442,7 +451,7 @@ OFCondition DcmDataset::read(DcmInputStream &inStream,
         }
         /* pass processing the task to class DcmItem */
         if (errorFlag.good())
-            errorFlag = DcmItem::read(inStream, OriginalXfer, glenc, maxReadLength);
+            errorFlag = DcmItem::readUntilTag(inStream, OriginalXfer, glenc, maxReadLength, stopParsingAtElement);
 
     }
 
@@ -639,6 +648,15 @@ OFCondition DcmDataset::loadFile(const OFFilename &fileName,
                                  const E_GrpLenEncoding groupLength,
                                  const Uint32 maxReadLength)
 {
+  return DcmDataset::loadFileUntilTag(fileName, readXfer, groupLength, maxReadLength, DCM_UndefinedTagKey);
+}
+
+OFCondition DcmDataset::loadFileUntilTag(const OFFilename &fileName,
+                                 const E_TransferSyntax readXfer,
+                                 const E_GrpLenEncoding groupLength,
+                                 const Uint32 maxReadLength,
+                                 const DcmTagKey &stopParsingAtElement)
+{
     OFCondition l_error = EC_InvalidFilename;
     /* check parameters first */
     if (!fileName.isEmpty())
@@ -657,7 +675,7 @@ OFCondition DcmDataset::loadFile(const OFFilename &fileName,
             {
                 /* read data from file */
                 transferInit();
-                l_error = read(fileStream, readXfer, groupLength, maxReadLength);
+                l_error = readUntilTag(fileStream, readXfer, groupLength, maxReadLength, stopParsingAtElement);
                 transferEnd();
             }
         }
diff --git a/dcmdata/libsrc/dcddirif.cc b/dcmdata/libsrc/dcddirif.cc
index ca118d7..e25c0e7 100644
--- a/dcmdata/libsrc/dcddirif.cc
+++ b/dcmdata/libsrc/dcddirif.cc
@@ -24,7 +24,6 @@
 
 #define INCLUDE_CSTDIO
 #define INCLUDE_CCTYPE
-#define INCLUDE_CERRNO
 #include "dcmtk/ofstd/ofstdinc.h"
 
 #include "dcmtk/dcmdata/dcddirif.h"
@@ -668,7 +667,8 @@ static E_DirRecType sopClassToRecordType(const OFString &sopClass)
              compare(sopClass, UID_MacularGridThicknessAndVolumeReportStorage) ||
              compare(sopClass, UID_ImplantationPlanSRDocumentStorage) ||
              compare(sopClass, UID_AcquisitionContextSRStorage) ||
-             compare(sopClass, UID_SimplifiedAdultEchoSRStorage))
+             compare(sopClass, UID_SimplifiedAdultEchoSRStorage) ||
+             compare(sopClass, UID_PatientRadiationDoseSRStorage))
     {
         result = ERT_SRDocument;
     }
@@ -679,6 +679,10 @@ static E_DirRecType sopClassToRecordType(const OFString &sopClass)
              compare(sopClass, UID_XAXRFGrayscaleSoftcopyPresentationStateStorage) ||
              compare(sopClass, UID_GrayscalePlanarMPRVolumetricPresentationStateStorage) ||
              compare(sopClass, UID_CompositingPlanarMPRVolumetricPresentationStateStorage) ||
+             compare(sopClass, UID_AdvancedBlendingPresentationStateStorage) ||
+             compare(sopClass, UID_VolumeRenderingVolumetricPresentationStateStorage) ||
+             compare(sopClass, UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage) ||
+             compare(sopClass, UID_MultipleVolumeRenderingVolumetricPresentationStateStorage) ||
              compare(sopClass, UID_BasicStructuredDisplayStorage))
     {
         result = ERT_Presentation;
@@ -1049,6 +1053,7 @@ static OFBool isMultiframeStorageSOPClass(const OFString &sopClassUID)
            compare(sopClassUID, UID_MultiframeSingleBitSecondaryCaptureImageStorage) ||
            compare(sopClassUID, UID_MultiframeTrueColorSecondaryCaptureImageStorage) ||
            compare(sopClassUID, UID_NuclearMedicineImageStorage) ||
+           compare(sopClassUID, UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage) ||
            compare(sopClassUID, UID_OphthalmicPhotography16BitImageStorage) ||
            compare(sopClassUID, UID_OphthalmicPhotography8BitImageStorage) ||
            compare(sopClassUID, UID_OphthalmicTomographyImageStorage) ||
@@ -1569,7 +1574,8 @@ OFCondition DicomDirInterface::checkSOPClassAndXfer(DcmMetaInfo *metainfo,
                                 compare(mediaSOPClassUID, UID_MacularGridThicknessAndVolumeReportStorage) ||
                                 compare(mediaSOPClassUID, UID_ImplantationPlanSRDocumentStorage) ||
                                 compare(mediaSOPClassUID, UID_AcquisitionContextSRStorage) ||
-                                compare(mediaSOPClassUID, UID_SimplifiedAdultEchoSRStorage);
+                                compare(mediaSOPClassUID, UID_SimplifiedAdultEchoSRStorage) ||
+                                compare(mediaSOPClassUID, UID_PatientRadiationDoseSRStorage);
                      }
                     /* is it one of the waveform SOP Classes? */
                     if (!found)
@@ -1594,6 +1600,10 @@ OFCondition DicomDirInterface::checkSOPClassAndXfer(DcmMetaInfo *metainfo,
                                 compare(mediaSOPClassUID, UID_XAXRFGrayscaleSoftcopyPresentationStateStorage) ||
                                 compare(mediaSOPClassUID, UID_GrayscalePlanarMPRVolumetricPresentationStateStorage) ||
                                 compare(mediaSOPClassUID, UID_CompositingPlanarMPRVolumetricPresentationStateStorage) ||
+                                compare(mediaSOPClassUID, UID_AdvancedBlendingPresentationStateStorage) ||
+                                compare(mediaSOPClassUID, UID_VolumeRenderingVolumetricPresentationStateStorage) ||
+                                compare(mediaSOPClassUID, UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage) ||
+                                compare(mediaSOPClassUID, UID_MultipleVolumeRenderingVolumetricPresentationStateStorage) ||
                                 compare(mediaSOPClassUID, UID_BasicStructuredDisplayStorage);
                     }
                     /* is it one of the encapsulated document SOP Classes? */
@@ -5308,9 +5318,8 @@ OFBool DicomDirInterface::copyFile(const OFFilename &fromFilename,
     if (!result)
     {
         /* create error message from error code */
-        char buffer[255];
         DCMDATA_ERROR("copying files: " << fromFilename << " to " << toFilename
-            << ": " << OFStandard::strerror(errno, buffer, 255));
+            << ": " << OFStandard::getLastSystemErrorCode().message());
     }
     return result;
 }
diff --git a/dcmdata/libsrc/dcdicdir.cc b/dcmdata/libsrc/dcdicdir.cc
index ec1dc38..e086553 100644
--- a/dcmdata/libsrc/dcdicdir.cc
+++ b/dcmdata/libsrc/dcdicdir.cc
@@ -24,7 +24,6 @@
 
 #define INCLUDE_CSTDLIB
 #define INCLUDE_CSTDIO
-#define INCLUDE_CERRNO
 #define INCLUDE_LIBC
 #define INCLUDE_UNISTD
 #include "dcmtk/ofstd/ofstdinc.h"
@@ -1069,29 +1068,23 @@ OFCondition DcmDicomDir::write(const E_TransferSyntax oxfer,
         {
             if (!OFStandard::renameFile(dicomDirFileName, backupFilename))
             {
-                char buf[256];
-                const char *text = OFStandard::strerror(errno, buf, sizeof(buf));
-                if (text == NULL) text = "(unknown error code)";
-                errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, text);
+                OFString buffer = OFStandard::getLastSystemErrorCode().message();
+                errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, buffer.c_str());
             }
         }
 #else
         if (!OFStandard::deleteFile(dicomDirFileName))
         {
-            char buf[256];
-            const char *text = OFStandard::strerror(errno, buf, sizeof(buf));
-            if (text == NULL) text = "(unknown error code)";
-            errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, text);
+            OFString buffer = OFStandard::getLastSystemErrorCode().message();
+            errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, buffer.c_str());
         }
 #endif
     }
 
     if (errorFlag == EC_Normal && !OFStandard::renameFile(tempFilename, dicomDirFileName))
     {
-        char buf[256];
-        const char *text = OFStandard::strerror(errno, buf, sizeof(buf));
-        if (text == NULL) text = "(unknown error code)";
-        errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, text);
+        OFString buffer = OFStandard::getLastSystemErrorCode().message();
+        errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, buffer.c_str());
     }
 
     modified = OFFalse;
diff --git a/dcmdata/libsrc/dcdictbi.cc b/dcmdata/libsrc/dcdictbi.cc
index 2e09145..ec01c78 100644
--- a/dcmdata/libsrc/dcdictbi.cc
+++ b/dcmdata/libsrc/dcdictbi.cc
@@ -4,7 +4,7 @@
 **
 **   User: joergr
 **   Host: thinkpad
-**   Date: 2017-01-31 14:11:02
+**   Date: 2017-06-15 10:51:06
 **   Prog: /home/joergr/Source/dcmtk-full/public/dcmdata/libsrc/mkdictbi
 **
 **   From: ../data/dicom.dic
@@ -2123,23 +2123,23 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0010, 0x0221, 0x0010, 0x0221,
-      EVR_SQ, "GeneticModificationsSequence", 1, 1, "DICOM/CP_1619",
+      EVR_SQ, "GeneticModificationsSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0010, 0x0222, 0x0010, 0x0222,
-      EVR_UC, "GeneticModificationsDescription", 1, 1, "DICOM/CP_1619",
+      EVR_UC, "GeneticModificationsDescription", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0010, 0x0223, 0x0010, 0x0223,
-      EVR_LO, "GeneticModificationsNomenclature", 1, 1, "DICOM/CP_1619",
+      EVR_LO, "GeneticModificationsNomenclature", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0010, 0x0229, 0x0010, 0x0229,
-      EVR_SQ, "GeneticModificationsCodeSequence", 1, 1, "DICOM/CP_1619",
+      EVR_SQ, "GeneticModificationsCodeSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0010, 0x1000, 0x0010, 0x1000,
-      EVR_LO, "OtherPatientIDs", 1, -1, "DICOM",
+      EVR_LO, "RETIRED_OtherPatientIDs", 1, -1, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0010, 0x1001, 0x0010, 0x1001,
@@ -2203,7 +2203,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0010, 0x1090, 0x0010, 0x1090,
-      EVR_LO, "MedicalRecordLocator", 1, 1, "DICOM",
+      EVR_LO, "RETIRED_MedicalRecordLocator", 1, 1, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0010, 0x1100, 0x0010, 0x1100,
@@ -13404,6 +13404,82 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_OF, "TwoDimensionalToThreeDimensionalMapData", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0022, 0x1612, 0x0022, 0x1612,
+      EVR_SQ, "DerivationAlgorithmSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1615, 0x0022, 0x1615,
+      EVR_SQ, "OphthalmicImageTypeCodeSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1616, 0x0022, 0x1616,
+      EVR_LO, "OphthalmicImageTypeDescription", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1618, 0x0022, 0x1618,
+      EVR_SQ, "ScanPatternTypeCodeSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1620, 0x0022, 0x1620,
+      EVR_SQ, "ReferencedSurfaceMeshIdentificationSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1622, 0x0022, 0x1622,
+      EVR_CS, "OphthalmicVolumetricPropertiesFlag", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1624, 0x0022, 0x1624,
+      EVR_FL, "OphthalmicAnatomicReferencePointXCoordinate", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1626, 0x0022, 0x1626,
+      EVR_FL, "OphthalmicAnatomicReferencePointYCoordinate", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1628, 0x0022, 0x1628,
+      EVR_SQ, "OphthalmicEnFaceImageQualityRatingSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1630, 0x0022, 0x1630,
+      EVR_DS, "QualityThreshold", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1640, 0x0022, 0x1640,
+      EVR_SQ, "OCTBscanAnalysisAcquisitionParametersSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1642, 0x0022, 0x1642,
+      EVR_UL, "NumberofBscansPerFrame", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1643, 0x0022, 0x1643,
+      EVR_FL, "BscanSlabThickness", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1644, 0x0022, 0x1644,
+      EVR_FL, "DistanceBetweenBscanSlabs", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1645, 0x0022, 0x1645,
+      EVR_FL, "BscanCycleTime", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1646, 0x0022, 0x1646,
+      EVR_FL, "BscanCycleTimeVector", 1, -1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1649, 0x0022, 0x1649,
+      EVR_FL, "AscanRate", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1650, 0x0022, 0x1650,
+      EVR_FL, "BscanRate", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0022, 0x1658, 0x0022, 0x1658,
+      EVR_UL, "SurfaceMeshZPixelOffset", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
 #ifdef ENABLE_PRIVATE_TAGS
   , { 0x0023, 0x0000, 0x0023, 0x0000,
       EVR_DS, "CRDRE", 1, 1, "PrivateTag",
@@ -18426,6 +18502,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_DS, "EntranceDoseInmGy", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0040, 0x8303, 0x0040, 0x8303,
+      EVR_CS, "EntranceDoseDerivation", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0040, 0x9092, 0x0040, 0x9092,
       EVR_SQ, "ParametricMapFrameTypeSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -21519,7 +21599,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0068, 0x62f0, 0x0068, 0x62f0,
-      EVR_FD, "ViewOrientationModifier", 9, 9, "DICOM",
+      EVR_SQ, "ViewOrientationModifierCodeSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0068, 0x62f2, 0x0068, 0x62f2,
@@ -22195,7 +22275,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0070, 0x1206, 0x0070, 0x1206,
-      EVR_CS, "CompositingMethod", 1, 1, "DICOM",
+      EVR_CS, "RETIRED_CompositingMethod", 1, 1, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0070, 0x1207, 0x0070, 0x1207,
@@ -22206,6 +22286,26 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_CS, "ImageVolumeGeometry", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0070, 0x1209, 0x0070, 0x1209,
+      EVR_UI, "VolumetricPresentationInputSetUID", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x120a, 0x0070, 0x120a,
+      EVR_SQ, "VolumetricPresentationInputSetSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x120b, 0x0070, 0x120b,
+      EVR_CS, "GlobalCrop", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x120c, 0x0070, 0x120c,
+      EVR_US, "GlobalCroppingSpecificationIndex", 1, -1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x120d, 0x0070, 0x120d,
+      EVR_CS, "RenderingMethod", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0070, 0x1301, 0x0070, 0x1301,
       EVR_SQ, "VolumeCroppingSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -22274,6 +22374,54 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_FD, "MPRViewHeight", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0070, 0x1602, 0x0070, 0x1602,
+      EVR_CS, "RenderProjection", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1603, 0x0070, 0x1603,
+      EVR_FD, "ViewpointPosition", 3, 3, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1604, 0x0070, 0x1604,
+      EVR_FD, "ViewpointLookAtPoint", 3, 3, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1605, 0x0070, 0x1605,
+      EVR_FD, "ViewpointUpDirection", 3, 3, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1606, 0x0070, 0x1606,
+      EVR_FD, "RenderFieldOfView", 6, 6, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1607, 0x0070, 0x1607,
+      EVR_FD, "SamplingStepSize", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1701, 0x0070, 0x1701,
+      EVR_CS, "ShadingStyle", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1702, 0x0070, 0x1702,
+      EVR_FD, "AmbientReflectionIntensity", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1703, 0x0070, 0x1703,
+      EVR_FD, "LightDirection", 3, 3, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1704, 0x0070, 0x1704,
+      EVR_FD, "DiffuseReflectionIntensity", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1705, 0x0070, 0x1705,
+      EVR_FD, "SpecularReflectionIntensity", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1706, 0x0070, 0x1706,
+      EVR_FD, "Shininess", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0070, 0x1801, 0x0070, 0x1801,
       EVR_SQ, "PresentationStateClassificationComponentSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -22342,6 +22490,66 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_FD, "AnimationStepSize", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0070, 0x1a06, 0x0070, 0x1a06,
+      EVR_FD, "SwivelRange", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1a07, 0x0070, 0x1a07,
+      EVR_OD, "VolumetricCurveUpDirections", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1a08, 0x0070, 0x1a08,
+      EVR_SQ, "VolumeStreamSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1a09, 0x0070, 0x1a09,
+      EVR_LO, "RGBATransferFunctionDescription", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1b01, 0x0070, 0x1b01,
+      EVR_SQ, "AdvancedBlendingSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1b02, 0x0070, 0x1b02,
+      EVR_US, "BlendingInputNumber", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1b03, 0x0070, 0x1b03,
+      EVR_SQ, "BlendingDisplayInputSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1b04, 0x0070, 0x1b04,
+      EVR_SQ, "BlendingDisplaySequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1b06, 0x0070, 0x1b06,
+      EVR_CS, "BlendingMode", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1b07, 0x0070, 0x1b07,
+      EVR_CS, "TimeSeriesBlending", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1b08, 0x0070, 0x1b08,
+      EVR_CS, "GeometryForDisplay", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1b11, 0x0070, 0x1b11,
+      EVR_SQ, "ThresholdSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1b12, 0x0070, 0x1b12,
+      EVR_SQ, "ThresholdValueSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1b13, 0x0070, 0x1b13,
+      EVR_CS, "ThresholdType", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0070, 0x1b14, 0x0070, 0x1b14,
+      EVR_FD, "ThresholdValue", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0072, 0x0002, 0x0072, 0x0002,
       EVR_SH, "HangingProtocolName", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -23163,7 +23371,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0076, 0x0034, 0x0076, 0x0034,
-      EVR_CS, "ComponentTypeCodeSequence", 1, 1, "DICOM",
+      EVR_SQ, "ComponentTypeCodeSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0076, 0x0036, 0x0076, 0x0036,
@@ -25736,6 +25944,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_DS, "BeamDoseSpecificationPoint", 3, 3, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x300a, 0x0083, 0x300a, 0x0083,
+      EVR_UI, "ReferencedDoseReferenceUID", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x300a, 0x0084, 0x300a, 0x0084,
       EVR_DS, "BeamDose", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
diff --git a/dcmdata/libsrc/dcdirrec.cc b/dcmdata/libsrc/dcdirrec.cc
index fb9cc0c..bd5a901 100644
--- a/dcmdata/libsrc/dcdirrec.cc
+++ b/dcmdata/libsrc/dcdirrec.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,7 +25,6 @@
 #define INCLUDE_CSTDLIB
 #define INCLUDE_CSTDIO
 #define INCLUDE_CSTRING
-#define INCLUDE_CERRNO
 #define INCLUDE_CCTYPE
 #define INCLUDE_LIBC
 #define INCLUDE_UNISTD
@@ -1092,10 +1091,8 @@ OFCondition DcmDirectoryRecord::purgeReferencedFile()
         {                                 // filename exists
             if (unlink(localFileName) != 0)
             {
-                char buf[256];
-                const char *text = OFStandard::strerror(errno, buf, sizeof(buf));
-                if (text == NULL) text = "(unknown error code)";
-                errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, text);
+                OFString buffer = OFStandard::getLastSystemErrorCode().message();
+                errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, buffer.c_str());
             }
             delete[] localFileName;
         } else {                          // no referenced file exists
diff --git a/dcmdata/libsrc/dcelem.cc b/dcmdata/libsrc/dcelem.cc
index a682403..840e6aa 100644
--- a/dcmdata/libsrc/dcelem.cc
+++ b/dcmdata/libsrc/dcelem.cc
@@ -306,13 +306,35 @@ Uint32 DcmElement::calcElementLength(const E_TransferSyntax xfer,
 {
     DcmXfer xferSyn(xfer);
     DcmEVR vr = getVR();
-    /* These don't use extended length encoding, but when writing, they are
-     * converted to EVR_UN which does use extended length encoding.
-     * (EVR_na should never happen here, it's just handled for completeness) */
+
+    /* These VRs don't use extended length encoding, but when writing, they are
+     * converted to EVR_UN, which DOES use extended length encoding.
+     * (EVR_na should never happen here, it's just handled for completeness)
+     */
     if (vr == EVR_UNKNOWN2B || vr == EVR_na)
         vr = EVR_UN;
-    const Uint32 headerLength = xferSyn.sizeofTagHeader(vr);
+
+    /* compute length of element value */
     const Uint32 elemLength = getLength(xfer, enctype);
+
+    /* Create an object that represents this object's "valid" data type */
+    DcmVR myvalidvr(vr);
+
+    if ((elemLength) > 0xffff && (! myvalidvr.usesExtendedLengthEncoding()) && xferSyn.isExplicitVR())
+    {
+      /* special case: we are writing in explicit VR, the VR of this
+       * element uses a 2-byte length encoding, but the element length is
+       * too large for a 2-byte length field. We need to write this element
+       * as VR=UN (or VR=OB) and adjust the length calculation accordingly.
+       * Since UN and OB always have the same header length, we can simply
+       * assume that we are using UN.
+       */
+       vr = EVR_UN;
+    }
+
+    /* now compute length of header */
+    const Uint32 headerLength = xferSyn.sizeofTagHeader(vr);
+
     if (OFStandard::check32BitAddOverflow(headerLength, elemLength))
       return DCM_UndefinedLength;
     else
@@ -323,22 +345,7 @@ Uint32 DcmElement::calcElementLength(const E_TransferSyntax xfer,
 OFBool DcmElement::canWriteXfer(const E_TransferSyntax newXfer,
                                 const E_TransferSyntax /*oldXfer*/)
 {
-    OFBool canWrite = (newXfer != EXS_Unknown);
-    if (canWrite)
-    {
-        /* check whether element value exceeds length field (in case of 16 bit) */
-        if (DcmXfer(newXfer).isExplicitVR() && !DcmVR(getVR()).usesExtendedLengthEncoding())
-        {
-            const Uint32 length = getLength(newXfer);
-            if (length > 0xffff)
-            {
-                DCMDATA_DEBUG("DcmElement::canWriteXfer() Length of element " << getTagName() << " " << getTag()
-                    << " exceeds maximum of 16-bit length field (" << length << " > 65535 bytes)");
-                canWrite = OFFalse;
-            }
-        }
-    }
-    return canWrite;
+    return (newXfer != EXS_Unknown);
 }
 
 
@@ -1119,8 +1126,12 @@ OFCondition DcmElement::read(DcmInputStream &inStream,
         /* if this is not an illegal call, go ahead and create a DcmXfer */
         /* object based on the transfer syntax which was passed */
         DcmXfer inXfer(ixfer);
+
         /* determine the transfer syntax's byte ordering */
-        fByteOrder = inXfer.getByteOrder();
+        if (getTag() == DCM_PixelData)
+          fByteOrder = inXfer.getPixelDataByteOrder();
+          else fByteOrder = inXfer.getByteOrder();
+
         /* check if the stream reported an error */
         errorFlag = inStream.status();
         /* if we encountered the end of the stream, set the error flag correspondingly */
@@ -1169,7 +1180,7 @@ OFCondition DcmElement::read(DcmInputStream &inStream,
                     if (fLoadValue)
                     {
                         offile_off_t skipped = inStream.skip(getLengthField());
-                        if (skipped < getLengthField())
+                        if (skipped < OFstatic_cast(offile_off_t, getLengthField()))
                         {
                             /* If desired, specific parser errors will be ignored */
                             if (dcmIgnoreParsingErrors.get())
@@ -1241,11 +1252,39 @@ void DcmElement::transferInit()
 
 OFCondition DcmElement::write(DcmOutputStream &outStream,
                               const E_TransferSyntax oxfer,
-                              const E_EncodingType /*enctype*/,
+                              const E_EncodingType enctype,
                               DcmWriteCache *wcache)
 {
     DcmWriteCache wcache2;
 
+    /* Create an object that represents this object's data type */
+    DcmVR myvr(getVR());
+
+    /* create an object that represents the transfer syntax */
+    DcmXfer outXfer(oxfer);
+
+    /* getValidEVR() will convert post 1993 VRs to "OB" if these are disabled */
+    DcmEVR vr = myvr.getValidEVR();
+
+    /* compute length of element value */
+    const Uint32 elemLength = getLength(oxfer, enctype);
+
+    /* Create an object that represents this object's "valid" data type */
+    DcmVR myvalidvr(vr);
+
+    if ((elemLength) > 0xffff && (! myvalidvr.usesExtendedLengthEncoding()) && outXfer.isExplicitVR())
+    {
+      /* special case: we are writing in explicit VR, the VR of this
+       * element uses a 2-byte length encoding, but the element length is
+       * too large for a 2-byte length field. We need to write this element
+       * as VR=UN (or VR=OB if the generation of UN is disabled).
+       * In this method, the variable "vr" is only used to determine the
+       * output byte order, which is always the same for OB and UN.
+       * Therefore, we do not need to distinguish between these two.
+       */
+       vr = EVR_UN;
+    }
+
     /* In case the transfer state is not initialized, this is an illegal call */
     if (getTransferState() == ERW_notInitialized)
         errorFlag = EC_IllegalCall;
@@ -1257,8 +1296,17 @@ OFCondition DcmElement::write(DcmOutputStream &outStream,
         errorFlag = outStream.status();
         if (errorFlag.good())
         {
-            /* create an object that represents the transfer syntax */
-            DcmXfer outXfer(oxfer);
+            E_ByteOrder outByteOrder;
+
+            /* determine the transfer syntax's byte ordering for this element */
+            if (getTag() == DCM_PixelData)
+              outByteOrder = outXfer.getPixelDataByteOrder();
+              else outByteOrder = outXfer.getByteOrder();
+
+            /* UN and OB element content always needs to be written in little endian.
+               We need to set this manually for the case that we are converting
+               elements to UN or OB while writing because some post-1993 VRs are disabled */
+            if ((vr == EVR_OB) || (vr == EVR_UN)) outByteOrder = EBO_LittleEndian;
 
             /* pointer to element value if value resides in memory or old-style
              * write behaviour is active (i.e. everything loaded into memory upon write)
@@ -1277,7 +1325,7 @@ OFCondition DcmElement::write(DcmOutputStream &outStream,
               {
                 /* get this element's value. Mind the byte ordering (little */
                 /* or big endian) of the transfer syntax which shall be used */
-                value = OFstatic_cast(Uint8 *, getValue(outXfer.getByteOrder()));
+                value = OFstatic_cast(Uint8 *, getValue(outByteOrder));
                 if (value) accessPossible = OFTrue;
               }
               else
@@ -1290,7 +1338,7 @@ OFCondition DcmElement::write(DcmOutputStream &outStream,
                 if (!wcache) wcache = &wcache2;
 
                 /* initialize cache object. This is safe even if the object was already initialized */
-                wcache->init(this, getLengthField(), getTransferredBytes(), outXfer.getByteOrder());
+                wcache->init(this, getLengthField(), getTransferredBytes(), outByteOrder);
 
                 /* access first block of element content */
                 errorFlag = wcache->fillBuffer(*this);
@@ -1309,8 +1357,8 @@ OFCondition DcmElement::write(DcmOutputStream &outStream,
                  * in the buffer, check if the buffer is still sufficient for the requirements
                  * of this element, which may need only 8 instead of 12 bytes.
                  */
-                if ((outStream.avail() >= DCM_TagInfoLength) ||
-                    (outStream.avail() >= getTagAndLengthSize(oxfer)))
+                if ((outStream.avail() >= OFstatic_cast(offile_off_t, DCM_TagInfoLength)) ||
+                    (outStream.avail() >= OFstatic_cast(offile_off_t, getTagAndLengthSize(oxfer))))
                 {
                     /* if there is no value, Length (member variable) shall be set to 0 */
                     if (! accessPossible) setLengthField(0);
@@ -1804,7 +1852,7 @@ OFCondition DcmElement::getPartialValue(void *targetBuffer,
     if (bytesToRead > 0)
     {
       // here we read the main block of data
-     if (bytesToRead != readStream->read(targetBufferChar, bytesToRead))
+     if (OFstatic_cast(offile_off_t, bytesToRead) != readStream->read(targetBufferChar, bytesToRead))
          return EC_InvalidStream;
 
       // swap to desired byte order. fByteOrder contains the byte order in file.
@@ -2128,3 +2176,21 @@ OFCondition DcmElement::checkVM(const unsigned long vmNum,
   }
   return result;
 }
+
+OFBool DcmElement::matches(const DcmElement& candidate,
+                           const OFBool enableWildCardMatching) const
+{
+  OFstatic_cast(void,candidate);
+  OFstatic_cast(void,enableWildCardMatching);
+  return OFFalse;
+}
+
+OFBool DcmElement::combinationMatches(const DcmElement& keySecond,
+                                      const DcmElement& candidateFirst,
+                                      const DcmElement& candidateSecond) const
+{
+  OFstatic_cast(void,keySecond);
+  OFstatic_cast(void,candidateFirst);
+  OFstatic_cast(void,candidateSecond);
+  return OFFalse;
+}
diff --git a/dcmdata/libsrc/dcfilefo.cc b/dcmdata/libsrc/dcfilefo.cc
index f12bbb5..4cc2ef2 100644
--- a/dcmdata/libsrc/dcfilefo.cc
+++ b/dcmdata/libsrc/dcfilefo.cc
@@ -693,7 +693,15 @@ OFCondition DcmFileFormat::read(DcmInputStream &inStream,
                                 const E_TransferSyntax xfer,
                                 const E_GrpLenEncoding glenc,
                                 const Uint32 maxReadLength)
+{
+  return DcmFileFormat::readUntilTag(inStream,xfer,glenc,maxReadLength,DCM_UndefinedTagKey);
+}
 
+OFCondition DcmFileFormat::readUntilTag(DcmInputStream &inStream,
+                                        const E_TransferSyntax xfer,
+                                        const E_GrpLenEncoding glenc,
+                                        const Uint32 maxReadLength,
+                                        const DcmTagKey &stopParsingAtElement)
 {
     if (getTransferState() == ERW_notInitialized)
         errorFlag = EC_IllegalCall;
@@ -749,7 +757,7 @@ OFCondition DcmFileFormat::read(DcmInputStream &inStream,
                 {
                     if (dataset && dataset->transferState() != ERW_ready)
                     {
-                        errorFlag = dataset->read(inStream, newxfer, glenc, maxReadLength);
+                        errorFlag = dataset->readUntilTag(inStream, newxfer, glenc, maxReadLength,stopParsingAtElement);
                     }
                 }
             }
@@ -761,7 +769,7 @@ OFCondition DcmFileFormat::read(DcmInputStream &inStream,
             setTransferState(ERW_ready);
     }
     return errorFlag;
-}  // DcmFileFormat::read()
+}  // DcmFileFormat::readUntilTag()
 
 
 // ********************************
@@ -873,15 +881,26 @@ OFCondition DcmFileFormat::write(DcmOutputStream &outStream,
 
 // ********************************
 
-
 OFCondition DcmFileFormat::loadFile(const OFFilename &fileName,
                                     const E_TransferSyntax readXfer,
                                     const E_GrpLenEncoding groupLength,
                                     const Uint32 maxReadLength,
                                     const E_FileReadMode readMode)
 {
+  return DcmFileFormat::loadFileUntilTag(fileName, readXfer, groupLength, maxReadLength, readMode, DCM_UndefinedTagKey);
+}
+
+
+OFCondition DcmFileFormat::loadFileUntilTag(
+                                    const OFFilename &fileName,
+                                    const E_TransferSyntax readXfer,
+                                    const E_GrpLenEncoding groupLength,
+                                    const Uint32 maxReadLength,
+                                    const E_FileReadMode readMode,
+                                    const DcmTagKey &stopParsingAtElement)
+{
     if (readMode == ERM_dataset)
-        return getDataset()->loadFile(fileName, readXfer, groupLength, maxReadLength);
+        return getDataset()->loadFileUntilTag(fileName, readXfer, groupLength, maxReadLength, stopParsingAtElement);
 
     OFCondition l_error = EC_InvalidFilename;
     /* check parameters first */
@@ -902,7 +921,7 @@ OFCondition DcmFileFormat::loadFile(const OFFilename &fileName,
                 FileReadMode = readMode;
                 /* read data from file */
                 transferInit();
-                l_error = read(fileStream, readXfer, groupLength, maxReadLength);
+                l_error = readUntilTag(fileStream, readXfer, groupLength, maxReadLength, stopParsingAtElement);
                 transferEnd();
                 /* restore old value */
                 FileReadMode = oldMode;
diff --git a/dcmdata/libsrc/dcitem.cc b/dcmdata/libsrc/dcitem.cc
index 3e48035..a357b66 100644
--- a/dcmdata/libsrc/dcitem.cc
+++ b/dcmdata/libsrc/dcitem.cc
@@ -166,8 +166,18 @@ int DcmItem::compare(const DcmItem& rhs) const
     myThis = OFconst_cast(DcmItem*, this);
     myRhs =  OFconst_cast(DcmItem*, &rhs);
 
-    // iterate over all items and test equality
+    // check length, i.e. number of elements in item
     unsigned long thisVM = myThis->card();
+    unsigned long rhsVM = myRhs->card();
+    if (thisVM < rhsVM)
+    {
+        return -1;
+    }
+    else if (thisVM > rhsVM)
+    {
+        return 1;
+    }
+    // iterate over all items and test equality
     for (unsigned long count = 0; count < thisVM; count++)
     {
         DcmElement* val = myThis->getElement(count);
@@ -183,25 +193,9 @@ int DcmItem::compare(const DcmItem& rhs) const
                 }
                 // otherwise they are equal, continue comparison
             }
-            else
-            {
-                break; // values equal until this point (rhs shorter)
-            }
         }
     }
 
-    // we get here if all values are equal. Now look at the
-    // number of components
-    unsigned long rhsVM = myRhs->card();
-    if (thisVM < rhsVM)
-    {
-        return -1;
-    }
-    else if (thisVM > rhsVM)
-    {
-        return 1;
-    }
-
     // all values as well as VM equal: objects are equal
     return 0;
 }
@@ -361,7 +355,8 @@ void DcmItem::checkAndUpdateVR(DcmItem &item,
                                DcmTag &tag)
 {
     /* handle special cases where the VR can be determined by some other element values */
-    if (((tag == DCM_WaveformData) || (tag == DCM_WaveformPaddingValue)) && (tag.getEVR() == EVR_ox))
+    if (((tag == DCM_WaveformData) || (tag == DCM_WaveformPaddingValue) ||
+        (tag == DCM_ChannelMinimumValue) || (tag == DCM_ChannelMaximumValue)) && (tag.getEVR() == EVR_ox))
     {
         /* case 1 (WaveformData and others): see section 8.3 in PS 3.5 */
         Uint16 bitsAlloc;
@@ -383,7 +378,11 @@ void DcmItem::checkAndUpdateVR(DcmItem &item,
     }
     else if (((tag == DCM_PixelPaddingValue) || (tag == DCM_PixelPaddingRangeLimit) ||
         (tag == DCM_HistogramFirstBinValue) || (tag == DCM_HistogramLastBinValue) ||
-        (tag == DCM_ZeroVelocityPixelValue)) && (tag.getEVR() == EVR_xs))
+        (tag == DCM_ZeroVelocityPixelValue) || (tag == DCM_SmallestImagePixelValue) ||
+        (tag == DCM_LargestImagePixelValue) || (tag == DCM_SmallestPixelValueInSeries) ||
+        (tag == DCM_LargestPixelValueInSeries) || (tag == DCM_LUTDescriptor) ||
+        (tag == DCM_RealWorldValueLastValueMapped) || (tag == DCM_RealWorldValueFirstValueMapped)) &&
+        (tag.getEVR() == EVR_xs))
     {
         /* case 2 (PixelPaddingValue and others): see section C.7.5.1, C.7.6.16.x and C.11.5 in PS 3.3 */
         Uint16 pixelRep;
@@ -964,7 +963,7 @@ OFCondition DcmItem::readTagAndLength(DcmInputStream &inStream,
     /* check if either 4 (for implicit transfer syntaxes) or 6 (for explicit transfer */
     /* syntaxes) bytes are available in (i.e. can be read from) inStream. if an error */
     /* occurred while performing this check return this error */
-    if (inStream.avail() < (xferSyn.isExplicitVR() ? 6u:4u))
+    if (inStream.avail() < OFstatic_cast(offile_off_t, xferSyn.isExplicitVR() ? 6 : 4))
         return EC_StreamNotifyClient;
 
     /* determine the byte ordering of the transfer syntax which was passed; */
@@ -1084,7 +1083,7 @@ OFCondition DcmItem::readTagAndLength(DcmInputStream &inStream,
     /* the next thing we want to do is read the value in the length field from inStream. */
     /* determine if there is a corresponding amount of bytes (for the length field) still */
     /* available in inStream. If not, return an error. */
-    if (inStream.avail() < xferSyn.sizeofTagHeader(newEVR) - bytesRead)
+    if (inStream.avail() < OFstatic_cast(offile_off_t, xferSyn.sizeofTagHeader(newEVR) - bytesRead))
     {
         inStream.putback();    // the UnsetPutbackMark is in readSubElement
         bytesRead = 0;
@@ -1153,7 +1152,7 @@ OFCondition DcmItem::readTagAndLength(DcmInputStream &inStream,
                 inStream.putback();
             }
         }
-        else if (valueLength > remainingItemBytes)
+        else if (OFstatic_cast(offile_off_t, valueLength) > remainingItemBytes)
         {
             DCMDATA_WARN("DcmItem: Element " << newTag.getTagName() << " " << newTag
                 << " larger (" << valueLength << ") than remaining bytes ("
@@ -1278,6 +1277,15 @@ OFCondition DcmItem::read(DcmInputStream & inStream,
                           const E_GrpLenEncoding glenc,
                           const Uint32 maxReadLength)
 {
+	return DcmItem::readUntilTag(inStream, xfer, glenc, maxReadLength, DCM_UndefinedTagKey);
+}
+
+OFCondition DcmItem::readUntilTag(DcmInputStream & inStream,
+                                  const E_TransferSyntax xfer,
+                                  const E_GrpLenEncoding glenc,
+                                  const Uint32 maxReadLength,
+                                  const DcmTagKey &stopParsingAtElement)
+{
     /* check if this is an illegal call; if so set the error flag and do nothing, else go ahead */
     if (getTransferState() == ERW_notInitialized)
     {
@@ -1354,17 +1362,30 @@ OFCondition DcmItem::read(DcmInputStream & inStream,
                     /* in case of implicit VR, check whether the "default VR" is really appropriate */
                     if (DcmXfer(xfer).isImplicitVR())
                         checkAndUpdateVR(*this, newTag);
-                    /* read the actual data value which belongs to this element */
-                    /* (attribute) and insert this information into the elementList */
-                    errorFlag = readSubElement(inStream, newTag, newValueLength, xfer, glenc, maxReadLength);
-                    /* if reading was successful, we read the entire data value information */
-                    /* for this element; hence lastElementComplete is true again */
-                    if (errorFlag.good())
+
+                    /* check if we want to stop parsing at this point, in the main dataset only */
+                    if( (stopParsingAtElement != DCM_UndefinedTagKey) && (newTag.getXTag()>=stopParsingAtElement) && ident() == EVR_dataset)
+                    {
+                      lastElementComplete = OFTrue;
+                      readStopElem = OFTrue;
+                      DCMDATA_WARN("DcmItem: Element " << newTag.getTagName() << " " << newTag
+                        << " encountered, skipping rest of dataset");
+                    }
+                    else
+                    {
+                      /* read the actual data value which belongs to this element */
+                      /* (attribute) and insert this information into the elementList */
+                      errorFlag = readSubElement(inStream, newTag, newValueLength, xfer, glenc, maxReadLength);
+                      /* if reading was successful, we read the entire data value information */
+                      /* for this element; hence lastElementComplete is true again */
+                      if (errorFlag.good())
                         lastElementComplete = OFTrue;
-                    /* in data or command sets, group 0x0001 to 0x0003, 0x0005, 0x0007 and 0xFFFF are not allowed. */
-                    /* (we cannot check for group 0x0000 since we do not know whether we read a data or command set.)*/
-                    if (!newTag.hasValidGroup() || (newTag.getGroup() == 0x0002))
-                        DCMDATA_WARN("DcmItem: Invalid Element " << newTag << " found in data set");
+
+                      /* in data or command sets, group 0x0001 to 0x0003, 0x0005, 0x0007 and 0xFFFF are not allowed. */
+                      /* (we cannot check for group 0x0000 since we do not know whether we read a data or command set.)*/
+                      if (!newTag.hasValidGroup() || (newTag.getGroup() == 0x0002))
+                          DCMDATA_WARN("DcmItem: Invalid Element " << newTag << " found in data set");
+                    }
                 }
             } else {
                 /* if lastElementComplete is false, we have only read the current element's */
@@ -4189,25 +4210,40 @@ OFCondition DcmItem::convertToUTF8()
 // ********************************
 
 
-DcmElement* DcmItem::newDicomElement(const DcmTagKey& tag)
+DcmElement* DcmItem::newDicomElement(const DcmTagKey& tag,
+                                     const char *privateCreator)
 {
-  DcmTag temp(tag);
+  DcmTag temp(tag, privateCreator);
   DcmElement* elem = NULL;
-      OFBool readAsUN = OFFalse;
-      newDicomElement(
-          elem,
-          temp,
-          0,          // Length
-          NULL,       // Private creator
-          readAsUN);  // read as VR UN (result ignored)
+  OFBool readAsUN = OFFalse;
+  newDicomElement(
+      elem,
+      temp,
+      0,          // Length
+      NULL,       // Private creator
+      readAsUN);  // read as VR UN (result ignored)
   return elem;
 }
 
 
+OFCondition DcmItem::newDicomElementWithVR(DcmElement*& newElement, const DcmTag& tag)
+{
+  DcmTag temp(tag);
+  OFBool readAsUN = OFFalse;
+  return newDicomElement(
+      newElement,
+      temp,
+      0,          // Length
+      NULL,       // Private creator
+      readAsUN);  // read as VR UN (result ignored)
+}
+
+
 OFCondition DcmItem::newDicomElement(DcmElement*& newElement,
-                                     const DcmTagKey& tag)
+                                     const DcmTagKey& tag,
+                                     const char *privateCreator)
 {
-    DcmTag temp(tag);
+    DcmTag temp(tag, privateCreator);
     newElement = NULL;
     OFBool readAsUN = OFFalse;
     return newDicomElement(
diff --git a/dcmdata/libsrc/dcjson.cc b/dcmdata/libsrc/dcjson.cc
index df68daa..9efb1b9 100644
--- a/dcmdata/libsrc/dcjson.cc
+++ b/dcmdata/libsrc/dcjson.cc
@@ -213,14 +213,14 @@ void DcmJsonFormat::printNextArrayElementPrefix(STD_NAMESPACE ostream &out)
 
 // Method for holding and determine if BulkDataURI should be printed.
 // This also manipulate uri String, if BulkDataURI should be printed.
-OFBool DcmJsonFormat::asBulkDataURI(const DcmTagKey& tag, OFString& uri)
+OFBool DcmJsonFormat::asBulkDataURI(const DcmTagKey& /*tag*/, OFString& /*uri*/)
 {
     return false;
 }
 
 //Class for formatted output
-DcmJsonFormatPretty::DcmJsonFormatPretty(const OFBool printMetaheaderInformation)
-: DcmJsonFormat(printMetaheaderInformation)
+DcmJsonFormatPretty::DcmJsonFormatPretty(const OFBool printMetaInfo)
+: DcmJsonFormat(printMetaInfo)
 , m_IndentionLevel(0)
 {
 
@@ -255,13 +255,13 @@ OFString DcmJsonFormatPretty::space()
 
 
 //Class for unformatted output
-DcmJsonFormatCompact::DcmJsonFormatCompact(const OFBool printMetaheaderInformation)
-: DcmJsonFormat(printMetaheaderInformation)
+DcmJsonFormatCompact::DcmJsonFormatCompact(const OFBool printMetaInfo)
+: DcmJsonFormat(printMetaInfo)
 {
 
 }
 
-void DcmJsonFormatCompact::printIndention(STD_NAMESPACE ostream& out)
+void DcmJsonFormatCompact::printIndention(STD_NAMESPACE ostream& /*out*/)
 {}
 
 void DcmJsonFormatCompact::increaseIndention()
diff --git a/dcmdata/libsrc/dcmatch.cc b/dcmdata/libsrc/dcmatch.cc
index febb140..9a9e7e8 100644
--- a/dcmdata/libsrc/dcmatch.cc
+++ b/dcmdata/libsrc/dcmatch.cc
@@ -22,6 +22,7 @@
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
 #include "dcmtk/ofstd/ofmem.h"
+#include "dcmtk/ofstd/ofdiag.h"
 #include "dcmtk/dcmdata/dcmatch.h"
 #include "dcmtk/dcmdata/dcvr.h"
 #include "dcmtk/dcmdata/dcvrda.h"
@@ -188,6 +189,8 @@ OFBool DcmAttributeMatching::rangeMatchingDateTime( const void* dateQueryData, c
 {
     if( !dateQuerySize )
         return rangeMatchingTime( timeQueryData, timeQuerySize, timeCandidateData, timeCandidateSize );
+    if( !timeQuerySize )
+        return rangeMatchingDate( dateQueryData, dateQuerySize, dateCandidateData, dateCandidateSize );
     OFDateTime candidate;
     if( DcmDate::getOFDateFromString( OFreinterpret_cast( const char*, dateCandidateData ), dateCandidateSize, candidate.Date ).bad() )
         return OFFalse;
@@ -196,7 +199,7 @@ OFBool DcmAttributeMatching::rangeMatchingDateTime( const void* dateQueryData, c
     const DashSeparated dateQuery( dateQueryData, dateQuerySize );
     const DashSeparated timeQuery( timeQueryData, timeQuerySize );
     // check that both date/time ranges have the same structure
-    if( ( dateQuery.first == dateQuery.second ) != ( timeQuery.first != timeQuery.second ) )
+    if( ( dateQuery.first != dateQuery.second ) != ( timeQuery.first != timeQuery.second ) )
         return OFFalse;
     if( ( !dateQuery.firstSize && timeQuery.firstSize ) || ( !dateQuery.secondSize && timeQuery.secondSize ) )
         return OFFalse;
@@ -311,7 +314,10 @@ DcmAttributeMatching::DcmAttributeMatching( const DcmVR vr )
 
 DcmAttributeMatching::operator OFBool() const
 {
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_PERFORMANCE_WARNING
     return m_pMatch;
+#include DCMTK_DIAGNOSTIC_POP
 }
 
 OFBool DcmAttributeMatching::operator!() const
diff --git a/dcmdata/libsrc/dcobject.cc b/dcmdata/libsrc/dcobject.cc
index 3bdb1e2..d6917f3 100644
--- a/dcmdata/libsrc/dcobject.cc
+++ b/dcmdata/libsrc/dcobject.cc
@@ -467,9 +467,14 @@ Uint32 DcmObject::getTagAndLengthSize(const E_TransferSyntax oxfer) const
        /* map "UN" to "OB" if generation of "UN" is disabled */
        DcmVR outvr(getTag().getVR().getValidEVR());
 
-       if (outvr.usesExtendedLengthEncoding())
+       if (Length > 0xffff || outvr.usesExtendedLengthEncoding())
        {
-           return 12;
+         // we are either using extended length encoding or the
+         // element length is > 64k (i.e. we have to convert to OB/UN).
+         // In any case we need a 12-byte header field.
+         // This is also the case for any object with undefined length,
+         // so we don't need to check that as a special case.
+          return 12;
        }
     }
     return 8;
@@ -526,6 +531,15 @@ OFCondition DcmObject::writeTagAndLength(DcmOutputStream &outStream,
 
             /* getValidEVR() will convert datatype "UN" to "OB" if generation of "UN" is disabled */
             DcmEVR vr = myvr.getValidEVR();
+            myvr.setVR(vr);
+
+            if (Length > 0xffff && (!myvr.usesExtendedLengthEncoding()))
+            {
+              // Attribute length is larger than 64 kBytes.
+              // We need to encode this as UN (or OB, if generation of UN is disabled
+              if (dcmEnableUnknownVRGeneration.get()) vr = EVR_UN; else vr = EVR_OB;
+              myvr.setVR(vr);
+            }
 
             /* get name of data type */
             const char *vrname = myvr.getValidVRName();
@@ -563,7 +577,10 @@ OFCondition DcmObject::writeTagAndLength(DcmOutputStream &outStream,
                 outStream.write(&valueLength, 2);                                   // write length, 2 bytes wide
                 writtenBytes += 2;                                                  // remember that 2 bytes were written in total
             }
-            /* ... if not, report an error message and return an error code. */
+            /* ... if not, report an error message and return an error code.
+             * This should never happen because we automatically convert such
+             * elements to UN/OB, but just in case, we leave the check in here.
+             */
             else {
                 DcmTag tag(Tag);
                 DCMDATA_ERROR("DcmObject: Length of element " << tag.getTagName() << " " << tag
diff --git a/dcmdata/libsrc/dcostrmf.cc b/dcmdata/libsrc/dcostrmf.cc
index d440c84..ac6ef7a 100644
--- a/dcmdata/libsrc/dcostrmf.cc
+++ b/dcmdata/libsrc/dcostrmf.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2012, OFFIS e.V.
+ *  Copyright (C) 2002-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,7 +25,6 @@
 #include "dcmtk/dcmdata/dcerror.h"
 
 #define INCLUDE_CSTDIO
-#define INCLUDE_CERRNO
 #include "dcmtk/ofstd/ofstdinc.h"
 
 
@@ -36,10 +35,8 @@ DcmFileConsumer::DcmFileConsumer(const OFFilename &filename)
 {
   if (!file_.fopen(filename, "wb"))
   {
-    char buf[256];
-    const char *text = OFStandard::strerror(errno, buf, sizeof(buf));
-    if (text == NULL) text = "(unknown error code)";
-    status_ = makeOFCondition(OFM_dcmdata, 19, OF_error, text);
+    OFString buffer = OFStandard::getLastSystemErrorCode().message();
+    status_ = makeOFCondition(OFM_dcmdata, 19, OF_error, buffer.c_str());
   }
 }
 
diff --git a/dcmdata/libsrc/dcpixel.cc b/dcmdata/libsrc/dcpixel.cc
index c21acc4..7cdd376 100644
--- a/dcmdata/libsrc/dcpixel.cc
+++ b/dcmdata/libsrc/dcpixel.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2010, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,6 +25,7 @@
 #include "dcmtk/dcmdata/dcpixseq.h"
 #include "dcmtk/dcmdata/dcdeftag.h"
 #include "dcmtk/dcmdata/dcitem.h"
+#include "dcmtk/dcmdata/dcpxitem.h"
 
 //
 // class DcmRepresentationEntry
@@ -172,18 +173,6 @@ DcmPixelData &DcmPixelData::operator=(const DcmPixelData &obj)
   return *this;
 }
 
-
-OFCondition DcmPixelData::copyFrom(const DcmObject& rhs)
-{
-  if (this != &rhs)
-  {
-    if (rhs.ident() != ident()) return EC_IllegalCall;
-    *this = OFstatic_cast(const DcmPixelData &, rhs);
-  }
-  return EC_Normal;
-}
-
-
 // methods in alphabetical order
 
 Uint32
@@ -222,6 +211,10 @@ DcmPixelData::canChooseRepresentation(
 
     const DcmRepresentationEntry findEntry(repType, repParam, NULL);
     DcmRepresentationListIterator resultIt(repListEnd);
+    // find out whether we have the desired target representation available. Three possibilities:
+    // 1. we have uncompressed data, and target is uncompressed (conversion betweeen uncompressed always possible)
+    // 2. we have uncompressed and want compressed, but we are forced to write uncompressed anyway
+    // 3. we want to go to compressed, and already have the desired representation available
     if ((!toType.isEncapsulated() && existUnencapsulated) ||
         (toType.isEncapsulated() && writeUnencapsulated(repType) && existUnencapsulated) ||
         (toType.isEncapsulated() && findRepresentationEntry(findEntry, resultIt) == EC_Normal))
@@ -229,18 +222,20 @@ DcmPixelData::canChooseRepresentation(
         // representation found
         result = OFTrue;
     }
+    // otherwise let's see whether we know how to convert to the target representation
     else
     {
         // representation not found, check if we have a codec that can create the
         // desired representation.
         if (original == repListEnd)
         {
+          // we have uncompressed data, check whether we know how to go from uncompressed to desired compression
           result = DcmCodecList::canChangeCoding(EXS_LittleEndianExplicit, toType.getXfer());
         }
         else if (toType.isEncapsulated())
         {
-          result = DcmCodecList::canChangeCoding(EXS_LittleEndianExplicit, toType.getXfer());
-
+          // we have already compressed data, check whether we know how to transcode
+          result = DcmCodecList::canChangeCoding((*original)->repType, toType.getXfer());
           if (!result)
           {
             // direct transcoding is not possible. Check if we can decode and then encode.
@@ -250,6 +245,7 @@ DcmPixelData::canChooseRepresentation(
         }
         else
         {
+          // target transfer syntax is uncompressed, look whether decompression is possible
           result = DcmCodecList::canChangeCoding((*original)->repType, EXS_LittleEndianExplicit);
         }
     }
@@ -308,8 +304,112 @@ DcmPixelData::chooseRepresentation(
 }
 
 
-void
-DcmPixelData::clearRepresentationList(
+int DcmPixelData::compare(const DcmElement& rhs) const
+{
+  // check tag and VR
+  int result = DcmElement::compare(rhs);
+  if (result != 0)
+  {
+    return result;
+  }
+
+  // cast away constness (dcmdata is not const correct...)
+  DcmPixelData* myThis = NULL;
+  DcmPixelData* myRhs = NULL;
+  myThis = OFconst_cast(DcmPixelData*, this);
+  myRhs =  OFstatic_cast(DcmPixelData*, OFconst_cast(DcmElement*, &rhs));
+
+  if (myThis->existUnencapsulated && myRhs->existUnencapsulated)
+  {
+    // we have uncompressed representations, which can be compared using DcmPolymorphOBOW::compare
+    return DcmPolymorphOBOW::compare(rhs);
+  }
+
+  // both do not have uncompressed data, we must compare compressed ones.
+  // check both have a current representation at all.
+  if ((myThis->current == myThis->repList.end()) && (myRhs->current != myRhs->repList.end())) return -1;
+  if ((myThis->current != myThis->repList.end()) && (myRhs->current == myRhs->repList.end())) return 1;
+  if ((myThis->current == myThis->repList.end()) && (myRhs->current == myRhs->repList.end()))
+  {
+    // if one of both have uncompressed data at least, that one is considered "bigger"
+    if (myThis->existUnencapsulated) return 1;
+    if (myRhs->existUnencapsulated) return -1;
+    else return 0;
+  }
+
+  // both have compressed data: compare current representation (only)
+  if ((myThis->current != myThis->repList.end()) && (myRhs->current != myRhs->repList.end()) )
+  {
+    E_TransferSyntax myRep = (*(myThis->current))->repType;
+    E_TransferSyntax rhsRep = (*(myRhs->current))->repType;
+    DcmXfer myXfer(myRep);
+    DcmXfer rhsXfer(rhsRep);
+    // if both transfer syntaxes are different, we have to perform more checks to
+    // find out whether the related pixel data is comparable; this is the case
+    // for all uncompressed transfer syntaxes, except Big Endian with OW data
+    // since it uses a different memory layout, and we do not want to byte-swap
+    // the values for the comparison.
+    if (myRep != rhsRep)
+    {
+        return 1;
+    }
+    else
+    {
+      // For compressed, compare pixel items bytewise
+      DcmPixelSequence* myPix = (*(myThis->current))->pixSeq;
+      DcmPixelSequence* rhsPix = (*(myRhs->current))->pixSeq;
+      if (!myPix && rhsPix) return -1;
+      if (myPix && !rhsPix) return 1;
+      if (!myPix && !rhsPix) return 0;
+      // Check number of pixel items
+      long unsigned int myNumPix = myPix->card();
+      long unsigned int rhsNumPix = rhsPix->card();
+      if (myNumPix < rhsNumPix) return -1;
+      if (myNumPix > rhsNumPix) return 1;
+      // loop over pixel items, both have the same number of pixel items
+      for (unsigned long n = 0; n < myNumPix; n++)
+      {
+        DcmPixelItem* myPixItem = NULL;
+        DcmPixelItem* rhsPixItem = NULL;
+        if (myPix->getItem(myPixItem, n).good() && rhsPix->getItem(rhsPixItem, n).good())
+        {
+          // compare them value by value, using DcmOtherByteOtherWord::compare() method
+          int result = myPixItem->compare(*rhsPixItem);
+          if (result != 0)
+          {
+            return result;
+          }
+        }
+        else
+        {
+          DCMDATA_ERROR("Internal error: Could not get pixel item #" << n << " from Pixel Sequence");
+          return 1;
+        }
+      }
+      return 0;
+    }
+  }
+  // if one of both have a current representation; consider that one "bigger".
+  // if none has a current one, consider both equal (neither uncompressed or compressed data present).
+  else
+  {
+    if (myThis->current != myThis->repList.end()) return 1;
+    if (myRhs->current != myRhs->repList.end()) return -1;
+    else return 0;
+  }
+}
+
+OFCondition DcmPixelData::copyFrom(const DcmObject& rhs)
+{
+  if (this != &rhs)
+  {
+    if (rhs.ident() != ident()) return EC_IllegalCall;
+    *this = OFstatic_cast(const DcmPixelData &, rhs);
+  }
+  return EC_Normal;
+}
+
+void DcmPixelData::clearRepresentationList(
     DcmRepresentationListIterator leaveInList)
 {
     /* define iterators to go through all representations in the list */
diff --git a/dcmdata/libsrc/dcsequen.cc b/dcmdata/libsrc/dcsequen.cc
index 600c0f8..a44f450 100644
--- a/dcmdata/libsrc/dcsequen.cc
+++ b/dcmdata/libsrc/dcsequen.cc
@@ -204,8 +204,19 @@ int DcmSequenceOfItems::compare(const DcmElement& rhs) const
     myThis = OFconst_cast(DcmSequenceOfItems*, this);
     myRhs = OFstatic_cast(DcmSequenceOfItems*, OFconst_cast(DcmElement*, &rhs));
 
-    /* iterate over all items and test equality */
+    /* check number of items */
+    unsigned long rhsVM = myRhs->card();
     unsigned long thisVM = myThis->card();
+    if (thisVM < rhsVM)
+    {
+        return -1;
+    }
+    else if (thisVM > rhsVM)
+    {
+        return 1;
+    }
+
+    /* iterate over all items and test equality */
     for (unsigned long count = 0; count < thisVM; count++)
     {
         DcmItem* val = myThis->getItem(count);
@@ -220,24 +231,9 @@ int DcmSequenceOfItems::compare(const DcmElement& rhs) const
                     return result;
                 }
             }
-            else
-            {
-                break; // values equal until this point (rhs shorter)
-            }
         }
     }
 
-    /* we get here if all values are equal. Now look at the number of components. */
-    unsigned long rhsVM = myRhs->card();
-    if (thisVM < rhsVM)
-    {
-        return -1;
-    }
-    else if (thisVM > rhsVM)
-    {
-        return 1;
-    }
-
     /* all values as well as VM equal: objects are equal */
     return 0;
 }
@@ -792,8 +788,8 @@ OFCondition DcmSequenceOfItems::write(DcmOutputStream &outStream,
                  * in the buffer, check if the buffer is still sufficient for the requirements
                  * of this element, which may need only 8 instead of 12 bytes.
                  */
-                if ((outStream.avail() >= DCM_TagInfoLength) ||
-                    (outStream.avail() >= getTagAndLengthSize(oxfer)))
+                if ((outStream.avail() >= OFstatic_cast(offile_off_t, DCM_TagInfoLength)) ||
+                    (outStream.avail() >= OFstatic_cast(offile_off_t, getTagAndLengthSize(oxfer))))
                 {
                     if (enctype == EET_ExplicitLength)
                         setLengthField(getLength(oxfer, enctype));
@@ -916,8 +912,8 @@ OFCondition DcmSequenceOfItems::writeSignatureFormat(DcmOutputStream &outStream,
                  * in the buffer, check if the buffer is still sufficient for the requirements
                  * of this element, which may need only 8 instead of 12 bytes.
                  */
-                if ((outStream.avail() >= DCM_TagInfoLength) ||
-                    (outStream.avail() >= getTagAndLengthSize(oxfer)))
+                if ((outStream.avail() >= OFstatic_cast(offile_off_t, DCM_TagInfoLength)) ||
+                    (outStream.avail() >= OFstatic_cast(offile_off_t, getTagAndLengthSize(oxfer))))
                 {
                     if (enctype == EET_ExplicitLength)
                         setLengthField(getLength(oxfer, enctype));
diff --git a/dcmdata/libsrc/dcuid.cc b/dcmdata/libsrc/dcuid.cc
index a5b86e6..b594b02 100644
--- a/dcmdata/libsrc/dcuid.cc
+++ b/dcmdata/libsrc/dcuid.cc
@@ -24,11 +24,9 @@
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
 #ifdef HAVE_WINDOWS_H
-#include <windows.h>     /* this includes either winsock.h or winsock2.h */
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>     /* include winsock.h directly i.e. on MacOS */
-#endif
+// on Windows, we need Winsock2 for getting network adapter information
+#include <winsock2.h>
+#include <iphlpapi.h>
 #endif
 
 #define INCLUDE_CSTDLIB
@@ -79,6 +77,7 @@ END_EXTERN_C
 #include "dcmtk/ofstd/ofcrc32.h"
 #include "dcmtk/ofstd/ofdefine.h"
 #include "dcmtk/ofstd/ofstd.h"
+#include "dcmtk/ofstd/ofvector.h"
 #include "dcmtk/ofstd/ofnetdb.h"
 
 struct UIDNameMap {
@@ -137,9 +136,11 @@ static const UIDNameMap uidNameMap[] = {
     { UID_HEVCMain10ProfileLevel5_1TransferSyntax,             "HEVCMain10Profile/Level5.1" },
     { UID_RFC2557MIMEEncapsulationTransferSyntax,              "RFC2557MIMEEncapsulation" },
     { UID_XMLEncodingTransferSyntax,                           "XMLEncoding" },
+    { UID_PrivateGE_LEI_WithBigEndianPixelDataTransferSyntax,  "PrivateGELittleEndianImplicitWithBigEndianPixelData" },
 
     // Storage (DICOM)
     { UID_AcquisitionContextSRStorage,                         "AcquisitionContextSRStorage" },
+    { UID_AdvancedBlendingPresentationStateStorage,            "AdvancedBlendingPresentationStateStorage" },
     { UID_AmbulatoryECGWaveformStorage,                        "AmbulatoryECGWaveformStorage" },
     { UID_ArterialPulseWaveformStorage,                        "ArterialPulseWaveformStorage" },
     { UID_AutorefractionMeasurementsStorage,                   "AutorefractionMeasurementsStorage" },
@@ -210,14 +211,18 @@ static const UIDNameMap uidNameMap[] = {
     { UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage, "MultiframeGrayscaleWordSecondaryCaptureImageStorage" },
     { UID_MultiframeSingleBitSecondaryCaptureImageStorage,     "MultiframeSingleBitSecondaryCaptureImageStorage" },
     { UID_MultiframeTrueColorSecondaryCaptureImageStorage,     "MultiframeTrueColorSecondaryCaptureImageStorage" },
+    { UID_MultipleVolumeRenderingVolumetricPresentationStateStorage, "MultipleVolumeRenderingVolumetricPresentationStateStorage" },
     { UID_NuclearMedicineImageStorage,                         "NuclearMedicineImageStorage" },
     { UID_OphthalmicAxialMeasurementsStorage,                  "OphthalmicAxialMeasurementsStorage" },
+    { UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage, "OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage" },
+    { UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage, "OphthalmicOpticalCoherenceTomographyEnFaceImageStorage" },
     { UID_OphthalmicPhotography16BitImageStorage,              "OphthalmicPhotography16BitImageStorage" },
     { UID_OphthalmicPhotography8BitImageStorage,               "OphthalmicPhotography8BitImageStorage" },
     { UID_OphthalmicThicknessMapStorage,                       "OphthalmicThicknessMapStorage" },
     { UID_OphthalmicTomographyImageStorage,                    "OphthalmicTomographyImageStorage" },
     { UID_OphthalmicVisualFieldStaticPerimetryMeasurementsStorage, "OphthalmicVisualFieldStaticPerimetryMeasurementsStorage" },
     { UID_ParametricMapStorage,                                "ParametricMapStorage" },
+    { UID_PatientRadiationDoseSRStorage,                       "PatientRadiationDoseSRStorage" },
     { UID_PositronEmissionTomographyImageStorage,              "PositronEmissionTomographyImageStorage" },
     { UID_ProcedureLogStorage,                                 "ProcedureLogStorage" },
     { UID_PseudoColorSoftcopyPresentationStateStorage,         "PseudoColorSoftcopyPresentationStateStorage" },
@@ -238,6 +243,7 @@ static const UIDNameMap uidNameMap[] = {
     { UID_RTTreatmentSummaryRecordStorage,                     "RTTreatmentSummaryRecordStorage" },
     { UID_SecondaryCaptureImageStorage,                        "SecondaryCaptureImageStorage" },
     { UID_SegmentationStorage,                                 "SegmentationStorage" },
+    { UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage, "SegmentedVolumeRenderingVolumetricPresentationStateStorage" },
     { UID_SimplifiedAdultEchoSRStorage,                        "SimplifiedAdultEchoSRStorage" },
     { UID_SpatialFiducialsStorage,                             "SpatialFiducialsStorage" },
     { UID_SpatialRegistrationStorage,                          "SpatialRegistrationStorage" },
@@ -260,6 +266,7 @@ static const UIDNameMap uidNameMap[] = {
     { UID_VLPhotographicImageStorage,                          "VLPhotographicImageStorage" },
     { UID_VLSlideCoordinatesMicroscopicImageStorage,           "VLSlideCoordinatesMicroscopicImageStorage" },
     { UID_VLWholeSlideMicroscopyImageStorage,                  "VLWholeSlideMicroscopyImageStorage" },
+    { UID_VolumeRenderingVolumetricPresentationStateStorage,   "VolumeRenderingVolumetricPresentationStateStorage" },
     { UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage, "WideFieldOphthalmicPhotographyStereographicProjectionImageStorage" },
     { UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, "WideFieldOphthalmicPhotography3DCoordinatesImageStorage" },
     { UID_XAXRFGrayscaleSoftcopyPresentationStateStorage,      "XAXRFGrayscaleSoftcopyPresentationStateStorage" },
@@ -555,6 +562,7 @@ static const int uidNameMap_size = OFstatic_cast(int, sizeof(uidNameMap) / sizeo
 
 const char* dcmAllStorageSOPClassUIDs[] = {
     UID_AcquisitionContextSRStorage,
+    UID_AdvancedBlendingPresentationStateStorage,
     UID_AmbulatoryECGWaveformStorage,
     UID_ArterialPulseWaveformStorage,
     UID_AutorefractionMeasurementsStorage,
@@ -618,14 +626,18 @@ const char* dcmAllStorageSOPClassUIDs[] = {
     UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage,
     UID_MultiframeSingleBitSecondaryCaptureImageStorage,
     UID_MultiframeTrueColorSecondaryCaptureImageStorage,
+    UID_MultipleVolumeRenderingVolumetricPresentationStateStorage,
     UID_NuclearMedicineImageStorage,
     UID_OphthalmicAxialMeasurementsStorage,
+    UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage,
+    UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage,
     UID_OphthalmicPhotography16BitImageStorage,
     UID_OphthalmicPhotography8BitImageStorage,
     UID_OphthalmicThicknessMapStorage,
     UID_OphthalmicTomographyImageStorage,
     UID_OphthalmicVisualFieldStaticPerimetryMeasurementsStorage,
     UID_ParametricMapStorage,
+    UID_PatientRadiationDoseSRStorage,
     UID_PositronEmissionTomographyImageStorage,
     UID_ProcedureLogStorage,
     UID_PseudoColorSoftcopyPresentationStateStorage,
@@ -646,6 +658,7 @@ const char* dcmAllStorageSOPClassUIDs[] = {
     UID_RTTreatmentSummaryRecordStorage,
     UID_SecondaryCaptureImageStorage,
     UID_SegmentationStorage,
+    UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage,
     UID_SimplifiedAdultEchoSRStorage,
     UID_SpatialFiducialsStorage,
     UID_SpatialRegistrationStorage,
@@ -668,6 +681,7 @@ const char* dcmAllStorageSOPClassUIDs[] = {
     UID_VLPhotographicImageStorage,
     UID_VLSlideCoordinatesMicroscopicImageStorage,
     UID_VLWholeSlideMicroscopyImageStorage,
+    UID_VolumeRenderingVolumetricPresentationStateStorage,
     UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage,
     UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage,
     UID_XAXRFGrayscaleSoftcopyPresentationStateStorage,
@@ -850,6 +864,7 @@ const char* dcmLongSCUStorageSOPClassUIDs[] = {
     UID_XRayRadiofluoroscopicImageStorage,
     // recently approved
 //  UID_AcquisitionContextSRStorage,
+//  UID_AdvancedBlendingPresentationStateStorage,
 //  UID_BreastProjectionXRayImageStorageForPresentation,
 //  UID_BreastProjectionXRayImageStorageForProcessing,
 //  UID_CompositingPlanarMPRVolumetricPresentationStateStorage,
@@ -858,11 +873,17 @@ const char* dcmLongSCUStorageSOPClassUIDs[] = {
 //  UID_CTPerformedProcedureProtocolStorage,
 //  UID_ExtensibleSRStorage,
 //  UID_GrayscalePlanarMPRVolumetricPresentationStateStorage
+//  UID_MultipleVolumeRenderingVolumetricPresentationStateStorage,
+//  UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage,
+//  UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage,
 //  UID_ParametricMapStorage,
+//  UID_PatientRadiationDoseSRStorage,
 //  UID_RadiopharmaceuticalRadiationDoseSRStorage,
 //  UID_RTBrachyApplicationSetupDeliveryInstructionStorage,
+//  UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage,
 //  UID_SimplifiedAdultEchoSRStorage,
 //  UID_TractographyResultsStorage,
+//  UID_VolumeRenderingVolumetricPresentationStateStorage,
 //  UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage,
 //  UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage,
     // non-patient
@@ -1041,6 +1062,8 @@ const char* dcmImageSOPClassUIDs[] = {
     UID_MultiframeSingleBitSecondaryCaptureImageStorage,
     UID_MultiframeTrueColorSecondaryCaptureImageStorage,
     UID_NuclearMedicineImageStorage,
+    UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage,
+    UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage,
     UID_OphthalmicPhotography16BitImageStorage,
     UID_OphthalmicPhotography8BitImageStorage,
     UID_OphthalmicThicknessMapStorage,
@@ -1103,6 +1126,7 @@ typedef struct {
 */
 static const DcmModalityTable modalities[] = {
     { UID_AcquisitionContextSRStorage,                             "SRa", 4096 },
+    { UID_AdvancedBlendingPresentationStateStorage,                "PSa", 4096 },
     { UID_AmbulatoryECGWaveformStorage,                            "ECA", 4096 },
     { UID_ArterialPulseWaveformStorage,                            "WVa", 4096 },
     { UID_AutorefractionMeasurementsStorage,                       "OPa", 4096 },
@@ -1172,14 +1196,18 @@ static const DcmModalityTable modalities[] = {
     { UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage,     "SCw", 512 * 512 * 2 },
     { UID_MultiframeSingleBitSecondaryCaptureImageStorage,         "SCs", 1024 * 1024 },  /* roughly an A4 300dpi scan */
     { UID_MultiframeTrueColorSecondaryCaptureImageStorage,         "SCc", 512 * 512 * 3 },
+    { UID_MultipleVolumeRenderingVolumetricPresentationStateStorage, "VPm" , 4096 },
     { UID_NuclearMedicineImageStorage,                             "NM",  64 * 64 * 2 },
     { UID_OphthalmicAxialMeasurementsStorage,                      "OPx", 4096 },
+    { UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage, "OCb" , 768 * 576 },
+    { UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage,  "OCe", 768 * 576  * 2 },
     { UID_OphthalmicPhotography16BitImageStorage,                  "OPw", 768 * 576 * 6 },
     { UID_OphthalmicPhotography8BitImageStorage,                   "OPb", 768 * 576 * 3 },
     { UID_OphthalmicThicknessMapStorage,                           "OPm", 768 * 576 },
     { UID_OphthalmicTomographyImageStorage,                        "OPt", 768 * 576 * 3 },
     { UID_OphthalmicVisualFieldStaticPerimetryMeasurementsStorage, "OPp", 4096 },
     { UID_ParametricMapStorage,                                    "PM",  256 * 256 * 4 },
+    { UID_PatientRadiationDoseSRStorage,                           "SRq", 4096 },
     { UID_PositronEmissionTomographyImageStorage,                  "PI",  512 * 512 * 2 },
     { UID_ProcedureLogStorage,                                     "SRp", 4096 },
     { UID_PseudoColorSoftcopyPresentationStateStorage,             "PSp", 4096 },
@@ -1200,6 +1228,7 @@ static const DcmModalityTable modalities[] = {
     { UID_RTTreatmentSummaryRecordStorage,                         "RTs", 4096 },
     { UID_SecondaryCaptureImageStorage,                            "SC",  512 * 512 * 2 },
     { UID_SegmentationStorage,                                     "SG",  4096 },
+    { UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage, "VPs", 4096 },
     { UID_SimplifiedAdultEchoSRStorage,                            "SRu", 4096 },
     { UID_SpatialFiducialsStorage,                                 "FID", 4096 },
     { UID_SpatialRegistrationStorage,                              "RGs", 4096 },
@@ -1221,7 +1250,8 @@ static const DcmModalityTable modalities[] = {
     { UID_VLMicroscopicImageStorage,                               "VLm", 768 * 576 * 3 },
     { UID_VLPhotographicImageStorage,                              "VLp", 768 * 576 * 3 },
     { UID_VLSlideCoordinatesMicroscopicImageStorage,               "VLs", 768 * 576 * 3 },
-    { UID_VLWholeSlideMicroscopyImageStorage,                      "VLw", 10000 * 10000 * 3},
+    { UID_VLWholeSlideMicroscopyImageStorage,                      "VLw", 10000 * 10000 * 3 },
+    { UID_VolumeRenderingVolumetricPresentationStateStorage,       "VPv", 4096 },
     { UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage, "OWs", 768 * 576 * 3 },
     { UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, "OW3", 768 * 576 * 3 },
     { UID_XAXRFGrayscaleSoftcopyPresentationStateStorage,          "PSx", 4096 },
@@ -1395,12 +1425,14 @@ dcmIsImageStorageSOPClassUID(const char* uid)
 #ifndef HAVE_GETHOSTID
 #if defined(HAVE_SYSINFO) && defined(HAVE_SYS_SYSTEMINFO_H)
 
+/* Implementation of gethostid() based on sysinfo().
+ * This implementation is used, for example, on Solaris.
+ */
 #include <sys/systeminfo.h>
 static long gethostid(void)
 {
-    char buf[256];
     if (sysinfo(SI_HW_SERIAL, buf, 128) == -1) {
-      DCMDATA_FATAL("sysinfo: " << OFStandard::strerror(errno, buf, sizeof(buf)));
+      DCMDATA_FATAL("sysinfo: " << OFStandard::getLastSystemErrorCode().message());
       exit(1);
     }
 #ifdef HAVE_STRTOUL
@@ -1420,198 +1452,47 @@ static long gethostid(void)
 */
 #if (defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME)) || defined(HAVE_WINDOWS_H)
 
-// 16K should be large enough to handle everything pointed to by a struct hostent
-#define GETHOSTBYNAME_R_BUFSIZE 16384
-
-/* On Windows systems specify a routine to determine the MAC address of the Ethernet adapter */
-/* Special handling for MinGW which does not yet (as of MinGW 2.0) support snmp.h */
-#if defined(HAVE_WINDOWS_H) && !defined(__MINGW32__)
-
-#include <snmp.h>
-
-// Visual C++ prior to version 6 declared different type names
-// in <snmp.h>, so we need to define a mapping
-#if _MSC_VER < 1200
-typedef RFC1157VarBind     SnmpVarBind;
-typedef RFC1157VarBindList SnmpVarBindList;
-typedef AsnInteger         AsnInteger32;
-#define SNMP_PDU_GETNEXT   ASN_RFC1157_GETNEXTREQUEST
-#endif
-
-
-typedef int(WINAPI *pSnmpUtilOidCpy) (
-        OUT AsnObjectIdentifier *pOidDst,
-        IN AsnObjectIdentifier *pOidSrc);
+#ifdef _WIN32
 
-typedef int(WINAPI *pSnmpUtilOidNCmp) (
-        IN AsnObjectIdentifier *pOid1,
-        IN AsnObjectIdentifier *pOid2,
-        IN UINT nSubIds);
-
-typedef void(WINAPI *pSnmpUtilVarBindFree) (
-        IN OUT SnmpVarBind *pVb);
-
-typedef bool(WINAPI *pSnmpExtensionInit) (
-        IN DWORD dwTimeZeroReference,
-        OUT HANDLE *hPollForTrapEvent,
-        OUT AsnObjectIdentifier *supportedView);
-
-typedef bool(WINAPI *pSnmpExtensionQuery) (
-        IN BYTE requestType,
-        IN OUT SnmpVarBindList *variableBindings,
-        OUT AsnInteger32 *errorStatus,
-        OUT AsnInteger32 *errorIndex);
-
-typedef struct _ASTAT_
-{
-    ADAPTER_STATUS adapt;
-    NAME_BUFFER    NameBuff[30];
-} ASTAT, *PASTAT;
-
-/* get the MAC address of the (first) Ethernet adapter (6 bytes) */
-static unsigned char *getMACAddress(unsigned char buffer[6])
+/* On Windows systems specify a routine to determine the MAC address of the Ethernet adapter.
+ * This implementation uses Win32 system calls available on Windows 2000 and newer.
+ * A different implementation supporting Windows 95 was used in DCMTK releases up to 3.6.0,
+ * but that implementation does not work reliably anymore on Windows 10.
+ */
+static IP_ADAPTER_INFO* getMACAddresses(OFVector<Uint8>& buffer)
 {
-    OFBool success = OFFalse;
-    /* init return variable */
-    memzero(buffer, 6 * sizeof(unsigned char));
-    NCB ncb;
-    memzero(&ncb, sizeof(ncb));
-    /* reset the LAN adapter */
-    ncb.ncb_command = NCBRESET;
-    /* it is considered bad practice to hardcode the LANA number (should enumerate
-       adapters first), but at least this approach also works on Windows 9x */
-    ncb.ncb_lana_num = 0;
-    if (Netbios(&ncb) == NRC_GOODRET)
-    {
-        ASTAT Adapter;
-        /* prepare to get the adapter status block */
-        memzero(&ncb, sizeof(ncb));
-        ncb.ncb_command = NCBASTAT;
-        /* it is considered bad practice to hardcode the LANA number (should enumerate
-           adapters first), but at least this approach also works on Windows 9x */
-        ncb.ncb_lana_num = 0;
-        strcpy((char *)ncb.ncb_callname, "*");
-        ncb.ncb_buffer = (unsigned char *)&Adapter;
-        ncb.ncb_length = sizeof(Adapter);
-        /* get the adapter's info */
-        if (Netbios(&ncb) == 0)
-        {
-            /* store the MAC address */
-            buffer[0] = Adapter.adapt.adapter_address[0];
-            buffer[1] = Adapter.adapt.adapter_address[1];
-            buffer[2] = Adapter.adapt.adapter_address[2];
-            buffer[3] = Adapter.adapt.adapter_address[3];
-            buffer[4] = Adapter.adapt.adapter_address[4];
-            buffer[5] = Adapter.adapt.adapter_address[5];
-            success = OFTrue;
-        }
-    }
-    /* check whether NetBIOS routines succeeded, if not try the SNMP approach */
-    if (!success)
-    {
-        HINSTANCE m_hInst1, m_hInst2;
-        /* load the "SNMP Utility Library" dll and get the addresses of the functions necessary */
-        m_hInst1 = LoadLibrary("snmpapi.dll");
-        if (m_hInst1 >= (HINSTANCE)HINSTANCE_ERROR)
-        {
-            pSnmpUtilOidCpy m_Copy = (pSnmpUtilOidCpy)GetProcAddress(m_hInst1, "SnmpUtilOidCpy");
-            pSnmpUtilOidNCmp m_Compare = (pSnmpUtilOidNCmp)GetProcAddress(m_hInst1, "SnmpUtilOidNCmp");
-            pSnmpUtilVarBindFree m_BindFree = (pSnmpUtilVarBindFree)GetProcAddress(m_hInst1, "SnmpUtilVarBindFree");
-            /* load the "SNMP Internet MIB" dll and get the addresses of the functions necessary */
-            m_hInst2 = LoadLibrary("inetmib1.dll");
-            if (m_hInst2 >= (HINSTANCE)HINSTANCE_ERROR)
-            {
-                HANDLE PollForTrapEvent;
-                AsnObjectIdentifier SupportedView;
-                UINT OID_ifEntryType[] = {1, 3, 6, 1, 2, 1, 2, 2, 1, 3};
-                UINT OID_ifEntryNum[] = {1, 3, 6, 1, 2, 1, 2, 1};
-                UINT OID_ipMACEntAddr[] = {1, 3, 6, 1, 2, 1, 2, 2, 1, 6};
-                AsnObjectIdentifier MIB_ifMACEntAddr = {sizeof(OID_ipMACEntAddr) / sizeof(UINT), OID_ipMACEntAddr};
-                AsnObjectIdentifier MIB_ifEntryType = {sizeof(OID_ifEntryType) / sizeof(UINT), OID_ifEntryType};
-                SnmpVarBindList varBindList;
-                SnmpVarBind varBind[2];
-                AsnInteger32 errorStatus;
-                AsnInteger32 errorIndex;
-                AsnObjectIdentifier MIB_NULL = {0, 0};
-                int ret;
-                int dtmp;
-                int j = 0;
-                pSnmpExtensionInit m_Init = (pSnmpExtensionInit)GetProcAddress(m_hInst2, "SnmpExtensionInit");
-                pSnmpExtensionQuery m_Query = (pSnmpExtensionQuery)GetProcAddress(m_hInst2, "SnmpExtensionQuery");
-                m_Init(GetTickCount(), &PollForTrapEvent, &SupportedView);
-                /* initialize the variable list to be retrieved by m_Query */
-                varBindList.list = varBind;
-                varBind[0].name = MIB_NULL;
-                varBind[1].name = MIB_NULL;
-                varBindList.len = 2;
-                /* copy in the OID of ifType, the type of interface */
-                m_Copy(&varBind[0].name, &MIB_ifEntryType);
-                /* copy in the OID of ifPhysAddress, the address */
-                m_Copy(&varBind[1].name, &MIB_ifMACEntAddr);
-                do {
-                    /* Submit the query.  Responses will be loaded into varBindList.
-                       We can expect this call to succeed a # of times corresponding
-                       to the # of adapters reported to be in the system */
-                    ret = m_Query(SNMP_PDU_GETNEXT, &varBindList, &errorStatus, &errorIndex);
-                    if (!ret)
-                        ret = 1;
-                    else
-                    {
-                        /* confirm that the proper type has been returned */
-                        ret = m_Compare(&varBind[0].name, &MIB_ifEntryType, MIB_ifEntryType.idLength);
-                    }
-                    if (!ret)
-                    {
-                        j++;
-                        dtmp = varBind[0].value.asnValue.number;
-                        /* type 6 describes ethernet interfaces */
-                        if (dtmp == 6)
-                        {
-                            /* confirm that we have an address here */
-                            ret = m_Compare(&varBind[1].name, &MIB_ifMACEntAddr,MIB_ifMACEntAddr.idLength);
-                            if ((!ret) && (varBind[1].value.asnValue.address.stream != NULL))
-                            {
-                                if ((varBind[1].value.asnValue.address.stream[0] == 0x44) &&
-                                    (varBind[1].value.asnValue.address.stream[1] == 0x45) &&
-                                    (varBind[1].value.asnValue.address.stream[2] == 0x53) &&
-                                    (varBind[1].value.asnValue.address.stream[3] == 0x54) &&
-                                    (varBind[1].value.asnValue.address.stream[4] == 0x00))
-                                {
-                                    /* ignore all dial-up networking adapters */
-                                    continue;
-                                }
-                                if ((varBind[1].value.asnValue.address.stream[0] == 0x00) &&
-                                    (varBind[1].value.asnValue.address.stream[1] == 0x00) &&
-                                    (varBind[1].value.asnValue.address.stream[2] == 0x00) &&
-                                    (varBind[1].value.asnValue.address.stream[3] == 0x00) &&
-                                    (varBind[1].value.asnValue.address.stream[4] == 0x00) &&
-                                    (varBind[1].value.asnValue.address.stream[5] == 0x00))
-                                {
-                                    /* ignore NULL addresses returned by other network interfaces */
-                                    continue;
-                                }
-                                /* store the MAC address */
-                                buffer[0] = varBind[1].value.asnValue.address.stream[0];
-                                buffer[1] = varBind[1].value.asnValue.address.stream[1];
-                                buffer[2] = varBind[1].value.asnValue.address.stream[2];
-                                buffer[3] = varBind[1].value.asnValue.address.stream[3];
-                                buffer[4] = varBind[1].value.asnValue.address.stream[4];
-                                buffer[5] = varBind[1].value.asnValue.address.stream[5];
-                                ret = 1;    // we found an address -> exit
-                            }
-                        }
-                    }
-                } while (!ret);  /* Stop only on an error. An error will occur when we
-                                    go exhaust the list of interfaces to be examined */
-                FreeLibrary(m_hInst2);
-                /* free the bindings */
-                m_BindFree(&varBind[0]);
-                m_BindFree(&varBind[1]);
-            }
-            FreeLibrary(m_hInst1);
-        }
-    }
-    return buffer;
+  // get adapter info using OFVector to allocate memory
+  DWORD bufferSize = 0;
+  DWORD status = GetAdaptersInfo(OFnullptr, &bufferSize);
+  if (status == ERROR_BUFFER_OVERFLOW)
+  {
+    buffer.resize(bufferSize);
+    status = GetAdaptersInfo(OFreinterpret_cast(IP_ADAPTER_INFO*, &*buffer.begin()), &bufferSize);
+  }
+  if (status == ERROR_SUCCESS)
+    return OFreinterpret_cast(IP_ADAPTER_INFO*, &*buffer.begin());
+  // print out the error message for debugging
+  OFString message;
+  LPVOID errBuf = OFnullptr;
+  if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+      OFnullptr, status, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), OFreinterpret_cast(LPTSTR, &errBuf), 0, OFnullptr) > 0)
+  {
+    message = OFstatic_cast(const char*, errBuf);
+    // remove "\r\n"
+    if (message.size() >= 2 && message.substr(message.length() - 2) == "\r\n")
+      message = message.substr(0, message.length() - 2);
+  }
+  LocalFree(errBuf);
+  if (!message.empty())
+  {
+    DCMDATA_WARN("GetAdaptersInfo() failed with the error: '" << message << '\'');
+  }
+  else
+  {
+    DCMDATA_WARN("GetAdaptersInfo() failed with an unknown error");
+  }
+  // a null pointer indicates that no adapter is available
+  return OFnullptr;
 }
 #endif
 
@@ -1627,12 +1508,9 @@ static long gethostid(void)
     char name[1024];
     char **p = NULL;
     struct in_addr in;
-#ifdef HAVE_WINSOCK_H
-    WSAData winSockData;
-    /* we need at least version 1.1 */
-    WORD winSockVersionNeeded = MAKEWORD(1, 1);
-    WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+
+    OFStandard::initializeNetwork();
+
     /*
     ** Define the hostid to be the system's main TCP/IP address.
     ** This is not perfect but it is better than nothing (i.e. using zero)
@@ -1648,9 +1526,8 @@ static long gethostid(void)
             }
         }
     }
-#ifdef HAVE_WINSOCK_H
-    WSACleanup();
-#endif
+
+    OFStandard::shutdownNetwork();
 #endif /* defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME) */
 /* on Windows systems determine some system specific information (e.g. MAC address) */
 #ifdef HAVE_WINDOWS_H
@@ -1674,11 +1551,12 @@ static long gethostid(void)
     }
     /* concatenate the host specific elements and compute a 32-bit checksum */
     crc.addBlock(&result /*ip address*/, OFstatic_cast(unsigned long, sizeof(result)));
-#ifndef __MINGW32__
-    /* on MinGW, getMacAddress() is not yet available. */
-    unsigned char buffer[6];
-    crc.addBlock(getMACAddress(buffer), sizeof(buffer));
-#endif
+    // add the MAC addresses of all adapters
+    {
+      OFVector<Uint8> buffer;
+      for (IP_ADAPTER_INFO* adapterInfo = getMACAddresses(buffer); adapterInfo; adapterInfo = adapterInfo->Next)
+        crc.addBlock(adapterInfo->Address, adapterInfo->AddressLength);
+    }
     crc.addBlock(&serialNumber, OFstatic_cast(unsigned long, sizeof(serialNumber)));
     crc.addBlock(&systemInfo.wProcessorLevel, OFstatic_cast(unsigned long, sizeof(systemInfo.wProcessorLevel)));
     crc.addBlock(&systemInfo.wProcessorRevision, OFstatic_cast(unsigned long, sizeof(systemInfo.wProcessorRevision)));
diff --git a/dcmdata/libsrc/dcvr.cc b/dcmdata/libsrc/dcvr.cc
index 9765c9b..1c9e4ca 100644
--- a/dcmdata/libsrc/dcvr.cc
+++ b/dcmdata/libsrc/dcvr.cc
@@ -77,15 +77,16 @@ void dcmDisableGenerationOfNewVRs()
 #define DCMVR_PROP_EXTENDEDLENGTHENCODING 0x04
 #define DCMVR_PROP_ISASTRING              0x08
 #define DCMVR_PROP_ISAFFECTEDBYCHARSET    0x10
+#define DCMVR_PROP_ISLENGTHINCHAR         0x20
 
 struct DcmVREntry {
     DcmEVR vr;                      // Enumeration Value of Value representation
     const char* vrName;             // Name of Value representation
     const OFString* delimiterChars; // Delimiter characters, switch to default charset
     size_t fValWidth;               // Length of minimal unit, used for swapping
-    int propertyFlags;              // Normal, internal, non-standard vr
-    Uint32 minValueLength;          // Minimum length of a single value (bytes)
-    Uint32 maxValueLength;          // Maximum length of a single value (bytes)
+    int propertyFlags;              // Normal, internal, non-standard VR, etc.
+    Uint32 minValueLength;          // Minimum length of a single value (bytes or characters)
+    Uint32 maxValueLength;          // Maximum length of a single value (bytes or characters)
 };
 
 static const OFString noDelimiters;             // none
@@ -104,26 +105,26 @@ static const DcmVREntry DcmVRDict[] = {
     { EVR_FL, "FL", &noDelimiters, sizeof(Float32), DCMVR_PROP_NONE, 4, 4 },
     { EVR_FD, "FD", &noDelimiters, sizeof(Float64), DCMVR_PROP_NONE, 8, 8 },
     { EVR_IS, "IS", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING, 0, 12 },
-    { EVR_LO, "LO", &bsDelimiter, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 64 },
-    { EVR_LT, "LT", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 10240 },
+    { EVR_LO, "LO", &bsDelimiter, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET | DCMVR_PROP_ISLENGTHINCHAR, 0, 64 },
+    { EVR_LT, "LT", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET | DCMVR_PROP_ISLENGTHINCHAR, 0, 10240 },
     { EVR_OB, "OB", &noDelimiters, sizeof(Uint8), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength },
-    { EVR_OD, "OD", &noDelimiters, sizeof(Float64), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength },
-    { EVR_OF, "OF", &noDelimiters, sizeof(Float32), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength },
+    { EVR_OD, "OD", &noDelimiters, sizeof(Float64), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, 4294967288U },
+    { EVR_OF, "OF", &noDelimiters, sizeof(Float32), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, 4294967292U },
     { EVR_OL, "OL", &noDelimiters, sizeof(Uint32), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength },
     { EVR_OW, "OW", &noDelimiters, sizeof(Uint16), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength },
-    { EVR_PN, "PN", &pnDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 64 },
-    { EVR_SH, "SH", &bsDelimiter, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 16 },
+    { EVR_PN, "PN", &pnDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET | DCMVR_PROP_ISLENGTHINCHAR, 0, 64 },
+    { EVR_SH, "SH", &bsDelimiter, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET | DCMVR_PROP_ISLENGTHINCHAR, 0, 16 },
     { EVR_SL, "SL", &noDelimiters, sizeof(Sint32), DCMVR_PROP_NONE, 4, 4 },
     { EVR_SQ, "SQ", &noDelimiters, 0, DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength },
     { EVR_SS, "SS", &noDelimiters, sizeof(Sint16), DCMVR_PROP_NONE, 2, 2 },
-    { EVR_ST, "ST", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 1024 },
+    { EVR_ST, "ST", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET | DCMVR_PROP_ISLENGTHINCHAR, 0, 1024 },
     { EVR_TM, "TM", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING, 0, 16 },
-    { EVR_UC, "UC", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, DCM_UndefinedLength },
+    { EVR_UC, "UC", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 4294967294U },
     { EVR_UI, "UI", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING, 0, 64 },
     { EVR_UL, "UL", &noDelimiters, sizeof(Uint32), DCMVR_PROP_NONE, 4, 4 },
-    { EVR_UR, "UR", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING|DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength },
+    { EVR_UR, "UR", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING|DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, 4294967294U },
     { EVR_US, "US", &noDelimiters, sizeof(Uint16), DCMVR_PROP_NONE, 2, 2 },
-    { EVR_UT, "UT", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, DCM_UndefinedLength },
+    { EVR_UT, "UT", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 4294967294U },
     { EVR_ox, "ox", &noDelimiters, sizeof(Uint8), DCMVR_PROP_NONSTANDARD | DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength },
     { EVR_xs, "xs", &noDelimiters, sizeof(Uint16), DCMVR_PROP_NONSTANDARD, 2, 2 },
     { EVR_lt, "lt", &noDelimiters, sizeof(Uint16), DCMVR_PROP_NONSTANDARD | DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength },
@@ -466,3 +467,10 @@ DcmVR::getDelimiterChars() const
 {
     return *DcmVRDict[vr].delimiterChars;
 }
+
+/* returns true if VR length is in char */
+OFBool
+DcmVR::isLengthInChar() const
+{
+    return (DcmVRDict[vr].propertyFlags & DCMVR_PROP_ISLENGTHINCHAR) ? OFTrue : OFFalse;
+}
diff --git a/dcmdata/libsrc/dcvrae.cc b/dcmdata/libsrc/dcvrae.cc
index 8d247ac..4782240 100644
--- a/dcmdata/libsrc/dcvrae.cc
+++ b/dcmdata/libsrc/dcvrae.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2010, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -22,6 +22,7 @@
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
 #include "dcmtk/dcmdata/dcvrae.h"
+#include "dcmtk/dcmdata/dcmatch.h"
 
 
 #define MAX_AE_LENGTH 16
@@ -113,3 +114,14 @@ OFCondition DcmApplicationEntity::checkStringValue(const OFString &value,
 {
     return DcmByteString::checkStringValue(value, vm, "ae", 13, MAX_AE_LENGTH);
 }
+
+
+OFBool DcmApplicationEntity::matches(const OFString& key,
+                                     const OFString& candidate,
+                                     const OFBool enableWildCardMatching) const
+{
+  if (enableWildCardMatching)
+    return DcmAttributeMatching::wildCardMatching(key.c_str(), key.length(), candidate.c_str(), candidate.length());
+  else
+    return DcmByteString::matches(key, candidate, OFFalse);
+}
diff --git a/dcmdata/libsrc/dcvrat.cc b/dcmdata/libsrc/dcvrat.cc
index afca44a..8efb5d6 100644
--- a/dcmdata/libsrc/dcvrat.cc
+++ b/dcmdata/libsrc/dcvrat.cc
@@ -76,8 +76,19 @@ int DcmAttributeTag::compare(const DcmElement& rhs) const
     myThis = OFconst_cast(DcmAttributeTag*, this);
     myRhs = OFstatic_cast(DcmAttributeTag*, OFconst_cast(DcmElement*, &rhs));
 
-    /* iterate over all components and test equality */
+    /* compare VMs  */
     unsigned long thisVM = myThis->getVM();
+    unsigned long rhsVM = myRhs->getVM();
+    if (thisVM < rhsVM)
+    {
+        return -1;
+    }
+    else if (thisVM > rhsVM)
+    {
+        return 1;
+    }
+
+    /* iterate over all components and test equality */
     for (unsigned long count = 0; count < thisVM; count++)
     {
         DcmTagKey val;
@@ -96,24 +107,9 @@ int DcmAttributeTag::compare(const DcmElement& rhs) const
                 }
                 /* otherwise they are equal, continue comparison */
             }
-            else
-            {
-                break; // values equal until this point (rhs shorter)
-            }
         }
     }
 
-    /* we get here if all values are equal. Now look at the number of components. */
-    unsigned long rhsVM = myRhs->getVM();
-    if (thisVM < rhsVM)
-    {
-        return -1;
-    }
-    else if (thisVM > rhsVM)
-    {
-        return 1;
-    }
-
     /* all values as well as VM equal: objects are equal */
     return 0;
 }
diff --git a/dcmdata/libsrc/dcvrcs.cc b/dcmdata/libsrc/dcvrcs.cc
index c7718c7..14c4a12 100644
--- a/dcmdata/libsrc/dcvrcs.cc
+++ b/dcmdata/libsrc/dcvrcs.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2010, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,6 +26,7 @@
 #include "dcmtk/ofstd/ofstdinc.h"
 
 #include "dcmtk/dcmdata/dcvrcs.h"
+#include "dcmtk/dcmdata/dcmatch.h"
 
 
 #define MAX_CS_LENGTH 16
@@ -142,3 +143,14 @@ OFCondition DcmCodeString::checkStringValue(const OFString &value,
 {
     return DcmByteString::checkStringValue(value, vm, "cs", 10, MAX_CS_LENGTH);
 }
+
+
+OFBool DcmCodeString::matches(const OFString& key,
+                              const OFString& candidate,
+                              const OFBool enableWildCardMatching) const
+{
+  if (enableWildCardMatching)
+    return DcmAttributeMatching::wildCardMatching(key.c_str(), key.length(), candidate.c_str(), candidate.length());
+  else
+    return DcmByteString::matches(key, candidate, OFFalse);
+}
diff --git a/dcmdata/libsrc/dcvrda.cc b/dcmdata/libsrc/dcvrda.cc
index fdead9b..be4bc11 100644
--- a/dcmdata/libsrc/dcvrda.cc
+++ b/dcmdata/libsrc/dcvrda.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2015, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -22,9 +22,11 @@
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
 #include "dcmtk/dcmdata/dcvrda.h"
+#include "dcmtk/dcmdata/dcvrtm.h"
 
 #define INCLUDE_CSTDIO
 #include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/dcmdata/dcmatch.h"
 
 
 // ********************************
@@ -331,3 +333,34 @@ OFCondition DcmDate::checkStringValue(const OFString &value,
     }
     return result;
 }
+
+OFBool DcmDate::matches(const OFString& key,
+                        const OFString& candidate,
+                        const OFBool enableWildCardMatching) const
+{
+  OFstatic_cast(void,enableWildCardMatching);
+  return DcmAttributeMatching::rangeMatchingDate(key.c_str(), key.length(), candidate.c_str(), candidate.length());
+}
+
+OFBool DcmDate::combinationMatches(const DcmElement& keySecond,
+                                   const DcmElement& candidateFirst,
+                                   const DcmElement& candidateSecond) const
+{
+  if (keySecond.ident() == EVR_TM && candidateFirst.ident() == EVR_DA && candidateSecond.ident() == EVR_TM)
+  {
+    // do many const casts, but we do not modify the value, I promise...
+    DcmDate& queryDate = OFconst_cast(DcmDate&, *this);
+    DcmDate& candidateDate = OFconst_cast(DcmDate&, OFstatic_cast(const DcmDate&, candidateFirst));
+    DcmTime& queryTime = OFconst_cast(DcmTime&, OFstatic_cast(const DcmTime&, keySecond));
+    DcmTime& candidateTime = OFconst_cast(DcmTime&, OFstatic_cast(const DcmTime&, candidateSecond));
+    OFString a0, a1, b0, b1;
+    // no support for VM>1 so far!
+    return queryDate.getOFString( a0, 0, OFTrue ).good() && queryTime.getOFString( a1, 0, OFTrue ).good() &&
+        candidateDate.getOFString( b0, 0, OFTrue ).good() && candidateTime.getOFString( b1, 0, OFTrue ).good() &&
+        DcmAttributeMatching::rangeMatchingDateTime
+    (
+      a0.c_str(), a0.length(), a1.c_str(), a1.length(), b0.c_str(), b0.length(), b1.c_str(), b1.length()
+    );
+  }
+  return OFFalse;
+}
diff --git a/dcmdata/libsrc/dcvrdt.cc b/dcmdata/libsrc/dcvrdt.cc
index a917556..43c1e0e 100644
--- a/dcmdata/libsrc/dcvrdt.cc
+++ b/dcmdata/libsrc/dcvrdt.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2015, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -24,6 +24,7 @@
 #include "dcmtk/dcmdata/dcvrdt.h"
 #include "dcmtk/dcmdata/dcvrda.h"
 #include "dcmtk/dcmdata/dcvrtm.h"
+#include "dcmtk/dcmdata/dcmatch.h"
 #include "dcmtk/ofstd/ofstring.h"
 #include "dcmtk/ofstd/ofstd.h"
 
@@ -399,3 +400,12 @@ OFCondition DcmDateTime::checkStringValue(const OFString &value,
     }
     return result;
 }
+
+
+OFBool DcmDateTime::matches(const OFString& key,
+                            const OFString& candidate,
+                            const OFBool enableWildCardMatching) const
+{
+  OFstatic_cast(void,enableWildCardMatching);
+  return DcmAttributeMatching::rangeMatchingDateTime(key.c_str(), key.length(), candidate.c_str(), candidate.length());
+}
diff --git a/dcmdata/libsrc/dcvrfd.cc b/dcmdata/libsrc/dcvrfd.cc
index dc6e9f3..79b49a9 100644
--- a/dcmdata/libsrc/dcvrfd.cc
+++ b/dcmdata/libsrc/dcvrfd.cc
@@ -78,8 +78,19 @@ int DcmFloatingPointDouble::compare(const DcmElement& rhs) const
     myThis = OFconst_cast(DcmFloatingPointDouble*, this);
     myRhs = OFstatic_cast(DcmFloatingPointDouble*, OFconst_cast(DcmElement*, &rhs));
 
-    /* iterate over all components and test equality */
+    /* check whether VMs are equal */
     unsigned long thisVM = myThis->getVM();
+    unsigned long rhsVM = myRhs->getVM();
+    if (thisVM < rhsVM)
+    {
+        return -1;
+    }
+    else if (thisVM > rhsVM)
+    {
+        return 1;
+    }
+
+    /* iterate over all components and test equality */
     for (unsigned long count = 0; count < thisVM; count++)
     {
         Float64 val = 0;
@@ -97,24 +108,9 @@ int DcmFloatingPointDouble::compare(const DcmElement& rhs) const
                     return -1;
                 }
             }
-            else
-            {
-                break; // values equal until this point (rhs shorter)
-            }
         }
     }
 
-    /* we get here if all values are equal. Now look at the number of components */
-    unsigned long rhsVM = myRhs->getVM();
-    if (thisVM < rhsVM)
-    {
-        return -1;
-    }
-    else if (thisVM > rhsVM)
-    {
-        return 1;
-    }
-
     /* all values as well as VM equal: objects are equal */
     return 0;
 }
@@ -365,3 +361,23 @@ OFCondition DcmFloatingPointDouble::verify(const OFBool autocorrect)
         errorFlag = EC_Normal;
     return errorFlag;
 }
+
+
+OFBool DcmFloatingPointDouble::matches(const DcmElement& candidate,
+                                       const OFBool enableWildCardMatching) const
+{
+  OFstatic_cast(void,enableWildCardMatching);
+  if (ident() == candidate.ident())
+  {
+    // some const casts to call the getter functions, I do not modify the values, I promise!
+    DcmFloatingPointDouble& key = OFconst_cast(DcmFloatingPointDouble&,*this);
+    DcmElement& can = OFconst_cast(DcmElement&,candidate);
+    Float64 a, b;
+    for( unsigned long ui = 0; ui < key.getVM(); ++ui )
+      for( unsigned long uj = 0; uj < can.getVM(); ++uj )
+        if( key.getFloat64( a, ui ).good() && can.getFloat64( b, uj ).good() && a == b )
+          return OFTrue;
+    return key.getVM() == 0;
+  }
+  return OFFalse;
+}
diff --git a/dcmdata/libsrc/dcvrfl.cc b/dcmdata/libsrc/dcvrfl.cc
index 9234826..9c137d6 100644
--- a/dcmdata/libsrc/dcvrfl.cc
+++ b/dcmdata/libsrc/dcvrfl.cc
@@ -78,8 +78,19 @@ int DcmFloatingPointSingle::compare(const DcmElement& rhs) const
     myThis = OFconst_cast(DcmFloatingPointSingle*, this);
     myRhs = OFstatic_cast(DcmFloatingPointSingle*, OFconst_cast(DcmElement*, &rhs));
 
-    // iterate over all components and test equality */
+    /* check whether VMs are equal */
     unsigned long thisVM = myThis->getVM();
+    unsigned long rhsVM = myRhs->getVM();
+    if (thisVM < rhsVM)
+    {
+        return -1;
+    }
+    else if (thisVM > rhsVM)
+    {
+        return 1;
+    }
+
+    // iterate over all components and test equality */
     for (unsigned long count = 0; count < thisVM; count++)
     {
         Float32 val = 0;
@@ -97,24 +108,9 @@ int DcmFloatingPointSingle::compare(const DcmElement& rhs) const
                     return -1;
                 }
             }
-            else
-            {
-                break; // values equal until this point (rhs shorter)
-            }
       }
   }
 
-  /* we get here if all values are equal. Now look at the number of components. */
-  unsigned long rhsVM = myRhs->getVM();
-  if (thisVM < rhsVM)
-  {
-      return -1;
-  }
-  else if (thisVM > rhsVM)
-  {
-      return 1;
-  }
-
   /* all values as well as VM equal: objects are equal */
   return 0;
 }
@@ -366,3 +362,23 @@ OFCondition DcmFloatingPointSingle::verify(const OFBool autocorrect)
         errorFlag = EC_Normal;
     return errorFlag;
 }
+
+
+OFBool DcmFloatingPointSingle::matches(const DcmElement& candidate,
+                                       const OFBool enableWildCardMatching) const
+{
+  OFstatic_cast(void,enableWildCardMatching);
+  if (ident() == candidate.ident())
+  {
+    // some const casts to call the getter functions, I do not modify the values, I promise!
+    DcmFloatingPointSingle& key = OFconst_cast(DcmFloatingPointSingle&,*this);
+    DcmElement& can = OFconst_cast(DcmElement&,candidate);
+    Float32 a, b;
+    for( unsigned long ui = 0; ui < key.getVM(); ++ui )
+      for( unsigned long uj = 0; uj < can.getVM(); ++uj )
+        if( key.getFloat32( a, ui ).good() && can.getFloat32( b, uj ).good() && a == b )
+          return OFTrue;
+    return key.getVM() == 0;
+  }
+  return OFFalse;
+}
diff --git a/dcmdata/libsrc/dcvrlo.cc b/dcmdata/libsrc/dcvrlo.cc
index c34a623..2840cdb 100644
--- a/dcmdata/libsrc/dcvrlo.cc
+++ b/dcmdata/libsrc/dcvrlo.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -86,7 +86,8 @@ OFCondition DcmLongString::checkValue(const OFString &vm,
     {
         OFString charset;
         /* try to determine the value of the SpecificCharacterSet element */
-        getSpecificCharacterSet(charset);
+        if (getSpecificCharacterSet(charset) == EC_CorruptedData)
+            charset = "UNKNOWN";
         l_error = DcmLongString::checkStringValue(strVal, vm, charset);
     }
     return l_error;
diff --git a/dcmdata/libsrc/dcvrlt.cc b/dcmdata/libsrc/dcvrlt.cc
index 6c1969b..da8f71d 100644
--- a/dcmdata/libsrc/dcvrlt.cc
+++ b/dcmdata/libsrc/dcvrlt.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2013, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -84,7 +84,8 @@ OFCondition DcmLongText::checkValue(const OFString & /*vm*/,
     {
         OFString charset;
         /* try to determine the value of the SpecificCharacterSet element */
-        getSpecificCharacterSet(charset);
+        if (getSpecificCharacterSet(charset) == EC_CorruptedData)
+            charset = "UNKNOWN";
         l_error = DcmLongText::checkStringValue(strVal, charset);
     }
     return l_error;
diff --git a/dcmdata/libsrc/dcvrobow.cc b/dcmdata/libsrc/dcvrobow.cc
index 00e33fb..6f0bc31 100644
--- a/dcmdata/libsrc/dcvrobow.cc
+++ b/dcmdata/libsrc/dcvrobow.cc
@@ -90,37 +90,22 @@ int DcmOtherByteOtherWord::compare(const DcmElement& rhs) const
     myThis = OFconst_cast(DcmOtherByteOtherWord*, this);
     myRhs =  OFstatic_cast(DcmOtherByteOtherWord*, OFconst_cast(DcmElement*, &rhs));
 
+    /* check equality of length */
     unsigned long thisLength = myThis->getLength();
     unsigned long rhsLength= myRhs->getLength();
-    Uint8* thisData = OFstatic_cast(Uint8*, myThis->getValue());
-    Uint8* rhsData = OFstatic_cast(Uint8*, myRhs->getValue());
-    unsigned long maxLength = (thisLength > rhsLength) ? rhsLength : thisLength;
-    /* iterate over all components and test equality */
-    for (unsigned long count = 0; count < maxLength; count++)
-    {
-        if (thisData[count] > rhsData[count])
-        {
-            return 1;
-        }
-        else if (thisData[count] < rhsData[count])
-        {
-            return -1;
-        }
-        /* otherwise they are equal, continue comparison */
-    }
-
-    /* we get here if all values are equal. Now look at the number of components. */
     if (thisLength < rhsLength)
     {
-        return -1;
+      return -1;
     }
     else if (thisLength > rhsLength)
     {
-        return 1;
+      return 1;
     }
-
-    /* all values as well as VM equal: objects are equal */
-    return 0;
+    /* finally, check equality of values. getValue() makes sure byte
+     * swapping is applied as necessary. */
+    void* thisData = myThis->getValue();
+    void* rhsData = myRhs->getValue();
+    return memcmp(thisData, rhsData, thisLength);
 }
 
 
diff --git a/dcmdata/libsrc/dcvrpn.cc b/dcmdata/libsrc/dcvrpn.cc
index 2b88b0b..3424ccc 100644
--- a/dcmdata/libsrc/dcvrpn.cc
+++ b/dcmdata/libsrc/dcvrpn.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -89,7 +89,8 @@ OFCondition DcmPersonName::checkValue(const OFString &vm,
     {
         OFString charset;
         /* try to determine the value of the SpecificCharacterSet element */
-        getSpecificCharacterSet(charset);
+        if (getSpecificCharacterSet(charset) == EC_CorruptedData)
+            charset = "UNKNOWN";
         l_error = DcmPersonName::checkStringValue(strVal, vm, charset);
     }
     return l_error;
diff --git a/dcmdata/libsrc/dcvrpobw.cc b/dcmdata/libsrc/dcvrpobw.cc
index 42c2ba6..1af885d 100644
--- a/dcmdata/libsrc/dcvrpobw.cc
+++ b/dcmdata/libsrc/dcvrpobw.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2010, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -58,6 +58,45 @@ DcmPolymorphOBOW &DcmPolymorphOBOW::operator=(const DcmPolymorphOBOW & obj)
   return *this;
 }
 
+int DcmPolymorphOBOW::compare(const DcmElement& rhs) const
+{
+  /* check tag and VR */
+  int result = DcmElement::compare(rhs);
+  if (result != 0)
+  {
+    return result;
+  }
+
+  /* cast away constness (dcmdata is not const correct...) */
+  DcmPolymorphOBOW* myThis = NULL;
+  DcmPolymorphOBOW* myRhs = NULL;
+  myThis = OFconst_cast(DcmPolymorphOBOW*, this);
+  myRhs =  OFstatic_cast(DcmPolymorphOBOW*, OFconst_cast(DcmElement*, &rhs));
+
+  /* check whether length is the same */
+  Uint32 myLength = myThis->getLength();
+  Uint32 rhsLength = myRhs->getLength();
+  if (myLength < rhsLength)
+    return -1;
+  else if (myLength > rhsLength)
+    return 1;
+  /* finally check whether values are the same */
+  else
+  {
+    // Get values, always compare in Little Endian byte order (only relevant for OW)
+    void* myValue = myThis->getValue(EBO_LittleEndian);
+    void* rhsValue = myRhs->getValue(EBO_LittleEndian);
+    int result = memcmp(myValue, rhsValue, myLength);
+    if (result < 0)
+      return -1;
+    else if (result > 0)
+      return 1;
+    else
+      return 0;
+  }
+  /* we never get here */
+}
+
 OFCondition DcmPolymorphOBOW::copyFrom(const DcmObject& rhs)
 {
   if (this != &rhs)
@@ -251,16 +290,32 @@ OFCondition DcmPolymorphOBOW::write(
     DcmXfer oXferSyn(oxfer);
     if (getTransferState() == ERW_init)
     {
-        if (getTag().getEVR() == EVR_OB && oXferSyn.isImplicitVR() &&  getByteOrder() == EBO_BigEndian)
+        if (getTag().getEVR() == EVR_OB && oXferSyn.isImplicitVR())
         {
-            // VR is OB and it will be written as OW in LittleEndianImplicit.
-            setTagVR(EVR_OW);
-            if (currentVR == EVR_OB) setByteOrder(EBO_LittleEndian);
-            currentVR = EVR_OB;
-            changeVR = OFTrue;
+          // This element was read or created as OB, but we are writing in
+          // implicit VR transfer syntax (which always uses OW). Therefore,
+          // change the VR associated with the tag to OW.
+          setTagVR(EVR_OW);
+
+          // If the data is currently in OB representation in memory,
+          // adjust the VR to OW and update the current byte order.
+          // OB data is equivalent to OW data in little endian byte order.
+          if (currentVR == EVR_OB)
+          {
+            setByteOrder(EBO_LittleEndian);
+            currentVR = EVR_OW;
+          }
+
+          // remember that we have changed the VR associated with the tag
+          changeVR = OFTrue;
         }
+
         else if (getTag().getEVR() == EVR_OW && currentVR == EVR_OB)
         {
+            // the element was originally read/created as OW
+            // but is currently in OB format. Change back to OW.
+
+            // OB data is equivalent to OW data in little endian byte order.
             setByteOrder(EBO_LittleEndian);
             currentVR = EVR_OW;
         }
@@ -268,9 +323,8 @@ OFCondition DcmPolymorphOBOW::write(
     errorFlag = DcmOtherByteOtherWord::write(outStream, oxfer, enctype, wcache);
     if (getTransferState() == ERW_ready && changeVR)
     {
-        // VR must be OB again. No Swapping is needed since the written
-        // transfer syntax was LittleEndianImplicit and so no swapping
-        // took place.
+        // Change the VR associated with the tag
+        // (not the current VR!) back from OW to OB
         setTagVR(EVR_OB);
     }
     return errorFlag;
@@ -285,16 +339,32 @@ OFCondition DcmPolymorphOBOW::writeSignatureFormat(
     DcmXfer oXferSyn(oxfer);
     if (getTransferState() == ERW_init)
     {
-        if (getTag().getEVR() == EVR_OB && oXferSyn.isImplicitVR() &&  getByteOrder() == EBO_BigEndian)
+        if (getTag().getEVR() == EVR_OB && oXferSyn.isImplicitVR())
         {
-            // VR is OB and it will be written as OW in LittleEndianImplicit.
-            setTagVR(EVR_OW);
-            if (currentVR == EVR_OB) setByteOrder(EBO_LittleEndian);
-            currentVR = EVR_OB;
-            changeVR = OFTrue;
+          // This element was read or created as OB, but we are writing in
+          // implicit VR transfer syntax (which always uses OW). Therefore,
+          // change the VR associated with the tag to OW.
+          setTagVR(EVR_OW);
+
+          // If the data is currently in OB representation in memory,
+          // adjust the VR to OW and update the current byte order.
+          // OB data is equivalent to OW data in little endian byte order.
+          if (currentVR == EVR_OB)
+          {
+            setByteOrder(EBO_LittleEndian);
+            currentVR = EVR_OW;
+          }
+
+          // remember that we have changed the VR associated with the tag
+          changeVR = OFTrue;
         }
+
         else if (getTag().getEVR() == EVR_OW && currentVR == EVR_OB)
         {
+            // the element was originally read/created as OW
+            // but is currently in OB format. Change back to OW.
+
+            // OB data is equivalent to OW data in little endian byte order.
             setByteOrder(EBO_LittleEndian);
             currentVR = EVR_OW;
         }
@@ -302,9 +372,8 @@ OFCondition DcmPolymorphOBOW::writeSignatureFormat(
     errorFlag = DcmOtherByteOtherWord::writeSignatureFormat(outStream, oxfer, enctype, wcache);
     if (getTransferState() == ERW_ready && changeVR)
     {
-        // VR must be OB again. No Swapping is needed since the written
-        // transfer syntax was LittleEndianImplicit and so no swapping
-        // took place.
+        // Change the VR associated with the tag
+        // (not the current VR!) back from OW to OB
         setTagVR(EVR_OB);
     }
     return errorFlag;
diff --git a/dcmdata/libsrc/dcvrsh.cc b/dcmdata/libsrc/dcvrsh.cc
index f80c779..549e7f7 100644
--- a/dcmdata/libsrc/dcvrsh.cc
+++ b/dcmdata/libsrc/dcvrsh.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -86,7 +86,8 @@ OFCondition DcmShortString::checkValue(const OFString &vm,
     {
         OFString charset;
         /* try to determine the value of the SpecificCharacterSet element */
-        getSpecificCharacterSet(charset);
+        if (getSpecificCharacterSet(charset) == EC_CorruptedData)
+            charset = "UNKNOWN";
         l_error = DcmShortString::checkStringValue(strVal, vm, charset);
     }
     return l_error;
diff --git a/dcmdata/libsrc/dcvrsl.cc b/dcmdata/libsrc/dcvrsl.cc
index 16562f9..3d8e2c1 100644
--- a/dcmdata/libsrc/dcvrsl.cc
+++ b/dcmdata/libsrc/dcvrsl.cc
@@ -76,8 +76,19 @@ int DcmSignedLong::compare(const DcmElement& rhs) const
     myThis = OFconst_cast(DcmSignedLong*, this);
     myRhs =  OFstatic_cast(DcmSignedLong*, OFconst_cast(DcmElement*, &rhs));
 
-    /* iterate over all components and test equality */
+    /* check whether VMs are equal */
     unsigned long thisVM = myThis->getVM();
+    unsigned long rhsVM = myRhs->getVM();
+    if (thisVM < rhsVM)
+    {
+        return -1;
+    }
+    else if (thisVM > rhsVM)
+    {
+        return 1;
+    }
+
+    /* iterate over all components and test equality */
     for (unsigned long count = 0; count < thisVM; count++)
     {
         Sint32 val = 0;
@@ -96,24 +107,9 @@ int DcmSignedLong::compare(const DcmElement& rhs) const
                 }
                 /* otherwise they are equal, continue comparison */
             }
-            else
-            {
-                break; // values equal until this point (rhs shorter)
-            }
         }
     }
 
-    /* we get here if all values are equal. Now look at the number of components. */
-    unsigned long rhsVM = myRhs->getVM();
-    if (thisVM < rhsVM)
-    {
-        return -1;
-    }
-    else if (thisVM > rhsVM)
-    {
-        return 1;
-    }
-
     /* all values as well as VM equal: objects are equal */
     return 0;
 }
@@ -369,3 +365,23 @@ OFCondition DcmSignedLong::verify(const OFBool autocorrect)
         errorFlag = EC_Normal;
     return errorFlag;
 }
+
+
+OFBool DcmSignedLong::matches(const DcmElement& candidate,
+                             const OFBool enableWildCardMatching) const
+{
+  OFstatic_cast(void,enableWildCardMatching);
+  if (ident() == candidate.ident())
+  {
+    // some const casts to call the getter functions, I do not modify the values, I promise!
+    DcmSignedLong& key = OFconst_cast(DcmSignedLong&,*this);
+    DcmElement& can = OFconst_cast(DcmElement&,candidate);
+    Sint32 a, b;
+    for( unsigned long ui = 0; ui < key.getVM(); ++ui )
+      for( unsigned long uj = 0; uj < can.getVM(); ++uj )
+        if( key.getSint32( a, ui ).good() && can.getSint32( b, uj ).good() && a == b )
+          return OFTrue;
+    return key.getVM() == 0;
+  }
+  return OFFalse;
+}
diff --git a/dcmdata/libsrc/dcvrss.cc b/dcmdata/libsrc/dcvrss.cc
index 846983d..918a540 100644
--- a/dcmdata/libsrc/dcvrss.cc
+++ b/dcmdata/libsrc/dcvrss.cc
@@ -76,8 +76,19 @@ int DcmSignedShort::compare(const DcmElement& rhs) const
     myThis = OFconst_cast(DcmSignedShort*, this);
     myRhs =  OFstatic_cast(DcmSignedShort*, OFconst_cast(DcmElement*, &rhs));
 
-    /* iterate over all components and test equality */
+    /* check whether VMs are equal */
     unsigned long thisVM = myThis->getVM();
+    unsigned long rhsVM = myRhs->getVM();
+    if (thisVM < rhsVM)
+    {
+        return -1;
+    }
+    else if (thisVM > rhsVM)
+    {
+        return 1;
+    }
+
+    /* iterate over all components and test equality */
     for (unsigned long count = 0; count < thisVM; count++)
     {
         Sint16 val = 0;
@@ -96,24 +107,9 @@ int DcmSignedShort::compare(const DcmElement& rhs) const
                 }
                 /* otherwise they are equal, continue comparison */
             }
-            else
-            {
-                break; // values equal until this point (rhs shorter)
-            }
         }
     }
 
-    /* we get here if all values are equal. Now look at the number of components. */
-    unsigned long rhsVM = myRhs->getVM();
-    if (thisVM < rhsVM)
-    {
-        return -1;
-    }
-    else if (thisVM > rhsVM)
-    {
-        return 1;
-    }
-
     /* all values as well as VM equal: objects are equal */
     return 0;
 }
@@ -354,3 +350,23 @@ OFCondition DcmSignedShort::verify(const OFBool autocorrect)
         errorFlag = EC_Normal;
     return errorFlag;
 }
+
+
+OFBool DcmSignedShort::matches(const DcmElement& candidate,
+                               const OFBool enableWildCardMatching) const
+{
+  OFstatic_cast(void,enableWildCardMatching);
+  if (ident() == candidate.ident())
+  {
+    // some const casts to call the getter functions, I do not modify the values, I promise!
+    DcmSignedShort& key = OFconst_cast(DcmSignedShort&,*this);
+    DcmElement& can = OFconst_cast(DcmElement&,candidate);
+    Sint16 a, b;
+    for( unsigned long ui = 0; ui < key.getVM(); ++ui )
+      for( unsigned long uj = 0; uj < can.getVM(); ++uj )
+        if( key.getSint16( a, ui ).good() && can.getSint16( b, uj ).good() && a == b )
+          return OFTrue;
+    return key.getVM() == 0;
+  }
+  return OFFalse;
+}
diff --git a/dcmdata/libsrc/dcvrst.cc b/dcmdata/libsrc/dcvrst.cc
index 12d5c82..82acc51 100644
--- a/dcmdata/libsrc/dcvrst.cc
+++ b/dcmdata/libsrc/dcvrst.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2013, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -84,7 +84,8 @@ OFCondition DcmShortText::checkValue(const OFString & /*vm*/,
     {
         OFString charset;
         /* try to determine the value of the SpecificCharacterSet element */
-        getSpecificCharacterSet(charset);
+        if (getSpecificCharacterSet(charset) == EC_CorruptedData)
+            charset = "UNKNOWN";
         l_error = DcmShortText::checkStringValue(strVal, charset);
     }
     return l_error;
diff --git a/dcmdata/libsrc/dcvrtm.cc b/dcmdata/libsrc/dcvrtm.cc
index 0f3e177..c8dbff0 100644
--- a/dcmdata/libsrc/dcvrtm.cc
+++ b/dcmdata/libsrc/dcvrtm.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2013, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,6 +27,7 @@
 
 #define INCLUDE_CSTDIO
 #include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/dcmdata/dcmatch.h"
 
 
 #define MAX_TM_LENGTH 16
@@ -484,3 +485,12 @@ OFBool DcmTime::parseFragment(const char* const string, const size_t size, doubl
     }
     return OFFalse;
 }
+
+
+OFBool DcmTime::matches(const OFString& key,
+                        const OFString& candidate,
+                        const OFBool enableWildCardMatching) const
+{
+  OFstatic_cast(void,enableWildCardMatching);
+  return DcmAttributeMatching::rangeMatchingTime(key.c_str(), key.length(), candidate.c_str(), candidate.length());
+}
diff --git a/dcmdata/libsrc/dcvruc.cc b/dcmdata/libsrc/dcvruc.cc
index aed7031..d0781b2 100644
--- a/dcmdata/libsrc/dcvruc.cc
+++ b/dcmdata/libsrc/dcvruc.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015, OFFIS e.V.
+ *  Copyright (C) 2015-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -84,7 +84,8 @@ OFCondition DcmUnlimitedCharacters::checkValue(const OFString &vm,
     {
         OFString charset;
         /* try to determine the value of the SpecificCharacterSet element */
-        getSpecificCharacterSet(charset);
+        if (getSpecificCharacterSet(charset) == EC_CorruptedData)
+            charset = "UNKNOWN";
         l_error = DcmUnlimitedCharacters::checkStringValue(strVal, vm, charset);
     }
     return l_error;
diff --git a/dcmdata/libsrc/dcvrul.cc b/dcmdata/libsrc/dcvrul.cc
index 59986be..3d90a63 100644
--- a/dcmdata/libsrc/dcvrul.cc
+++ b/dcmdata/libsrc/dcvrul.cc
@@ -77,8 +77,19 @@ int DcmUnsignedLong::compare(const DcmElement& rhs) const
     myThis = OFconst_cast(DcmUnsignedLong*, this);
     myRhs =  OFstatic_cast(DcmUnsignedLong*, OFconst_cast(DcmElement*, &rhs));
 
-    /* iterate over all components and test equality */
+    /* check whether VMs are equal */
     unsigned long thisVM = myThis->getVM();
+    unsigned long rhsVM = myRhs->getVM();
+    if (thisVM < rhsVM)
+    {
+        return -1;
+    }
+    else if (thisVM > rhsVM)
+    {
+        return 1;
+    }
+
+    /* iterate over all components and test equality */
     for (unsigned long count = 0; count < thisVM; count++)
     {
         Uint32 val = 0;
@@ -96,24 +107,9 @@ int DcmUnsignedLong::compare(const DcmElement& rhs) const
                     return -1;
                 }
             }
-            else
-            {
-                break; // values equal until this point (rhs shorter)
-            }
         }
     }
 
-    /* we get here if all values are equal. Now look at the number of components. */
-    unsigned long rhsVM = myRhs->getVM();
-    if (thisVM < rhsVM)
-    {
-        return -1;
-    }
-    else if (thisVM > rhsVM)
-    {
-        return 1;
-    }
-
     /* all values as well as VM equal: objects are equal */
     return 0;
 }
@@ -368,3 +364,23 @@ OFCondition DcmUnsignedLong::verify(const OFBool autocorrect)
         errorFlag = EC_Normal;
     return errorFlag;
 }
+
+
+OFBool DcmUnsignedLong::matches(const DcmElement& candidate,
+                                const OFBool enableWildCardMatching) const
+{
+  OFstatic_cast(void,enableWildCardMatching);
+  if (ident() == candidate.ident())
+  {
+    // some const casts to call the getter functions, I do not modify the values, I promise!
+    DcmUnsignedLong& key = OFconst_cast(DcmUnsignedLong&,*this);
+    DcmElement& can = OFconst_cast(DcmElement&,candidate);
+    Uint32 a, b;
+    for( unsigned long ui = 0; ui < key.getVM(); ++ui )
+      for( unsigned long uj = 0; uj < can.getVM(); ++uj )
+        if( key.getUint32( a, ui ).good() && can.getUint32( b, uj ).good() && a == b )
+          return OFTrue;
+    return key.getVM() == 0;
+  }
+  return OFFalse;
+}
diff --git a/dcmdata/libsrc/dcvrur.cc b/dcmdata/libsrc/dcvrur.cc
index 881ca4c..85b920d 100644
--- a/dcmdata/libsrc/dcvrur.cc
+++ b/dcmdata/libsrc/dcvrur.cc
@@ -23,6 +23,7 @@
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
 #include "dcmtk/dcmdata/dcvrur.h"
+#include "dcmtk/dcmdata/dcmatch.h"
 
 
 // ********************************
@@ -123,3 +124,14 @@ OFCondition DcmUniversalResourceIdentifierOrLocator::checkStringValue(const OFSt
 {
     return DcmByteString::checkStringValue(value, "" /* vm */, "ur", 19, 0 /* maxLen: no check */);
 }
+
+
+OFBool DcmUniversalResourceIdentifierOrLocator::matches(const OFString& key,
+                                                        const OFString& candidate,
+                                                        const OFBool enableWildCardMatching) const
+{
+  if (enableWildCardMatching)
+    return DcmAttributeMatching::wildCardMatching(key.c_str(), key.length(), candidate.c_str(), candidate.length());
+  else
+    return DcmByteString::matches(key, candidate, OFFalse);
+}
diff --git a/dcmdata/libsrc/dcvrus.cc b/dcmdata/libsrc/dcvrus.cc
index e92fd3d..040f3d2 100644
--- a/dcmdata/libsrc/dcvrus.cc
+++ b/dcmdata/libsrc/dcvrus.cc
@@ -76,8 +76,19 @@ int DcmUnsignedShort::compare(const DcmElement& rhs) const
     myThis = OFconst_cast(DcmUnsignedShort*, this);
     myRhs =  OFstatic_cast(DcmUnsignedShort*, OFconst_cast(DcmElement*, &rhs));
 
-    /* iterate over all components and test equality */
+    /* check whether VMs are equal */
     unsigned long thisVM = myThis->getVM();
+    unsigned long rhsVM = myRhs->getVM();
+    if (thisVM < rhsVM)
+    {
+        return -1;
+    }
+    else if (thisVM > rhsVM)
+    {
+        return 1;
+    }
+
+    /* iterate over all components and test equality */
     for (unsigned long count = 0; count < thisVM; count++)
     {
         Uint16 val = 0;
@@ -95,24 +106,9 @@ int DcmUnsignedShort::compare(const DcmElement& rhs) const
                       return -1;
                   }
             }
-            else
-            {
-                break; // values equal until this point (rhs shorter)
-            }
         }
     }
 
-    /* we get here if all values are equal. Now look at the number of components. */
-    unsigned long rhsVM = myRhs->getVM();
-    if (thisVM < rhsVM)
-    {
-        return -1;
-    }
-    else if (thisVM > rhsVM)
-    {
-        return 1;
-    }
-
     /* all values as well as VM equal: objects are equal */
     return 0;
 }
@@ -353,3 +349,23 @@ OFCondition DcmUnsignedShort::verify(const OFBool autocorrect)
         errorFlag = EC_Normal;
     return errorFlag;
 }
+
+
+OFBool DcmUnsignedShort::matches(const DcmElement& candidate,
+                                 const OFBool enableWildCardMatching) const
+{
+  OFstatic_cast(void,enableWildCardMatching);
+  if (ident() == candidate.ident())
+  {
+    // some const casts to call the getter functions, I do not modify the values, I promise!
+    DcmUnsignedShort& key = OFconst_cast(DcmUnsignedShort&,*this);
+    DcmElement& can = OFconst_cast(DcmElement&,candidate);
+    Uint16 a, b;
+    for( unsigned long ui = 0; ui < key.getVM(); ++ui )
+      for( unsigned long uj = 0; uj < can.getVM(); ++uj )
+        if( key.getUint16( a, ui ).good() && can.getUint16( b, uj ).good() && a == b )
+          return OFTrue;
+    return key.getVM() == 0;
+  }
+  return OFFalse;
+}
diff --git a/dcmdata/libsrc/dcvrut.cc b/dcmdata/libsrc/dcvrut.cc
index 9a21d51..e9eaa84 100644
--- a/dcmdata/libsrc/dcvrut.cc
+++ b/dcmdata/libsrc/dcvrut.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2014, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -84,7 +84,8 @@ OFCondition DcmUnlimitedText::checkValue(const OFString & /*vm*/,
     {
         OFString charset;
         /* try to determine the value of the SpecificCharacterSet element */
-        getSpecificCharacterSet(charset);
+        if (getSpecificCharacterSet(charset) == EC_CorruptedData)
+            charset = "UNKNOWN";
         l_error = DcmUnlimitedText::checkStringValue(strVal, charset);
     }
     return l_error;
diff --git a/dcmdata/libsrc/dcxfer.cc b/dcmdata/libsrc/dcxfer.cc
index b3244c3..f138c10 100644
--- a/dcmdata/libsrc/dcxfer.cc
+++ b/dcmdata/libsrc/dcxfer.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -33,6 +33,7 @@ typedef struct
     const char         *xferName;
     E_TransferSyntax    xfer;
     E_ByteOrder         byteOrder;
+    E_ByteOrder         pixelDataByteOrder;
     E_VRType            vrType;
     E_JPEGEncapsulated  encapsulated;
     Uint32              JPEGProcess8;
@@ -53,6 +54,7 @@ const S_XferNames XferNames[] =
       "Little Endian Implicit",
       EXS_LittleEndianImplicit,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Implicit,
       EJE_NotEncapsulated,
       0L, 0L,
@@ -64,6 +66,7 @@ const S_XferNames XferNames[] =
       "Virtual Big Endian Implicit",
       EXS_BigEndianImplicit,
       EBO_BigEndian,
+      EBO_BigEndian,
       EVT_Implicit,
       EJE_NotEncapsulated,
       0L, 0L,
@@ -75,6 +78,7 @@ const S_XferNames XferNames[] =
       "Little Endian Explicit",
       EXS_LittleEndianExplicit,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_NotEncapsulated,
       0L, 0L,
@@ -86,6 +90,7 @@ const S_XferNames XferNames[] =
       "Big Endian Explicit",
       EXS_BigEndianExplicit,
       EBO_BigEndian,
+      EBO_BigEndian,
       EVT_Explicit,
       EJE_NotEncapsulated,
       0L, 0L,
@@ -97,6 +102,7 @@ const S_XferNames XferNames[] =
       "JPEG Baseline",
       EXS_JPEGProcess1,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       1L, 1L,
@@ -108,6 +114,7 @@ const S_XferNames XferNames[] =
       "JPEG Extended, Process 2+4",
       EXS_JPEGProcess2_4,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       2L ,4L,
@@ -119,6 +126,7 @@ const S_XferNames XferNames[] =
       "JPEG Extended, Process 3+5",
       EXS_JPEGProcess3_5,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       3L ,5L,
@@ -130,6 +138,7 @@ const S_XferNames XferNames[] =
       "JPEG Spectral Selection, Non-hierarchical, Process 6+8",
       EXS_JPEGProcess6_8,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       6L ,8L,
@@ -141,6 +150,7 @@ const S_XferNames XferNames[] =
       "JPEG Spectral Selection, Non-hierarchical, Process 7+9",
       EXS_JPEGProcess7_9,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       7L ,9L,
@@ -152,6 +162,7 @@ const S_XferNames XferNames[] =
       "JPEG Full Progression, Non-hierarchical, Process 10+12",
       EXS_JPEGProcess10_12,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       10L ,12L,
@@ -163,6 +174,7 @@ const S_XferNames XferNames[] =
       "JPEG Full Progression, Non-hierarchical, Process 11+13",
       EXS_JPEGProcess11_13,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       11L ,13L,
@@ -174,6 +186,7 @@ const S_XferNames XferNames[] =
       "JPEG Lossless, Non-hierarchical, Process 14",
       EXS_JPEGProcess14,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       14L ,14L,
@@ -185,6 +198,7 @@ const S_XferNames XferNames[] =
       "JPEG Lossless, Non-hierarchical, Process 15",
       EXS_JPEGProcess15,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       15L ,15L,
@@ -196,6 +210,7 @@ const S_XferNames XferNames[] =
       "JPEG Extended, Hierarchical, Process 16+18",
       EXS_JPEGProcess16_18,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       16L ,18L,
@@ -207,6 +222,7 @@ const S_XferNames XferNames[] =
       "JPEG Extended, Hierarchical, Process 17+19",
       EXS_JPEGProcess17_19,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       17L ,19L,
@@ -218,6 +234,7 @@ const S_XferNames XferNames[] =
       "JPEG Spectral Selection, Hierarchical, Process 20+22",
       EXS_JPEGProcess20_22,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       20L ,22L,
@@ -229,6 +246,7 @@ const S_XferNames XferNames[] =
       "JPEG Spectral Selection, Hierarchical, Process 21+23",
       EXS_JPEGProcess21_23,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       21L ,23L,
@@ -240,6 +258,7 @@ const S_XferNames XferNames[] =
       "JPEG Full Progression, Hierarchical, Process 24+26",
       EXS_JPEGProcess24_26,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       24L ,26L,
@@ -251,6 +270,7 @@ const S_XferNames XferNames[] =
       "JPEG Full Progression, Hierarchical, Process 25+27",
       EXS_JPEGProcess25_27,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       25L ,27L,
@@ -262,6 +282,7 @@ const S_XferNames XferNames[] =
       "JPEG Lossless, Hierarchical, Process 28",
       EXS_JPEGProcess28,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       28L ,28L,
@@ -273,6 +294,7 @@ const S_XferNames XferNames[] =
       "JPEG Lossless, Hierarchical, Process 29",
       EXS_JPEGProcess29,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       29L ,29L,
@@ -284,6 +306,7 @@ const S_XferNames XferNames[] =
       "JPEG Lossless, Non-hierarchical, 1st Order Prediction",
       EXS_JPEGProcess14SV1,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       14L ,14L,
@@ -295,6 +318,7 @@ const S_XferNames XferNames[] =
       "RLE Lossless",
       EXS_RLELossless,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -306,6 +330,7 @@ const S_XferNames XferNames[] =
       "Deflated Explicit VR Little Endian",
       EXS_DeflatedLittleEndianExplicit,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_NotEncapsulated,
       0L, 0L,
@@ -322,6 +347,7 @@ const S_XferNames XferNames[] =
       "JPEG-LS Lossless",
       EXS_JPEGLSLossless,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -333,6 +359,7 @@ const S_XferNames XferNames[] =
       "JPEG-LS Lossy (Near-lossless)",
       EXS_JPEGLSLossy,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -344,6 +371,7 @@ const S_XferNames XferNames[] =
       "JPEG 2000 (Lossless only)",
       EXS_JPEG2000LosslessOnly,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -355,6 +383,7 @@ const S_XferNames XferNames[] =
       "JPEG 2000 (Lossless or Lossy)",
       EXS_JPEG2000,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -366,6 +395,7 @@ const S_XferNames XferNames[] =
       "JPEG 2000 Part 2 Multicomponent Image Compression (Lossless only)",
       EXS_JPEG2000MulticomponentLosslessOnly,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -377,6 +407,7 @@ const S_XferNames XferNames[] =
       "JPEG 2000 Part 2 Multicomponent Image Compression (Lossless or Lossy)",
       EXS_JPEG2000Multicomponent,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -388,6 +419,7 @@ const S_XferNames XferNames[] =
       "JPIP Referenced",
       EXS_JPIPReferenced,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_NotEncapsulated,  // in fact, pixel data shall be referenced via (0028,7FE0) Pixel Data Provider URL
       0L, 0L,
@@ -399,6 +431,7 @@ const S_XferNames XferNames[] =
       "JPIP Referenced Deflate",
       EXS_JPIPReferencedDeflate,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_NotEncapsulated,  // in fact, pixel data shall be referenced via (0028,7FE0) Pixel Data Provider URL
       0L, 0L,
@@ -415,6 +448,7 @@ const S_XferNames XferNames[] =
       "MPEG2 Main Profile @ Main Level",  // changed with DICOM 2016e to: MPEG2 Main Profile / Main Level
       EXS_MPEG2MainProfileAtMainLevel,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -426,6 +460,7 @@ const S_XferNames XferNames[] =
       "MPEG2 Main Profile @ High Level",  // changed with DICOM 2016e to: MPEG2 Main Profile / High Level
       EXS_MPEG2MainProfileAtHighLevel,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -437,6 +472,7 @@ const S_XferNames XferNames[] =
       "MPEG-4 AVC/H.264 High Profile / Level 4.1",
       EXS_MPEG4HighProfileLevel4_1,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -448,6 +484,7 @@ const S_XferNames XferNames[] =
       "MPEG-4 AVC/H.264 BD-compatible High Profile / Level 4.1",
       EXS_MPEG4BDcompatibleHighProfileLevel4_1,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -459,6 +496,7 @@ const S_XferNames XferNames[] =
       "MPEG-4 AVC/H.264 High Profile / Level 4.2 For 2D Video",
       EXS_MPEG4HighProfileLevel4_2_For2DVideo,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -470,6 +508,7 @@ const S_XferNames XferNames[] =
       "MPEG-4 AVC/H.264 High Profile / Level 4.2 For 3D Video",
       EXS_MPEG4HighProfileLevel4_2_For3DVideo,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -481,6 +520,7 @@ const S_XferNames XferNames[] =
       "MPEG-4 AVC/H.264 Stereo High Profile / Level 4.2",
       EXS_MPEG4StereoHighProfileLevel4_2,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -492,6 +532,7 @@ const S_XferNames XferNames[] =
       "HEVC/H.265 Main Profile / Level 5.1",
       EXS_HEVCMainProfileLevel5_1,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
@@ -503,11 +544,24 @@ const S_XferNames XferNames[] =
       "HEVC/H.265 Main 10 Profile / Level 5.1",
       EXS_HEVCMain10ProfileLevel5_1,
       EBO_LittleEndian,
+      EBO_LittleEndian,
       EVT_Explicit,
       EJE_Encapsulated,
       0L, 0L,
       OFTrue,
       OFFalse,
+      ESC_none },
+    // entry #41
+    { UID_PrivateGE_LEI_WithBigEndianPixelDataTransferSyntax,
+      "Private GE Little Endian Implicit with big endian pixel data",
+      EXS_PrivateGE_LEI_WithBigEndianPixelData,
+      EBO_LittleEndian,
+      EBO_BigEndian,
+      EVT_Implicit,
+      EJE_NotEncapsulated,
+      0L, 0L,
+      OFFalse,
+      OFFalse,
       ESC_none }
 };
 
@@ -522,6 +576,7 @@ DcmXfer::DcmXfer(E_TransferSyntax xfer)
     xferName(ERROR_XferName),
     xferSyn(EXS_Unknown),
     byteOrder(EBO_unknown),
+    pixelDataByteOrder(EBO_unknown),
     vrType(EVT_Implicit),
     encapsulated(EJE_NotEncapsulated),
     JPEGProcess8(0L),
@@ -535,17 +590,18 @@ DcmXfer::DcmXfer(E_TransferSyntax xfer)
         i++;
     if ((i < DIM_OF_XferNames) && (XferNames[i].xfer == xfer))
     {
-        xferSyn           = XferNames[i].xfer;
-        xferID            = XferNames[i].xferID;
-        xferName          = XferNames[i].xferName;
-        byteOrder         = XferNames[i].byteOrder;
-        vrType            = XferNames[i].vrType;
-        encapsulated      = XferNames[i].encapsulated;
-        JPEGProcess8      = XferNames[i].JPEGProcess8;
-        JPEGProcess12     = XferNames[i].JPEGProcess12;
-        lossy             = XferNames[i].lossy;
-        retired           = XferNames[i].retired;
-        streamCompression = XferNames[i].streamCompression;
+        xferSyn            = XferNames[i].xfer;
+        xferID             = XferNames[i].xferID;
+        xferName           = XferNames[i].xferName;
+        byteOrder          = XferNames[i].byteOrder;
+        pixelDataByteOrder = XferNames[i].pixelDataByteOrder;
+        vrType             = XferNames[i].vrType;
+        encapsulated       = XferNames[i].encapsulated;
+        JPEGProcess8       = XferNames[i].JPEGProcess8;
+        JPEGProcess12      = XferNames[i].JPEGProcess12;
+        lossy              = XferNames[i].lossy;
+        retired            = XferNames[i].retired;
+        streamCompression  = XferNames[i].streamCompression;
     }
 }
 
@@ -558,6 +614,7 @@ DcmXfer::DcmXfer(const char* xferName_xferID)
     xferName(ERROR_XferName),
     xferSyn(EXS_Unknown),
     byteOrder(EBO_unknown),
+    pixelDataByteOrder(EBO_unknown),
     vrType(EVT_Implicit),
     encapsulated(EJE_NotEncapsulated),
     JPEGProcess8(0L),
@@ -574,17 +631,18 @@ DcmXfer::DcmXfer(const char* xferName_xferID)
             i++;
         if ((i < DIM_OF_XferNames) && (strcmp(XferNames[i].xferID, xname) == 0))
         {
-            xferSyn           = XferNames[i].xfer;
-            xferID            = XferNames[i].xferID;
-            xferName          = XferNames[i].xferName;
-            byteOrder         = XferNames[i].byteOrder;
-            vrType            = XferNames[i].vrType;
-            encapsulated      = XferNames[i].encapsulated;
-            JPEGProcess8      = XferNames[i].JPEGProcess8;
-            JPEGProcess12     = XferNames[i].JPEGProcess12;
-            lossy             = XferNames[i].lossy;
-            retired           = XferNames[i].retired;
-            streamCompression = XferNames[i].streamCompression;
+            xferSyn            = XferNames[i].xfer;
+            xferID             = XferNames[i].xferID;
+            xferName           = XferNames[i].xferName;
+            byteOrder          = XferNames[i].byteOrder;
+            pixelDataByteOrder = XferNames[i].pixelDataByteOrder;
+            vrType             = XferNames[i].vrType;
+            encapsulated       = XferNames[i].encapsulated;
+            JPEGProcess8       = XferNames[i].JPEGProcess8;
+            JPEGProcess12      = XferNames[i].JPEGProcess12;
+            lossy              = XferNames[i].lossy;
+            retired            = XferNames[i].retired;
+            streamCompression  = XferNames[i].streamCompression;
         }
         else
         {
@@ -593,17 +651,18 @@ DcmXfer::DcmXfer(const char* xferName_xferID)
                 i++;
             if ((i < DIM_OF_XferNames) && (strcmp(XferNames[i].xferName, xname) == 0))
             {
-                xferSyn           = XferNames[i].xfer;
-                xferID            = XferNames[i].xferID;
-                xferName          = XferNames[i].xferName;
-                byteOrder         = XferNames[i].byteOrder;
-                vrType            = XferNames[i].vrType;
-                encapsulated      = XferNames[i].encapsulated;
-                JPEGProcess8      = XferNames[i].JPEGProcess8;
-                JPEGProcess12     = XferNames[i].JPEGProcess12;
-                lossy             = XferNames[i].lossy;
-                retired           = XferNames[i].retired;
-                streamCompression = XferNames[i].streamCompression;
+                xferSyn            = XferNames[i].xfer;
+                xferID             = XferNames[i].xferID;
+                xferName           = XferNames[i].xferName;
+                byteOrder          = XferNames[i].byteOrder;
+                pixelDataByteOrder = XferNames[i].pixelDataByteOrder;
+                vrType             = XferNames[i].vrType;
+                encapsulated       = XferNames[i].encapsulated;
+                JPEGProcess8       = XferNames[i].JPEGProcess8;
+                JPEGProcess12      = XferNames[i].JPEGProcess12;
+                lossy              = XferNames[i].lossy;
+                retired            = XferNames[i].retired;
+                streamCompression  = XferNames[i].streamCompression;
             }
         }
     }
@@ -618,6 +677,7 @@ DcmXfer::DcmXfer(const DcmXfer &newXfer)
     xferName(newXfer.xferName),
     xferSyn(newXfer.xferSyn),
     byteOrder(newXfer.byteOrder),
+    pixelDataByteOrder(newXfer.pixelDataByteOrder),
     vrType(newXfer.vrType),
     encapsulated(newXfer.encapsulated),
     JPEGProcess8(newXfer.JPEGProcess8),
@@ -649,29 +709,31 @@ DcmXfer &DcmXfer::operator=(const E_TransferSyntax xfer)
         i++;
     if ((i < DIM_OF_XferNames) && (XferNames[i].xfer == xfer))
     {
-        xferSyn           = XferNames[i].xfer;
-        xferID            = XferNames[i].xferID;
-        xferName          = XferNames[i].xferName;
-        byteOrder         = XferNames[i].byteOrder;
-        vrType            = XferNames[i].vrType;
-        encapsulated      = XferNames[i].encapsulated;
-        JPEGProcess8      = XferNames[i].JPEGProcess8;
-        JPEGProcess12     = XferNames[i].JPEGProcess12;
-        lossy             = XferNames[i].lossy;
-        retired           = XferNames[i].retired;
-        streamCompression = XferNames[i].streamCompression;
+        xferSyn            = XferNames[i].xfer;
+        xferID             = XferNames[i].xferID;
+        xferName           = XferNames[i].xferName;
+        byteOrder          = XferNames[i].byteOrder;
+        pixelDataByteOrder = XferNames[i].pixelDataByteOrder;
+        vrType             = XferNames[i].vrType;
+        encapsulated       = XferNames[i].encapsulated;
+        JPEGProcess8       = XferNames[i].JPEGProcess8;
+        JPEGProcess12      = XferNames[i].JPEGProcess12;
+        lossy              = XferNames[i].lossy;
+        retired            = XferNames[i].retired;
+        streamCompression  = XferNames[i].streamCompression;
     } else {
-        xferSyn           = EXS_Unknown;
-        xferID            = "";
-        xferName          = ERROR_XferName;
-        byteOrder         = EBO_unknown;
-        vrType            = EVT_Implicit;
-        encapsulated      = EJE_NotEncapsulated;
-        JPEGProcess8      = 0L;
-        JPEGProcess12     = 0L;
-        lossy             = OFFalse;
-        retired           = OFFalse;
-        streamCompression = ESC_none;
+        xferSyn            = EXS_Unknown;
+        xferID             = "";
+        xferName           = ERROR_XferName;
+        byteOrder          = EBO_unknown;
+        pixelDataByteOrder = EBO_unknown;
+        vrType             = EVT_Implicit;
+        encapsulated       = EJE_NotEncapsulated;
+        JPEGProcess8       = 0L;
+        JPEGProcess12      = 0L;
+        lossy              = OFFalse;
+        retired            = OFFalse;
+        streamCompression  = ESC_none;
     }
     return *this;
 }
@@ -684,17 +746,18 @@ DcmXfer &DcmXfer::operator=(const DcmXfer &newXfer)
 {
     if (this != &newXfer)
     {
-        xferSyn           = newXfer.xferSyn;
-        xferID            = newXfer.xferID;
-        xferName          = newXfer.xferName;
-        byteOrder         = newXfer.byteOrder;
-        vrType            = newXfer.vrType;
-        encapsulated      = newXfer.encapsulated;
-        JPEGProcess8      = newXfer.JPEGProcess8;
-        JPEGProcess12     = newXfer.JPEGProcess12;
-        lossy             = newXfer.lossy;
-        retired           = newXfer.retired;
-        streamCompression = newXfer.streamCompression;
+        xferSyn            = newXfer.xferSyn;
+        xferID             = newXfer.xferID;
+        xferName           = newXfer.xferName;
+        byteOrder          = newXfer.byteOrder;
+        pixelDataByteOrder = newXfer.pixelDataByteOrder;
+        vrType             = newXfer.vrType;
+        encapsulated       = newXfer.encapsulated;
+        JPEGProcess8       = newXfer.JPEGProcess8;
+        JPEGProcess12      = newXfer.JPEGProcess12;
+        lossy              = newXfer.lossy;
+        retired            = newXfer.retired;
+        streamCompression  = newXfer.streamCompression;
     }
     return *this;
 }
diff --git a/dcmdata/libsrc/mkdeftag.cc b/dcmdata/libsrc/mkdeftag.cc
index fe90c98..78dc180 100644
--- a/dcmdata/libsrc/mkdeftag.cc
+++ b/dcmdata/libsrc/mkdeftag.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2015, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -20,17 +20,6 @@
  */
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
-
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>  /* this includes either winsock.h or winsock2.h */
-#elif defined(HAVE_WINSOCK_H)
-#include <winsock.h>  /* include winsock.h directly i.e. on MacOS */
-#endif
-
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/dcdict.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofstring.h"
@@ -126,17 +115,7 @@ int main(int argc, char* argv[])
     int i = 0;
     FILE* fout = NULL;
 
-#ifdef HAVE_GUSI_H
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-    WSAData winSockData;
-    /* we need at least version 1.1 */
-    WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-    WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+    OFStandard::initializeNetwork();
 
     prepareCmdLineArgs(argc, argv, "mkdeftag");
 
diff --git a/dcmdata/libsrc/mkdictbi.cc b/dcmdata/libsrc/mkdictbi.cc
index 16af4a0..e05e64c 100644
--- a/dcmdata/libsrc/mkdictbi.cc
+++ b/dcmdata/libsrc/mkdictbi.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2015, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -22,18 +22,6 @@
  */
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
-
-
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>  /* this includes either winsock.h or winsock2.h */
-#elif defined(HAVE_WINSOCK_H)
-#include <winsock.h>  /* include winsock.h directly i.e. on MacOS */
-#endif
-
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/dcdict.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofstring.h"
@@ -123,17 +111,7 @@ main(int argc, char* argv[])
     FILE* fout = NULL;
     DcmDictEntry* e = NULL;
 
-#ifdef HAVE_GUSI_H
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-    WSAData winSockData;
-    /* we need at least version 1.1 */
-    WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-    WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+    OFStandard::initializeNetwork();
 
     prepareCmdLineArgs(argc, argv, "mkdictbi");
 
diff --git a/dcmdata/libsrc/vrscan.cc b/dcmdata/libsrc/vrscan.cc
index ebb4bc2..8482568 100644
--- a/dcmdata/libsrc/vrscan.cc
+++ b/dcmdata/libsrc/vrscan.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2010, OFFIS e.V.
+ *  Copyright (C) 2010-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -61,9 +61,8 @@ int vrscan::scan(const OFString& vr, const OFString& value)
 
     if (yylex_init(&scanner))
     {
-        char buf[256];
         DCMDATA_WARN("Error while setting up lexer: "
-                << OFStandard::strerror(errno, buf, sizeof(buf)));
+                << OFStandard::getLastSystemErrorCode().message());
         return 16;
     }
 
diff --git a/dcmdata/tests/CMakeLists.txt b/dcmdata/tests/CMakeLists.txt
index efc8cec..0d7c0d6 100644
--- a/dcmdata/tests/CMakeLists.txt
+++ b/dcmdata/tests/CMakeLists.txt
@@ -1,5 +1,5 @@
 # declare executables
-DCMTK_ADD_EXECUTABLE(dcmdata_tests tests tpread ti2dbmp tchval tpath tvrdatim telemlen tparser tdict tvrds tvrfd tvrpn tvrui tvrol tstrval tspchrs tparent tfilter tvrcomp tmatch)
+DCMTK_ADD_EXECUTABLE(dcmdata_tests tests tpread ti2dbmp tchval tpath tvrdatim telemlen tparser tdict tvrds tvrfd tvrpn tvrui tvrol tstrval tspchrs tparent tfilter tvrcomp tmatch tnewdcme tgenuid)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(dcmdata_tests i2d dcmdata oflog ofstd)
diff --git a/dcmdata/tests/Makefile.dep b/dcmdata/tests/Makefile.dep
index e980384..267774f 100644
--- a/dcmdata/tests/Makefile.dep
+++ b/dcmdata/tests/Makefile.dep
@@ -18,6 +18,7 @@ tchval.o: tchval.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -30,7 +31,9 @@ tchval.o: tchval.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -56,8 +59,6 @@ tchval.o: tchval.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \
  ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -102,6 +103,7 @@ tdict.o: tdict.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -114,7 +116,9 @@ tdict.o: tdict.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -149,6 +153,7 @@ telemlen.o: telemlen.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -161,7 +166,9 @@ telemlen.o: telemlen.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -187,8 +194,6 @@ telemlen.o: telemlen.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \
  ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -232,6 +237,7 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -244,7 +250,9 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -275,6 +283,7 @@ tfilter.o: tfilter.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -287,7 +296,9 @@ tfilter.o: tfilter.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -309,6 +320,52 @@ tfilter.o: tfilter.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dcstack.h \
  ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcdatset.h \
  ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dcpcache.h
+tgenuid.o: tgenuid.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../../ofstd/include/dcmtk/ofstd/oftest.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h
 ti2dbmp.o: ti2dbmp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
@@ -329,6 +386,7 @@ ti2dbmp.o: ti2dbmp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -341,7 +399,9 @@ ti2dbmp.o: ti2dbmp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -378,6 +438,7 @@ tmatch.o: tmatch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -390,7 +451,9 @@ tmatch.o: tmatch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -404,6 +467,61 @@ tmatch.o: tmatch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/dcmatch.h
+tnewdcme.o: tnewdcme.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../../ofstd/include/dcmtk/ofstd/oftest.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dctypes.h \
+ ../include/dcmtk/dcmdata/dcobject.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
+ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
+ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
+ ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h \
+ ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcdict.h \
+ ../include/dcmtk/dcmdata/dchashdi.h ../include/dcmtk/dcmdata/dcdicent.h
 tparent.o: tparent.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
@@ -424,6 +542,7 @@ tparent.o: tparent.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -436,7 +555,9 @@ tparent.o: tparent.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -462,8 +583,6 @@ tparent.o: tparent.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \
  ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -508,6 +627,7 @@ tparser.o: tparser.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -520,7 +640,9 @@ tparser.o: tparser.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -547,8 +669,6 @@ tparser.o: tparser.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \
  ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -593,6 +713,7 @@ tpath.o: tpath.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -605,7 +726,9 @@ tpath.o: tpath.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -631,8 +754,6 @@ tpath.o: tpath.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \
  ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -676,6 +797,7 @@ tpread.o: tpread.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -688,7 +810,9 @@ tpread.o: tpread.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -714,8 +838,6 @@ tpread.o: tpread.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \
  ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \
@@ -760,6 +882,7 @@ tspchrs.o: tspchrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -772,7 +895,9 @@ tspchrs.o: tspchrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -785,9 +910,6 @@ tspchrs.o: tspchrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
  ../include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../include/dcmtk/dcmdata/dctypes.h
 tstrval.o: tstrval.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -810,6 +932,7 @@ tstrval.o: tstrval.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -822,7 +945,9 @@ tstrval.o: tstrval.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -859,6 +984,7 @@ tvrcomp.o: tvrcomp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcvras.h ../include/dcmtk/dcmdata/dcbytstr.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -872,7 +998,9 @@ tvrcomp.o: tvrcomp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -904,11 +1032,12 @@ tvrcomp.o: tvrcomp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcpcache.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmdata/dcvrat.h ../include/dcmtk/dcmdata/dcvrfd.h \
  ../include/dcmtk/dcmdata/dcvrfl.h ../include/dcmtk/dcmdata/dcvrobow.h \
- ../include/dcmtk/dcmdata/dcvrsl.h ../include/dcmtk/dcmdata/dcvrss.h \
- ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcvrus.h \
- ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcpxitem.h \
- ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcvrpobw.h \
- ../include/dcmtk/dcmdata/dcovlay.h ../include/dcmtk/dcmdata/dcpixel.h
+ ../include/dcmtk/dcmdata/dcvrpobw.h ../include/dcmtk/dcmdata/dcvrsl.h \
+ ../include/dcmtk/dcmdata/dcvrss.h ../include/dcmtk/dcmdata/dcvrul.h \
+ ../include/dcmtk/dcmdata/dcvrus.h ../include/dcmtk/dcmdata/dcdeftag.h \
+ ../include/dcmtk/dcmdata/dcpxitem.h ../include/dcmtk/dcmdata/dcofsetl.h \
+ ../include/dcmtk/dcmdata/dcpixel.h ../include/dcmtk/dcmdata/dcovlay.h \
+ ../include/dcmtk/dcmdata/dcpixseq.h
 tvrdatim.o: tvrdatim.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
@@ -929,6 +1058,7 @@ tvrdatim.o: tvrdatim.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -941,7 +1071,9 @@ tvrdatim.o: tvrdatim.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -985,6 +1117,7 @@ tvrds.o: tvrds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -997,7 +1130,9 @@ tvrds.o: tvrds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1036,6 +1171,7 @@ tvrfd.o: tvrfd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1048,7 +1184,9 @@ tvrfd.o: tvrfd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1086,6 +1224,7 @@ tvrol.o: tvrol.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1098,7 +1237,9 @@ tvrol.o: tvrol.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1138,6 +1279,7 @@ tvrpn.o: tvrpn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1150,7 +1292,9 @@ tvrpn.o: tvrpn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1188,6 +1332,7 @@ tvrui.o: tvrui.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1200,7 +1345,9 @@ tvrui.o: tvrui.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
diff --git a/dcmdata/tests/Makefile.in b/dcmdata/tests/Makefile.in
index 5a6d732..247d6cd 100644
--- a/dcmdata/tests/Makefile.in
+++ b/dcmdata/tests/Makefile.in
@@ -18,12 +18,12 @@ oflogdir = $(top_srcdir)/../oflog
 LOCALINCLUDES = -I$(top_srcdir)/include -I$(ofstddir)/include -I$(oflogdir)/include
 LIBDIRS = -L$(top_srcdir)/libsrc -L$(top_srcdir)/libi2d -L$(ofstddir)/libsrc \
 	-L$(oflogdir)/libsrc
-LOCALLIBS = -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS)
+LOCALLIBS = -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 I2DLIBS = -li2d
 
 objs = tests.o tpread.o ti2dbmp.o tchval.o tpath.o tvrdatim.o telemlen.o tparser.o \
 	tdict.o tvrds.o tvrfd.o tvrui.o tvrol.o tstrval.o tspchrs.o tvrpn.o \
-	tparent.o tfilter.o tvrcomp.o tmatch.o
+	tparent.o tfilter.o tvrcomp.o tmatch.o tnewdcme.o tgenuid.o
 
 progs = tests
 
diff --git a/dcmdata/tests/tests.cc b/dcmdata/tests/tests.cc
index 57470f3..8c849ba 100644
--- a/dcmdata/tests/tests.cc
+++ b/dcmdata/tests/tests.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2011-2016 OFFIS e.V.
+ *  Copyright (C) 2011-2017 OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -104,4 +104,6 @@ OFTEST_REGISTER(dcmdata_specificCharacterSet_3);
 OFTEST_REGISTER(dcmdata_specificCharacterSet_4);
 OFTEST_REGISTER(dcmdata_attribute_filter);
 OFTEST_REGISTER(dcmdata_attribute_matching);
+OFTEST_REGISTER(dcmdata_newDicomElementPrivate);
+OFTEST_REGISTER(dcmdata_generateUniqueIdentifier);
 OFTEST_MAIN("dcmdata")
diff --git a/dcmdata/tests/tgenuid.cc b/dcmdata/tests/tgenuid.cc
new file mode 100644
index 0000000..9830dbf
--- /dev/null
+++ b/dcmdata/tests/tgenuid.cc
@@ -0,0 +1,56 @@
+/*
+ *
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Marco Eichelberg
+ *
+ *  Purpose: test program for function dcmGenerateUniqueIdentifier
+ *
+ */
+
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+#include "dcmtk/ofstd/oftest.h"
+#include "dcmtk/dcmdata/dcuid.h"
+
+
+OFTEST(dcmdata_generateUniqueIdentifier)
+{
+  // test generation of UIDs. We generate 10000 UIDs in quick
+  // succession and check if they are pair-wise different.
+  // This will also catch any application error during UID generation.
+
+  char uid[65];
+  OFString previousuid;
+
+  // This variable name will be printed on the console if the test fails.
+  // In fact a generated UID is not unique if this variable is false!
+  OFBool generated_uid_is_not_unique;
+
+  for (size_t i = 0; i < 10000; ++i)
+  {
+     // generate UID
+     dcmGenerateUniqueIdentifier(uid);
+
+     // compare with the previously generated UID, should be different.
+     generated_uid_is_not_unique = (previousuid != uid);
+     OFCHECK(generated_uid_is_not_unique);
+     previousuid = uid;
+
+     // if we have found a non-unique UID, the test has failed.
+     // Break out of the loop.
+     if (! generated_uid_is_not_unique) break;
+  }
+}
diff --git a/dcmdata/tests/tnewdcme.cc b/dcmdata/tests/tnewdcme.cc
new file mode 100644
index 0000000..a5aad1d
--- /dev/null
+++ b/dcmdata/tests/tnewdcme.cc
@@ -0,0 +1,101 @@
+/*
+ *
+ *  Copyright (C) 2017, Open Connections GmbH
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation are maintained by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Tests for DcmItem's newDicomElement() helper methods
+ *
+ */
+
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+#include "dcmtk/ofstd/oftest.h"
+#include "dcmtk/dcmdata/dcitem.h"
+#include "dcmtk/dcmdata/dcelem.h"
+#include "dcmtk/dcmdata/dcitem.h"
+#include "dcmtk/dcmdata/dcdict.h"
+#include "dcmtk/dcmdata/dcdicent.h"
+
+// Definitions of private tag info we use in this test
+
+#define PRIVATE_CREATOR_NAME "John Doe Testing Corporation"
+#define PRIVATE_ELEMENT_STRINGELEM 0x0029, 0x1000
+#define PRIVATE_ELEMENT_NOTINDICT 0x0029, 0x1111
+#define PRIVATE_STRING_VALUE "Test Value"
+
+/** Register private tag(s) in runtime dictionary
+ */
+void registerPrivateTag()
+
+{
+  DcmDataDictionary &dict = dcmDataDict.wrlock();
+  dict.addEntry(new DcmDictEntry(PRIVATE_ELEMENT_STRINGELEM, EVR_LO, "StringAttributeForTesting", 1, 1, "private", OFTrue, PRIVATE_CREATOR_NAME));
+  dcmDataDict.unlock();
+
+}
+
+
+OFTEST(dcmdata_newDicomElementPrivate)
+{
+  // Pre-register the private tags we want to use for this test in the dictionary
+  registerPrivateTag();
+
+  // Test cases when constructing a known, private element:
+
+  // API 1: Construct DICOM element and get it as a return value.
+  DcmElement *elem = DcmItem::newDicomElement(DcmTagKey(PRIVATE_ELEMENT_STRINGELEM), PRIVATE_CREATOR_NAME);
+  // Check whether creation as well as tag and value assignment are correct
+  OFCHECK(elem);
+  OFCHECK(elem->putOFStringArray(PRIVATE_STRING_VALUE).good());
+  OFCHECK(elem->getTag().getXTag() == DcmTagKey(PRIVATE_ELEMENT_STRINGELEM));
+  OFCHECK(elem->getVR() == EVR_LO);
+  OFCHECK(elem->putOFStringArray(PRIVATE_STRING_VALUE).good());
+  char *charVal = NULL;
+  OFCHECK(elem->getString(charVal).good());
+  OFCHECK(OFString(charVal) == PRIVATE_STRING_VALUE);
+  charVal = NULL;
+
+  // API 2: Construct DICOM element and get it as parameter output value
+  DcmElement* elem2 = NULL;
+  // Check whether creation as well as tag and value assignment are correct
+  OFCHECK(DcmItem::newDicomElement(elem2, DcmTagKey(PRIVATE_ELEMENT_STRINGELEM), PRIVATE_CREATOR_NAME).good());
+  OFCHECK(elem2->getTag().getXTag() == DcmTagKey(PRIVATE_ELEMENT_STRINGELEM));
+  OFCHECK(elem->getVR() == EVR_LO);
+  OFCHECK(elem2->putOFStringArray(PRIVATE_STRING_VALUE).good());
+  OFCHECK(elem2->getString(charVal).good());
+  OFCHECK(OFString(charVal) == PRIVATE_STRING_VALUE);
+
+  delete elem;
+  delete elem2;
+
+  // Test cases when constructing an unknown, private element resulting in creation
+  // with VR "EVR_UNKNOWN":
+
+  // API 1
+  DcmElement *elem_un = NULL;
+  elem_un = DcmItem::newDicomElement(DcmTagKey(PRIVATE_ELEMENT_NOTINDICT), PRIVATE_CREATOR_NAME);
+  OFCHECK(elem_un);
+  OFCHECK(elem_un->getTag().getXTag() == DcmTagKey(PRIVATE_ELEMENT_NOTINDICT));
+  OFCHECK(elem_un->getVR() == EVR_UNKNOWN);
+  delete elem_un;
+
+  // API 2
+  elem_un = NULL;
+  OFCHECK(DcmItem::newDicomElement(elem_un, DcmTagKey(PRIVATE_ELEMENT_NOTINDICT), PRIVATE_CREATOR_NAME).good());
+  OFCHECK(elem_un);
+  OFCHECK(elem_un->getVR() == EVR_UNKNOWN);
+  delete elem_un;
+}
diff --git a/dcmdata/tests/tparent.cc b/dcmdata/tests/tparent.cc
index ddf3b3c..a202da4 100644
--- a/dcmdata/tests/tparent.cc
+++ b/dcmdata/tests/tparent.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2012, OFFIS e.V.
+ *  Copyright (C) 2012-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -143,7 +143,7 @@ OFTEST(dcmdata_elementParent)
     OFCHECK(item->getParent() == seq);
     testParents(ff);
 
-    elem = new DcmLongString(DCM_OtherPatientIDs);
+    elem = new DcmLongString(DCM_RETIRED_OtherPatientIDs);
     OFCHECK(elem->getParent() == NULL);
     cond = item->insert(elem);
     OFCHECK(cond.good());
@@ -157,7 +157,7 @@ OFTEST(dcmdata_elementParent)
     OFCHECK(item->getParent() == seq);
     testParents(ff);
 
-    elem = new DcmLongString(DCM_OtherPatientIDs);
+    elem = new DcmLongString(DCM_RETIRED_OtherPatientIDs);
     OFCHECK(elem->getParent() == NULL);
     cond = item->insert(elem);
     OFCHECK(cond.good());
@@ -172,7 +172,7 @@ OFTEST(dcmdata_elementParent)
     testParents(ff);
 
     elem = item->remove(1);
-    OFCHECK_EQUAL(elem->getTag(), DCM_OtherPatientIDs);
+    OFCHECK_EQUAL(elem->getTag(), DCM_RETIRED_OtherPatientIDs);
     OFCHECK(elem->getParent() == NULL);
     delete elem;
     testParents(ff);
diff --git a/dcmdata/tests/tpath.cc b/dcmdata/tests/tpath.cc
index ef59875..5b18a92 100644
--- a/dcmdata/tests/tpath.cc
+++ b/dcmdata/tests/tpath.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2008-2011, OFFIS e.V.
+ *  Copyright (C) 2008-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -152,11 +152,6 @@ static OFCondition testPathInsertionsWithWildcard(const OFString& path,
 
 OFTEST(dcmdata_pathAccess)
 {
-  // TODO TODO TODO TODO TODO TODO TODO TODO
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
 
   /* make sure data dictionary is loaded */
   if (!dcmDataDict.isDictionaryLoaded())
diff --git a/dcmdata/tests/tpread.cc b/dcmdata/tests/tpread.cc
index 9e4971f..4548a03 100644
--- a/dcmdata/tests/tpread.cc
+++ b/dcmdata/tests/tpread.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2011, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,10 +26,6 @@
 #define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/ofstd/oftest.h"
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/dcuid.h"       /* for dcmtk version name */
@@ -315,11 +311,6 @@ static OFCondition randomRead(DcmDataset *dset, unsigned char *buffer)
 
 OFTEST(dcmdata_partialElementAccess)
 {
-  // TODO TODO TODO TODO???
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
 
     /* make sure data dictionary is loaded */
     if (!dcmDataDict.isDictionaryLoaded())
diff --git a/dcmdata/tests/tvrcomp.cc b/dcmdata/tests/tvrcomp.cc
index e14a6a6..a430c1e 100644
--- a/dcmdata/tests/tvrcomp.cc
+++ b/dcmdata/tests/tvrcomp.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015, OFFIS e.V.
+ *  Copyright (C) 2015-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -11,11 +11,11 @@
  *    D-26121 Oldenburg, Germany
  *
  *
- *  Module:  ofstd
+ *  Module:  dcmdata
  *
  *  Author:  Michael Onken
  *
- *  Purpose: tests for compare() as well as < and > operators of VR classes
+ *  Purpose: tests for compare() operator of VR classes
  *
  */
 
@@ -47,15 +47,18 @@
 #include "dcmtk/dcmdata/dcvrfd.h"
 #include "dcmtk/dcmdata/dcvrfl.h"
 #include "dcmtk/dcmdata/dcvrobow.h"
+#include "dcmtk/dcmdata/dcvrpobw.h"
 #include "dcmtk/dcmdata/dcvrsl.h"
 #include "dcmtk/dcmdata/dcvrss.h"
 #include "dcmtk/dcmdata/dcvrul.h"
 #include "dcmtk/dcmdata/dcvrus.h"
 #include "dcmtk/dcmdata/dcdeftag.h"
 #include "dcmtk/dcmdata/dcpxitem.h"
+#include "dcmtk/dcmdata/dcpixel.h"
 #include "dcmtk/dcmdata/dcvrpobw.h"
 #include "dcmtk/dcmdata/dcovlay.h"
 #include "dcmtk/dcmdata/dcpixel.h"
+#include "dcmtk/dcmdata/dcpixseq.h"
 
 
 template <typename ByteStringType>
@@ -265,13 +268,12 @@ static void checkFloatingPointSingle()
   OFCHECK(obj2 >= obj1);
 }
 
-template <typename BinaryOBOWType>
-static void checkOtherByteOtherWord(const DcmTagKey& tagKey)
+static void checkOtherByteOtherWord()
 {
   // Start with equal values
-  BinaryOBOWType obj1(tagKey);
-  BinaryOBOWType obj2(tagKey);
-  BinaryOBOWType objOtherTag(DCM_UndefinedTagKey);
+  DcmOtherByteOtherWord obj1(DCM_PixelData);
+  DcmOtherByteOtherWord obj2(DCM_PixelData);
+  DcmOtherByteOtherWord objOtherTag(DCM_UndefinedTagKey);
 
   // Check equality
   Uint8 testData[1] = {100};
@@ -320,6 +322,284 @@ static void checkOtherByteOtherWord(const DcmTagKey& tagKey)
 }
 
 
+static void checkPolymorphOtherByteOtherWord()
+{
+  // Start comparing OB with OB
+  DcmPolymorphOBOW obj1_ob(DCM_PixelData);
+  DcmPolymorphOBOW obj2_ob(DCM_PixelData);
+  obj1_ob.setVR(EVR_OB);
+  obj2_ob.setVR(EVR_OB);
+
+  OFCHECK(obj1_ob.compare(obj2_ob) == 0);
+  OFCHECK(obj1_ob >= obj2_ob);
+  OFCHECK(obj1_ob <= obj2_ob);
+  OFCHECK(obj2_ob >= obj1_ob);
+  OFCHECK(obj2_ob <= obj2_ob);
+
+  // Compare with same values (still equal)
+  Uint8 testData_100[1] = {100};
+  OFCHECK(obj1_ob.putUint8Array(testData_100, 1).good());
+  OFCHECK(obj2_ob.putUint8Array(testData_100, 1).good());
+  OFCHECK(obj1_ob.compare(obj2_ob) == 0);
+  OFCHECK(obj1_ob >= obj2_ob);
+  OFCHECK(obj1_ob <= obj2_ob);
+  OFCHECK(obj2_ob >= obj1_ob);
+  OFCHECK(obj2_ob <= obj2_ob);
+  OFCHECK(!(obj1_ob > obj2_ob));
+  OFCHECK(!(obj1_ob < obj2_ob));
+
+
+  // Compare with different values (single value, obj1 < obj2)
+  Uint8 testData_200[1] = {200};
+  OFCHECK(obj1_ob.putUint8Array(testData_100, 1).good());
+  OFCHECK(obj2_ob.putUint8Array(testData_200, 1).good());
+  OFCHECK(obj1_ob.compare(obj2_ob) == -1);
+  OFCHECK(obj1_ob < obj2_ob);
+  OFCHECK(obj1_ob <= obj2_ob);
+
+  // Compare with different number of values (less values, i.e. obj1, means smaller)
+  Uint8 testData_100_200[2] = {100,200};
+  OFCHECK(obj1_ob.putUint8Array(testData_100, 1).good());
+  OFCHECK(obj2_ob.putUint8Array(testData_100_200, 2).good());
+  OFCHECK(obj1_ob.compare(obj2_ob) < 0);
+  OFCHECK(obj1_ob < obj2_ob);
+  OFCHECK(obj1_ob <= obj2_ob);
+
+  // Compare values (same multiple values means equal)
+  OFCHECK(obj1_ob.putUint8Array(testData_100_200, 2).good());
+  OFCHECK(obj2_ob.putUint8Array(testData_100_200, 2).good());
+  OFCHECK(obj1_ob.compare(obj2_ob) == 0);
+  OFCHECK(!(obj1_ob < obj2_ob));
+  OFCHECK(!(obj2_ob < obj2_ob));
+  OFCHECK(obj1_ob <= obj2_ob);
+
+  // Compare values (same number of values but different values means not equal, obj1 < obj2)
+  Uint8 testData_100_201[2] = {100,201};
+  OFCHECK(obj1_ob.putUint8Array(testData_100_200, 2).good());
+  OFCHECK(obj2_ob.putUint8Array(testData_100_201, 2).good());
+  OFCHECK(obj1_ob.compare(obj2_ob) == -1);
+  OFCHECK(obj1_ob < obj2_ob);
+  OFCHECK(!(obj2_ob < obj2_ob));
+  OFCHECK(obj1_ob <= obj2_ob);
+}
+
+
+static void checkDcmPixelDataNative()
+{
+  // Testing DcmPixelData having uncompressed pixel data.
+  // The tests here finally boil down in the usage of
+  // DcmPolymorphOBOW::compare() which is called within
+  // DcmPixelData::compare()
+
+  // -------------------------------
+  // Start with comparing OB with OB
+  // -------------------------------
+
+  DcmPixelData obj1_ob(DCM_PixelData);
+  DcmPixelData obj2_ob(DCM_PixelData);
+  obj1_ob.setVR(EVR_OB);
+  obj2_ob.setVR(EVR_OB);
+
+  // Compare empty
+  OFCHECK(obj1_ob.compare(obj2_ob) == 0);
+  OFCHECK(obj1_ob >= obj2_ob);
+  OFCHECK(obj2_ob >= obj1_ob);
+
+  // Compare with same values (still equal), uncompressed
+  Uint8 testData_100[1] = {100};
+  OFCHECK(obj1_ob.putUint8Array(testData_100, 1).good());
+  OFCHECK(obj2_ob.putUint8Array(testData_100, 1).good());
+  OFCHECK(obj1_ob.compare(obj2_ob) == 0);
+  OFCHECK(obj1_ob >= obj2_ob);
+  OFCHECK(obj2_ob >= obj1_ob);
+  OFCHECK(!(obj1_ob > obj2_ob));
+  OFCHECK(!(obj1_ob < obj2_ob));
+
+  // Compare with different values (single value, obj1 < obj2)
+  Uint8 testData_200[1] = {200};
+  OFCHECK(obj1_ob.putUint8Array(testData_100, 1).good());
+  OFCHECK(obj2_ob.putUint8Array(testData_200, 1).good());
+  OFCHECK(obj1_ob.compare(obj2_ob) == -1);
+  OFCHECK(obj1_ob < obj2_ob);
+  OFCHECK(obj1_ob <= obj2_ob);
+
+  // Compare with different number of values (less values, i.e. obj1, means smaller)
+  Uint8 testData_100_200[2] = {100,200};
+  OFCHECK(obj1_ob.putUint8Array(testData_100, 1).good());
+  OFCHECK(obj2_ob.putUint8Array(testData_100_200, 2).good());
+  OFCHECK(obj1_ob.compare(obj2_ob) < 0);
+  OFCHECK(obj1_ob < obj2_ob);
+  OFCHECK(obj1_ob <= obj2_ob);
+
+  // Compare values (same multiple values means equal)
+  OFCHECK(obj1_ob.putUint8Array(testData_100_200, 2).good());
+  OFCHECK(obj2_ob.putUint8Array(testData_100_200, 2).good());
+  OFCHECK(obj1_ob.compare(obj2_ob) == 0);
+  OFCHECK(!(obj1_ob < obj2_ob));
+  OFCHECK(!(obj2_ob < obj2_ob));
+  OFCHECK(obj1_ob <= obj2_ob);
+
+  // Compare values (same number of values but different values means not equal, obj1 < obj2)
+  Uint8 testData_100_201[2] = {100,201};
+  OFCHECK(obj1_ob.putUint8Array(testData_100_200, 2).good());
+  OFCHECK(obj2_ob.putUint8Array(testData_100_201, 2).good());
+  OFCHECK(obj1_ob.compare(obj2_ob) == -1);
+  OFCHECK(obj1_ob < obj2_ob);
+  OFCHECK(!(obj2_ob < obj2_ob));
+  OFCHECK(obj1_ob <= obj2_ob);
+
+  // -------------------------------
+  // Continue comparing OW with OW
+  // -------------------------------
+
+  DcmPixelData obj1_ow(DCM_PixelData);
+  DcmPixelData obj2_ow(DCM_PixelData);
+  obj1_ow.setVR(EVR_OW);
+  obj2_ow.setVR(EVR_OW);
+
+  // Compare empty (equal)
+  OFCHECK(obj1_ow.compare(obj2_ow) == 0);
+  OFCHECK(obj1_ow >= obj2_ow);
+  OFCHECK(obj2_ow >= obj1_ow);
+
+  // Compare with same values (still equal), uncompressed
+  Uint16 testData_1000[1] = {0x1000};
+  OFCHECK(obj1_ow.putUint16Array(testData_1000, 1).good());
+  OFCHECK(obj2_ow.putUint16Array(testData_1000, 1).good());
+  OFCHECK(obj1_ow.compare(obj2_ow) == 0);
+  OFCHECK(obj1_ow >= obj2_ow);
+  OFCHECK(obj2_ow >= obj1_ow);
+
+  // Compare with different values (single value)
+  Uint16 testData_2000[1] = {0x2000};
+  OFCHECK(obj1_ow.putUint16Array(testData_1000, 1).good());
+  OFCHECK(obj2_ow.putUint16Array(testData_2000, 1).good());
+  OFCHECK(obj1_ow.compare(obj2_ow) == -1);
+  OFCHECK(obj1_ow < obj2_ow);
+
+  // Compare with different number of values (less values, i.e. obj1, means smaller)
+  Uint16 testData_1000_2000[2] = {0x1000,0x2000};
+  OFCHECK(obj1_ow.putUint16Array(testData_1000, 1).good());
+  OFCHECK(obj2_ow.putUint16Array(testData_1000_2000, 2).good());
+  OFCHECK(obj1_ow.compare(obj2_ow) < 0);
+  OFCHECK(obj1_ow < obj2_ow);
+
+  // Compare values (same multiple values means equal)
+  OFCHECK(obj1_ow.putUint16Array(testData_1000_2000, 2).good());
+  OFCHECK(obj2_ow.putUint16Array(testData_1000_2000, 2).good());
+  OFCHECK(obj1_ow.compare(obj2_ow) == 0);
+  OFCHECK(!(obj1_ow < obj2_ow));
+  OFCHECK(!(obj2_ow < obj2_ow));
+  OFCHECK(obj1_ow <= obj2_ow);
+
+  // Compare values (same number of values but different values means not equal, obj1 < obj2)
+  Uint16 testData_1000_2001[2] = {0x1000,0x2001};
+  OFCHECK(obj1_ow.putUint16Array(testData_1000_2000, 2).good());
+  OFCHECK(obj2_ow.putUint16Array(testData_1000_2001, 2).good());
+  OFCHECK(obj1_ow.compare(obj2_ow) == -1);
+  OFCHECK(obj1_ow < obj2_ow);
+  OFCHECK(!(obj2_ow < obj2_ow));
+  OFCHECK(obj1_ow <= obj2_ow);
+
+
+  // Continue with comparison of OB with OW
+  Uint8 testData8_10[1] = {0x10};
+  Uint16 testData16_0010[1] = {0x0010};
+  obj1_ob.putUint8Array(testData8_10, 1);
+  obj2_ow.putUint16Array(testData16_0010, 1);
+  // OB and OW with same value should be equal
+  // (comparison takes place bytewise in little endian)
+  OFCHECK(obj1_ob.compare(obj2_ow) == 0);
+  OFCHECK(obj1_ob >= obj2_ow);
+  OFCHECK(obj2_ow >= obj1_ob);
+
+  // Compare with different values
+  Uint16 testData16_0011[1] = {0x0011};
+  OFCHECK(obj1_ob.putUint8Array(testData8_10, 1).good());
+  OFCHECK(obj2_ow.putUint16Array(testData16_0011, 1).good());
+  OFCHECK(obj1_ob.compare(obj2_ow) < 0);
+  OFCHECK(obj1_ob < obj2_ow);
+
+  // Compare with different number of values (less values, i.e. obj1, means smaller)
+  Uint16 testData16_0010_0020[2] = {0x0010,0x0020};
+  OFCHECK(obj1_ob.putUint8Array(testData8_10, 1).good());
+  OFCHECK(obj2_ow.putUint16Array(testData16_0010_0020, 2).good());
+  OFCHECK(obj1_ow.compare(obj2_ow) < 0);
+  OFCHECK(obj1_ow < obj2_ow);
+}
+
+
+static void checkDcmPixelDataEncapsulatedOB()
+{
+  DcmPixelData obj1_ob(DCM_PixelData);
+  DcmPixelData obj2_ob(DCM_PixelData);
+  obj1_ob.setVR(EVR_OB);
+  obj2_ob.setVR(EVR_OB);
+  Uint8 testData8_1010[2] = {0x10,0x10};
+
+  // (Compare empty already om checkDcmPixelDataNative())
+
+  // --------------------------------------------
+  // Compare with same current representation
+  // --------------------------------------------
+
+  DcmPixelSequence *pixseq1 = new DcmPixelSequence(DCM_PixelData);
+  OFCHECK(pixseq1 != NULL);
+  DcmOffsetList offsetList;
+  DcmPixelItem *offsetItem = new DcmPixelItem(DCM_PixelItemTag);
+  OFCHECK(offsetItem != NULL);
+  // First item is always offset table
+  OFCHECK(pixseq1->insert(offsetItem).good());
+  OFCHECK(pixseq1->storeCompressedFrame(offsetList, testData8_1010, 2, 0).good());
+  obj1_ob.putOriginalRepresentation(EXS_JPEGProcess14SV1, NULL, pixseq1);
+
+  // Compare objects with two equal single frames
+  DcmPixelSequence *pixseq2 = new DcmPixelSequence(DCM_PixelData);
+  OFCHECK(pixseq2 != NULL);
+  offsetItem = new DcmPixelItem(DCM_PixelItemTag);
+  OFCHECK(offsetItem != NULL);
+  OFCHECK(pixseq2->insert(offsetItem).good());
+  OFCHECK(pixseq2->storeCompressedFrame(offsetList, testData8_1010, 2, 0).good());
+  obj2_ob.putOriginalRepresentation(EXS_JPEGProcess14SV1, NULL, pixseq2);
+  OFCHECK(obj1_ob.compare(obj2_ob) == 0);
+  OFCHECK(obj1_ob >= obj2_ob);
+
+  // Compare object with single frame with one with no frame
+  DcmPixelItem* remove = NULL;
+  OFCHECK(pixseq2->remove(remove, 1).good()); // remove frame 1
+  OFCHECK(obj1_ob.compare(obj2_ob) > 0 );
+
+  // Compare object with single frame, and with two frames
+  OFCHECK(pixseq2->insert(remove, 1).good()); // insert frame 1 back in again
+  OFCHECK(pixseq2->storeCompressedFrame(offsetList, testData8_1010, 2, 0).good());
+  OFCHECK(obj1_ob.compare(obj2_ob) < 0); //1 frames < 2 frames
+
+  // Compare objects, both having two frames, with the second frame being different
+  Uint8 testData8_0505[2] = {0x05,0x05};
+  OFCHECK(pixseq1->storeCompressedFrame(offsetList, testData8_0505, 2, 0).good());
+  OFCHECK(obj1_ob.compare(obj2_ob) < 0);
+
+  // --------------------------------------------
+  // Compare with different current representation
+  // --------------------------------------------
+
+  DcmPixelData obj3_ob(DCM_PixelData);
+  obj3_ob.setVR(EVR_OB);
+  DcmPixelSequence *pixseq3 = new DcmPixelSequence(DCM_PixelData);
+  OFCHECK(pixseq3 != NULL);
+  offsetItem = new DcmPixelItem(DCM_PixelItemTag);
+  OFCHECK(offsetItem != NULL);
+  OFCHECK(pixseq3->insert(offsetItem).good());
+  // Add same data as in pixseq1
+  OFCHECK(pixseq3->storeCompressedFrame(offsetList, testData8_1010, 2, 0).good());
+  OFCHECK(pixseq3->storeCompressedFrame(offsetList, testData8_0505, 2, 0).good());
+  // But insert and pretend that is RLE
+  obj3_ob.putOriginalRepresentation(EXS_RLELossless, NULL, pixseq3);
+  // compare JPEG (pixseq1), with RLE (pixseq3)
+  OFCHECK(obj1_ob.compare(obj3_ob) == 1); // different current representation returns 1
+}
+
+
 static void checkSignedLong()
 {
   // Start with equal values
@@ -614,13 +894,14 @@ OFTEST(dcmdata_VRCompare)
   checkByteString<DcmPersonName>(DCM_OtherPatientNames);
   checkByteString<DcmShortText>(DCM_RTPlanDescription);
   checkByteString<DcmUnlimitedText>(DCM_RetrieveURL);
+  // Check the rest
   checkAttributeTags();
   checkFloatingPointDouble();
   checkFloatingPointSingle();
-  checkOtherByteOtherWord<DcmPixelItem>(DCM_PixelData);
-  checkOtherByteOtherWord<DcmPolymorphOBOW>(DCM_PixelData);
-  checkOtherByteOtherWord<DcmOverlayData>(DCM_OverlayData);
-  checkOtherByteOtherWord<DcmPixelData>(DCM_PixelData);
+  checkOtherByteOtherWord();
+  checkPolymorphOtherByteOtherWord();
+  checkDcmPixelDataNative();
+  checkDcmPixelDataEncapsulatedOB();
   checkSignedLong();
   checkSignedShort();
   checkUnsignedLong();
diff --git a/dcmfg/CMakeLists.txt b/dcmfg/CMakeLists.txt
index 48559a4..725d791 100644
--- a/dcmfg/CMakeLists.txt
+++ b/dcmfg/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmfg)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmfg_SOURCE_DIR}/include  ${dcmiod_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${ZLIB_INCDIR})
+INCLUDE_DIRECTORIES("${dcmfg_SOURCE_DIR}/include"  "${dcmiod_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" ${ZLIB_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc include)
diff --git a/dcmfg/include/CMakeLists.txt b/dcmfg/include/CMakeLists.txt
index 516fa22..5227b72 100644
--- a/dcmfg/include/CMakeLists.txt
+++ b/dcmfg/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmfg DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmfg DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmfg/include/dcmtk/dcmfg/fgrealworldvaluemapping.h b/dcmfg/include/dcmtk/dcmfg/fgrealworldvaluemapping.h
index 0465b53..27545f9 100644
--- a/dcmfg/include/dcmtk/dcmfg/fgrealworldvaluemapping.h
+++ b/dcmfg/include/dcmtk/dcmfg/fgrealworldvaluemapping.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, Open Connections GmbH
+ *  Copyright (C) 2015-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -308,13 +308,13 @@ public:
   /** Set Real World Value First Value Mapped
    *  @param  value Value to be set. If Pixel Representation is -1 (signed
    *          pixel data) value  must be -2^15  < value < 2^15-1. Otherwise use
-   *          setRealWorldValueFirstValueMappedUnSigned().
+   *          setRealWorldValueFirstValueMappedUnsigned().
    *  @param  checkValue Check 'value'. Not evaluated (here for consistency
    *          with other setter functions).
    *  @return EC_Normal if successful, an error code otherwise
    */
-  virtual OFCondition setRealWorldValueFirstValueMappeSigned(const Sint16 &value,
-                                                             const OFBool checkValue = OFTrue);
+  virtual OFCondition setRealWorldValueFirstValueMappedSigned(const Sint16 &value,
+                                                              const OFBool checkValue = OFTrue);
 
   /** Set Real World Value Last Value Mapped
    *  @param  value Value to be set. If Pixel Representation is 0 (unsigned
@@ -330,7 +330,7 @@ public:
   /** Set Real World Value Last Value Mapped
    *  @param  value Value to be set. If Pixel Representation is -1 (signed
    *          pixel data) value  must be -2^15  < value < 2^15-1. Otherwise use
-   *          setRealWorldValueLastValueMappedUnSigned().
+   *          setRealWorldValueLastValueMappedUnsigned().
    *  @param  checkValue Check 'value'. Not evaluated (here for consistency
    *          with other setter functions).
    *  @return EC_Normal if successful, an error code otherwise
diff --git a/dcmfg/libsrc/Makefile.dep b/dcmfg/libsrc/Makefile.dep
index 8617090..7008329 100644
--- a/dcmfg/libsrc/Makefile.dep
+++ b/dcmfg/libsrc/Makefile.dep
@@ -22,7 +22,7 @@ fg.o: fg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -42,6 +42,7 @@ fg.o: fg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -126,6 +127,7 @@ fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -140,7 +142,9 @@ fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -183,8 +187,6 @@ fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -233,7 +235,6 @@ fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../../dcmiod/include/dcmtk/dcmiod/modpatient.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
  ../../dcmiod/include/dcmtk/dcmiod/modpatientstudy.h \
  ../../ofstd/include/dcmtk/ofstd/ofoption.h \
@@ -262,6 +263,7 @@ fgderimg.o: fgderimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -274,7 +276,9 @@ fgderimg.o: fgderimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -319,8 +323,6 @@ fgderimg.o: fgderimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -367,8 +369,8 @@ fgderimg.o: fgderimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmfg/fgbase.h \
- ../include/dcmtk/dcmfg/fgtypes.h ../include/dcmtk/dcmfg/fgdefine.h \
+ ../include/dcmtk/dcmfg/fgbase.h ../include/dcmtk/dcmfg/fgtypes.h \
+ ../include/dcmtk/dcmfg/fgdefine.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodutil.h
 fgfact.o: fgfact.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \
@@ -400,7 +402,9 @@ fgfact.o: fgfact.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -419,6 +423,7 @@ fgfact.o: fgfact.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -434,8 +439,6 @@ fgfact.o: fgfact.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmfg/fgfact.h ../include/dcmtk/dcmfg/fgtypes.h \
@@ -493,8 +496,7 @@ fgfact.o: fgfact.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmfg/fgdefine.h ../include/dcmtk/dcmfg/fgderimg.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmfg/fgbase.h \
- ../include/dcmtk/dcmfg/fgfracon.h \
+ ../include/dcmtk/dcmfg/fgbase.h ../include/dcmtk/dcmfg/fgfracon.h \
  ../include/dcmtk/dcmfg/fgframeanatomy.h \
  ../include/dcmtk/dcmfg/fgframevoilut.h \
  ../include/dcmtk/dcmfg/fgidentpixeltransform.h \
@@ -538,7 +540,9 @@ fgfracon.o: fgfracon.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -557,6 +561,7 @@ fgfracon.o: fgfracon.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
@@ -571,8 +576,6 @@ fgfracon.o: fgfracon.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmfg/fgfracon.h \
@@ -646,6 +649,7 @@ fgframeanatomy.o: fgframeanatomy.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -658,7 +662,9 @@ fgframeanatomy.o: fgframeanatomy.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -701,8 +707,6 @@ fgframeanatomy.o: fgframeanatomy.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -749,8 +753,8 @@ fgframeanatomy.o: fgframeanatomy.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmfg/fgbase.h \
- ../include/dcmtk/dcmfg/fgtypes.h ../include/dcmtk/dcmfg/fgdefine.h \
+ ../include/dcmtk/dcmfg/fgbase.h ../include/dcmtk/dcmfg/fgtypes.h \
+ ../include/dcmtk/dcmfg/fgdefine.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h
 fgframevoilut.o: fgframevoilut.cc \
@@ -786,7 +790,9 @@ fgframevoilut.o: fgframevoilut.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -805,6 +811,7 @@ fgframevoilut.o: fgframevoilut.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
@@ -819,8 +826,6 @@ fgframevoilut.o: fgframevoilut.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmfg/fgframevoilut.h ../include/dcmtk/dcmfg/fgbase.h \
@@ -909,7 +914,9 @@ fgidentpixeltransform.o: fgidentpixeltransform.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -928,6 +935,7 @@ fgidentpixeltransform.o: fgidentpixeltransform.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
@@ -942,8 +950,6 @@ fgidentpixeltransform.o: fgidentpixeltransform.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmfg/fgidentpixeltransform.h \
@@ -1032,7 +1038,9 @@ fgimagedatatype.o: fgimagedatatype.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1051,6 +1059,7 @@ fgimagedatatype.o: fgimagedatatype.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
@@ -1065,8 +1074,6 @@ fgimagedatatype.o: fgimagedatatype.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmfg/fgimagedatatype.h ../include/dcmtk/dcmfg/fgbase.h \
@@ -1158,7 +1165,6 @@ fginterface.o: fginterface.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1176,6 +1182,7 @@ fginterface.o: fginterface.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1280,7 +1287,9 @@ fgparametricmapframetype.o: fgparametricmapframetype.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1299,6 +1308,7 @@ fgparametricmapframetype.o: fgparametricmapframetype.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
@@ -1313,8 +1323,6 @@ fgparametricmapframetype.o: fgparametricmapframetype.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmfg/fgparametricmapframetype.h \
@@ -1387,6 +1395,7 @@ fgpixmsr.o: fgpixmsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1399,7 +1408,9 @@ fgpixmsr.o: fgpixmsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1444,8 +1455,6 @@ fgpixmsr.o: fgpixmsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1507,6 +1516,7 @@ fgplanor.o: fgplanor.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -1521,7 +1531,9 @@ fgplanor.o: fgplanor.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1564,8 +1576,6 @@ fgplanor.o: fgplanor.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1644,7 +1654,10 @@ fgplanorvol.o: fgplanorvol.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1661,9 +1674,9 @@ fgplanorvol.o: fgplanorvol.cc \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1681,8 +1694,6 @@ fgplanorvol.o: fgplanorvol.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmfg/fgplanorvol.h ../include/dcmtk/dcmfg/fgbase.h \
@@ -1752,6 +1763,7 @@ fgplanpo.o: fgplanpo.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -1766,7 +1778,9 @@ fgplanpo.o: fgplanpo.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1809,8 +1823,6 @@ fgplanpo.o: fgplanpo.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1892,7 +1904,9 @@ fgplanposvol.o: fgplanposvol.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1911,6 +1925,7 @@ fgplanposvol.o: fgplanposvol.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
@@ -1925,8 +1940,6 @@ fgplanposvol.o: fgplanposvol.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmfg/fgplanposvol.h ../include/dcmtk/dcmfg/fgbase.h \
@@ -1998,6 +2011,7 @@ fgrealworldvaluemapping.o: fgrealworldvaluemapping.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -2012,7 +2026,9 @@ fgrealworldvaluemapping.o: fgrealworldvaluemapping.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2055,8 +2071,6 @@ fgrealworldvaluemapping.o: fgrealworldvaluemapping.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2100,7 +2114,6 @@ fgrealworldvaluemapping.o: fgrealworldvaluemapping.cc \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../include/dcmtk/dcmfg/fgdefine.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
@@ -2126,6 +2139,7 @@ fgseg.o: fgseg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -2138,7 +2152,9 @@ fgseg.o: fgseg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2182,8 +2198,6 @@ fgseg.o: fgseg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2250,7 +2264,10 @@ fgtypes.o: fgtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2268,10 +2285,10 @@ fgtypes.o: fgtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -2301,8 +2318,6 @@ fgtypes.o: fgtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2351,7 +2366,6 @@ fgtypes.o: fgtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../../dcmiod/include/dcmtk/dcmiod/modpatient.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
  ../../dcmiod/include/dcmtk/dcmiod/modpatientstudy.h \
  ../../ofstd/include/dcmtk/ofstd/ofoption.h \
@@ -2397,7 +2411,9 @@ fgusimagedescription.o: fgusimagedescription.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2416,6 +2432,7 @@ fgusimagedescription.o: fgusimagedescription.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
@@ -2430,8 +2447,6 @@ fgusimagedescription.o: fgusimagedescription.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmfg/fgusimagedescription.h \
@@ -2533,7 +2548,9 @@ stackinterface.o: stackinterface.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2552,6 +2569,7 @@ stackinterface.o: stackinterface.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2567,8 +2585,6 @@ stackinterface.o: stackinterface.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmfg/stackinterface.h \
diff --git a/dcmfg/libsrc/fginterface.cc b/dcmfg/libsrc/fginterface.cc
index c7c0802..1bb5842 100644
--- a/dcmfg/libsrc/fginterface.cc
+++ b/dcmfg/libsrc/fginterface.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, Open Connections GmbH
+ *  Copyright (C) 2015-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -75,7 +75,7 @@ OFCondition FGInterface::addShared(const FGBase& group)
   // Delete all per frame groups of this type
   for (size_t count = 0; count < m_perFrame.size(); count++)
   {
-    deletePerFrame(count, group.getType());
+    deletePerFrame(OFstatic_cast(Uint32, count), group.getType());
   }
 
   // Create copy for insertion
@@ -254,7 +254,7 @@ OFCondition FGInterface::readPerFrameFG(DcmItem& dataset)
   Uint32 count = 0;
   while (oneFrameItem != NULL)
   {
-    OFauto_ptr<FunctionalGroups> perFrameGroups(new FunctionalGroups());
+    OFunique_ptr<FunctionalGroups> perFrameGroups(new FunctionalGroups());
     if (!oneFrameItem)
     {
       DCMFG_ERROR("Could not get functional group item for frame #" << count << " (internal error)");
@@ -294,7 +294,7 @@ OFCondition FGInterface::readSingleFG(DcmItem& fgItem,
   OFString fgname;
   for (size_t count = 0; count < card; count++)
   {
-    DcmElement *elem = fgItem.getElement(count);
+    DcmElement *elem = fgItem.getElement(OFstatic_cast(unsigned long, count));
     // TODO: non-sequence elements are not explicitly forbidden here(?), we could store them and re-store them later
     if (elem->getVR() != EVR_SQ)
     {
@@ -424,7 +424,7 @@ size_t FGInterface::deletePerFrame(const DcmFGTypes::E_FGType fgType)
   const size_t numFrames = m_perFrame.size();
   for (size_t frameNo = 0; frameNo < numFrames; frameNo++)
   {
-    if (deletePerFrame(frameNo, fgType))
+    if (deletePerFrame(OFstatic_cast(Uint32, frameNo), fgType))
     {
       numDeleted++;
     }
@@ -494,7 +494,7 @@ OFCondition FGInterface::writePerFrameFG(DcmItem& dataset)
   for ( size_t count = 0; (count < numFrames)  && result.good(); count++)
   {
     DcmItem* perFrameItem = NULL;
-    result = dataset.findOrCreateSequenceItem(DCM_PerFrameFunctionalGroupsSequence, perFrameItem, count);
+    result = dataset.findOrCreateSequenceItem(DCM_PerFrameFunctionalGroupsSequence, perFrameItem, OFstatic_cast(long, count));
     if (result.good())
     {
       /* Iterate over groups for each frame */
@@ -603,7 +603,7 @@ OFCondition FGInterface::convertSharedToPerFrame(const DcmFGTypes::E_FGType fgTy
     }
     else
     {
-      result = insertPerFrame(count, clone, OFTrue /* replace existing */);
+      result = insertPerFrame(OFstatic_cast(Uint32, count), clone, OFTrue /* replace existing */);
       if (result.bad())
       {
         delete clone;
diff --git a/dcmfg/libsrc/fgrealworldvaluemapping.cc b/dcmfg/libsrc/fgrealworldvaluemapping.cc
index 08ba72e..ef53ab3 100644
--- a/dcmfg/libsrc/fgrealworldvaluemapping.cc
+++ b/dcmfg/libsrc/fgrealworldvaluemapping.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, Open Connections GmbH
+ *  Copyright (C) 2015-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -259,7 +259,7 @@ OFCondition FGRealWorldValueMapping::RWVMItem::getRealWorldValueLUTData(OFVector
     for (size_t n = 0; n < numValues; n++)
     {
       Float64 value;
-      result = elem->getFloat64(value, n);
+      result = elem->getFloat64(value, OFstatic_cast(unsigned long, n));
       if (result.good()) values.push_back(value);
     }
   }
@@ -312,8 +312,8 @@ OFCondition FGRealWorldValueMapping::RWVMItem::setRealWorldValueFirstValueMapped
 }
 
 
-OFCondition FGRealWorldValueMapping::RWVMItem::setRealWorldValueFirstValueMappeSigned(const Sint16& value,
-                                                                                      const OFBool checkValue)
+OFCondition FGRealWorldValueMapping::RWVMItem::setRealWorldValueFirstValueMappedSigned(const Sint16& value,
+                                                                                       const OFBool checkValue)
 {
   (void)checkValue;
   DcmSignedShort* ss = new DcmSignedShort(DCM_RealWorldValueFirstValueMapped);
@@ -391,7 +391,7 @@ OFCondition FGRealWorldValueMapping::RWVMItem::setRealWorldValueLUTData(const OF
     size_t count = value.size();
     for (size_t n = 0; n < count; n++)
     {
-      if (result.good()) result = elem->putFloat64(value[n], n);
+      if (result.good()) result = elem->putFloat64(value[n], OFstatic_cast(unsigned long, n));
     }
   }
   return result;
diff --git a/dcmfg/libsrc/stackinterface.cc b/dcmfg/libsrc/stackinterface.cc
index cef3d6f..50a90cc 100644
--- a/dcmfg/libsrc/stackinterface.cc
+++ b/dcmfg/libsrc/stackinterface.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, Open Connections GmbH
+ *  Copyright (C) 2015-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -62,7 +62,7 @@ OFCondition FGStackInterface::read(FGInterface& fgSource)
   for (size_t count = 0; count < numFrames; count++)
   {
     // Get frame content FG if existing
-    FGFrameContent* fracon = OFstatic_cast(FGFrameContent*, fgSource.get(count, DcmFGTypes::EFG_FRAMECONTENT));
+    FGFrameContent* fracon = OFstatic_cast(FGFrameContent*, fgSource.get(OFstatic_cast(Uint32, count), DcmFGTypes::EFG_FRAMECONTENT));
     if (fracon != NULL)
     {
       OFString stackID;
@@ -78,9 +78,9 @@ OFCondition FGStackInterface::read(FGInterface& fgSource)
           if ( (*it).second->getStackID() == stackID)
           {
             // Add frame to stack if it is not in yet
-            if ( (*it).second->getInStackPos(count) == 0)
+            if ( (*it).second->getInStackPos(OFstatic_cast(Uint32, count)) == 0)
             {
-              (*it).second->addFrame(count, inStackPos);
+              (*it).second->addFrame(OFstatic_cast(Uint32, count), inStackPos);
             }
           }
           it++;
@@ -93,7 +93,7 @@ OFCondition FGStackInterface::read(FGInterface& fgSource)
           {
             return EC_MemoryExhausted;
           }
-          stack->addFrame(count, inStackPos);
+          stack->addFrame(OFstatic_cast(Uint32, count), inStackPos);
           if ( !m_Stacks.insert(OFMake_pair(stack->getStackID(), stack)).second )
           {
             delete stack;
diff --git a/dcmfg/tests/Makefile.in b/dcmfg/tests/Makefile.in
index 733bd29..428f575 100644
--- a/dcmfg/tests/Makefile.in
+++ b/dcmfg/tests/Makefile.in
@@ -5,7 +5,6 @@
 @SET_MAKE@
 
 SHELL = /bin/sh
-VPATH = @srcdir@:@top_srcdir@/include:@top_srcdir@/@configdir@/include
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 configdir = @top_srcdir@/@configdir@
diff --git a/dcmimage/CMakeLists.txt b/dcmimage/CMakeLists.txt
index e1313f0..4364051 100644
--- a/dcmimage/CMakeLists.txt
+++ b/dcmimage/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmimage)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmimage_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${ZLIB_INCDIR} ${LIBTIFF_INCDIR} ${LIBPNG_INCDIR})
+INCLUDE_DIRECTORIES("${dcmimage_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" ${ZLIB_INCDIR} ${LIBTIFF_INCDIR} ${LIBPNG_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc apps include)
diff --git a/dcmimage/apps/Makefile.dep b/dcmimage/apps/Makefile.dep
index c2aa1a6..b60482b 100644
--- a/dcmimage/apps/Makefile.dep
+++ b/dcmimage/apps/Makefile.dep
@@ -19,7 +19,10 @@ dcm2pnm.o: dcm2pnm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -37,10 +40,10 @@ dcm2pnm.o: dcm2pnm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -68,8 +71,6 @@ dcm2pnm.o: dcm2pnm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -160,7 +161,10 @@ dcmquant.o: dcmquant.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -178,10 +182,10 @@ dcmquant.o: dcmquant.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -209,8 +213,6 @@ dcmquant.o: dcmquant.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -295,7 +297,10 @@ dcmscale.o: dcmscale.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -313,10 +318,10 @@ dcmscale.o: dcmscale.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -344,8 +349,6 @@ dcmscale.o: dcmscale.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
diff --git a/dcmimage/apps/Makefile.in b/dcmimage/apps/Makefile.in
index 4e9bb1d..c04baeb 100644
--- a/dcmimage/apps/Makefile.in
+++ b/dcmimage/apps/Makefile.in
@@ -22,7 +22,7 @@ LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include \
 LIBDIRS = -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc -L$(oflogdir)/libsrc \
 	-L$(dcmdatadir)/libsrc -L$(dcmimgledir)/libsrc
 LOCALLIBS = -ldcmimage -ldcmimgle -ldcmdata -loflog -lofstd $(TIFFLIBS) $(PNGLIBS) \
-	$(ZLIBLIBS) $(CHARCONVLIBS)
+	$(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
 objs = dcm2pnm.o dcmquant.o dcmscale.o
 progs = dcm2pnm dcmquant dcmscale
@@ -31,13 +31,13 @@ progs = dcm2pnm dcmquant dcmscale
 all: $(progs)
 
 dcm2pnm: dcm2pnm.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcmquant: dcmquant.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcmscale: dcmscale.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 
 install: all
diff --git a/dcmimage/apps/dcm2pnm.cc b/dcmimage/apps/dcm2pnm.cc
index 454497c..c546749 100644
--- a/dcmimage/apps/dcm2pnm.cc
+++ b/dcmimage/apps/dcm2pnm.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2016, OFFIS e.V.
+ *  Copyright (C) 1996-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,10 +26,6 @@
 #define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/dctk.h"          /* for various dcmdata headers */
 #include "dcmtk/dcmdata/cmdlnarg.h"      /* for prepareCmdLineArgs */
 #include "dcmtk/dcmdata/dcuid.h"         /* for dcmtk version name */
diff --git a/dcmimage/apps/dcmquant.cc b/dcmimage/apps/dcmquant.cc
index e36d125..8be1cc8 100644
--- a/dcmimage/apps/dcmquant.cc
+++ b/dcmimage/apps/dcmquant.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2014, OFFIS e.V.
+ *  Copyright (C) 2001-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,10 +26,6 @@
 #define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/dctk.h"          /* for various dcmdata headers */
 #include "dcmtk/dcmdata/cmdlnarg.h"      /* for prepareCmdLineArgs */
 #include "dcmtk/dcmdata/dcuid.h"         /* for dcmtk version name */
@@ -90,7 +86,7 @@ int main(int argc, char *argv[])
     OFCmdUnsignedInt    opt_frame = 1;                    /* default: first frame */
     OFCmdUnsignedInt    opt_frameCount = 0;               /* default: all frames */
 
-    OFBool              opt_palette_ow = OFFalse;
+    OFBool              opt_palette_ow = OFTrue;
     OFBool              opt_entries_word = OFFalse;
     OFBool              opt_palette_fs = OFFalse;
     OFCmdUnsignedInt    opt_palette_col = 256;
@@ -166,8 +162,11 @@ int main(int argc, char *argv[])
       cmd.addOption("--mc-color-avgpixel",   "+Cp",    "average pixels in box");
       cmd.addOption("--mc-color-center",     "+Cc",    "select center of box");
 
+     cmd.addSubGroup("color palette value representation:");
+      cmd.addOption("--write-ow",            "+pw",    "write Palette LUT as OW (default)");
+      cmd.addOption("--write-us",            "+pu",    "write Palette LUT as US (retired)");
+
      cmd.addSubGroup("color palette creation:");
-      cmd.addOption("--write-ow",            "+pw",    "write Palette LUT as OW instead of US");
       cmd.addOption("--lut-entries-word",    "+pe",    "write Palette LUT with 16-bit entries");
       cmd.addOption("--floyd-steinberg",     "+pf",    "use Floyd-Steinberg error diffusion");
       cmd.addOption("--colors",              "+pc", 1, "number of colors: 2..65536 (default 256)",
@@ -298,7 +297,11 @@ int main(int argc, char *argv[])
       cmd.endOptionBlock();
 #endif
 
+      cmd.beginOptionBlock();
       if (cmd.findOption("--write-ow")) opt_palette_ow = OFTrue;
+      if (cmd.findOption("--write-us")) opt_palette_ow = OFFalse;
+      cmd.endOptionBlock();
+
       if (cmd.findOption("--lut-entries-word")) opt_entries_word = OFTrue;
       if (cmd.findOption("--floyd-steinberg")) opt_palette_fs = OFTrue;
       if (cmd.findOption("--colors")) cmd.getValueAndCheckMinMax(opt_palette_col, 2, 65536);
diff --git a/dcmimage/apps/dcmscale.cc b/dcmimage/apps/dcmscale.cc
index 12145c8..cfb0754 100644
--- a/dcmimage/apps/dcmscale.cc
+++ b/dcmimage/apps/dcmscale.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2014, OFFIS e.V.
+ *  Copyright (C) 2002-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,10 +26,6 @@
 #define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/dctk.h"          /* for various dcmdata headers */
 #include "dcmtk/dcmdata/cmdlnarg.h"      /* for prepareCmdLineArgs */
 #include "dcmtk/dcmdata/dcuid.h"         /* for dcmtk version name */
diff --git a/dcmimage/docs/dcm2pnm.man b/dcmimage/docs/dcm2pnm.man
index 52ab537..cbd4857 100644
--- a/dcmimage/docs/dcm2pnm.man
+++ b/dcmimage/docs/dcm2pnm.man
@@ -6,13 +6,13 @@
 \page dcm2pnm dcm2pnm: Convert DICOM images to PGM/PPM, PNG, TIFF or BMP
 \endif
 
-\section synopsis SYNOPSIS
+\section dcm2pnm_synopsis SYNOPSIS
 
 \verbatim
 dcm2pnm [options] dcmfile-in [bitmap-out]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcm2pnm_description DESCRIPTION
 
 The \b dcm2pnm utility reads a DICOM image, converts the pixel data according
 to the selected image processing options and writes back an image in the
@@ -21,7 +21,7 @@ Windows BMP format.  This utility only supports uncompressed and RLE
 compressed DICOM images.  The command line tool \b dcmj2pnm also supports a
 number of JPEG compression schemes.
 
-\section parameters PARAMETERS
+\section dcm2pnm_parameters PARAMETERS
 
 \verbatim
 dcmfile-in  DICOM input filename to be converted
@@ -29,9 +29,9 @@ dcmfile-in  DICOM input filename to be converted
 bitmap-out  output filename to be written (default: stdout)
 \endverbatim
 
-\section options OPTIONS
+\section dcm2pnm_options OPTIONS
 
-\subsection general_options general options
+\subsection dcm2pnm_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -59,7 +59,7 @@ bitmap-out  output filename to be written (default: stdout)
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcm2pnm_input_options input options
 \verbatim
 input file format:
 
@@ -90,7 +90,7 @@ input transfer syntax:
           read with implicit VR little endian TS
 \endverbatim
 
-\subsection image_processing_options image processing options
+\subsection dcm2pnm_image_processing_options image processing options
 \verbatim
 frame selection:
 
@@ -338,7 +338,7 @@ other transformations:
           clip image region (l, t, w, h)
 \endverbatim
 
-\subsection output_options output options
+\subsection dcm2pnm_output_options output options
 \verbatim
 general:
 
@@ -392,7 +392,7 @@ image format:
           write 16-bit (monochrome) or 48-bit (color) PNG
 \endverbatim
 
-\section notes NOTES
+\section dcm2pnm_notes NOTES
 
 The following preferred interpolation algorithms can be selected using the
 \e --interpolate option:
@@ -413,7 +413,7 @@ and compiled with support for the external \b libpng PNG library.  Option
 \e --interlace enables progressive image view while loading the PNG file.
 Only a few applications take care of the meta info (TEXT) in a PNG file.
 
-\section transfer_syntaxes TRANSFER SYNTAXES
+\section dcm2pnm_transfer_syntaxes TRANSFER SYNTAXES
 
 \b dcm2pnm supports the following transfer syntaxes for input (\e dcmfile-in):
 
@@ -427,7 +427,7 @@ RLELosslessTransferSyntax                      1.2.840.10008.1.2.5
 
 (*) if compiled with zlib support enabled
 
-\section logging LOGGING
+\section dcm2pnm_logging 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
@@ -446,7 +446,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcm2pnm_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -468,7 +468,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcm2pnm_environment ENVIRONMENT
 
 The \b dcm2pnm utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -484,18 +484,18 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dcm2pnm_files FILES
 
 <em>\<datadir\>/camera.lut</em> - sample characteristics file of a camera
 \n<em>\<datadir\>/monitor.lut</em> - sample characteristics file of a monitor
 \n<em>\<datadir\>/printer.lut</em> - sample characteristics file of a printer
 \n<em>\<datadir\>/scanner.lut</em> - sample characteristics file of a scanner
 
-\section see_also SEE ALSO
+\section dcm2pnm_see_also SEE ALSO
 
 <b>dcmj2pnm</b>(1), <b>img2dcm</b>(1)
 
-\section copyright COPYRIGHT
+\section dcm2pnm_copyright COPYRIGHT
 
 Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmimage/docs/dcmquant.man b/dcmimage/docs/dcmquant.man
index 0f446e3..af50d5a 100644
--- a/dcmimage/docs/dcmquant.man
+++ b/dcmimage/docs/dcmquant.man
@@ -6,20 +6,20 @@
 \page dcmquant dcmquant: Convert DICOM color images to palette color
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmquant_synopsis SYNOPSIS
 
 \verbatim
 dcmquant [options] dcmfile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmquant_description DESCRIPTION
 
 The \b dcmquant utility reads a DICOM color image, computes a palette color
 look-up table of the desired size for this image (based on the median cut
 algorithm published by Paul Heckbert) and converts the color image into a
 DICOM palette color image.
 
-\section parameters PARAMETERS
+\section dcmquant_parameters PARAMETERS
 
 \verbatim
 dcmfile-in   DICOM input filename to be converted
@@ -27,9 +27,9 @@ dcmfile-in   DICOM input filename to be converted
 dcmfile-out  DICOM output filename to be written
 \endverbatim
 
-\section options OPTIONS
+\section dcmquant_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmquant_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -57,7 +57,7 @@ dcmfile-out  DICOM output filename to be written
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmquant_input_options input options
 \verbatim
 input file format:
 
@@ -88,7 +88,7 @@ input transfer syntax:
          read with implicit VR little endian TS
 \endverbatim
 
-\subsection processing_options image processing and encoding options
+\subsection dcmquant_processing_options image processing and encoding options
 \verbatim
 frame selection:
 
@@ -123,10 +123,15 @@ median cut representative color selection:
   +Cc  --mc-color-center
          select center of box
 
-color palette creation:
+color palette value representation:
 
   +pw  --write-ow
-         write Palette LUT as OW instead of US
+         write Palette LUT as OW (default)
+
+  +pu  --write-us
+         write Palette LUT as US (retired)
+
+color palette creation:
 
   +pe  --lut-entries-word
          write Palette LUT with 16-bit entries
@@ -155,9 +160,8 @@ SOP Instance UID:
          never assign new UID
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmquant_output_options output options
 \verbatim
-
 output file format:
 
   +F   --write-file
@@ -221,7 +225,7 @@ data set trailing padding (not with --write-dataset):
          multiple of i bytes
 \endverbatim
 
-\section logging LOGGING
+\section dcmquant_logging 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
@@ -240,7 +244,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmquant_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -262,7 +266,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmquant_environment ENVIRONMENT
 
 The \b dcmquant utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -278,8 +282,8 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section copyright COPYRIGHT
+\section dcmquant_copyright COPYRIGHT
 
-Copyright (C) 2001-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2001-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
diff --git a/dcmimage/docs/dcmscale.man b/dcmimage/docs/dcmscale.man
index 75a218c..bec7e6d 100644
--- a/dcmimage/docs/dcmscale.man
+++ b/dcmimage/docs/dcmscale.man
@@ -6,19 +6,19 @@
 \page dcmscale dcmscale: Scale DICOM images
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmscale_synopsis SYNOPSIS
 
 \verbatim
 dcmscale [options] dcmfile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmscale_description DESCRIPTION
 
 The \b dcmscale utility reads a DICOM image, scales it according to the
 command line settings and writes back the DICOM image.  This utility only
 supports uncompressed and RLE compressed DICOM images.
 
-\section parameters PARAMETERS
+\section dcmscale_parameters PARAMETERS
 
 \verbatim
 dcmfile-in   DICOM input filename to be scaled
@@ -26,9 +26,9 @@ dcmfile-in   DICOM input filename to be scaled
 dcmfile-out  DICOM output filename to be written
 \endverbatim
 
-\section options OPTIONS
+\section dcmscale_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmscale_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -56,7 +56,7 @@ dcmfile-out  DICOM output filename to be written
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmscale_input_options input options
 \verbatim
 input file format:
 
@@ -87,7 +87,7 @@ input transfer syntax:
           read with implicit VR little endian TS
 \endverbatim
 
-\subsection processing_options image processing and encoding options
+\subsection dcmscale_processing_options image processing and encoding options
 \verbatim
 scaling:
 
@@ -132,7 +132,7 @@ SOP Instance UID:
           never assign new SOP Instance UID
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmscale_output_options output options
 \verbatim
 output file format:
 
@@ -197,7 +197,7 @@ data set trailing padding (not with --write-dataset):
           multiple of i bytes
 \endverbatim
 
-\section notes NOTES
+\section dcmscale_notes NOTES
 
 The following preferred interpolation algorithms can be selected using the
 \e --interpolate option:
@@ -207,7 +207,7 @@ The following preferred interpolation algorithms can be selected using the
 \li 3 = magnification algorithm with bilinear interpolation from Eduard Stanescu
 \li 4 = magnification algorithm with bicubic interpolation from Eduard Stanescu
 
-\section logging LOGGING
+\section dcmscale_logging 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
@@ -226,7 +226,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmscale_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -248,7 +248,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmscale_environment ENVIRONMENT
 
 The \b dcmscale utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -264,7 +264,7 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section copyright COPYRIGHT
+\section dcmscale_copyright COPYRIGHT
 
 Copyright (C) 2002-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmimage/include/CMakeLists.txt b/dcmimage/include/CMakeLists.txt
index aaf8525..e8dbcd6 100644
--- a/dcmimage/include/CMakeLists.txt
+++ b/dcmimage/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmimage DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmimage DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmimage/libsrc/Makefile.dep b/dcmimage/libsrc/Makefile.dep
index 40edbdd..0b482cb 100644
--- a/dcmimage/libsrc/Makefile.dep
+++ b/dcmimage/libsrc/Makefile.dep
@@ -18,7 +18,10 @@ diargimg.o: diargimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -36,10 +39,10 @@ diargimg.o: diargimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -98,7 +101,10 @@ dicmyimg.o: dicmyimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -116,10 +122,10 @@ dicmyimg.o: dicmyimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmimage/dicmyimg.h ../include/dcmtk/dcmimage/dicoimg.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \
@@ -169,7 +175,10 @@ dicoimg.o: dicoimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -187,10 +196,10 @@ dicoimg.o: dicoimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -261,7 +270,10 @@ dicoopx.o: dicoopx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -279,10 +291,10 @@ dicoopx.o: dicoopx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \
  ../include/dcmtk/dcmimage/dicdefin.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/dipixel.h
@@ -306,7 +318,10 @@ dicopx.o: dicopx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -324,10 +339,10 @@ dicopx.o: dicopx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -378,7 +393,10 @@ dihsvimg.o: dihsvimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -396,10 +414,10 @@ dihsvimg.o: dihsvimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmimage/dihsvimg.h ../include/dcmtk/dcmimage/dicoimg.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \
@@ -449,7 +467,10 @@ dilogger.o: dilogger.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -467,10 +488,10 @@ dilogger.o: dilogger.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmimage/dicdefin.h
 dipalimg.o: dipalimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -492,7 +513,10 @@ dipalimg.o: dipalimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -510,10 +534,10 @@ dipalimg.o: dipalimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -572,7 +596,10 @@ dipipng.o: dipipng.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -590,10 +617,10 @@ dipipng.o: dipipng.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -639,7 +666,10 @@ dipitiff.o: dipitiff.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -657,10 +687,10 @@ dipitiff.o: dipitiff.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -722,7 +752,10 @@ diqtctab.o: diqtctab.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -738,9 +771,9 @@ diqtctab.o: diqtctab.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -770,7 +803,8 @@ diqtfs.o: diqtfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h
 diqthash.o: diqthash.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimage/diqthash.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
@@ -799,7 +833,10 @@ diqthash.o: diqthash.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -816,10 +853,10 @@ diqthash.o: diqthash.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -891,7 +928,10 @@ diquant.o: diquant.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -909,9 +949,9 @@ diquant.o: diquant.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmimage/diqttype.h \
  ../include/dcmtk/dcmimage/dicdefin.h ../include/dcmtk/dcmimage/diqtid.h \
@@ -981,7 +1021,10 @@ diregist.o: diregist.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -999,10 +1042,10 @@ diregist.o: diregist.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \
  ../include/dcmtk/dcmimage/dicdefin.h \
  ../include/dcmtk/dcmimage/dipalimg.h ../include/dcmtk/dcmimage/dicoimg.h \
@@ -1068,7 +1111,10 @@ dirgbimg.o: dirgbimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1086,10 +1132,10 @@ dirgbimg.o: dirgbimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmimage/dirgbimg.h ../include/dcmtk/dcmimage/dicoimg.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \
@@ -1139,7 +1185,10 @@ diybrimg.o: diybrimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1157,10 +1206,10 @@ diybrimg.o: diybrimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmimage/diybrimg.h ../include/dcmtk/dcmimage/dicoimg.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \
@@ -1215,7 +1264,10 @@ diyf2img.o: diyf2img.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1233,10 +1285,10 @@ diyf2img.o: diyf2img.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmimage/diyf2img.h ../include/dcmtk/dcmimage/dicoimg.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \
@@ -1291,7 +1343,10 @@ diyp2img.o: diyp2img.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1309,10 +1364,10 @@ diyp2img.o: diyp2img.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmimage/diyp2img.h ../include/dcmtk/dcmimage/dicoimg.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \
diff --git a/dcmimage/libsrc/diqthash.cc b/dcmimage/libsrc/diqthash.cc
index 5d13f7d..6464b90 100644
--- a/dcmimage/libsrc/diqthash.cc
+++ b/dcmimage/libsrc/diqthash.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2016, OFFIS e.V.
+ *  Copyright (C) 2002-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -43,7 +43,7 @@ unsigned long DcmQuantColorHashTable::countEntries() const
 {
   unsigned long result = 0;
   for (const_table_iterator it = m_Table.begin(); it != m_Table.end(); ++it)
-    if (*it) result += (*it)->size();
+    if (*it) result += OFstatic_cast(unsigned long, (*it)->size());
   return result;
 }
 
diff --git a/dcmimgle/CMakeLists.txt b/dcmimgle/CMakeLists.txt
index a60c171..80fc0ec 100644
--- a/dcmimgle/CMakeLists.txt
+++ b/dcmimgle/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmimgle)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmimgle_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${ZLIB_INCDIR})
+INCLUDE_DIRECTORIES("${dcmimgle_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" ${ZLIB_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc apps include data)
diff --git a/dcmimgle/apps/Makefile.dep b/dcmimgle/apps/Makefile.dep
index 9639ef8..63764a0 100644
--- a/dcmimgle/apps/Makefile.dep
+++ b/dcmimgle/apps/Makefile.dep
@@ -19,7 +19,10 @@ dcmdspfn.o: dcmdspfn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -37,10 +40,10 @@ dcmdspfn.o: dcmdspfn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -68,8 +71,6 @@ dcmdspfn.o: dcmdspfn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -144,6 +145,7 @@ dconvlum.o: dconvlum.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
diff --git a/dcmimgle/apps/Makefile.in b/dcmimgle/apps/Makefile.in
index 61669cb..cb876bb 100644
--- a/dcmimgle/apps/Makefile.in
+++ b/dcmimgle/apps/Makefile.in
@@ -18,7 +18,7 @@ dcmdatadir = $(top_srcdir)/../dcmdata
 
 LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include -I$(dcmdatadir)/include
 LIBDIRS = -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc -L$(oflogdir)/libsrc -L$(dcmdatadir)/libsrc
-LOCALLIBS = -ldcmimgle -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS)
+LOCALLIBS = -ldcmimgle -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
 objs = dconvlum.o dcmdspfn.o dcod2lum.o
 progs = dconvlum dcmdspfn dcod2lum
@@ -27,13 +27,13 @@ progs = dconvlum dcmdspfn dcod2lum
 all: $(progs)
 
 dconvlum: dconvlum.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcmdspfn: dcmdspfn.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcod2lum: dcod2lum.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 
 install: all
diff --git a/dcmimgle/apps/dcmdspfn.cc b/dcmimgle/apps/dcmdspfn.cc
index 7f3f978..725d323 100644
--- a/dcmimgle/apps/dcmdspfn.cc
+++ b/dcmimgle/apps/dcmdspfn.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2014, OFFIS e.V.
+ *  Copyright (C) 1999-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -22,10 +22,6 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 
diff --git a/dcmimgle/data/CMakeLists.txt b/dcmimgle/data/CMakeLists.txt
index c08733e..fc17af8 100644
--- a/dcmimgle/data/CMakeLists.txt
+++ b/dcmimgle/data/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(FILES camera.lut monitor.lut printer.lut scanner.lut DESTINATION ${DCMTK_INSTALL_DATDIR} COMPONENT data)
+INSTALL(FILES camera.lut monitor.lut printer.lut scanner.lut DESTINATION "${DCMTK_INSTALL_DATDIR}" COMPONENT data)
diff --git a/dcmimgle/docs/dcmdspfn.man b/dcmimgle/docs/dcmdspfn.man
index a1d91af..92c4a5e 100644
--- a/dcmimgle/docs/dcmdspfn.man
+++ b/dcmimgle/docs/dcmdspfn.man
@@ -6,13 +6,13 @@
 \page dcmdspfn dcmdspfn: Export standard display curves to a text file
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmdspfn_synopsis SYNOPSIS
 
 \verbatim
 dcmdspfn [options]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmdspfn_description DESCRIPTION
 
 Command line program converts a DCMTK monitor / camera / printer / scanner
 characteristics file to tabbed text file describing the characteristic curve
@@ -22,15 +22,15 @@ sheet program.  Above that the display curve (without CC and PSC) can also be
 computed for a specified luminance/OD range (min/max) and a certain number of
 Digital Driving Levels (DDL).
 
-\section parameters PARAMETERS
+\section dcmdspfn_parameters PARAMETERS
 
 \verbatim
 dcmfile-in  DICOM input filename to be dumped
 \endverbatim
 
-\section options OPTIONS
+\section dcmdspfn_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmdspfn_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -58,7 +58,7 @@ dcmfile-in  DICOM input filename to be dumped
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options (mutually exclusive)
+\subsection dcmdspfn_input_options input options (mutually exclusive)
 \verbatim
   +Im  --monitor-file  [f]ilename: string
          text file describing the monitor characteristics
@@ -80,7 +80,7 @@ dcmfile-in  DICOM input filename to be dumped
          automatically converted to luminance
 \endverbatim
 
-\subsection creation_options creation options
+\subsection dcmdspfn_creation_options creation options
 \verbatim
   +Ca  --ambient-light  [a]mbient light: float
          ambient light value (cd/m^2, default: file f)
@@ -103,7 +103,7 @@ dcmfile-in  DICOM input filename to be dumped
          (0..99, default: file setting or cubic spline)
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmdspfn_output_options output options
 \verbatim
   +Og  --gsdf  [f]ilename: string
          write GSDF curve data to file f
@@ -112,7 +112,7 @@ dcmfile-in  DICOM input filename to be dumped
          write CIELAB curve data to file f
 \endverbatim
 
-\section notes NOTES
+\section dcmdspfn_notes NOTES
 
 The output file describing the CC, GSDF or CIELAB and PSC for an 8 bit display
 system (monitor, camera, printer or scanner) is a simple text file.  Lines
@@ -142,7 +142,7 @@ The \e data folder contains sample characteristics file for monitors,
 cameras, printers and scanners.  See DICOM standard part 14 for more details
 on display calibration and Barten's model (including GSDF).
 
-\section logging LOGGING
+\section dcmdspfn_logging 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
@@ -161,7 +161,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmdspfn_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -183,18 +183,18 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section files FILES
+\section dcmdspfn_files FILES
 
 <em>\<datadir\>/camera.lut</em> - sample characteristics file of a camera
 \n<em>\<datadir\>/monitor.lut</em> - sample characteristics file of a monitor
 \n<em>\<datadir\>/printer.lut</em> - sample characteristics file of a printer
 \n<em>\<datadir\>/scanner.lut</em> - sample characteristics file of a scanner
 
-\section see_also SEE ALSO
+\section dcmdspfn_see_also SEE ALSO
 
 <b>dconvlum</b>(1), <b>dcod2lum</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmdspfn_copyright COPYRIGHT
 
 Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmimgle/docs/dcod2lum.man b/dcmimgle/docs/dcod2lum.man
index e86f21a..bed4c54 100644
--- a/dcmimgle/docs/dcod2lum.man
+++ b/dcmimgle/docs/dcod2lum.man
@@ -6,13 +6,13 @@
 \page dcod2lum dcod2lum: Convert hardcopy characteristic curve file to softcopy format
 \endif
 
-\section synopsis SYNOPSIS
+\section dcod2lum_synopsis SYNOPSIS
 
 \verbatim
 dcod2lum in-file out-file
 \endverbatim
 
-\section description DESCRIPTION
+\section dcod2lum_description DESCRIPTION
 
 Command line program that converts a hardcopy characteristic curve file to
 softcopy format.  In other words, the measured optical density (OD) values
@@ -29,7 +29,7 @@ and \e L0 the illumination (both measured in cd/m^2), 'D' the optical density
 file (keyword \e lum) all optical density values are mapped to a constant
 luminance.
 
-\section parameters PARAMETERS
+\section dcod2lum_parameters PARAMETERS
 
 \verbatim
 in-file   hardcopy characteristic curve file to be converted
@@ -37,24 +37,24 @@ in-file   hardcopy characteristic curve file to be converted
 out-file  softcopy characteristic curve file to be written
 \endverbatim
 
-\section notes NOTES
+\section dcod2lum_notes NOTES
 
 The format of both input and output file is described the documentation of the
 \b dcmdspfn command line tool.  In addition, the \e data folder contains
 sample characteristics file monitors, cameras, printers and scanners.
 
-\section files FILES
+\section dcod2lum_files FILES
 
 <em>\<datadir\>/camera.lut</em> - sample characteristics file of a camera
 \n<em>\<datadir\>/monitor.lut</em> - sample characteristics file of a monitor
 \n<em>\<datadir\>/printer.lut</em> - sample characteristics file of a printer
 \n<em>\<datadir\>/scanner.lut</em> - sample characteristics file of a scanner
 
-\section see_also SEE ALSO
+\section dcod2lum_see_also SEE ALSO
 
 <b>dcmdspfn</b>(1)
 
-\section copyright COPYRIGHT
+\section dcod2lum_copyright COPYRIGHT
 
 Copyright (C) 2002-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmimgle/docs/dconvlum.man b/dcmimgle/docs/dconvlum.man
index 60b752a..4db8317 100644
--- a/dcmimgle/docs/dconvlum.man
+++ b/dcmimgle/docs/dconvlum.man
@@ -6,20 +6,20 @@
 \page dconvlum dconvlum: Convert VeriLUM files to DCMTK display files
 \endif
 
-\section synopsis SYNOPSIS
+\section dconvlum_synopsis SYNOPSIS
 
 \verbatim
 dconvlum in-file out-file [ambient]
 \endverbatim
 
-\section description DESCRIPTION
+\section dconvlum_description DESCRIPTION
 
 Command line program that converts VeriLUM file with characteristic curve data
 (\e CCx_xx.dat) to a format used for the Barten transformation in this toolkit.
 VeriLUM is a calibration package from ImageSmiths consisting of a photometer
 (with serial RS232 connector) and a Windows NT software.
 
-\section parameters PARAMETERS
+\section dconvlum_parameters PARAMETERS
 
 \verbatim
 in-file   VeriLUM characteristic curve file to be converted
@@ -29,7 +29,7 @@ out-file  DCMTK display file to be written
 ambient   ambient light (cd/m^2, floating point value)
 \endverbatim
 
-\section notes NOTES
+\section dconvlum_notes NOTES
 
 The output file describing the characteristic curve of a display system
 (monitor) is a simple text file.  Lines starting with a '#' are treated as
@@ -48,12 +48,12 @@ values are calculated by cubic spline interpolation.
 See DICOM standard part 14 for more details on display calibration and
 Barten's model (including GSDF).
 
-\section see_also SEE ALSO
+\section dconvlum_see_also SEE ALSO
 
 <b>dcmdspfn</b>(1), <b>dcm2pnm</b>(1)
 
-\section copyright COPYRIGHT
+\section dconvlum_copyright COPYRIGHT
 
 Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
-*/
\ No newline at end of file
+*/
diff --git a/dcmimgle/include/CMakeLists.txt b/dcmimgle/include/CMakeLists.txt
index 5c2663e..5d67d80 100644
--- a/dcmimgle/include/CMakeLists.txt
+++ b/dcmimgle/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmimgle DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmimgle DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmimgle/libsrc/Makefile.dep b/dcmimgle/libsrc/Makefile.dep
index 534af90..54cfad3 100644
--- a/dcmimgle/libsrc/Makefile.dep
+++ b/dcmimgle/libsrc/Makefile.dep
@@ -18,7 +18,10 @@ dcmimage.o: dcmimage.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -36,10 +39,10 @@ dcmimage.o: dcmimage.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -98,7 +101,10 @@ dibaslut.o: dibaslut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -116,10 +122,10 @@ dibaslut.o: dibaslut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmimgle/didefine.h
 diciefn.o: diciefn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimgle/diciefn.h ../include/dcmtk/dcmimgle/didispfn.h \
@@ -146,7 +152,10 @@ diciefn.o: diciefn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -164,10 +173,10 @@ diciefn.o: diciefn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h
 dicielut.o: dicielut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimgle/dicielut.h \
  ../include/dcmtk/dcmimgle/didislut.h \
@@ -191,7 +200,10 @@ dicielut.o: dicielut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -209,10 +221,10 @@ dicielut.o: dicielut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmimgle/didefine.h
 didislut.o: didislut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimgle/didislut.h \
@@ -236,7 +248,10 @@ didislut.o: didislut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -254,10 +269,10 @@ didislut.o: didislut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmimgle/didefine.h
 didispfn.o: didispfn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
@@ -286,7 +301,10 @@ didispfn.o: didispfn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -304,10 +322,10 @@ didispfn.o: didispfn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h
 didocu.o: didocu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -329,7 +347,10 @@ didocu.o: didocu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -347,10 +368,10 @@ didocu.o: didocu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -378,8 +399,6 @@ didocu.o: didocu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -449,7 +468,10 @@ digsdfn.o: digsdfn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -467,10 +489,10 @@ digsdfn.o: digsdfn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h
 digsdlut.o: digsdlut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimgle/digsdlut.h \
  ../include/dcmtk/dcmimgle/didislut.h \
@@ -494,7 +516,10 @@ digsdlut.o: digsdlut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -512,10 +537,10 @@ digsdlut.o: digsdlut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmimgle/didefine.h \
  ../include/dcmtk/dcmimgle/displint.h
 diimage.o: diimage.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -538,7 +563,10 @@ diimage.o: diimage.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -556,10 +584,10 @@ diimage.o: diimage.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -612,7 +640,10 @@ diinpx.o: diinpx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -630,10 +661,10 @@ diinpx.o: diinpx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmimgle/didefine.h
 diluptab.o: diluptab.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
@@ -654,6 +685,7 @@ diluptab.o: diluptab.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -672,7 +704,9 @@ diluptab.o: diluptab.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -720,7 +754,10 @@ dimo1img.o: dimo1img.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -738,10 +775,10 @@ dimo1img.o: dimo1img.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmimgle/dimo1img.h ../include/dcmtk/dcmimgle/dimoimg.h \
  ../include/dcmtk/dcmimgle/diimage.h \
@@ -785,7 +822,10 @@ dimo2img.o: dimo2img.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -803,10 +843,10 @@ dimo2img.o: dimo2img.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmimgle/dimo2img.h ../include/dcmtk/dcmimgle/dimoimg.h \
  ../include/dcmtk/dcmimgle/diimage.h \
@@ -850,7 +890,10 @@ dimoimg.o: dimoimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -868,10 +911,10 @@ dimoimg.o: dimoimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -929,6 +972,7 @@ dimoimg3.o: dimoimg3.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -941,7 +985,9 @@ dimoimg3.o: dimoimg3.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -999,6 +1045,7 @@ dimoimg4.o: dimoimg4.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1011,7 +1058,9 @@ dimoimg4.o: dimoimg4.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1069,6 +1118,7 @@ dimoimg5.o: dimoimg5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1081,7 +1131,9 @@ dimoimg5.o: dimoimg5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1146,7 +1198,10 @@ dimomod.o: dimomod.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1164,10 +1219,10 @@ dimomod.o: dimomod.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmimgle/didefine.h \
  ../include/dcmtk/dcmimgle/diobjcou.h ../include/dcmtk/dcmimgle/didocu.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -1206,7 +1261,10 @@ dimoopx.o: dimoopx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1224,10 +1282,10 @@ dimoopx.o: dimoopx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmimgle/didefine.h ../include/dcmtk/dcmimgle/dimopx.h \
  ../include/dcmtk/dcmimgle/dipixel.h ../include/dcmtk/dcmimgle/dimomod.h \
  ../include/dcmtk/dcmimgle/diluptab.h \
@@ -1256,7 +1314,10 @@ dimopx.o: dimopx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1274,10 +1335,10 @@ dimopx.o: dimopx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmimgle/didefine.h ../include/dcmtk/dcmimgle/dimomod.h \
  ../include/dcmtk/dcmimgle/diluptab.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1305,7 +1366,10 @@ diovdat.o: diovdat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1323,10 +1387,10 @@ diovdat.o: diovdat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmimgle/diovlay.h ../include/dcmtk/dcmimgle/diobjcou.h \
  ../include/dcmtk/dcmimgle/didefine.h ../include/dcmtk/dcmimgle/diovdat.h \
@@ -1352,7 +1416,10 @@ diovlay.o: diovlay.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1370,10 +1437,10 @@ diovlay.o: diovlay.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmimgle/diovlay.h ../include/dcmtk/dcmimgle/diobjcou.h \
  ../include/dcmtk/dcmimgle/didefine.h ../include/dcmtk/dcmimgle/diovdat.h \
@@ -1419,7 +1486,10 @@ diovlimg.o: diovlimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1437,10 +1507,10 @@ diovlimg.o: diovlimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmimgle/diovlimg.h \
  ../include/dcmtk/dcmimgle/dimo2img.h ../include/dcmtk/dcmimgle/dimoimg.h \
@@ -1491,7 +1561,10 @@ diovpln.o: diovpln.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1509,10 +1582,10 @@ diovpln.o: diovpln.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1557,7 +1630,10 @@ diutils.o: diutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1575,9 +1651,9 @@ diutils.o: diutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmimgle/diutils.h ../include/dcmtk/dcmimgle/didefine.h
diff --git a/dcmiod/CMakeLists.txt b/dcmiod/CMakeLists.txt
index 58c13d5..07e691f 100644
--- a/dcmiod/CMakeLists.txt
+++ b/dcmiod/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmiod)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmiod_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${ZLIB_INCDIR})
+INCLUDE_DIRECTORIES("${dcmiod_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" ${ZLIB_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc include tests)
diff --git a/dcmiod/include/CMakeLists.txt b/dcmiod/include/CMakeLists.txt
index 35db557..1499d79 100644
--- a/dcmiod/include/CMakeLists.txt
+++ b/dcmiod/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmiod DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE)
+INSTALL(DIRECTORY dcmtk/dcmiod DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE)
diff --git a/dcmiod/include/dcmtk/dcmiod/iodcommn.h b/dcmiod/include/dcmtk/dcmiod/iodcommn.h
index 0e3dc97..a9c8819 100644
--- a/dcmiod/include/dcmtk/dcmiod/iodcommn.h
+++ b/dcmiod/include/dcmtk/dcmiod/iodcommn.h
@@ -176,13 +176,18 @@ public:
    *  @param  readSeries  Read Series-level information if OFTrue, always
    *                      includes Frame of Reference, i.e.\ readFoR is
    *                      considered to be OFTrue
+   *  @param  takeOverCharset If OFTrue (default), Specific Character Set is
+   *                          taken over from imported dataset. If it's not
+   *                          present or empty (invalid), the attribute will
+   *                          not be present in this class either.
    *  @return EC_Normal if successful, an error code otherwise
    */
   virtual OFCondition import(DcmItem& dataset,
-                             OFBool readPatient,
-                             OFBool readStudy,
-                             OFBool readFoR = OFFalse,
-                             OFBool readSeries = OFFalse);
+                             const OFBool readPatient,
+                             const OFBool readStudy,
+                             const OFBool readFoR = OFFalse,
+                             const OFBool readSeries = OFFalse,
+                             const OFBool takeOverCharset = OFTrue);
 
   /** Import common module attributes from DICOM file but only read Patient, Study,
    *  Series and/or Frame of Reference level portions. The current content
@@ -196,6 +201,11 @@ public:
    *  @param  useStudy If OFTrue, Study level information is imported
    *  @param  useSeries If OFTrue, Series level information is imported
    *  @param  useFoR If OFTrue, Frame of Reference information is imported
+   *  @param  takeOverCharset If OFTrue (default), Specific Character Set is
+   *                          taken over from imported dataset. If it's not
+   *                          present or empty (invalid), the attribute will
+   *                          not be present in this class either.
+
    *  @return EC_Normal if reading was successful (i.e.\ if any information could
    *          be read), otherwise an error is returned
    */
@@ -203,7 +213,8 @@ public:
                                     const OFBool usePatient,
                                     const OFBool useStudy,
                                     const OFBool useSeries,
-                                    const OFBool useFoR = OFFalse);
+                                    const OFBool useFoR = OFFalse,
+                                    OFBool takeOverCharset = OFTrue);
 
   /** Import common module attributes from DICOM file but only read Patient, Study,
    *  Series and/or Frame of Reference level portions. The current content
@@ -214,6 +225,10 @@ public:
    *  @param  useStudy If OFTrue, Study level information is imported
    *  @param  useSeries If OFTrue, Series level information is imported
    *  @param  useFoR If OFTrue, Frame of Reference information is imported
+   *  @param  takeOverCharset If OFTrue (default), Specific Character Set is
+   *                          taken over from imported dataset. If it's not
+   *                          present or empty (invalid), the attribute will
+   *                          not be present in this class either.
    *  @return EC_Normal if reading was successful (i.e.\ if any information could
    *          be read), otherwise an error is returned
    */
@@ -221,7 +236,8 @@ public:
                              const OFBool usePatient,
                              const OFBool useStudy,
                              const OFBool useSeries,
-                             const OFBool useFoR = OFFalse);
+                             const OFBool useFoR = OFFalse,
+                             const OFBool takeOverCharset = OFTrue);
 
 
   /** Write the attributes managed by this class to DICOM dataset.
diff --git a/dcmiod/include/dcmtk/dcmiod/iodimage.h b/dcmiod/include/dcmtk/dcmiod/iodimage.h
index 7760c4b..2695751 100644
--- a/dcmiod/include/dcmtk/dcmiod/iodimage.h
+++ b/dcmiod/include/dcmtk/dcmiod/iodimage.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, Open Connections GmbH
+ *  Copyright (C) 2015-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -43,7 +43,7 @@ class IODImagePixelModule;
  *  Modules supported on top of DcmIODCommon: General Image Module and
  *  Image Pixel Module.
  */
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
 template<typename T,typename... Types>
 struct DcmIODImageHasType
 : std::false_type {};
@@ -72,7 +72,7 @@ public:
 
   /** A good comment would be nice, but I have nothing in mind
    */
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
   using IODImagePixelModuleType = IODImagePixelVariant<Types...>;
 #else
   typedef IODImagePixelVariant<OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)> IODImagePixelModuleType;
@@ -182,7 +182,7 @@ public:
 private:
 
   template<typename T>
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
   typename std::enable_if<DcmIODImageHasType<T,Types...>::value,OFCondition>::type
 #else
   OFTypename OFenable_if
@@ -199,7 +199,7 @@ private:
   }
 
   template<typename T>
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
   typename std::enable_if<!DcmIODImageHasType<T,Types...>::value,OFCondition>::type
 #else
   OFTypename OFenable_if
@@ -214,7 +214,7 @@ private:
   }
 
   template<typename T>
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
   typename std::enable_if<DcmIODImageHasType<T,Types...>::value,OFCondition>::type
 #else
   OFTypename OFenable_if
@@ -231,7 +231,7 @@ private:
   }
 
   template<typename T>
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
   typename std::enable_if<!DcmIODImageHasType<T,Types...>::value,OFCondition>::type
 #else
   OFTypename OFenable_if
@@ -271,7 +271,7 @@ private:
   }
 
   template<typename T>
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
   typename std::enable_if<DcmIODImageHasType<T,Types...>::value,OFCondition>::type
 #else
   OFTypename OFenable_if
@@ -286,7 +286,7 @@ private:
   }
 
   template<typename T>
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
   typename std::enable_if<!DcmIODImageHasType<T,Types...>::value,OFCondition>::type
 #else
   OFTypename OFenable_if
diff --git a/dcmiod/include/dcmtk/dcmiod/iodutil.h b/dcmiod/include/dcmtk/dcmiod/iodutil.h
index 8de4ef8..37a7851 100644
--- a/dcmiod/include/dcmtk/dcmiod/iodutil.h
+++ b/dcmiod/include/dcmtk/dcmiod/iodutil.h
@@ -211,6 +211,7 @@ public:
    *  @param  type Value type (valid value: "1", "1C", "2", something else)
    *  @param  searchCond Optional flag indicating the status of a previous 'search' function call
    *  @param  moduleName Optional module name to be printed (default: "IOD" if NULL)
+   *  @param  logLevel The log level to log errors to
    *  @return EC_Normal if element value is correct, error otherwise
    */
   static OFCondition checkElementValue(const DcmElement *delem,
@@ -218,7 +219,8 @@ public:
                                        const OFString &vm,
                                        const OFString &type,
                                        const OFCondition &searchCond = EC_Normal,
-                                       const char *moduleName = NULL);
+                                       const char *moduleName = NULL,
+                                       const dcmtk::log4cplus::LogLevel logLevel = dcmtk::log4cplus::WARN_LOG_LEVEL);
 
   /** Check element value for correct value multiplicity and type.
    *  @param  delem DICOM element to be checked
@@ -228,13 +230,15 @@ public:
    *  @param  type Value type (valid value: "1", "1C", "2", something else)
    *  @param  searchCond Optional flag indicating the status of a previous 'search' function call
    *  @param  moduleName Optional module name to be printed (default: "IOD" if NULL)
+   *  @param  logLevel The log level to log errors to
    *  @return EC_Normal if element value is correct, error otherwise
    */
   static OFCondition checkElementValue(const DcmElement &delem,
                                        const OFString &vm,
                                        const OFString &type,
                                        const OFCondition &searchCond = EC_Normal,
-                                       const char *moduleName = NULL);
+                                       const char *moduleName = NULL,
+                                       const dcmtk::log4cplus::LogLevel logLevel = dcmtk::log4cplus::WARN_LOG_LEVEL);
 
   /** Get string value from element
    *  @param  delem DICOM element from which the string value should be retrieved
@@ -354,7 +358,7 @@ public:
     for (size_t count = 0; (count < vm) && result.good(); count ++)
     {
       Uint8 value;
-      result = elem->getUint8(value, count);
+      result = elem->getUint8(value, OFstatic_cast(unsigned long, count));
       if ( result.good() )
       {
         destination.push_back(value);
@@ -544,7 +548,7 @@ public:
   {
     OFCondition result;
     /* Check sequence, reports cardinality and type errors as warnings */
-    checkSubSequence(result, source, seqKey, "1", type, module);
+    checkSubSequence(result, source, seqKey, "1", type, module, dcmtk::log4cplus::WARN_LOG_LEVEL);
 
     /* Try to read sequence into internal data (ignore errors as much as possible) */
     DcmItem* item = NULL;
@@ -602,7 +606,6 @@ public:
    *          i.e.\ "1,1C,2,2C or 3".
    *  @param  module Name of the module/macro this sequence is contained in. Used
    *                 for error messages and can also be left empty.
-   *  @return EC_Normal if successful, an error code otherwise
    */
   template <class Container>
   static void writeSubSequence(OFCondition& result,
@@ -661,7 +664,7 @@ public:
       }
 
       // Check result
-      checkSubSequence(result, destination, seqKey, cardinality, type, module);
+      checkSubSequence(result, destination, seqKey, cardinality, type, module, dcmtk::log4cplus::ERROR_LOG_LEVEL);
 
       // Clean up if we did not have success */
       if (result.bad())
@@ -683,7 +686,6 @@ public:
    *  @param  rule Rule describing the requirements for this sequence. If NULL
    *          an error is returned (IOD_EC_NoSuchRule), but no error error is reported
    *          to the logger.
-   *  @return EC_Normal if successful, an error code otherwise
    */
   template <class Container>
   static void writeSubSequence(OFCondition& result,
@@ -720,7 +722,6 @@ public:
    *          i.e.\ "1,1C,2,2C or 3".
    *  @param  module Name of the module/macro this sequence is contained in.
    *          Used for error messages and can also be left empty.
-   *  @return EC_Normal if successful, an error code otherwise
    */
   template <class Container>
   static void writeSingleItem(OFCondition& result,
@@ -769,7 +770,7 @@ public:
         DCMIOD_TRACE("Skipping type 3 sequence " << seqKey << ": No data or incomplete data available");
       }
       /* Check outcome */
-      checkSubSequence(result, destination, seqKey, "1", type, module);
+      checkSubSequence(result, destination, seqKey, "1", type, module, dcmtk::log4cplus::ERROR_LOG_LEVEL);
     }
   }
 
@@ -784,7 +785,6 @@ public:
    *  @param  destination The DICOM item that should hold the sequence
    *          (with a single item) in the end.
    *  @param  rule The rule for writing the given sequence
-   *  @return EC_Normal if successful, an error code otherwise
    */
   template <class Container>
   static void writeSingleItem(OFCondition& result,
@@ -821,14 +821,15 @@ public:
    *          i.e.\ "1,1C,2,2C or 3".
    *  @param  module Name of the module/macro this sequence is contained in.
    *          Used for error messages and can also be left empty.
-   *  @return EC_Normal if successful, an error code otherwise
+   *  @param  logLevel The log level to write errors to
    */
   static void checkSubSequence(OFCondition& result,
                                DcmItem& surroundingItem,
                                const DcmTagKey& seqKey,
                                const OFString& cardinality,
                                const OFString& type,
-                               const OFString& module);
+                               const OFString& module,
+                               const dcmtk::log4cplus::LogLevel logLevel);
 
   /** Deletes all elements from given container and calls "delete" on each
    *  of them to clear memory.
diff --git a/dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h b/dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h
index 43368a2..23dccba 100644
--- a/dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h
+++ b/dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h
@@ -42,6 +42,9 @@
  * > Study Instance UID (UI, 1, 1)
  * > Series and Instance Reference Macro
  *
+ * Thus the Common Instance Reference Module lists references to other SOP
+ * instances and divides them between those instances that are in the same
+ * study, and those that are inside another study.
  */
 class DCMTK_DCMIOD_EXPORT IODCommonInstanceReferenceModule : public IODModule
 {
@@ -74,12 +77,19 @@ public:
 
   /** Add references
    *  @param  references The references to be added
-   *  @param  studyInstanceUID The Study Instance UID the references belong to
-   *  @param  clearOldData Delete any old referneces if OFTrue, otherwise keep them
+   *  @param  studyInstanceUID The Study Instance UID of "this" object instance.
+   *          It's used to decide whether the provided instances (with their
+   *          own Study Instance UIDs) will go into the Referenced Series Sequence
+   *          or into the Studies Containing Other Referenced Instances Sequence.
+   *          If it is left empty, then the method tries to find "this" instances
+   *          Study Instance UID in the internal item container which may be shared
+   *          with other modules and thus may already provide the Study Instance
+   *          UID (e.g. via General Study Module).
+   *  @param  clearOldData Delete any old references if OFTrue, otherwise keep them
    *  @result EC_Normal if successful, error otherwise
    */
   virtual size_t addReferences(const IODReferences& references,
-                               const OFString& studyInstanceUID,
+                               const OFString& studyInstanceUID = "",
                                const OFBool clearOldData = OFTrue);
 
   /** Read data of this module from given source item
diff --git a/dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h b/dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h
index d6a5ba2..c4adb54 100644
--- a/dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h
+++ b/dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016, Open Connections GmbH
+ *  Copyright (C) 2016-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -55,7 +55,7 @@ struct IODImagePixelVariantBaseVisitor
  *  The class Image Pixel Module, the Floating Point Image Pixel module
  *  and the Double Floating Point Image Pixel module
  */
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
 template<typename... Types>
 class IODImagePixelVariant
 : public OFvariant<OFmonostate,Types...>
diff --git a/dcmiod/libsrc/Makefile.dep b/dcmiod/libsrc/Makefile.dep
index 944fe00..4c4ce16 100644
--- a/dcmiod/libsrc/Makefile.dep
+++ b/dcmiod/libsrc/Makefile.dep
@@ -34,7 +34,7 @@ iodcommn.o: iodcommn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -53,9 +53,9 @@ iodcommn.o: iodcommn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmiod/modpatient.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
@@ -162,7 +162,10 @@ iodcontentitemmacro.o: iodcontentitemmacro.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -180,10 +183,10 @@ iodcontentitemmacro.o: iodcontentitemmacro.cc \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -207,11 +210,8 @@ iodcontentitemmacro.o: iodcontentitemmacro.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \
  ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmiod/iodcontentitemmacro.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/dcmiod/modbase.h ../include/dcmtk/dcmiod/iodmacro.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
@@ -279,7 +279,10 @@ iodmacro.o: iodmacro.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -297,10 +300,10 @@ iodmacro.o: iodmacro.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -328,8 +331,6 @@ iodmacro.o: iodmacro.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -373,9 +374,7 @@ iodmacro.o: iodmacro.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../include/dcmtk/dcmiod/iodrules.h ../include/dcmtk/dcmiod/iodtypes.h \
  ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \
- ../include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../include/dcmtk/dcmiod/iodutil.h \
+ ../include/dcmtk/dcmiod/modbase.h ../include/dcmtk/dcmiod/iodutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h
 iodreferences.o: iodreferences.cc \
  ../../config/include/dcmtk/config/osconfig.h \
@@ -398,7 +397,10 @@ iodreferences.o: iodreferences.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -416,10 +418,10 @@ iodreferences.o: iodreferences.cc \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmiod/iodreferences.h \
  ../include/dcmtk/dcmiod/iodutil.h \
@@ -444,8 +446,6 @@ iodreferences.o: iodreferences.cc \
  ../../ofstd/include/dcmtk/ofstd/oftime.h \
  ../include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
@@ -481,7 +481,7 @@ iodrules.o: iodrules.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -500,6 +500,7 @@ iodrules.o: iodrules.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -533,7 +534,10 @@ iodtypes.o: iodtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -551,10 +555,10 @@ iodtypes.o: iodtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h
@@ -578,7 +582,10 @@ iodutil.o: iodutil.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -596,10 +603,10 @@ iodutil.o: iodutil.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmiod/iodutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
@@ -621,8 +628,6 @@ iodutil.o: iodutil.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftime.h \
  ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/cielabutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
@@ -657,7 +662,10 @@ modacquisitioncontext.o: modacquisitioncontext.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -675,10 +683,10 @@ modacquisitioncontext.o: modacquisitioncontext.cc \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -706,8 +714,6 @@ modacquisitioncontext.o: modacquisitioncontext.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -751,9 +757,7 @@ modacquisitioncontext.o: modacquisitioncontext.cc \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../include/dcmtk/dcmiod/iodrules.h ../include/dcmtk/dcmiod/iodtypes.h \
  ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \
- ../include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../include/dcmtk/dcmiod/iodutil.h \
+ ../include/dcmtk/dcmiod/modbase.h ../include/dcmtk/dcmiod/iodutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h
 modbase.o: modbase.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmiod/modbase.h \
@@ -776,6 +780,7 @@ modbase.o: modbase.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -787,7 +792,6 @@ modbase.o: modbase.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -851,7 +855,6 @@ modcommoninstanceref.o: modcommoninstanceref.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -872,6 +875,7 @@ modcommoninstanceref.o: modcommoninstanceref.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -978,7 +982,7 @@ modenhequipment.o: modenhequipment.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -997,8 +1001,8 @@ modenhequipment.o: modenhequipment.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmiod/cielabutil.h ../include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -1046,6 +1050,7 @@ modenhusimage.o: modenhusimage.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1057,7 +1062,6 @@ modenhusimage.o: modenhusimage.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1179,7 +1183,6 @@ modenhusseries.o: modenhusseries.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1198,6 +1201,7 @@ modenhusseries.o: modenhusseries.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmiod/iodmacro.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -1300,7 +1304,7 @@ modequipment.o: modequipment.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1319,8 +1323,8 @@ modequipment.o: modequipment.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmiod/cielabutil.h ../include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -1369,6 +1373,7 @@ modfloatingpointimagepixel.o: modfloatingpointimagepixel.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1380,7 +1385,6 @@ modfloatingpointimagepixel.o: modfloatingpointimagepixel.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1440,6 +1444,7 @@ modfor.o: modfor.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1451,7 +1456,6 @@ modfor.o: modfor.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1523,7 +1527,7 @@ modgeneralimage.o: modgeneralimage.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1542,9 +1546,9 @@ modgeneralimage.o: modgeneralimage.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -1598,6 +1602,7 @@ modgeneralseries.o: modgeneralseries.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1609,7 +1614,6 @@ modgeneralseries.o: modgeneralseries.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1720,6 +1724,7 @@ modgeneralstudy.o: modgeneralstudy.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1731,7 +1736,6 @@ modgeneralstudy.o: modgeneralstudy.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1837,6 +1841,7 @@ modhelp.o: modhelp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1849,7 +1854,9 @@ modhelp.o: modhelp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1900,6 +1907,7 @@ modimagepixel.o: modimagepixel.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1911,7 +1919,6 @@ modimagepixel.o: modimagepixel.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1975,6 +1982,7 @@ modimagepixelbase.o: modimagepixelbase.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1986,7 +1994,6 @@ modimagepixelbase.o: modimagepixelbase.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2058,7 +2065,7 @@ modmultiframedimension.o: modmultiframedimension.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2077,9 +2084,9 @@ modmultiframedimension.o: modmultiframedimension.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -2124,6 +2131,7 @@ modmultiframefg.o: modmultiframefg.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -2143,7 +2151,9 @@ modmultiframefg.o: modmultiframefg.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2168,11 +2178,8 @@ modmultiframefg.o: modmultiframefg.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \
  ../include/dcmtk/dcmiod/cielabutil.h ../include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../ofstd/include/dcmtk/ofstd/oftime.h \
@@ -2208,7 +2215,6 @@ modpatient.o: modpatient.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2229,6 +2235,7 @@ modpatient.o: modpatient.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2330,7 +2337,6 @@ modpatientstudy.o: modpatientstudy.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2351,6 +2357,7 @@ modpatientstudy.o: modpatientstudy.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2450,7 +2457,6 @@ modsegmentationseries.o: modsegmentationseries.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2471,6 +2477,7 @@ modsegmentationseries.o: modsegmentationseries.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2566,6 +2573,7 @@ modsopcommon.o: modsopcommon.cc \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -2577,7 +2585,6 @@ modsopcommon.o: modsopcommon.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2647,6 +2654,7 @@ modsynchronization.o: modsynchronization.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -2658,7 +2666,6 @@ modsynchronization.o: modsynchronization.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2725,6 +2732,7 @@ modusfor.o: modusfor.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -2736,7 +2744,6 @@ modusfor.o: modusfor.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
diff --git a/dcmiod/libsrc/cielabutil.cc b/dcmiod/libsrc/cielabutil.cc
index 8b03051..77082bd 100755
--- a/dcmiod/libsrc/cielabutil.cc
+++ b/dcmiod/libsrc/cielabutil.cc
@@ -24,6 +24,11 @@
 #define INCLUDE_CMATH                // for pow() function
 #include "dcmtk/ofstd/ofstdinc.h"
 
+// workaround for SunPro not defining these C functions in the global namespace
+#ifdef __sun
+using STD_NAMESPACE pow;
+#endif
+
 // Initialize white points of D65 light point (CIELab standard white point)
 const double IODCIELabUtil::D65_WHITEPOINT_X = 0.950456;
 const double IODCIELabUtil::D65_WHITEPOINT_Y = 1.0;
diff --git a/dcmiod/libsrc/iodcommn.cc b/dcmiod/libsrc/iodcommn.cc
index 03c7f97..195bf50 100644
--- a/dcmiod/libsrc/iodcommn.cc
+++ b/dcmiod/libsrc/iodcommn.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, Open Connections GmbH
+ *  Copyright (C) 2015-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -40,13 +40,14 @@ DcmIODCommon::DcmIODCommon()
 {
   // Set initial values for a new SOP instance
   ensureInstanceUIDs(OFFalse);
+  // push this first so Specific Character Set will be written in the beginning
+  m_Modules.push_back(&m_SOPCommon);
   m_Modules.push_back(&m_Patient);
   m_Modules.push_back(&m_PatientStudy);
   m_Modules.push_back(&m_Study);
   m_Modules.push_back(&m_Equipment);
   m_Modules.push_back(&m_Series);
   m_Modules.push_back(&m_FrameOfReference);
-  m_Modules.push_back(&m_SOPCommon);
   m_Modules.push_back(&m_CommonInstanceReferenceModule);
 }
 
@@ -66,13 +67,14 @@ DcmIODCommon::DcmIODCommon(const DcmIODCommon& rhs)
 {
   // Set initial values for a new SOP instance
   ensureInstanceUIDs(OFFalse);
+  // push this first so Specific Character Set will be written in the beginning
+  m_Modules.push_back(&m_SOPCommon);
   m_Modules.push_back(&m_Patient);
   m_Modules.push_back(&m_PatientStudy);
   m_Modules.push_back(&m_Study);
   m_Modules.push_back(&m_Equipment);
   m_Modules.push_back(&m_Series);
   m_Modules.push_back(&m_FrameOfReference);
-  m_Modules.push_back(&m_SOPCommon);
   m_Modules.push_back(&m_CommonInstanceReferenceModule);
 }
 
@@ -173,10 +175,11 @@ OFCondition DcmIODCommon::read(DcmItem &dataset)
 
 
 OFCondition DcmIODCommon::import(DcmItem& dataset,
-                                 OFBool readPatient,
-                                 OFBool readStudy,
-                                 OFBool readSeries,
-                                 OFBool readFoR)
+                                 const OFBool readPatient,
+                                 const OFBool readStudy,
+                                 const OFBool readFoR,
+                                 const OFBool readSeries,
+                                 const OFBool takeOverCharset)
 {
   if (readPatient)
   {
@@ -201,6 +204,27 @@ OFCondition DcmIODCommon::import(DcmItem& dataset,
     m_FrameOfReference.read(dataset, OFFalse /* do not clear old data */);
   }
 
+  // Take over character set from the dataset imported, if desired
+  if (takeOverCharset)
+  {
+    OFString charset;
+    dataset.findAndGetOFStringArray(DCM_SpecificCharacterSet, charset);
+    if (!charset.empty())
+    {
+      DCMIOD_DEBUG("Taking over Specific Character Set " << charset << " on import");
+      OFCondition result = m_SOPCommon.setSpecificCharacterSet(charset);
+      if (result.bad())
+      {
+        DCMIOD_ERROR("Could not set Specific Character Set " << charset << " on import: " << result.text());
+      }
+    }
+    else
+    {
+        DCMIOD_DEBUG("Taking over Default Specific Character Set (ASCII) on import");
+        m_SOPCommon.getData().findAndDeleteElement(DCM_SpecificCharacterSet);
+    }
+  }
+
   return EC_Normal;
 }
 
@@ -209,10 +233,11 @@ OFCondition DcmIODCommon::importPatientStudyFoR(const OFString& filename,
                                                 const OFBool usePatient,
                                                 const OFBool useStudy,
                                                 const OFBool useSeries,
-                                                const OFBool useFoR)
+                                                const OFBool useFoR,
+                                                const OFBool takeOverCharset)
 {
   DCMIOD_WARN("This function is deprecated and will be removed in later versions of DCMTK, please use import()");
-  return import(filename, usePatient, useStudy, useSeries, useFoR);
+  return import(filename, usePatient, useStudy, useSeries, useFoR, takeOverCharset);
 }
 
 
@@ -220,7 +245,8 @@ OFCondition DcmIODCommon::import(const OFString& filename,
                                  const OFBool usePatient,
                                  const OFBool useStudy,
                                  const OFBool useSeries,
-                                 const OFBool useFoR)
+                                 const OFBool useFoR,
+                                 const OFBool takeOverCharset)
 {
   DcmFileFormat dcmff;
   OFCondition result = dcmff.loadFile(filename.c_str());
@@ -229,7 +255,7 @@ OFCondition DcmIODCommon::import(const OFString& filename,
     DcmDataset *dset = dcmff.getDataset();
     if (dset != NULL)
     {
-      result = import(*dset, usePatient, useStudy, useSeries, useFoR);
+      result = import(*dset, usePatient, useStudy, useSeries, useFoR, takeOverCharset);
     }
     else
     {
diff --git a/dcmiod/libsrc/iodreferences.cc b/dcmiod/libsrc/iodreferences.cc
index 8294c5c..285f5ba 100755
--- a/dcmiod/libsrc/iodreferences.cc
+++ b/dcmiod/libsrc/iodreferences.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016, Open Connections GmbH
+ *  Copyright (C) 2016-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -131,8 +131,8 @@ OFCondition IODReferences::readTractographyReferencedInstanceSequence(DcmItem& s
       DcmElement* elem = NULL;
       if (item->findAndGetElement(DCM_ReferencedFrameNumber, elem).good())
       {
-        Uint32 vm = elem->getVM();
-        for (Uint32 f = 0; f < vm; f++)
+        unsigned long vm = elem->getVM();
+        for (unsigned long f = 0; f < vm; f++)
         {
           Sint32 val = 0;
           if (elem->getSint32(val, f).good())
@@ -190,7 +190,7 @@ OFCondition IODReferences::writeTractographyReferencedInstanceSequence(DcmItem&
   {
     if (result.good())
     {
-      result = item.findOrCreateSequenceItem(DCM_ReferencedInstanceSequence, seqItem, numItem);
+      result = item.findOrCreateSequenceItem(DCM_ReferencedInstanceSequence, seqItem, OFstatic_cast(long, numItem));
       numItem++;
     }
     if (result.good())
diff --git a/dcmiod/libsrc/iodutil.cc b/dcmiod/libsrc/iodutil.cc
index 4e6e507..ca18755 100644
--- a/dcmiod/libsrc/iodutil.cc
+++ b/dcmiod/libsrc/iodutil.cc
@@ -52,12 +52,12 @@ OFCondition DcmIODUtil::getAndCheckElementFromDataset(DcmItem &dataset,
     /* copy object from search stack */
     result = delem.copyFrom(*stack.top());
     /* we need a reference to the original element in order to determine the SpecificCharacterSet */
-    checkElementValue(OFstatic_cast(DcmElement *, stack.top()), tagKey, vm, type, result, moduleName);
+    checkElementValue(OFstatic_cast(DcmElement *, stack.top()), tagKey, vm, type, result, moduleName, dcmtk::log4cplus::WARN_LOG_LEVEL);
   }
   /* the element could not be found in the dataset */
   else
   {
-    checkElementValue(delem, vm, type, result, moduleName);
+    checkElementValue(delem, vm, type, result, moduleName, dcmtk::log4cplus::WARN_LOG_LEVEL);
   }
   return result;
 }
@@ -80,11 +80,11 @@ OFCondition DcmIODUtil::getAndCheckElementFromDataset(DcmItem &dataset,
     /* copy object from search stack */
     delem = OFstatic_cast ( DcmElement*, stack.top()->clone() );
     /* we need a reference to the original element in order to determine the SpecificCharacterSet */
-    checkElementValue(OFstatic_cast(DcmElement *, stack.top()), tagKey, vm, type, result, moduleName);
+    checkElementValue(OFstatic_cast(DcmElement *, stack.top()), tagKey, vm, type, result, moduleName, dcmtk::log4cplus::WARN_LOG_LEVEL);
   }
   /* the element could not be found in the dataset */
   else
-    checkElementValue(delem, tagKey, vm, type, result, moduleName);
+    checkElementValue(delem, tagKey, vm, type, result, moduleName, dcmtk::log4cplus::WARN_LOG_LEVEL);
 
   return result;
 }
@@ -186,19 +186,29 @@ OFCondition DcmIODUtil::addElementToDataset(OFCondition &result,
       // At this point, we certainly have an element. Check its value (empty ok for type 2)
       if ((type == "2") || !delem->isEmpty())
       {
-        result = checkElementValue(*delem, rule->getVM(), type, result, rule->getModule().c_str());
-        // Insert non-empty element or empty "type 2" element
+        // Insert non-empty element or empty "type 2" element. First, perform the insertion, and then
+        // check the value. This is (at least) required for checking the character set of string values which
+        // relies on the element context, i.e. the surrounding item or dataset.
+        result = dataset.insert(delem, OFTrue /*replaceOld*/);
         if (result.good())
         {
-          result = dataset.insert(delem, OFTrue /*replaceOld*/);
-          if (result.good()) insertionOK = OFTrue;
+          result = checkElementValue(*delem, rule->getVM(), type, result, rule->getModule().c_str(), dcmtk::log4cplus::ERROR_LOG_LEVEL);
+        }
+        if (result.good())
+        {
+          insertionOK = OFTrue;
+        }
+        // remove element if value is invalid
+        else
+        {
+          dataset.remove(delem);
         }
       }
       else if (type == "1")
       {
         // Empty element value not allowed for "type 1"
         result = EC_InvalidValue;
-        checkElementValue(*delem, rule->getVM(), type, result, rule->getModule().c_str());
+        checkElementValue(*delem, rule->getVM(), type, result, rule->getModule().c_str(), dcmtk::log4cplus::ERROR_LOG_LEVEL);
       }
     }
     else
@@ -242,15 +252,17 @@ OFCondition DcmIODUtil::checkElementValue(const DcmElement *delem,
                                           const OFString &vm,
                                           const OFString &type,
                                           const OFCondition &searchCond,
-                                          const char *moduleName)
+                                          const char *moduleName,
+                                          const dcmtk::log4cplus::LogLevel logLevel)
 {
   OFCondition result = EC_Normal;
   const OFString tagName = DcmTag(tagKey).getTagName();
   const OFString module = (moduleName == NULL) ? "IOD" : moduleName;
+  OFOStringStream error;
   /* NB: type 1C and 2C cannot be checked, assuming to be optional */
   if (((type == "1") || (type == "2")) && searchCond.bad())
   {
-    DCMIOD_WARN(tagName << " " << tagKey << " absent in " << module << " (type " << type << ")");
+    error << tagName << " " << tagKey << " absent in " << module << " (type " << type << ")";
     result = IOD_EC_MissingAttribute;
   }
   else if ((delem == NULL) || OFconst_cast(DcmElement*, delem)->isEmpty(OFTrue /*normalize*/))   // cast away constness of delem; value modification can happen (eg. to remove padding)
@@ -258,34 +270,49 @@ OFCondition DcmIODUtil::checkElementValue(const DcmElement *delem,
     /* however, type 1C should never be present with empty value */
     if (((type == "1") || (type == "1C")) && searchCond.good())
     {
-      DCMIOD_WARN(tagName << " " << tagKey << " empty in " << module << " (type " << type << ")");
+      error << tagName << " " << tagKey << " empty in " << module << " (type " << type << ")";
       result = EC_MissingValue;
     }
   } else {
     result = OFconst_cast(DcmElement*, delem)->checkValue(vm, OFTrue /*oldFormat*/);   // cast away constness of delem; value modification can happen (eg. to remove padding)
     if (result == EC_InvalidCharacter)
     {
-      DCMIOD_WARN(tagName << " " << tagKey << " contains invalid character(s) in " << module);
+      error << tagName << " " << tagKey << " contains invalid character(s) in " << module;
     }
     else if (result == EC_ValueRepresentationViolated)
     {
-      DCMIOD_WARN(tagName << " " << tagKey << " violates VR definition in " << module);
+      error << tagName << " " << tagKey << " violates VR definition in " << module;
     }
     else if (result == EC_ValueMultiplicityViolated)
     {
       const OFString vmText = (delem->getVR() == EVR_SQ) ? " #items" : " VM";
-      DCMIOD_WARN(tagName << " " << tagKey << vmText << " != " << vm << " in " << module);
+      error << tagName << " " << tagKey << vmText << " != " << vm << " in " << module;
     }
     else if (result == EC_MaximumLengthViolated)
     {
-      DCMIOD_WARN(tagName << " " << tagKey << " violates maximum VR length in " << module);
+      error << tagName << " " << tagKey << " violates maximum VR length in " << module;
     }
     else if (result.bad())
     {
-      DCMIOD_WARN("INTERNAL ERROR while checking value of " << tagName << " " << tagKey << " in " << module);
+      error << "INTERNAL ERROR while checking value of " << tagName << " " << tagKey << " in " << module;
       result = EC_Normal;
     }
   }
+  OFSTRINGSTREAM_GETSTR(error, tmpString)
+  if (strlen(tmpString) > 0)
+  {
+    switch (logLevel)
+    {
+      case dcmtk::log4cplus::TRACE_LOG_LEVEL: DCMIOD_TRACE(tmpString); break;
+      case dcmtk::log4cplus::DEBUG_LOG_LEVEL: DCMIOD_DEBUG(tmpString); break;
+      case dcmtk::log4cplus::WARN_LOG_LEVEL : DCMIOD_WARN(tmpString); break;
+      case dcmtk::log4cplus::INFO_LOG_LEVEL : DCMIOD_INFO(tmpString); break;
+      case dcmtk::log4cplus::ERROR_LOG_LEVEL : DCMIOD_ERROR(tmpString); break;
+      case dcmtk::log4cplus::FATAL_LOG_LEVEL: DCMIOD_FATAL(tmpString); break;
+      default: DCMIOD_WARN(tmpString);;
+    }
+  }
+  OFSTRINGSTREAM_FREESTR(tmpString)
   return result;
 }
 
@@ -294,10 +321,11 @@ OFCondition DcmIODUtil::checkElementValue(const DcmElement &delem,
                                           const OFString &vm,
                                           const OFString &type,
                                           const OFCondition &searchCond,
-                                          const char *moduleName)
+                                          const char *moduleName,
+                                          const dcmtk::log4cplus::LogLevel logLevel)
 {
   /* call the real function */
-  return checkElementValue(&delem, delem.getTag(), vm, type, searchCond, moduleName);
+  return checkElementValue(&delem, delem.getTag(), vm, type, searchCond, moduleName, logLevel);
 }
 
 
@@ -401,7 +429,7 @@ OFCondition DcmIODUtil::setUint16ValuesOnElement(DcmElement &delem,
     }
     else if (check)
     {
-      result = DcmElement::checkVM(values.size(), vm);
+      result = DcmElement::checkVM(OFstatic_cast(unsigned long, values.size()), vm);
     }
     it++;
   }
@@ -418,7 +446,7 @@ OFCondition DcmIODUtil::getUint16ValuesFromElement(DcmElement &delem,
   for (size_t i = 0;  i < count; i++)
   {
     Uint16 val;
-    result = delem.getUint16(val, i);
+    result = delem.getUint16(val, OFstatic_cast(unsigned long, i));
     if (result.bad())
     {
       DCMIOD_WARN(delem.getTag().getXTag() << ": Getting value " << " #" << i << " not possible");
@@ -435,7 +463,8 @@ void DcmIODUtil::checkSubSequence(OFCondition& result,
                                   const DcmTagKey& seqKey,
                                   const OFString& cardinality,
                                   const OFString& type,
-                                  const OFString& module)
+                                  const OFString& module,
+                                  const dcmtk::log4cplus::LogLevel logLevel)
 {
   OFCondition exists = EC_Normal;
   /* check result */
@@ -443,7 +472,7 @@ void DcmIODUtil::checkSubSequence(OFCondition& result,
   {
     DcmSequenceOfItems *seq = NULL;
     exists = surroundingItem.findAndGetSequence(seqKey, seq);
-    result = DcmIODUtil::checkElementValue(seq, seqKey, cardinality, type, exists, module.c_str());
+    result = DcmIODUtil::checkElementValue(seq, seqKey, cardinality, type, exists, module.c_str(), logLevel);
   }
 }
 
@@ -464,7 +493,7 @@ OFCondition DcmIODUtil::getAndCheckSingleItem(DcmSequenceOfItems& seq,
   }
 
   // get actual tag name and cardinality
-  const Uint32 card = seq.card();
+  const unsigned long card = seq.card();
   if (card != 1)
   {
     if (card > 1)
diff --git a/dcmiod/libsrc/modbase.cc b/dcmiod/libsrc/modbase.cc
index 27943f0..9ecde19 100644
--- a/dcmiod/libsrc/modbase.cc
+++ b/dcmiod/libsrc/modbase.cc
@@ -140,7 +140,7 @@ void IODComponent::makeOptional()
 
 
 OFCondition IODComponent::read(DcmItem& source,
-                               OFBool clearOldData)
+                               const OFBool clearOldData)
 {
   // Debug
   DCMIOD_DEBUG("Reading component: " << getName());
@@ -212,7 +212,7 @@ OFCondition IODComponent::read(DcmItem& source,
     {
       DcmElement *elem = NULL;
       OFCondition cond = source.findAndGetElement( (*rule)->getTagKey(), elem);
-      DcmIODUtil::checkElementValue(elem, (*rule)->getTagKey(), (*rule)->getVM(), (*rule)->getType(), cond, (*rule)->getModule().c_str());
+      DcmIODUtil::checkElementValue(elem, (*rule)->getTagKey(), (*rule)->getVM(), (*rule)->getType(), cond, (*rule)->getModule().c_str(), dcmtk::log4cplus::WARN_LOG_LEVEL);
     }
     else // Normal attributes are checked and copied over into this IOD component
     {
diff --git a/dcmiod/libsrc/modhelp.cc b/dcmiod/libsrc/modhelp.cc
index a68325e..44ee423 100644
--- a/dcmiod/libsrc/modhelp.cc
+++ b/dcmiod/libsrc/modhelp.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015, Open Connections GmbH
+ *  Copyright (C) 2015-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -39,7 +39,7 @@ const DcmTagKey DcmModuleHelpers::patientModuleTags[] =
   DCM_QualityControlSubject,
   DCM_ReferencedPatientSequence,
   DCM_PatientBirthTime,
-  DCM_OtherPatientIDs,
+  DCM_RETIRED_OtherPatientIDs,
   DCM_OtherPatientIDsSequence,
   DCM_OtherPatientNames,
   DCM_EthnicGroup,
diff --git a/dcmiod/libsrc/modimagepixel.cc b/dcmiod/libsrc/modimagepixel.cc
index 6343c5d..8d0b7b2 100644
--- a/dcmiod/libsrc/modimagepixel.cc
+++ b/dcmiod/libsrc/modimagepixel.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016, Open Connections GmbH
+ *  Copyright (C) 2016-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -255,7 +255,7 @@ template<typename T>
 OFCondition IODImagePixelModule<T>::setICCProfile(const Uint8* values,
                                                const size_t length)
 {
-  return m_Item->putAndInsertUint8Array(DCM_ICCProfile, values, length);
+  return m_Item->putAndInsertUint8Array(DCM_ICCProfile, values, OFstatic_cast(unsigned long, length));
 }
 
 template class IODImagePixelModule<Uint8>;
diff --git a/dcmiod/libsrc/modmultiframedimension.cc b/dcmiod/libsrc/modmultiframedimension.cc
index ad8e1be..caa3521 100644
--- a/dcmiod/libsrc/modmultiframedimension.cc
+++ b/dcmiod/libsrc/modmultiframedimension.cc
@@ -267,7 +267,7 @@ DcmElement* IODMultiframeDimensionModule::getIndexElement(DcmSequenceOfItems *pe
   DcmElement *returnValue = NULL;
   for (size_t count = 0; count < numFrames; count++)
   {
-    DcmItem* item = perFrameFG->getItem(count);
+    DcmItem* item = perFrameFG->getItem(OFstatic_cast(unsigned long, count));
     if (item != NULL)
     {
       // Check for the functional group mentioned in dimension
diff --git a/dcmiod/libsrc/modusfor.cc b/dcmiod/libsrc/modusfor.cc
index c124ca3..9058d5d 100644
--- a/dcmiod/libsrc/modusfor.cc
+++ b/dcmiod/libsrc/modusfor.cc
@@ -213,7 +213,7 @@ OFCondition IODUSFoRModule::setVolumetoTransducerMappingMatrix(const OFVector< F
   {
     for (size_t n = 0; result.good() && n < vm; n++)
     {
-      result = elem->putFloat64(value[n], n);
+      result = elem->putFloat64(value[n], OFstatic_cast(unsigned long, n));
     }
   }
   if (result.good())
@@ -262,7 +262,7 @@ OFCondition IODUSFoRModule::setVolumeToTableMappingMatrix(const OFVector< Float6
   {
     for (size_t n = 0; result.good() && (n < vm); n++)
     {
-      result = elem->putFloat64(value[n], n);
+      result = elem->putFloat64(value[n], OFstatic_cast(unsigned long, n));
     }
   }
   if (result.good())
diff --git a/dcmiod/tests/Makefile.dep b/dcmiod/tests/Makefile.dep
index facbdd6..72634ea 100644
--- a/dcmiod/tests/Makefile.dep
+++ b/dcmiod/tests/Makefile.dep
@@ -19,6 +19,7 @@ tcielabutil.o: tcielabutil.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -32,7 +33,9 @@ tcielabutil.o: tcielabutil.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -64,6 +67,7 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -77,7 +81,9 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -109,6 +115,7 @@ timagepixel.o: timagepixel.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -122,7 +129,9 @@ timagepixel.o: timagepixel.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -134,8 +143,6 @@ timagepixel.o: timagepixel.cc \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
  ../include/dcmtk/dcmiod/iodimage.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
@@ -151,7 +158,6 @@ timagepixel.o: timagepixel.cc \
  ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \
  ../include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmiod/modpatient.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
diff --git a/dcmiod/tests/Makefile.in b/dcmiod/tests/Makefile.in
index ced9417..4b8699b 100644
--- a/dcmiod/tests/Makefile.in
+++ b/dcmiod/tests/Makefile.in
@@ -17,11 +17,12 @@ oflogdir = $(top_srcdir)/../oflog
 dcmdatadir = $(top_srcdir)/../dcmdata
 dcmioddir = $(top_srcdir)/../dcmiod
 
-LOCALINCLUDES = -I$(dcmioddir)/include -I$(dcmdatadir)/include -I$(oflogdir)/include -I$(ofstddir)/include
+LOCALINCLUDES = -I$(dcmioddir)/include -I$(dcmdatadir)/include -I$(oflogdir)/include \
+	-I$(ofstddir)/include
 LIBDIRS = -L$(top_srcdir)/libsrc -L$(dcmioddir)/libsrc -L$(dcmdatadir)/libsrc \
 	-L$(oflogdir)/libsrc -L$(ofstddir)/libsrc
 LOCALLIBS = -ldcmiod -ldcmdata -loflog -lofstd \
-	$(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS)
+	$(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
 test_objs = tests.o tcielabutil.o timagepixel.o
 objs = tests.o $(test_objs)
@@ -30,9 +31,6 @@ progs = tests
 
 all: $(progs)
 
-tclabutil: tclabutil.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
-
 tests: $(test_objs)
 	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $(test_objs) $(LOCALLIBS) $(LIBS)
 
diff --git a/dcmjpeg/apps/CMakeLists.txt b/dcmjpeg/apps/CMakeLists.txt
index 8e24425..9a93beb 100644
--- a/dcmjpeg/apps/CMakeLists.txt
+++ b/dcmjpeg/apps/CMakeLists.txt
@@ -1,5 +1,5 @@
 # declare additional include directories
-INCLUDE_DIRECTORIES(${dcmjpeg_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${dcmimage_SOURCE_DIR}/include ${ZLIB_INCDIR} ${LIBTIFF_INCDIR} ${LIBPNG_INCDIR})
+INCLUDE_DIRECTORIES("${dcmjpeg_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" "${dcmimage_SOURCE_DIR}/include" ${ZLIB_INCDIR} ${LIBTIFF_INCDIR} ${LIBPNG_INCDIR})
 
 # declare executables
 FOREACH(PROGRAM dcmcjpeg dcmdjpeg dcmj2pnm dcmmkdir)
diff --git a/dcmjpeg/apps/Makefile.dep b/dcmjpeg/apps/Makefile.dep
index be75e57..1b8ae54 100644
--- a/dcmjpeg/apps/Makefile.dep
+++ b/dcmjpeg/apps/Makefile.dep
@@ -19,7 +19,10 @@ dcmcjpeg.o: dcmcjpeg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -37,10 +40,10 @@ dcmcjpeg.o: dcmcjpeg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -68,8 +71,6 @@ dcmcjpeg.o: dcmcjpeg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -142,7 +143,10 @@ dcmdjpeg.o: dcmdjpeg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -160,10 +164,10 @@ dcmdjpeg.o: dcmdjpeg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -191,8 +195,6 @@ dcmdjpeg.o: dcmdjpeg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -261,7 +263,10 @@ dcmj2pnm.o: dcmj2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -279,10 +284,10 @@ dcmj2pnm.o: dcmj2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -310,8 +315,6 @@ dcmj2pnm.o: dcmj2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -405,7 +408,10 @@ dcmmkdir.o: dcmmkdir.cc ../../dcmdata/apps/dcmgpdir.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -423,10 +429,10 @@ dcmmkdir.o: dcmmkdir.cc ../../dcmdata/apps/dcmgpdir.cc \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -454,8 +460,6 @@ dcmmkdir.o: dcmmkdir.cc ../../dcmdata/apps/dcmgpdir.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
diff --git a/dcmjpeg/apps/Makefile.in b/dcmjpeg/apps/Makefile.in
index 36e985e..136d83f 100644
--- a/dcmjpeg/apps/Makefile.in
+++ b/dcmjpeg/apps/Makefile.in
@@ -49,7 +49,7 @@ LOCALINCLUDES = $(dcmjpeginc) $(ofstdinc) $(ofloginc) $(dcmdatainc) $(dcmimagein
 LIBDIRS = -L$(top_srcdir)/libsrc $(dcmjpeglibdir) $(dcmimagelibdir) $(dcmimglelibdir) \
 	$(dcmdatalibdir) $(ofloglibdir) $(ofstdlibdir)
 LOCALLIBS = $(dcmjpeglib) $(dcmimagelib) $(dcmimglelib) $(dcmdatalib) $(ofloglib) \
-	$(ofstdlib) $(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS)
+	$(ofstdlib) $(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
 objs = dcmdjpeg.o dcmcjpeg.o dcmj2pnm.o dcmmkdir.o
 progs = dcmdjpeg dcmcjpeg dcmj2pnm dcmmkdir
@@ -58,16 +58,16 @@ progs = dcmdjpeg dcmcjpeg dcmj2pnm dcmmkdir
 all: $(progs)
 
 dcmdjpeg: dcmdjpeg.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcmcjpeg: dcmcjpeg.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcmj2pnm: dcmj2pnm.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcmmkdir: dcmmkdir.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 
 install: all
diff --git a/dcmjpeg/apps/dcmcjpeg.cc b/dcmjpeg/apps/dcmcjpeg.cc
index b714870..6eaf5b5 100644
--- a/dcmjpeg/apps/dcmcjpeg.cc
+++ b/dcmjpeg/apps/dcmcjpeg.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2014, OFFIS e.V.
+ *  Copyright (C) 2001-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,10 +26,6 @@
 #define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofconapp.h"
@@ -61,11 +57,6 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"
 int main(int argc, char *argv[])
 {
 
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
   const char *opt_ifname = NULL;
   const char *opt_ofname = NULL;
 
diff --git a/dcmjpeg/apps/dcmdjpeg.cc b/dcmjpeg/apps/dcmdjpeg.cc
index da878d3..6b7d54f 100644
--- a/dcmjpeg/apps/dcmdjpeg.cc
+++ b/dcmjpeg/apps/dcmdjpeg.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2016, OFFIS e.V.
+ *  Copyright (C) 2001-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,10 +26,6 @@
 #define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofconapp.h"
@@ -57,11 +53,6 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"
 int main(int argc, char *argv[])
 {
 
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
   const char *opt_ifname = NULL;
   const char *opt_ofname = NULL;
 
diff --git a/dcmjpeg/docs/dcmcjpeg.man b/dcmjpeg/docs/dcmcjpeg.man
index f41886a..d0ab0d8 100644
--- a/dcmjpeg/docs/dcmcjpeg.man
+++ b/dcmjpeg/docs/dcmcjpeg.man
@@ -6,19 +6,19 @@
 \page dcmcjpeg dcmcjpeg: Encode DICOM file to JPEG transfer syntax
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmcjpeg_synopsis SYNOPSIS
 
 \verbatim
 dcmcjpeg [options] dcmfile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmcjpeg_description DESCRIPTION
 
 The \b dcmcjpeg utility reads an uncompressed DICOM image (\e dcmfile-in),
 performs a JPEG compression (i. e. conversion to an encapsulated DICOM transfer
 syntax) and writes the converted image to an output file (\e dcmfile-out).
 
-\section parameters PARAMETERS
+\section dcmcjpeg_parameters PARAMETERS
 
 \verbatim
 dcmfile-in   DICOM input filename to be converted
@@ -26,9 +26,9 @@ dcmfile-in   DICOM input filename to be converted
 dcmfile-out  DICOM output filename
 \endverbatim
 
-\section options OPTIONS
+\section dcmcjpeg_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmcjpeg_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -56,7 +56,7 @@ dcmfile-out  DICOM output filename
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmcjpeg_input_options input options
 \verbatim
 input file format:
 
@@ -102,7 +102,7 @@ compatibility (ignored by +tl):
   # (only pseudo lossless encoder)
 \endverbatim
 
-\subsection JPEG_encoding_options JPEG encoding options
+\subsection dcmcjpeg_JPEG_encoding_options JPEG encoding options
 \verbatim
 JPEG process:
 
@@ -321,7 +321,7 @@ non-standard YCbCr component subsampling (not with +tl):
   # interpretation is encoded as YBR_FULL_422 which violates DICOM rules.
 \endverbatim
 
-\subsection enc_pix_data_encoding_opt encapsulated pixel data encoding options:
+\subsection dcmcjpeg_enc_pix_data_encoding_opt encapsulated pixel data encoding options:
 \verbatim
 encapsulated pixel data fragmentation:
 
@@ -484,7 +484,7 @@ SOP Instance UID:
   # Never assigns a new SOP instance UID.
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmcjpeg_output_options output options
 \verbatim
 post-1993 value representations:
 
@@ -526,7 +526,7 @@ data set trailing padding:
           and items on multiple of i bytes
 \endverbatim
 
-\section notes NOTES
+\section dcmcjpeg_notes NOTES
 
 The \b dcmcjpeg utility compresses DICOM images of all SOP classes.  Special
 handling has been implemented for CT images (where the modality transformation
@@ -573,7 +573,7 @@ also be distinguished by the Derivation Description in the resulting DICOM
 image, which contains the term "Lossless JPEG compression" for the new and
 "Pseudo-Lossless JPEG compression" for the old encoder.
 
-\section transfer_syntaxes TRANSFER SYNTAXES
+\section dcmcjpeg_transfer_syntaxes TRANSFER SYNTAXES
 
 \b dcmcjpeg supports the following transfer syntaxes for input
 (\e dcmfile-in):
@@ -605,7 +605,7 @@ JPEGProcess14TransferSyntax                    1.2.840.10008.1.2.4.57
 JPEGProcess14SV1TransferSyntax                 1.2.840.10008.1.2.4.70
 \endverbatim
 
-\section logging LOGGING
+\section dcmcjpeg_logging 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
@@ -624,7 +624,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmcjpeg_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -646,7 +646,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmcjpeg_environment ENVIRONMENT
 
 The \b dcmcjpeg utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -662,11 +662,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dcmcjpeg_see_also SEE ALSO
 
 <b>dcmdjpeg</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmcjpeg_copyright COPYRIGHT
 
 Copyright (C) 2001-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmjpeg/docs/dcmdjpeg.man b/dcmjpeg/docs/dcmdjpeg.man
index 1634207..fa8d346 100644
--- a/dcmjpeg/docs/dcmdjpeg.man
+++ b/dcmjpeg/docs/dcmdjpeg.man
@@ -6,19 +6,19 @@
 \page dcmdjpeg dcmdjpeg: Decode JPEG-compressed DICOM file
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmdjpeg_synopsis SYNOPSIS
 
 \verbatim
 dcmdjpeg [options] dcmfile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmdjpeg_description DESCRIPTION
 
 The \b dcmdjpeg utility reads a JPEG-compressed DICOM image (\e dcmfile-in),
 decompresses the JPEG data (i. e. conversion to a native DICOM transfer syntax)
 and writes the converted image to an output file (\e dcmfile-out).
 
-\section parameters PARAMETERS
+\section dcmdjpeg_parameters PARAMETERS
 
 \verbatim
 dcmfile-in   DICOM input filename to be converted
@@ -26,9 +26,9 @@ dcmfile-in   DICOM input filename to be converted
 dcmfile-out  DICOM output filename
 \endverbatim
 
-\section options OPTIONS
+\section dcmdjpeg_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmdjpeg_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -56,7 +56,7 @@ dcmfile-out  DICOM output filename
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmdjpeg_input_options input options
 
 \verbatim
 input file format:
@@ -76,7 +76,7 @@ input file format:
   # without meta-header but unfortunately it does.
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcmdjpeg_processing_options processing options
 
 \verbatim
 color space conversion:
@@ -178,7 +178,7 @@ workaround options for incorrect JPEG encodings:
 
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmdjpeg_output_options output options
 
 \verbatim
 output file format:
@@ -240,7 +240,7 @@ data set trailing padding (not with --write-dataset):
           and items on multiple of i bytes
 \endverbatim
 
-\section transfer_syntaxes TRANSFER SYNTAXES
+\section dcmdjpeg_transfer_syntaxes TRANSFER SYNTAXES
 
 \b dcmdjpeg supports the following transfer syntaxes for input
 (\e dcmfile-in):
@@ -269,7 +269,7 @@ LittleEndianExplicitTransferSyntax             1.2.840.10008.1.2.1
 BigEndianExplicitTransferSyntax                1.2.840.10008.1.2.2
 \endverbatim
 
-\section logging LOGGING
+\section dcmdjpeg_logging 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
@@ -288,7 +288,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmdjpeg_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -310,7 +310,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmdjpeg_environment ENVIRONMENT
 
 The \b dcmdjpeg utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -326,11 +326,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dcmdjpeg_see_also SEE ALSO
 
 <b>dcmcjpeg</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmdjpeg_copyright COPYRIGHT
 
 Copyright (C) 2001-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmjpeg/docs/dcmj2pnm.man b/dcmjpeg/docs/dcmj2pnm.man
index b117525..1777f30 100644
--- a/dcmjpeg/docs/dcmj2pnm.man
+++ b/dcmjpeg/docs/dcmj2pnm.man
@@ -6,13 +6,13 @@
 \page dcmj2pnm dcmj2pnm: Convert DICOM images to PGM/PPM, PNG, TIFF, JPEG or BMP
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmj2pnm_synopsis SYNOPSIS
 
 \verbatim
 dcmj2pnm [options] dcmfile-in [bitmap-out]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmj2pnm_description DESCRIPTION
 
 The \b dcmj2pnm utility reads a DICOM image, converts the pixel data according
 to the selected image processing options and writes back an image in the
@@ -20,7 +20,7 @@ well-known PGM/PPM (portable gray map / portable pix map), PNG, TIFF, JPEG
 (Joint Photographic Experts Group) or Windows BMP format.  This utility
 supports uncompressed as well as JPEG and RLE compressed DICOM images.
 
-\section parameters PARAMETERS
+\section dcmj2pnm_parameters PARAMETERS
 
 \verbatim
 dcmfile-in  DICOM input filename to be converted
@@ -28,9 +28,9 @@ dcmfile-in  DICOM input filename to be converted
 bitmap-out  output filename to be written (default: stdout)
 \endverbatim
 
-\section options OPTIONS
+\section dcmj2pnm_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmj2pnm_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -58,7 +58,7 @@ bitmap-out  output filename to be written (default: stdout)
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmj2pnm_input_options input options
 \verbatim
 input file format:
 
@@ -89,7 +89,7 @@ input transfer syntax:
           read with implicit VR little endian TS
 \endverbatim
 
-\subsection image_processing_options image processing options
+\subsection dcmj2pnm_image_processing_options image processing options
 \verbatim
 frame selection:
 
@@ -374,7 +374,7 @@ other transformations:
           clip image region (l, t, w, h)
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmj2pnm_output_options output options
 \verbatim
 general:
 
@@ -431,7 +431,7 @@ image format:
           write 8-bit lossy JPEG (baseline)
 \endverbatim
 
-\section notes NOTES
+\section dcmj2pnm_notes NOTES
 
 The following preferred interpolation algorithms can be selected using the
 \e --interpolate option:
@@ -452,7 +452,7 @@ and compiled with support for the external \b libpng PNG library.  Option
 \e --interlace enables progressive image view while loading the PNG file.
 Only a few applications take care of the meta info (TEXT) in a PNG file.
 
-\section transfer_syntaxes TRANSFER SYNTAXES
+\section dcmj2pnm_transfer_syntaxes TRANSFER SYNTAXES
 
 \b dcmj2pnm supports the following transfer syntaxes for input (\e dcmfile-in):
 
@@ -472,7 +472,7 @@ RLELosslessTransferSyntax                      1.2.840.10008.1.2.5
 
 (*) if compiled with zlib support enabled
 
-\section logging LOGGING
+\section dcmj2pnm_logging 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
@@ -491,7 +491,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmj2pnm_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -513,7 +513,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmj2pnm_environment ENVIRONMENT
 
 The \b dcmj2pnm utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -529,18 +529,18 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dcmj2pnm_files FILES
 
 <em>\<datadir\>/camera.lut</em> - sample characteristics file of a camera
 \n<em>\<datadir\>/monitor.lut</em> - sample characteristics file of a monitor
 \n<em>\<datadir\>/printer.lut</em> - sample characteristics file of a printer
 \n<em>\<datadir\>/scanner.lut</em> - sample characteristics file of a scanner
 
-\section see_also SEE ALSO
+\section dcmj2pnm_see_also SEE ALSO
 
 <b>dcm2pnm</b>(1), <b>img2dcm</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmj2pnm_copyright COPYRIGHT
 
 Copyright (C) 2001-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmjpeg/docs/dcmmkdir.man b/dcmjpeg/docs/dcmmkdir.man
index 0109ba2..fce3a13 100644
--- a/dcmjpeg/docs/dcmmkdir.man
+++ b/dcmjpeg/docs/dcmmkdir.man
@@ -6,13 +6,13 @@
 \page dcmmkdir dcmmkdir: Create a DICOMDIR file
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmmkdir_synopsis SYNOPSIS
 
 \verbatim
 dcmmkdir [options] [dcmfile-in...]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmmkdir_description DESCRIPTION
 
 The \b dcmmkdir utility creates a \e DICOMDIR file from the specified
 referenced DICOM files according to the DICOM Part 11 Media Storage Application
@@ -64,14 +64,14 @@ This tool extends \b dcmgpdir which can only create General Purpose \e DICOMDIR
 files.  The default behavior of \b dcmmkdir (with \e --general-purpose) is
 equivalent to that of \b dcmgpdir.
 
-\section parameters PARAMETERS
+\section dcmmkdir_parameters PARAMETERS
 
 \verbatim
 dcmfile-in  referenced DICOM file (or directory to be scanned)
 \endverbatim
 
-\section options OPTIONS
-\subsection general_options general options
+\section dcmmkdir_options OPTIONS
+\subsection dcmmkdir_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -99,7 +99,7 @@ dcmfile-in  referenced DICOM file (or directory to be scanned)
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmmkdir_input_options input options
 \verbatim
 DICOMDIR identifiers:
 
@@ -140,7 +140,7 @@ reading:
           # possibly not available on all systems
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcmmkdir_processing_options processing options
 \verbatim
 consistency check:
 
@@ -203,7 +203,7 @@ icon images:
           created automatically (default: black image)
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmmkdir_output_options output options
 \verbatim
 DICOMDIR file:
 
@@ -373,7 +373,7 @@ length encoding in sequences and items:
           write with undefined lengths
 \endverbatim
 
-\section notes NOTES
+\section dcmmkdir_notes NOTES
 
 All files specified on the command line (or discovered by recursively examining
 the contents of directories with the \e +r option) are first evaluated for
@@ -400,7 +400,7 @@ This might change in the future.  Till then, color images are automatically
 converted to grayscale mode.  The icon size is 128*128 pixels for the cardiac
 profiles (as required by the DICOM standard) and 64*64 for all others.
 
-\subsection scanning_directories Scanning Directories
+\subsection dcmmkdir_scanning_directories Scanning Directories
 
 Adding files from directories is possible by using option \e --recurse.  If no
 further command line parameters are given, the directory specified by option
@@ -414,7 +414,7 @@ other patterns are specified on the command line outside the
 \e --input-directory option (e.g. in order to select further files), these do
 not apply to the specified directories.
 
-\section logging LOGGING
+\section dcmmkdir_logging 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
@@ -433,7 +433,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmmkdir_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -455,7 +455,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmmkdir_environment ENVIRONMENT
 
 The \b dcmmkdir utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -471,11 +471,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dcmmkdir_see_also SEE ALSO
 
 <b>dcmgpdir</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmmkdir_copyright COPYRIGHT
 
 Copyright (C) 2001-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmjpeg/include/CMakeLists.txt b/dcmjpeg/include/CMakeLists.txt
index e1c6aa4..1a8c028 100644
--- a/dcmjpeg/include/CMakeLists.txt
+++ b/dcmjpeg/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmjpeg DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmjpeg DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djcodecd.h b/dcmjpeg/include/dcmtk/dcmjpeg/djcodecd.h
index 99b6e48..4a747ce 100644
--- a/dcmjpeg/include/dcmtk/dcmjpeg/djcodecd.h
+++ b/dcmjpeg/include/dcmtk/dcmjpeg/djcodecd.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2011, OFFIS e.V.
+ *  Copyright (C) 2001-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -188,6 +188,12 @@ public:
    */
   virtual E_TransferSyntax supportedTransferSyntax() const = 0;
 
+  /** returns true if the transfer syntax supported by this
+   *  codec is lossless.
+   *  @return lossless flag
+   */
+  virtual OFBool isLosslessProcess() const = 0;
+
 private:
 
   /** creates an instance of the compression library to be used for decoding.
diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djdecbas.h b/dcmjpeg/include/dcmtk/dcmjpeg/djdecbas.h
index 549839f..3809f6a 100644
--- a/dcmjpeg/include/dcmtk/dcmjpeg/djdecbas.h
+++ b/dcmjpeg/include/dcmtk/dcmjpeg/djdecbas.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2011, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -43,6 +43,12 @@ public:
    */
   virtual E_TransferSyntax supportedTransferSyntax() const;
 
+  /** returns true if the transfer syntax supported by this
+   *  codec is lossless.
+   *  @return lossless flag
+   */
+  virtual OFBool isLosslessProcess() const;
+
 private:
 
   /** creates an instance of the compression library to be used for decoding.
diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djdecext.h b/dcmjpeg/include/dcmtk/dcmjpeg/djdecext.h
index a53b911..8d48e1a 100644
--- a/dcmjpeg/include/dcmtk/dcmjpeg/djdecext.h
+++ b/dcmjpeg/include/dcmtk/dcmjpeg/djdecext.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2011, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -44,6 +44,12 @@ public:
    */
   virtual E_TransferSyntax supportedTransferSyntax() const;
 
+  /** returns true if the transfer syntax supported by this
+   *  codec is lossless.
+   *  @return lossless flag
+   */
+  virtual OFBool isLosslessProcess() const;
+
 private:
 
   /** creates an instance of the compression library to be used for decoding.
diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djdeclol.h b/dcmjpeg/include/dcmtk/dcmjpeg/djdeclol.h
index 220aea0..780c4cd 100644
--- a/dcmjpeg/include/dcmtk/dcmjpeg/djdeclol.h
+++ b/dcmjpeg/include/dcmtk/dcmjpeg/djdeclol.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2011, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -44,6 +44,12 @@ public:
    */
   virtual E_TransferSyntax supportedTransferSyntax() const;
 
+  /** returns true if the transfer syntax supported by this
+   *  codec is lossless.
+   *  @return lossless flag
+   */
+  virtual OFBool isLosslessProcess() const;
+
 private:
 
   /** creates an instance of the compression library to be used for decoding.
diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djdecpro.h b/dcmjpeg/include/dcmtk/dcmjpeg/djdecpro.h
index 464251f..f4cfdf4 100644
--- a/dcmjpeg/include/dcmtk/dcmjpeg/djdecpro.h
+++ b/dcmjpeg/include/dcmtk/dcmjpeg/djdecpro.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2011, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -44,6 +44,12 @@ public:
    */
   virtual E_TransferSyntax supportedTransferSyntax() const;
 
+  /** returns true if the transfer syntax supported by this
+   *  codec is lossless.
+   *  @return lossless flag
+   */
+  virtual OFBool isLosslessProcess() const;
+
 private:
 
   /** creates an instance of the compression library to be used for decoding.
diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djdecsps.h b/dcmjpeg/include/dcmtk/dcmjpeg/djdecsps.h
index 6d7f25d..22b5128 100644
--- a/dcmjpeg/include/dcmtk/dcmjpeg/djdecsps.h
+++ b/dcmjpeg/include/dcmtk/dcmjpeg/djdecsps.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2011, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -44,6 +44,12 @@ public:
    */
   virtual E_TransferSyntax supportedTransferSyntax() const;
 
+  /** returns true if the transfer syntax supported by this
+   *  codec is lossless.
+   *  @return lossless flag
+   */
+  virtual OFBool isLosslessProcess() const;
+
 private:
 
   /** creates an instance of the compression library to be used for decoding.
diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djdecsv1.h b/dcmjpeg/include/dcmtk/dcmjpeg/djdecsv1.h
index 5567bbb..87dba51 100644
--- a/dcmjpeg/include/dcmtk/dcmjpeg/djdecsv1.h
+++ b/dcmjpeg/include/dcmtk/dcmjpeg/djdecsv1.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2011, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -44,6 +44,12 @@ public:
    */
   virtual E_TransferSyntax supportedTransferSyntax() const;
 
+  /** returns true if the transfer syntax supported by this
+   *  codec is lossless.
+   *  @return lossless flag
+   */
+  virtual OFBool isLosslessProcess() const;
+
 private:
 
   /** creates an instance of the compression library to be used for decoding.
diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djutils.h b/dcmjpeg/include/dcmtk/dcmjpeg/djutils.h
index 80f7a74..1275dd7 100644
--- a/dcmjpeg/include/dcmtk/dcmjpeg/djutils.h
+++ b/dcmjpeg/include/dcmtk/dcmjpeg/djutils.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2014, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -218,6 +218,16 @@ public:
    *  @return photometric interpretation enum, EPI_Unknown if unknown string or attribute missing
    */
   static EP_Interpretation getPhotometricInterpretation(DcmItem *item);
+
+  /** adjusts the padding of a JPEG bitstream in the buffer that has odd length,
+   *  such that the End of Image (EOI) marker ends on an even byte boundary.
+   *  @param buffer pointer to buffer containing compressed JPEG bitstream
+   *  @param bufSize number of bytes used for the JPEG bitstream (including pad byte)
+   */
+  static void fixPadding(
+    Uint8 *buffer,
+    Uint32 bufSize);
+
 };
 
 #endif
diff --git a/dcmjpeg/libijg12/jerror.c b/dcmjpeg/libijg12/jerror.c
index 1b79aad..da5c14d 100644
--- a/dcmjpeg/libijg12/jerror.c
+++ b/dcmjpeg/libijg12/jerror.c
@@ -25,6 +25,7 @@
 #include "jerror12.h"
 
 #ifdef USE_WINDOWS_MESSAGEBOX
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #endif
 
diff --git a/dcmjpeg/libijg16/jerror.c b/dcmjpeg/libijg16/jerror.c
index 140d50d..6b2f29d 100644
--- a/dcmjpeg/libijg16/jerror.c
+++ b/dcmjpeg/libijg16/jerror.c
@@ -25,6 +25,7 @@
 #include "jerror16.h"
 
 #ifdef USE_WINDOWS_MESSAGEBOX
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #endif
 
diff --git a/dcmjpeg/libijg8/jerror.c b/dcmjpeg/libijg8/jerror.c
index 2850aab..f6595ec 100644
--- a/dcmjpeg/libijg8/jerror.c
+++ b/dcmjpeg/libijg8/jerror.c
@@ -25,6 +25,7 @@
 #include "jerror8.h"
 
 #ifdef USE_WINDOWS_MESSAGEBOX
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #endif
 
diff --git a/dcmjpeg/libsrc/CMakeLists.txt b/dcmjpeg/libsrc/CMakeLists.txt
index 08da120..8321c68 100644
--- a/dcmjpeg/libsrc/CMakeLists.txt
+++ b/dcmjpeg/libsrc/CMakeLists.txt
@@ -1,5 +1,5 @@
 # declare additional include directories
-INCLUDE_DIRECTORIES(${dcmjpeg_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${dcmimage_SOURCE_DIR}/include ${dcmjpeg_SOURCE_DIR}/libijg8 ${dcmjpeg_SOURCE_DIR}/libijg12 ${dcmjpeg_SOURCE_DIR}/libijg16 ${ZLIB_INCDIR})
+INCLUDE_DIRECTORIES("${dcmjpeg_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" "${dcmimage_SOURCE_DIR}/include" "${dcmjpeg_SOURCE_DIR}/libijg8" "${dcmjpeg_SOURCE_DIR}/libijg12" "${dcmjpeg_SOURCE_DIR}/libijg16" ${ZLIB_INCDIR})
 
 # create library from source files
 DCMTK_ADD_LIBRARY(dcmjpeg ddpiimpl dipijpeg djcodecd djcodece djcparam djdecbas djdecext djdeclol djdecode djdecpro djdecsps djdecsv1 djdijg12 djdijg8 djdijg16 djeijg12 djeijg8 djeijg16 djencbas djencext djenclol djencode djencpro djencsps djencsv1 djrplol djrploss djutils)
diff --git a/dcmjpeg/libsrc/Makefile.dep b/dcmjpeg/libsrc/Makefile.dep
index 6350cba..f94d7c8 100644
--- a/dcmjpeg/libsrc/Makefile.dep
+++ b/dcmjpeg/libsrc/Makefile.dep
@@ -21,6 +21,7 @@ ddpiimpl.o: ddpiimpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -33,7 +34,7 @@ ddpiimpl.o: ddpiimpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -108,7 +109,10 @@ dipijpeg.o: dipijpeg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -126,10 +130,10 @@ dipijpeg.o: dipijpeg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -180,7 +184,10 @@ djcodecd.o: djcodecd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -198,9 +205,9 @@ djcodecd.o: djcodecd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -252,7 +259,10 @@ djcodece.o: djcodece.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -270,9 +280,9 @@ djcodece.o: djcodece.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -348,7 +358,10 @@ djcparam.o: djcparam.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -366,9 +379,9 @@ djcparam.o: djcparam.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -400,7 +413,10 @@ djdecbas.o: djdecbas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -418,9 +434,9 @@ djdecbas.o: djdecbas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -463,7 +479,10 @@ djdecext.o: djdecext.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -481,9 +500,9 @@ djdecext.o: djdecext.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -527,7 +546,10 @@ djdeclol.o: djdeclol.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -545,9 +567,9 @@ djdeclol.o: djdeclol.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -591,7 +613,10 @@ djdecode.o: djdecode.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -609,9 +634,9 @@ djdecode.o: djdecode.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \
  ../include/dcmtk/dcmjpeg/djdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dccodec.h \
@@ -647,7 +672,10 @@ djdecpro.o: djdecpro.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -665,9 +693,9 @@ djdecpro.o: djdecpro.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -711,7 +739,10 @@ djdecsps.o: djdecsps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -729,9 +760,9 @@ djdecsps.o: djdecsps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -775,7 +806,10 @@ djdecsv1.o: djdecsv1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -793,9 +827,9 @@ djdecsv1.o: djdecsv1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -837,7 +871,10 @@ djdijg12.o: djdijg12.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -855,10 +892,10 @@ djdijg12.o: djdijg12.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmjpeg/djutils.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \
@@ -892,7 +929,10 @@ djdijg16.o: djdijg16.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -910,10 +950,10 @@ djdijg16.o: djdijg16.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmjpeg/djutils.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \
@@ -947,7 +987,10 @@ djdijg8.o: djdijg8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -965,10 +1008,10 @@ djdijg8.o: djdijg8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmjpeg/djutils.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \
@@ -1004,7 +1047,10 @@ djeijg12.o: djeijg12.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1021,10 +1067,10 @@ djeijg12.o: djeijg12.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \
@@ -1061,7 +1107,10 @@ djeijg16.o: djeijg16.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1078,10 +1127,10 @@ djeijg16.o: djeijg16.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \
@@ -1118,7 +1167,10 @@ djeijg8.o: djeijg8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1135,10 +1187,10 @@ djeijg8.o: djeijg8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \
@@ -1175,7 +1227,10 @@ djencbas.o: djencbas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1193,9 +1248,9 @@ djencbas.o: djencbas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -1238,7 +1293,10 @@ djencext.o: djencext.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1256,9 +1314,9 @@ djencext.o: djencext.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -1302,7 +1360,10 @@ djenclol.o: djenclol.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1320,9 +1381,9 @@ djenclol.o: djenclol.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -1366,7 +1427,10 @@ djencode.o: djencode.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1384,9 +1448,9 @@ djencode.o: djencode.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \
  ../include/dcmtk/dcmjpeg/djdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -1422,7 +1486,10 @@ djencpro.o: djencpro.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1440,9 +1507,9 @@ djencpro.o: djencpro.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -1486,7 +1553,10 @@ djencsps.o: djencsps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1504,9 +1574,9 @@ djencsps.o: djencsps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -1550,7 +1620,10 @@ djencsv1.o: djencsv1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1568,9 +1641,9 @@ djencsv1.o: djencsv1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -1623,7 +1696,10 @@ djrplol.o: djrplol.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1640,9 +1716,9 @@ djrplol.o: djrplol.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1680,7 +1756,10 @@ djrploss.o: djrploss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1697,9 +1776,9 @@ djrploss.o: djrploss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1727,7 +1806,10 @@ djutils.o: djutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1745,9 +1827,9 @@ djutils.o: djutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \
  ../include/dcmtk/dcmjpeg/djdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
diff --git a/dcmjpeg/libsrc/djcodecd.cc b/dcmjpeg/libsrc/djcodecd.cc
index 125b96b..754eb90 100644
--- a/dcmjpeg/libsrc/djcodecd.cc
+++ b/dcmjpeg/libsrc/djcodecd.cc
@@ -337,9 +337,14 @@ OFCondition DJCodecDecoder::decode(
     // which should always identify itself as dataset, not as item.
     if (dataset->ident() == EVR_dataset)
     {
+        DcmItem *ditem = OFreinterpret_cast(DcmItem*, dataset);
+
         // create new SOP instance UID if codec parameters require so
         if (result.good() && (djcp->getUIDCreation() == EUC_always))
-          result = DcmCodec::newInstance(OFreinterpret_cast(DcmItem*, dataset), NULL, NULL, NULL);
+          result = DcmCodec::newInstance(ditem, NULL, NULL, NULL);
+
+        // set Lossy Image Compression to "01" (see DICOM part 3, C.7.6.1.1.5)
+        if (result.good() && (! isLosslessProcess())) result = ditem->putAndInsertString(DCM_LossyImageCompression, "01");
     }
 
   }
diff --git a/dcmjpeg/libsrc/djcodece.cc b/dcmjpeg/libsrc/djcodece.cc
index d3d2d0c..2bad189 100644
--- a/dcmjpeg/libsrc/djcodece.cc
+++ b/dcmjpeg/libsrc/djcodece.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2016, OFFIS e.V.
+ *  Copyright (C) 2001-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -248,7 +248,7 @@ OFCondition DJCodecEncoder::encodeColorImage(
 
   // initialize settings with defaults for RGB mode
   OFBool monochromeMode = OFFalse;
-  size_t flags = 0; // flags for initialization of DicomImage
+  unsigned long flags = 0; // flags for initialization of DicomImage
   EP_Interpretation interpr = EPI_RGB;
   Uint16 samplesPerPixel = 3;
   const char *photometricInterpretation = "RGB";
@@ -346,7 +346,7 @@ OFCondition DJCodecEncoder::encodeColorImage(
 
       // compute original image size in bytes, ignoring any padding bits.
       uncompressedSize = OFstatic_cast(double, columns * rows * dimage->getDepth() * frameCount * samplesPerPixel) / 8.0;
-      for (size_t i=0; (i<frameCount) && (result.good()); i++)
+      for (unsigned long i=0; (i<frameCount) && (result.good()); i++)
       {
         frame = dimage->getOutputData(bitsPerSample, i, 0);
         if (frame == NULL) result = EC_MemoryExhausted;
@@ -884,7 +884,7 @@ OFCondition DJCodecEncoder::encodeMonochromeImage(
   compressionRatio = 0.0; // initialize if something goes wrong
   size_t compressedSize = 0;
   double uncompressedSize = 0.0;
-  size_t flags = 0; // flags for initialization of DicomImage
+  unsigned long flags = 0; // flags for initialization of DicomImage
 
   // variables needed if VOI mode is 0
   double minRange = 0.0;
@@ -999,14 +999,14 @@ OFCondition DJCodecEncoder::encodeMonochromeImage(
         {
           size_t windowParameter = cp->getWindowParameter();
           if ((windowParameter < 1) || (windowParameter > dimage.getWindowCount())) result = EC_IllegalCall;
-          if (!dimage.setWindow(windowParameter - 1)) result = EC_IllegalCall;
+          if (!dimage.setWindow(OFstatic_cast(unsigned long, windowParameter - 1))) result = EC_IllegalCall;
         }
         break;
       case 2: // use the n-th VOI look up table from the image file
         {
           size_t windowParameter = cp->getWindowParameter();
           if ((windowParameter < 1) || (windowParameter > dimage.getVoiLutCount())) result = EC_IllegalCall;
-          if (!dimage.setVoiLut(windowParameter - 1)) result = EC_IllegalCall;
+          if (!dimage.setVoiLut(OFstatic_cast(unsigned long, windowParameter - 1))) result = EC_IllegalCall;
         }
         break;
       case 3: // Compute VOI window using min-max algorithm
@@ -1032,7 +1032,8 @@ OFCondition DJCodecEncoder::encodeMonochromeImage(
         {
          size_t left_pos=0, top_pos=0, width=0, height=0;
          cp->getROI(left_pos, top_pos, width, height);
-          if (!dimage.setRoiWindow(left_pos, top_pos, width, height)) result = EC_IllegalCall;
+          if (!dimage.setRoiWindow(OFstatic_cast(unsigned long, left_pos), OFstatic_cast(unsigned long, top_pos),
+             OFstatic_cast(unsigned long, width), OFstatic_cast(unsigned long, height))) result = EC_IllegalCall;
         }
         break;
       default: // includes case 0, which must not occur here
@@ -1141,7 +1142,7 @@ OFCondition DJCodecEncoder::encodeMonochromeImage(
       uncompressedSize = OFstatic_cast(double, columns * rows * pixelDepth * frameCount * samplesPerPixel) / 8.0;
       for (size_t i=0; (i<frameCount) && (result.good()); i++)
       {
-        frame = dimage.getOutputData(bitsPerSample, i, 0);
+        frame = dimage.getOutputData(bitsPerSample, OFstatic_cast(unsigned long, i), 0);
         if (frame == NULL) result = EC_MemoryExhausted;
         else
         {
diff --git a/dcmjpeg/libsrc/djdecbas.cc b/dcmjpeg/libsrc/djdecbas.cc
index 19bfa67..614d161 100644
--- a/dcmjpeg/libsrc/djdecbas.cc
+++ b/dcmjpeg/libsrc/djdecbas.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2011, OFFIS e.V.
+ *  Copyright (C) 2001-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -43,6 +43,10 @@ E_TransferSyntax DJDecoderBaseline::supportedTransferSyntax() const
   return EXS_JPEGProcess1;
 }
 
+OFBool DJDecoderBaseline::isLosslessProcess() const
+{
+  return OFFalse;
+}
 
 DJDecoder *DJDecoderBaseline::createDecoderInstance(
     const DcmRepresentationParameter * /* toRepParam */,
diff --git a/dcmjpeg/libsrc/djdecext.cc b/dcmjpeg/libsrc/djdecext.cc
index 7efd99c..0f0f215 100644
--- a/dcmjpeg/libsrc/djdecext.cc
+++ b/dcmjpeg/libsrc/djdecext.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2010, OFFIS e.V.
+ *  Copyright (C) 2001-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -43,6 +43,10 @@ E_TransferSyntax DJDecoderExtended::supportedTransferSyntax() const
   return EXS_JPEGProcess2_4;
 }
 
+OFBool DJDecoderExtended::isLosslessProcess() const
+{
+  return OFFalse;
+}
 
 DJDecoder *DJDecoderExtended::createDecoderInstance(
     const DcmRepresentationParameter * /* toRepParam */,
diff --git a/dcmjpeg/libsrc/djdeclol.cc b/dcmjpeg/libsrc/djdeclol.cc
index 0d5f49a..c342b72 100644
--- a/dcmjpeg/libsrc/djdeclol.cc
+++ b/dcmjpeg/libsrc/djdeclol.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2011, OFFIS e.V.
+ *  Copyright (C) 2001-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -43,6 +43,10 @@ E_TransferSyntax DJDecoderLossless::supportedTransferSyntax() const
   return EXS_JPEGProcess14;
 }
 
+OFBool DJDecoderLossless::isLosslessProcess() const
+{
+  return OFTrue;
+}
 
 DJDecoder *DJDecoderLossless::createDecoderInstance(
     const DcmRepresentationParameter * /* toRepParam */,
diff --git a/dcmjpeg/libsrc/djdecpro.cc b/dcmjpeg/libsrc/djdecpro.cc
index c99581a..c5e9285 100644
--- a/dcmjpeg/libsrc/djdecpro.cc
+++ b/dcmjpeg/libsrc/djdecpro.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2010, OFFIS e.V.
+ *  Copyright (C) 2001-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -43,6 +43,10 @@ E_TransferSyntax DJDecoderProgressive::supportedTransferSyntax() const
   return EXS_JPEGProcess10_12;
 }
 
+OFBool DJDecoderProgressive::isLosslessProcess() const
+{
+  return OFFalse;
+}
 
 DJDecoder *DJDecoderProgressive::createDecoderInstance(
     const DcmRepresentationParameter * /* toRepParam */,
diff --git a/dcmjpeg/libsrc/djdecsps.cc b/dcmjpeg/libsrc/djdecsps.cc
index 22bfbb7..a02e7b4 100644
--- a/dcmjpeg/libsrc/djdecsps.cc
+++ b/dcmjpeg/libsrc/djdecsps.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2010, OFFIS e.V.
+ *  Copyright (C) 2001-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -44,6 +44,12 @@ E_TransferSyntax DJDecoderSpectralSelection::supportedTransferSyntax() const
 }
 
 
+OFBool DJDecoderSpectralSelection::isLosslessProcess() const
+{
+  return OFFalse;
+}
+
+
 DJDecoder *DJDecoderSpectralSelection::createDecoderInstance(
     const DcmRepresentationParameter * /* toRepParam */,
     const DJCodecParameter *cp,
diff --git a/dcmjpeg/libsrc/djdecsv1.cc b/dcmjpeg/libsrc/djdecsv1.cc
index 04b2e39..5a5587e 100644
--- a/dcmjpeg/libsrc/djdecsv1.cc
+++ b/dcmjpeg/libsrc/djdecsv1.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2010, OFFIS e.V.
+ *  Copyright (C) 2001-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -44,6 +44,10 @@ E_TransferSyntax DJDecoderP14SV1::supportedTransferSyntax() const
   return EXS_JPEGProcess14SV1;
 }
 
+OFBool DJDecoderP14SV1::isLosslessProcess() const
+{
+  return OFTrue;
+}
 
 DJDecoder *DJDecoderP14SV1::createDecoderInstance(
     const DcmRepresentationParameter * /* toRepParam */,
diff --git a/dcmjpeg/libsrc/djeijg12.cc b/dcmjpeg/libsrc/djeijg12.cc
index 7cad737..a350436 100644
--- a/dcmjpeg/libsrc/djeijg12.cc
+++ b/dcmjpeg/libsrc/djeijg12.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2014, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -15,7 +15,7 @@
  *
  *  Author:  Marco Eichelberg, Norbert Olges
  *
- *  Purpose: compression routines of the IJG JPEG library configured for 12 bits/sample. 
+ *  Purpose: compression routines of the IJG JPEG library configured for 12 bits/sample.
  *
  */
 
@@ -182,7 +182,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[0].Se = 0;
     scanptr[0].Ah = 0;
     scanptr[0].Al = 0;
-    
+
     // AC scans
     // First two Y AC coefficients
     scanptr[1].component_index[0] = 0;
@@ -191,7 +191,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[1].Se = 2;
     scanptr[1].Ah = 0;
     scanptr[1].Al = 0;
-    
+
     // Three more
     scanptr[2].component_index[0] = 0;
     scanptr[2].comps_in_scan = 1;
@@ -199,7 +199,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[2].Se = 5;
     scanptr[2].Ah = 0;
     scanptr[2].Al = 0;
-    
+
     // All AC coefficients for Cb
     scanptr[3].component_index[0] = 1;
     scanptr[3].comps_in_scan = 1;
@@ -207,7 +207,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[3].Se = 63;
     scanptr[3].Ah = 0;
     scanptr[3].Al = 0;
-    
+
     // All AC coefficients for Cr
     scanptr[4].component_index[0] = 2;
     scanptr[4].comps_in_scan = 1;
@@ -215,7 +215,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[4].Se = 63;
     scanptr[4].Ah = 0;
     scanptr[4].Al = 0;
-    
+
     // More Y coefficients
     scanptr[5].component_index[0] = 0;
     scanptr[5].comps_in_scan = 1;
@@ -223,7 +223,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[5].Se = 9;
     scanptr[5].Ah = 0;
     scanptr[5].Al = 0;
-    
+
     // Remaining Y coefficients
     scanptr[6].component_index[0] = 0;
     scanptr[6].comps_in_scan = 1;
@@ -236,7 +236,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
   {
     /* All-purpose script for other color spaces. */
     int j=0;
-    
+
     // Interleaved DC scan for all components
     for (j=0; j<ncomps; j++) scanptr[0].component_index[j] = j;
     scanptr[0].comps_in_scan = ncomps;
@@ -246,7 +246,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[0].Al = 0;
 
     // first AC scan for each component
-    for (j=0; j<ncomps; j++) 
+    for (j=0; j<ncomps; j++)
     {
       scanptr[j+1].component_index[0] = j;
       scanptr[j+1].comps_in_scan = 1;
@@ -257,7 +257,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     }
 
     // second AC scan for each component
-    for (j=0; j<ncomps; j++) 
+    for (j=0; j<ncomps; j++)
     {
       scanptr[j+ncomps+1].component_index[0] = j;
       scanptr[j+ncomps+1].comps_in_scan = 1;
@@ -336,7 +336,7 @@ OFCondition DJCompressIJG12Bit::encode(
   return EC_IllegalCall;
 }
 
-OFCondition DJCompressIJG12Bit::encode( 
+OFCondition DJCompressIJG12Bit::encode(
   Uint16 columns,
   Uint16 rows,
   EP_Interpretation colorSpace,
@@ -355,7 +355,7 @@ OFCondition DJCompressIJG12Bit::encode(
   if (setjmp(jerr.setjmp_buffer))
   {
     // the IJG error handler will cause the following code to be executed
-    char buffer[JMSG_LENGTH_MAX];    
+    char buffer[JMSG_LENGTH_MAX];
     (*cinfo.err->format_message)(OFreinterpret_cast(jpeg_common_struct*, &cinfo), buffer); /* Create the message */
     jpeg_destroy_compress(&cinfo);
     return makeOFCondition(OFM_dcmjpeg, EJCode_IJG12_Compression, OF_error, buffer);
@@ -406,7 +406,7 @@ OFCondition DJCompressIJG12Bit::encode(
      jpeg_simple_lossless(&cinfo,psv,pt);
      break;
   }
-  
+
   cinfo.smoothing_factor = cparam->getSmoothingFactor();
 
   // initialize sampling factors
@@ -445,7 +445,7 @@ OFCondition DJCompressIJG12Bit::encode(
   JSAMPROW row_pointer[1];
   jpeg_start_compress(&cinfo,TRUE);
   int row_stride = columns * samplesPerPixel;
-  while (cinfo.next_scanline < cinfo.image_height) 
+  while (cinfo.next_scanline < cinfo.image_height)
   {
     // JSAMPLE is signed, typecast to avoid a warning
     row_pointer[0] = OFreinterpret_cast(JSAMPLE*, image_buffer + (cinfo.next_scanline * row_stride));
@@ -456,11 +456,11 @@ OFCondition DJCompressIJG12Bit::encode(
 
   length = OFstatic_cast(Uint32, bytesInLastBlock);
   if (pixelDataList.size() > 1) length += OFstatic_cast(Uint32, (pixelDataList.size() - 1)*IJGE12_BLOCKSIZE);
-  if (length % 2) length++; // ensure even length    
+  OFBool length_is_odd = (length % 2) > 0;
+  if (length_is_odd) length++; // ensure even length
 
   to = new Uint8[length];
   if (to == NULL) return EC_MemoryExhausted;
-  if (length > 0) to[length-1] = 0;    
 
   size_t offset=0;
   OFListIterator(unsigned char *) first = pixelDataList.begin();
@@ -481,6 +481,7 @@ OFCondition DJCompressIJG12Bit::encode(
     }
     ++first;
   }
+  if (length_is_odd) DcmJpegHelper::fixPadding(to, length);
   cleanup();
 
   return EC_Normal;
@@ -495,12 +496,12 @@ void DJCompressIJG12Bit::initDestination(jpeg_compress_struct *cinfo)
   {
     pixelDataList.push_back(newBlock);
     cinfo->dest->next_output_byte = newBlock;
-    cinfo->dest->free_in_buffer = IJGE12_BLOCKSIZE;    
+    cinfo->dest->free_in_buffer = IJGE12_BLOCKSIZE;
   }
   else
   {
     cinfo->dest->next_output_byte = NULL;
-    cinfo->dest->free_in_buffer = 0;    
+    cinfo->dest->free_in_buffer = 0;
   }
 }
 
@@ -512,7 +513,7 @@ int DJCompressIJG12Bit::emptyOutputBuffer(jpeg_compress_struct *cinfo)
   {
     pixelDataList.push_back(newBlock);
     cinfo->dest->next_output_byte = newBlock;
-    cinfo->dest->free_in_buffer = IJGE12_BLOCKSIZE;    
+    cinfo->dest->free_in_buffer = IJGE12_BLOCKSIZE;
   }
   else
   {
diff --git a/dcmjpeg/libsrc/djeijg16.cc b/dcmjpeg/libsrc/djeijg16.cc
index e045cd0..c490e16 100644
--- a/dcmjpeg/libsrc/djeijg16.cc
+++ b/dcmjpeg/libsrc/djeijg16.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2014, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -15,7 +15,7 @@
  *
  *  Author:  Marco Eichelberg, Norbert Olges
  *
- *  Purpose: compression routines of the IJG JPEG library configured for 16 bits/sample. 
+ *  Purpose: compression routines of the IJG JPEG library configured for 16 bits/sample.
  *
  */
 
@@ -181,7 +181,7 @@ OFCondition DJCompressIJG16Bit::encode(
   return EC_IllegalCall;
 }
 
-OFCondition DJCompressIJG16Bit::encode( 
+OFCondition DJCompressIJG16Bit::encode(
   Uint16 columns,
   Uint16 rows,
   EP_Interpretation colorSpace,
@@ -200,7 +200,7 @@ OFCondition DJCompressIJG16Bit::encode(
   if (setjmp(jerr.setjmp_buffer))
   {
     // the IJG error handler will cause the following code to be executed
-    char buffer[JMSG_LENGTH_MAX];    
+    char buffer[JMSG_LENGTH_MAX];
     (*cinfo.err->format_message)(OFreinterpret_cast(jpeg_common_struct*, &cinfo), buffer); /* Create the message */
     jpeg_destroy_compress(&cinfo);
     return makeOFCondition(OFM_dcmjpeg, EJCode_IJG16_Compression, OF_error, buffer);
@@ -242,7 +242,7 @@ OFCondition DJCompressIJG16Bit::encode(
      return makeOFCondition(OFM_dcmjpeg, EJCode_IJG16_Compression, OF_error, "JPEG with 16 bits/sample only allowed with lossless compression");
      /* break; */
   }
-  
+
   cinfo.smoothing_factor = cparam->getSmoothingFactor();
 
   // initialize sampling factors
@@ -281,7 +281,7 @@ OFCondition DJCompressIJG16Bit::encode(
   JSAMPROW row_pointer[1];
   jpeg_start_compress(&cinfo,TRUE);
   int row_stride = columns * samplesPerPixel;
-  while (cinfo.next_scanline < cinfo.image_height) 
+  while (cinfo.next_scanline < cinfo.image_height)
   {
     // JSAMPLE might be signed, typecast to avoid a warning
     row_pointer[0] = OFreinterpret_cast(JSAMPLE*, image_buffer + (cinfo.next_scanline * row_stride));
@@ -292,11 +292,11 @@ OFCondition DJCompressIJG16Bit::encode(
 
   length = OFstatic_cast(Uint32, bytesInLastBlock);
   if (pixelDataList.size() > 1) length += OFstatic_cast(Uint32, (pixelDataList.size() - 1)*IJGE16_BLOCKSIZE);
-  if (length % 2) length++; // ensure even length    
+  OFBool length_is_odd = (length % 2) > 0;
+  if (length_is_odd) length++; // ensure even length
 
   to = new Uint8[length];
   if (to == NULL) return EC_MemoryExhausted;
-  if (length > 0) to[length-1] = 0;    
 
   size_t offset=0;
   OFListIterator(unsigned char *) first = pixelDataList.begin();
@@ -317,6 +317,7 @@ OFCondition DJCompressIJG16Bit::encode(
     }
     ++first;
   }
+  if (length_is_odd) DcmJpegHelper::fixPadding(to, length);
   cleanup();
 
   return EC_Normal;
@@ -331,12 +332,12 @@ void DJCompressIJG16Bit::initDestination(jpeg_compress_struct *cinfo)
   {
     pixelDataList.push_back(newBlock);
     cinfo->dest->next_output_byte = newBlock;
-    cinfo->dest->free_in_buffer = IJGE16_BLOCKSIZE;    
+    cinfo->dest->free_in_buffer = IJGE16_BLOCKSIZE;
   }
   else
   {
     cinfo->dest->next_output_byte = NULL;
-    cinfo->dest->free_in_buffer = 0;    
+    cinfo->dest->free_in_buffer = 0;
   }
 }
 
@@ -348,12 +349,12 @@ int DJCompressIJG16Bit::emptyOutputBuffer(jpeg_compress_struct *cinfo)
   {
     pixelDataList.push_back(newBlock);
     cinfo->dest->next_output_byte = newBlock;
-    cinfo->dest->free_in_buffer = IJGE16_BLOCKSIZE;    
+    cinfo->dest->free_in_buffer = IJGE16_BLOCKSIZE;
   }
   else
   {
     cinfo->dest->next_output_byte = NULL;
-    cinfo->dest->free_in_buffer = 0;    
+    cinfo->dest->free_in_buffer = 0;
     OF_ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 0xFF);
   }
   return TRUE;
diff --git a/dcmjpeg/libsrc/djeijg8.cc b/dcmjpeg/libsrc/djeijg8.cc
index d61458c..28890c1 100644
--- a/dcmjpeg/libsrc/djeijg8.cc
+++ b/dcmjpeg/libsrc/djeijg8.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2014, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -15,7 +15,7 @@
  *
  *  Author:  Marco Eichelberg, Norbert Olges
  *
- *  Purpose: compression routines of the IJG JPEG library configured for 8 bits/sample. 
+ *  Purpose: compression routines of the IJG JPEG library configured for 8 bits/sample.
  *
  */
 
@@ -183,7 +183,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[0].Se = 0;
     scanptr[0].Ah = 0;
     scanptr[0].Al = 0;
-    
+
     // AC scans
     // First two Y AC coefficients
     scanptr[1].component_index[0] = 0;
@@ -192,7 +192,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[1].Se = 2;
     scanptr[1].Ah = 0;
     scanptr[1].Al = 0;
-    
+
     // Three more
     scanptr[2].component_index[0] = 0;
     scanptr[2].comps_in_scan = 1;
@@ -200,7 +200,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[2].Se = 5;
     scanptr[2].Ah = 0;
     scanptr[2].Al = 0;
-    
+
     // All AC coefficients for Cb
     scanptr[3].component_index[0] = 1;
     scanptr[3].comps_in_scan = 1;
@@ -208,7 +208,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[3].Se = 63;
     scanptr[3].Ah = 0;
     scanptr[3].Al = 0;
-    
+
     // All AC coefficients for Cr
     scanptr[4].component_index[0] = 2;
     scanptr[4].comps_in_scan = 1;
@@ -216,7 +216,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[4].Se = 63;
     scanptr[4].Ah = 0;
     scanptr[4].Al = 0;
-    
+
     // More Y coefficients
     scanptr[5].component_index[0] = 0;
     scanptr[5].comps_in_scan = 1;
@@ -224,7 +224,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[5].Se = 9;
     scanptr[5].Ah = 0;
     scanptr[5].Al = 0;
-    
+
     // Remaining Y coefficients
     scanptr[6].component_index[0] = 0;
     scanptr[6].comps_in_scan = 1;
@@ -237,7 +237,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
   {
     /* All-purpose script for other color spaces. */
     int j=0;
-    
+
     // Interleaved DC scan for all components
     for (j=0; j<ncomps; j++) scanptr[0].component_index[j] = j;
     scanptr[0].comps_in_scan = ncomps;
@@ -247,7 +247,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     scanptr[0].Al = 0;
 
     // first AC scan for each component
-    for (j=0; j<ncomps; j++) 
+    for (j=0; j<ncomps; j++)
     {
       scanptr[j+1].component_index[0] = j;
       scanptr[j+1].comps_in_scan = 1;
@@ -258,7 +258,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo)
     }
 
     // second AC scan for each component
-    for (j=0; j<ncomps; j++) 
+    for (j=0; j<ncomps; j++)
     {
       scanptr[j+ncomps+1].component_index[0] = j;
       scanptr[j+ncomps+1].comps_in_scan = 1;
@@ -337,7 +337,7 @@ OFCondition DJCompressIJG8Bit::encode(
   return EC_IllegalCall;
 }
 
-OFCondition DJCompressIJG8Bit::encode( 
+OFCondition DJCompressIJG8Bit::encode(
   Uint16 columns,
   Uint16 rows,
   EP_Interpretation colorSpace,
@@ -356,7 +356,7 @@ OFCondition DJCompressIJG8Bit::encode(
   if (setjmp(jerr.setjmp_buffer))
   {
     // the IJG error handler will cause the following code to be executed
-    char buffer[JMSG_LENGTH_MAX];    
+    char buffer[JMSG_LENGTH_MAX];
     (*cinfo.err->format_message)(OFreinterpret_cast(jpeg_common_struct*, &cinfo), buffer); /* Create the message */
     jpeg_destroy_compress(&cinfo);
     return makeOFCondition(OFM_dcmjpeg, EJCode_IJG8_Compression, OF_error, buffer);
@@ -410,7 +410,7 @@ OFCondition DJCompressIJG8Bit::encode(
      jpeg_simple_lossless(&cinfo,psv,pt);
      break;
   }
-  
+
   cinfo.smoothing_factor = cparam->getSmoothingFactor();
 
   // initialize sampling factors
@@ -449,7 +449,7 @@ OFCondition DJCompressIJG8Bit::encode(
   JSAMPROW row_pointer[1];
   jpeg_start_compress(&cinfo,TRUE);
   int row_stride = columns * samplesPerPixel;
-  while (cinfo.next_scanline < cinfo.image_height) 
+  while (cinfo.next_scanline < cinfo.image_height)
   {
     row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride];
     jpeg_write_scanlines(&cinfo, row_pointer, 1);
@@ -459,11 +459,11 @@ OFCondition DJCompressIJG8Bit::encode(
 
   length = OFstatic_cast(Uint32, bytesInLastBlock);
   if (pixelDataList.size() > 1) length += OFstatic_cast(Uint32, (pixelDataList.size() - 1)*IJGE8_BLOCKSIZE);
-  if (length % 2) length++; // ensure even length    
+  OFBool length_is_odd = (length % 2) > 0;
+  if (length_is_odd) length++; // ensure even length
 
   to = new Uint8[length];
   if (to == NULL) return EC_MemoryExhausted;
-  if (length > 0) to[length-1] = 0;    
 
   size_t offset=0;
   OFListIterator(unsigned char *) first = pixelDataList.begin();
@@ -484,6 +484,7 @@ OFCondition DJCompressIJG8Bit::encode(
     }
     ++first;
   }
+  if (length_is_odd) DcmJpegHelper::fixPadding(to, length);
   cleanup();
   return EC_Normal;
 }
@@ -497,12 +498,12 @@ void DJCompressIJG8Bit::initDestination(jpeg_compress_struct *cinfo)
   {
     pixelDataList.push_back(newBlock);
     cinfo->dest->next_output_byte = newBlock;
-    cinfo->dest->free_in_buffer = IJGE8_BLOCKSIZE;    
+    cinfo->dest->free_in_buffer = IJGE8_BLOCKSIZE;
   }
   else
   {
     cinfo->dest->next_output_byte = NULL;
-    cinfo->dest->free_in_buffer = 0;    
+    cinfo->dest->free_in_buffer = 0;
   }
 }
 
@@ -514,7 +515,7 @@ int DJCompressIJG8Bit::emptyOutputBuffer(jpeg_compress_struct *cinfo)
   {
     pixelDataList.push_back(newBlock);
     cinfo->dest->next_output_byte = newBlock;
-    cinfo->dest->free_in_buffer = IJGE8_BLOCKSIZE;    
+    cinfo->dest->free_in_buffer = IJGE8_BLOCKSIZE;
   }
   else
   {
diff --git a/dcmjpeg/libsrc/djutils.cc b/dcmjpeg/libsrc/djutils.cc
index 893a510..f2cc7a1 100644
--- a/dcmjpeg/libsrc/djutils.cc
+++ b/dcmjpeg/libsrc/djutils.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2014, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -68,3 +68,29 @@ EP_Interpretation DcmJpegHelper::getPhotometricInterpretation(DcmItem *item)
   }
   return EPI_Unknown;
 }
+
+void DcmJpegHelper::fixPadding(
+    Uint8 *buffer,
+    Uint32 bufSize)
+{
+  if (buffer && (bufSize > 0))
+  {
+    // first write a zero pad byte after the end of the JPEG bitstream
+    buffer[bufSize - 1] = 0;
+
+#ifndef DISABLE_FF_JPEG_BITSTREAM_PADDING
+    // look for the EOI marker
+    if ((bufSize > 2) && (buffer[bufSize-3] == 0xFF) && (buffer[bufSize-2] == 0xD9))
+    {
+      // we now have ff/d9/00 at the end of the JPEG bitstream,
+      // i.e. an end of image (EOI) marker followed by a pad byte.
+      // Replace this with ff/ff/d9, which is an "extended" EOI marker
+      // ending on an even byte boundary.
+      buffer[bufSize-2] = 0xFF;
+      buffer[bufSize-1] = 0xD9;
+    }
+  }
+#endif
+
+  return;
+}
diff --git a/dcmjpls/apps/CMakeLists.txt b/dcmjpls/apps/CMakeLists.txt
index 2e881d7..14d8756 100644
--- a/dcmjpls/apps/CMakeLists.txt
+++ b/dcmjpls/apps/CMakeLists.txt
@@ -1,5 +1,5 @@
 # declare additional include directories
-INCLUDE_DIRECTORIES(${dcmjpls_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${dcmimage_SOURCE_DIR}/include ${ZLIB_INCDIR} ${LIBTIFF_INCDIR} ${LIBPNG_INCDIR})
+INCLUDE_DIRECTORIES("${dcmjpls_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" "${dcmimage_SOURCE_DIR}/include" ${ZLIB_INCDIR} ${LIBTIFF_INCDIR} ${LIBPNG_INCDIR})
 
 # declare executables
 FOREACH(PROGRAM dcmcjpls dcmdjpls dcml2pnm)
diff --git a/dcmjpls/apps/Makefile.dep b/dcmjpls/apps/Makefile.dep
index 28bdffb..0cb3878 100644
--- a/dcmjpls/apps/Makefile.dep
+++ b/dcmjpls/apps/Makefile.dep
@@ -19,7 +19,10 @@ dcmcjpls.o: dcmcjpls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -37,10 +40,10 @@ dcmcjpls.o: dcmcjpls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -68,8 +71,6 @@ dcmcjpls.o: dcmcjpls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -141,7 +142,10 @@ dcmdjpls.o: dcmdjpls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -159,10 +163,10 @@ dcmdjpls.o: dcmdjpls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -190,8 +194,6 @@ dcmdjpls.o: dcmdjpls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -262,7 +264,10 @@ dcml2pnm.o: dcml2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -280,10 +285,10 @@ dcml2pnm.o: dcml2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -311,8 +316,6 @@ dcml2pnm.o: dcml2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
diff --git a/dcmjpls/apps/Makefile.in b/dcmjpls/apps/Makefile.in
index 5d86402..33ef259 100644
--- a/dcmjpls/apps/Makefile.in
+++ b/dcmjpls/apps/Makefile.in
@@ -50,21 +50,22 @@ LOCALINCLUDES = $(dcmjplsinc) $(ofstdinc) $(ofloginc) $(dcmdatainc) $(dcmimagein
 LIBDIRS = -L$(top_srcdir)/libsrc $(dcmjplslibdir) $(libcharlslibdir) $(dcmimagelibdir) \
 	$(dcmimglelibdir) $(dcmdatalibdir) $(ofloglibdir) $(ofstdlibdir)
 LOCALLIBS = $(dcmjplslib) $(dcmimagelib) $(dcmimglelib) $(dcmdatalib) $(ofloglib) $(ofstdlib) \
-	$(libcharlslib) $(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS)
+	$(libcharlslib) $(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
 objs = dcmdjpls.o dcmcjpls.o dcml2pnm.o
 progs = dcmdjpls dcmcjpls dcml2pnm
 
+
 all: $(progs)
 
 dcmdjpls: dcmdjpls.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcmcjpls: dcmcjpls.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcml2pnm: dcml2pnm.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 
 install: all
diff --git a/dcmjpls/apps/dcmcjpls.cc b/dcmjpls/apps/dcmcjpls.cc
index 9d48be3..ebe44a5 100644
--- a/dcmjpls/apps/dcmcjpls.cc
+++ b/dcmjpls/apps/dcmcjpls.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2014, OFFIS e.V.
+ *  Copyright (C) 2007-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,10 +26,6 @@
 #define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofconapp.h"
@@ -65,11 +61,6 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"
 int main(int argc, char *argv[])
 {
 
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
   const char *opt_ifname = NULL;
   const char *opt_ofname = NULL;
 
diff --git a/dcmjpls/apps/dcmdjpls.cc b/dcmjpls/apps/dcmdjpls.cc
index e50fdc7..5bb8842 100644
--- a/dcmjpls/apps/dcmdjpls.cc
+++ b/dcmjpls/apps/dcmdjpls.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2014, OFFIS e.V.
+ *  Copyright (C) 2007-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,10 +26,6 @@
 #define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofconapp.h"
@@ -63,12 +59,6 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"
 
 int main(int argc, char *argv[])
 {
-
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
   const char *opt_ifname = NULL;
   const char *opt_ofname = NULL;
 
diff --git a/dcmjpls/docs/dcmcjpls.man b/dcmjpls/docs/dcmcjpls.man
index be5fe13..0ce5ca0 100644
--- a/dcmjpls/docs/dcmcjpls.man
+++ b/dcmjpls/docs/dcmcjpls.man
@@ -6,20 +6,20 @@
 \page dcmcjpls dcmcjpls: Encode DICOM file to JPEG-LS transfer syntax
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmcjpls_synopsis SYNOPSIS
 
 \verbatim
 dcmcjpls [options] dcmfile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmcjpls_description DESCRIPTION
 
 The \b dcmcjpls utility reads an uncompressed DICOM image (\e dcmfile-in),
 performs a JPEG-LS compression (i. e. conversion to an encapsulated DICOM
 transfer syntax) and writes the converted image to an output file
 (\e dcmfile-out).
 
-\section parameters PARAMETERS
+\section dcmcjpls_parameters PARAMETERS
 
 \verbatim
 dcmfile-in   DICOM input filename to be converted
@@ -27,9 +27,9 @@ dcmfile-in   DICOM input filename to be converted
 dcmfile-out  DICOM output filename
 \endverbatim
 
-\section options OPTIONS
+\section dcmcjpls_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmcjpls_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -57,7 +57,7 @@ dcmfile-out  DICOM output filename
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmcjpls_input_options input options
 \verbatim
 input file format:
 
@@ -88,7 +88,7 @@ input transfer syntax:
          read with implicit VR little endian TS
 \endverbatim
 
-\subsection JPEG_LS_encoding_options JPEG-LS encoding options
+\subsection dcmcjpls_JPEG_LS_encoding_options JPEG-LS encoding options
 \verbatim
 JPEG-LS process:
 
@@ -176,7 +176,7 @@ JPEG-LS interleave:
   # If possible, the image is not converted to a different interleave mode.
 \endverbatim
 
-\subsection enc_pix_data_encoding_opt encapsulated pixel data encoding options
+\subsection dcmcjpls_enc_pix_data_encoding_opt encapsulated pixel data encoding options
 \verbatim
 encapsulated pixel data fragmentation:
 
@@ -238,7 +238,7 @@ SOP Instance UID:
   # Never assigns a new SOP instance UID.
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmcjpls_output_options output options
 \verbatim
 post-1993 value representations:
 
@@ -280,7 +280,7 @@ data set trailing padding:
          and items on multiple of i bytes
 \endverbatim
 
-\section notes NOTES
+\section dcmcjpls_notes NOTES
 
 The \b dcmcjpls utility compresses DICOM images of all SOP classes. However,
 \b dcmcjpls does not attempt to ensure that the compressed image still
@@ -291,7 +291,7 @@ are compliant with the DICOM standard.  If in question, the \b dcmcjpls utility
 allows one to convert an image to secondary capture - this SOP class does not
 pose restrictions as the ones mentioned above.
 
-\section transfer_syntaxes TRANSFER SYNTAXES
+\section dcmcjpls_transfer_syntaxes TRANSFER SYNTAXES
 
 \b dcmcjpls supports the following transfer syntaxes for input
 (\e dcmfile-in):
@@ -313,7 +313,7 @@ JPEGLSLosslessTransferSyntax                   1.2.840.10008.1.2.4.80
 JPEGLSLossyTransferSyntax                      1.2.840.10008.1.2.4.81
 \endverbatim
 
-\section logging LOGGING
+\section dcmcjpls_logging 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
@@ -332,7 +332,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmcjpls_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -354,7 +354,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmcjpls_environment ENVIRONMENT
 
 The \b dcmcjpls utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -370,11 +370,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dcmcjpls_see_also SEE ALSO
 
 <b>dcmdjpls</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmcjpls_copyright COPYRIGHT
 
 Copyright (C) 2009-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmjpls/docs/dcmdjpls.man b/dcmjpls/docs/dcmdjpls.man
index 8003f0b..86c45e7 100644
--- a/dcmjpls/docs/dcmdjpls.man
+++ b/dcmjpls/docs/dcmdjpls.man
@@ -6,19 +6,19 @@
 \page dcmdjpls dcmdjpls: Decode JPEG-LS compressed DICOM file
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmdjpls_synopsis SYNOPSIS
 
 \verbatim
 dcmdjpls [options] dcmfile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmdjpls_description DESCRIPTION
 
 The \b dcmdjpls utility reads a JPEG-ls compressed DICOM image (\e dcmfile-in),
 decompresses the JPEG-LS data (i. e. conversion to a native DICOM transfer
 syntax) and writes the converted image to an output file (\e dcmfile-out).
 
-\section parameters PARAMETERS
+\section dcmdjpls_parameters PARAMETERS
 
 \verbatim
 dcmfile-in   DICOM input filename to be converted
@@ -26,9 +26,9 @@ dcmfile-in   DICOM input filename to be converted
 dcmfile-out  DICOM output filename
 \endverbatim
 
-\section options OPTIONS
+\section dcmdjpls_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmdjpls_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -56,7 +56,7 @@ dcmfile-out  DICOM output filename
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmdjpls_input_options input options
 \verbatim
 input file format:
 
@@ -75,7 +75,7 @@ input file format:
   # but unfortunately it does.
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcmdjpls_processing_options processing options
 \verbatim
 planar configuration:
 
@@ -126,7 +126,7 @@ other processing options:
          ignore offset table when decompressing
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmdjpls_output_options output options
 \verbatim
 output file format:
 
@@ -187,7 +187,7 @@ data set trailing padding (not with --write-dataset):
          and items on multiple of i bytes
 \endverbatim
 
-\section transfer_syntaxes TRANSFER SYNTAXES
+\section dcmdjpls_transfer_syntaxes TRANSFER SYNTAXES
 
 \b dcmdjpls supports the following transfer syntaxes for input
 (\e dcmfile-in):
@@ -212,7 +212,7 @@ LittleEndianExplicitTransferSyntax             1.2.840.10008.1.2.1
 BigEndianExplicitTransferSyntax                1.2.840.10008.1.2.2
 \endverbatim
 
-\section logging LOGGING
+\section dcmdjpls_logging 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
@@ -231,7 +231,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmdjpls_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -253,7 +253,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmdjpls_environment ENVIRONMENT
 
 The \b dcmdjpls utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -269,11 +269,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dcmdjpls_see_also SEE ALSO
 
 <b>dcmcjpls</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmdjpls_copyright COPYRIGHT
 
 Copyright (C) 2009-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmjpls/docs/dcml2pnm.man b/dcmjpls/docs/dcml2pnm.man
index 58718ec..a5044f4 100644
--- a/dcmjpls/docs/dcml2pnm.man
+++ b/dcmjpls/docs/dcml2pnm.man
@@ -6,13 +6,13 @@
 \page dcml2pnm dcml2pnm: Convert DICOM images to PGM/PPM, PNG, TIFF or BMP
 \endif
 
-\section synopsis SYNOPSIS
+\section dcml2pnm_synopsis SYNOPSIS
 
 \verbatim
 dcml2pnm [options] dcmfile-in [bitmap-out]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcml2pnm_description DESCRIPTION
 
 The \b dcml2pnm utility reads a DICOM image, converts the pixel data according
 to the selected image processing options and writes back an image in the
@@ -20,7 +20,7 @@ well-known PGM/PPM (portable gray map / portable pix map), PNG, TIFF or
 Windows BMP format.  This utility supports uncompressed as well as JPEG-LS
 and RLE compressed DICOM images.
 
-\section parameters PARAMETERS
+\section dcml2pnm_parameters PARAMETERS
 
 \verbatim
 dcmfile-in  DICOM input filename to be converted
@@ -28,9 +28,9 @@ dcmfile-in  DICOM input filename to be converted
 bitmap-out  output filename to be written (default: stdout)
 \endverbatim
 
-\section options OPTIONS
+\section dcml2pnm_options OPTIONS
 
-\subsection general_options general options
+\subsection dcml2pnm_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -58,7 +58,7 @@ bitmap-out  output filename to be written (default: stdout)
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcml2pnm_input_options input options
 \verbatim
 input file format:
 
@@ -89,7 +89,7 @@ input transfer syntax:
           read with implicit VR little endian TS
 \endverbatim
 
-\subsection image_processing_options image processing options
+\subsection dcml2pnm_image_processing_options image processing options
 \verbatim
 frame selection:
 
@@ -337,7 +337,7 @@ other transformations:
           clip image region (l, t, w, h)
 \endverbatim
 
-\subsection output_options output options
+\subsection dcml2pnm_output_options output options
 \verbatim
 general:
 
@@ -391,7 +391,7 @@ image format:
           write 16-bit (monochrome) or 48-bit (color) PNG
 \endverbatim
 
-\section notes NOTES
+\section dcml2pnm_notes NOTES
 
 The following preferred interpolation algorithms can be selected using the
 \e --interpolate option:
@@ -412,7 +412,7 @@ and compiled with support for the external \b libpng PNG library.  Option
 \e --interlace enables progressive image view while loading the PNG file.
 Only a few applications take care of the meta info (TEXT) in a PNG file.
 
-\section transfer_syntaxes TRANSFER SYNTAXES
+\section dcml2pnm_transfer_syntaxes TRANSFER SYNTAXES
 
 \b dcml2pnm supports the following transfer syntaxes for input (\e dcmfile-in):
 
@@ -428,7 +428,7 @@ RLELosslessTransferSyntax                      1.2.840.10008.1.2.5
 
 (*) if compiled with zlib support enabled
 
-\section logging LOGGING
+\section dcml2pnm_logging 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
@@ -447,7 +447,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcml2pnm_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -469,7 +469,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcml2pnm_environment ENVIRONMENT
 
 The \b dcml2pnm utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -485,18 +485,18 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dcml2pnm_files FILES
 
 <em>\<datadir\>/camera.lut</em> - sample characteristics file of a camera
 \n<em>\<datadir\>/monitor.lut</em> - sample characteristics file of a monitor
 \n<em>\<datadir\>/printer.lut</em> - sample characteristics file of a printer
 \n<em>\<datadir\>/scanner.lut</em> - sample characteristics file of a scanner
 
-\section see_also SEE ALSO
+\section dcml2pnm_see_also SEE ALSO
 
 <b>dcm2pnm</b>(1), <b>img2dcm</b>(1)
 
-\section copyright COPYRIGHT
+\section dcml2pnm_copyright COPYRIGHT
 
 Copyright (C) 2001-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmjpls/include/CMakeLists.txt b/dcmjpls/include/CMakeLists.txt
index 52033b0..a83fe38 100644
--- a/dcmjpls/include/CMakeLists.txt
+++ b/dcmjpls/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmjpls DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmjpls DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmjpls/include/dcmtk/dcmjpls/djcodecd.h b/dcmjpls/include/dcmtk/dcmjpls/djcodecd.h
index 062c0a7..71c5de7 100644
--- a/dcmjpls/include/dcmtk/dcmjpls/djcodecd.h
+++ b/dcmjpls/include/dcmtk/dcmjpls/djcodecd.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2011, OFFIS e.V.
+ *  Copyright (C) 2007-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -177,6 +177,12 @@ public:
 
 private:
 
+  /** returns the transfer syntax that this particular codec
+   *  is able to Decode
+   *  @return supported transfer syntax
+   */
+  virtual E_TransferSyntax supportedTransferSyntax() const = 0;
+
   // static private helper methods
 
   /** decompresses a single frame from the given pixel sequence and
diff --git a/dcmjpls/include/dcmtk/dcmjpls/djcodece.h b/dcmjpls/include/dcmtk/dcmjpls/djcodece.h
index f0b79b5..0946562 100644
--- a/dcmjpls/include/dcmtk/dcmjpls/djcodece.h
+++ b/dcmjpls/include/dcmtk/dcmjpls/djcodece.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2011, OFFIS e.V.
+ *  Copyright (C) 2007-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -343,6 +343,18 @@ private:
     Uint32 width,
     Uint32 height,
     Uint16 bitsAllocated) const;
+
+  /** Adjust the padding of the JPEG-LS bitstream in the buffer if it has odd length,
+   *  such that the End of Image (EOI) marker ends on an even byte boundary.
+   *  @param buffer pointer to buffer containing compressed JPEG-LS bitstream
+   *  @param bufSize size of the buffer in bytes
+   *  @param bytesWritten number of bytes written to buffer; value is increased
+   *   if this method adds a pad byte.
+   */
+  static void fixPaddingIfNecessary(
+    Uint8 *buffer,
+    size_t bufSize,
+    unsigned long &bytesWritten);
 };
 
 
diff --git a/dcmjpls/libcharls/CMakeLists.txt b/dcmjpls/libcharls/CMakeLists.txt
index 99371f7..efd52ff 100644
--- a/dcmjpls/libcharls/CMakeLists.txt
+++ b/dcmjpls/libcharls/CMakeLists.txt
@@ -1,5 +1,7 @@
 # declare additional include directories
-INCLUDE_DIRECTORIES(${dcmjpls_SOURCE_DIR}/libcharls ${ofstd_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES("${dcmjpls_SOURCE_DIR}/libcharls" "${ofstd_SOURCE_DIR}/include")
 
 # create library from source files
 DCMTK_ADD_LIBRARY(charls header intrface jpegls)
+
+DCMTK_TARGET_LINK_MODULES(charls ofstd oflog)
diff --git a/dcmjpls/libcharls/Makefile.dep b/dcmjpls/libcharls/Makefile.dep
index e9e67ba..1f5dcd4 100644
--- a/dcmjpls/libcharls/Makefile.dep
+++ b/dcmjpls/libcharls/Makefile.dep
@@ -1,13 +1,16 @@
 header.o: header.cc config.h util.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../config/include/dcmtk/config/osconfig.h pubtypes.h header.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h streams.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h streams.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h decodstr.h procline.h \
  clrtrans.h encodstr.h
 intrface.o: intrface.cc config.h util.h \
@@ -24,8 +27,11 @@ intrface.o: intrface.cc config.h util.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h header.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h streams.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h header.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h streams.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h
 jpegls.o: jpegls.cc config.h util.h \
@@ -38,10 +44,10 @@ jpegls.o: jpegls.cc config.h util.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h header.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h decodstr.h procline.h \
- clrtrans.h encodstr.h context.h ctxtrmod.h lokuptbl.h lltraits.h \
- deftrait.h scan.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../ofstd/include/dcmtk/ofstd/ofutil.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h decodstr.h \
+ procline.h clrtrans.h encodstr.h context.h ctxtrmod.h lokuptbl.h \
+ lltraits.h deftrait.h scan.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h
diff --git a/dcmjpls/libcharls/decodstr.h b/dcmjpls/libcharls/decodstr.h
index d892c5e..c01dbb7 100644
--- a/dcmjpls/libcharls/decodstr.h
+++ b/dcmjpls/libcharls/decodstr.h
@@ -19,7 +19,7 @@ class DecoderStrategy
 public:
 	DecoderStrategy(const JlsParameters& info) :
 		  _info(info),
-		  _processLine(0),
+		  _processLine(OFnullptr),
 		  _readCache(0),
 		  _validBits(0),
 		  _position(0),
@@ -274,7 +274,7 @@ public:
 
 protected:
 	JlsParameters _info;
-	OFauto_ptr<ProcessLine> _processLine;
+	OFunique_ptr<ProcessLine> _processLine;
 
 private:
 	BYTE current_value() const
diff --git a/dcmjpls/libcharls/encodstr.h b/dcmjpls/libcharls/encodstr.h
index 786754e..7c49e8f 100644
--- a/dcmjpls/libcharls/encodstr.h
+++ b/dcmjpls/libcharls/encodstr.h
@@ -8,7 +8,7 @@
 #define INCLUDE_NEW
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#include "dcmtk/ofstd/ofaptr.h"
+#include "dcmtk/ofstd/ofmem.h"
 #include "dcmtk/ofstd/ofbmanip.h"
 #include "procline.h"
 #include "decodstr.h"
@@ -20,9 +20,9 @@ class EncoderStrategy
 
 public:
   explicit EncoderStrategy(const JlsParameters& info) :
-     _qdecoder(0),
+     _qdecoder(OFnullptr),
      _info(info),
-     _processLine(0),
+     _processLine(OFnullptr),
      valcurrent(0),
      bitpos(0),
      _isFFWritten(false),
@@ -148,11 +148,11 @@ protected:
   }
 
 
-  OFauto_ptr<DecoderStrategy> _qdecoder; 
+  OFunique_ptr<DecoderStrategy> _qdecoder; 
 
 protected:
   JlsParameters _info;
-  OFauto_ptr<ProcessLine> _processLine;
+  OFunique_ptr<ProcessLine> _processLine;
 private:
   static BYTE *re_alloc(BYTE *old_ptr, size_t *old_size)
   {
diff --git a/dcmjpls/libcharls/header.cc b/dcmjpls/libcharls/header.cc
index f7c3dd1..8e9a050 100644
--- a/dcmjpls/libcharls/header.cc
+++ b/dcmjpls/libcharls/header.cc
@@ -529,7 +529,7 @@ int JLSInputStream::ReadWord()
 
 void JLSInputStream::ReadScan(void* pvout) 
 {
-	OFauto_ptr<DecoderStrategy> qcodec = JlsCodecFactory<DecoderStrategy>().GetCodec(_info, _info.custom);
+	OFunique_ptr<DecoderStrategy> qcodec = JlsCodecFactory<DecoderStrategy>().GetCodec(_info, _info.custom);
 	
 	BYTE **ptr = (BYTE **)&_pdata;
 	size_t *size = &_cbyteLength;
@@ -552,7 +552,7 @@ public:
 	{		
 		JlsParameters info = _info;
 		info.components = _ccompScan;	
-		OFauto_ptr<EncoderStrategy> qcodec =JlsCodecFactory<EncoderStrategy>().GetCodec(info, _info.custom);
+		OFunique_ptr<EncoderStrategy> qcodec =JlsCodecFactory<EncoderStrategy>().GetCodec(info, _info.custom);
 		size_t cbyteWritten = qcodec->EncodeScan((BYTE*)_pvoidRaw, pstream->get_pos(), pstream->get_size(), pstream->get_offset(), pstream->_bCompare);
 		pstream->seek(cbyteWritten);
 	}
diff --git a/dcmjpls/libcharls/header.h b/dcmjpls/libcharls/header.h
index d0fc0f8..effb4f8 100644
--- a/dcmjpls/libcharls/header.h
+++ b/dcmjpls/libcharls/header.h
@@ -6,7 +6,8 @@
 #ifndef CHARLS_HEADER
 #define CHARLS_HEADER
 
-#include "dcmtk/ofstd/ofaptr.h"
+#include "dcmtk/ofstd/ofmem.h"
+#undef NEAR
 #include "streams.h"
 
 #define JPEG_SOI  0xD8
@@ -39,7 +40,7 @@ template<class STRATEGY>
 class JlsCodecFactory 
 {
 public:	
-	OFauto_ptr<STRATEGY> GetCodec(const JlsParameters& info, const JlsCustomParameters&);
+	OFrvalue<OFunique_ptr<STRATEGY> > GetCodec(const JlsParameters& info, const JlsCustomParameters&);
 private:
 	STRATEGY* GetCodecImpl(const JlsParameters& info);
 };
diff --git a/dcmjpls/libcharls/jpegls.cc b/dcmjpls/libcharls/jpegls.cc
index d7e05c6..c451702 100644
--- a/dcmjpls/libcharls/jpegls.cc
+++ b/dcmjpls/libcharls/jpegls.cc
@@ -79,7 +79,7 @@ OFVector<signed char> rgquant16Ll = CreateQLutLossless(16);
 
 
 template<class STRATEGY>
-OFauto_ptr<STRATEGY> JlsCodecFactory<STRATEGY>::GetCodec(const JlsParameters& info, const JlsCustomParameters& presets)
+OFrvalue<OFunique_ptr<STRATEGY> > JlsCodecFactory<STRATEGY>::GetCodec(const JlsParameters& info, const JlsCustomParameters& presets)
 {
 	STRATEGY* pstrategy = NULL;
 	if (presets.RESET != 0 && presets.RESET != BASIC_RESET)
@@ -98,7 +98,7 @@ OFauto_ptr<STRATEGY> JlsCodecFactory<STRATEGY>::GetCodec(const JlsParameters& in
 	{
 		pstrategy->SetPresets(presets);
 	}
-	return OFauto_ptr<STRATEGY>(pstrategy);
+	return OFrvalue<OFunique_ptr<STRATEGY> >(pstrategy);
 }
 
 
diff --git a/dcmjpls/libcharls/scan.h b/dcmjpls/libcharls/scan.h
index 5cd2515..0cee4d4 100644
--- a/dcmjpls/libcharls/scan.h
+++ b/dcmjpls/libcharls/scan.h
@@ -790,11 +790,11 @@ ProcessLine* JlsCodec<TRAITS,STRATEGY>::CreateProcess(void* pvoidOut)
 template<class TRAITS, class STRATEGY>
 size_t JlsCodec<TRAITS,STRATEGY>::EncodeScan(const void* rawData, BYTE **ptr, size_t *size, size_t offset, bool compare)
 {
-	STRATEGY::_processLine = OFauto_ptr<ProcessLine>(CreateProcess(const_cast<void*>(rawData)));
+	STRATEGY::_processLine.reset(CreateProcess(const_cast<void*>(rawData)));
 
 	if (compare)
 	{
-		STRATEGY::_qdecoder = OFauto_ptr<DecoderStrategy>(new JlsCodec<TRAITS,DecoderStrategy>(traits, Info()));
+		STRATEGY::_qdecoder.reset(new JlsCodec<TRAITS,DecoderStrategy>(traits, Info()));
 		STRATEGY::_qdecoder->Init(ptr, size, offset);
 	}
 
@@ -809,7 +809,7 @@ size_t JlsCodec<TRAITS,STRATEGY>::EncodeScan(const void* rawData, BYTE **ptr, si
 template<class TRAITS, class STRATEGY>
 size_t JlsCodec<TRAITS,STRATEGY>::DecodeScan(void* rawData, const JlsRect& rect, BYTE **ptr, size_t *size, size_t offset, bool bCompare)
 {
-	STRATEGY::_processLine = OFauto_ptr<ProcessLine>(CreateProcess(rawData));
+	STRATEGY::_processLine.reset(CreateProcess(rawData));
 
 	_bCompare = bCompare;
 
diff --git a/dcmjpls/libsrc/CMakeLists.txt b/dcmjpls/libsrc/CMakeLists.txt
index 8a7b4e8..7e84f4d 100644
--- a/dcmjpls/libsrc/CMakeLists.txt
+++ b/dcmjpls/libsrc/CMakeLists.txt
@@ -1,5 +1,5 @@
 # declare additional include directories
-INCLUDE_DIRECTORIES(${dcmjpls_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${dcmimage_SOURCE_DIR}/include ${dcmjpls_SOURCE_DIR}/libcharls ${ZLIB_INCDIR})
+INCLUDE_DIRECTORIES("${dcmjpls_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" "${dcmimage_SOURCE_DIR}/include" "${dcmjpls_SOURCE_DIR}/libcharls" ${ZLIB_INCDIR})
 
 # create library from source files
 DCMTK_ADD_LIBRARY(dcmjpls djcparam djdecode djencode djrparam djcodecd djutils djcodece)
diff --git a/dcmjpls/libsrc/Makefile.dep b/dcmjpls/libsrc/Makefile.dep
index db23719..cd51a06 100644
--- a/dcmjpls/libsrc/Makefile.dep
+++ b/dcmjpls/libsrc/Makefile.dep
@@ -21,7 +21,10 @@ djcodecd.o: djcodecd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -39,9 +42,9 @@ djcodecd.o: djcodecd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -92,7 +95,10 @@ djcodece.o: djcodece.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -110,9 +116,9 @@ djcodece.o: djcodece.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -192,7 +198,10 @@ djcparam.o: djcparam.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -210,9 +219,9 @@ djcparam.o: djcparam.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -240,7 +249,10 @@ djdecode.o: djdecode.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -258,9 +270,9 @@ djdecode.o: djdecode.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmjpls/dldefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dccodec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -291,7 +303,10 @@ djencode.o: djencode.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -309,9 +324,9 @@ djencode.o: djencode.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmjpls/dldefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -354,7 +369,10 @@ djrparam.o: djrparam.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -371,9 +389,9 @@ djrparam.o: djrparam.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -400,7 +418,10 @@ djutils.o: djutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -418,9 +439,9 @@ djutils.o: djutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmjpls/dldefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h
diff --git a/dcmjpls/libsrc/djcodecd.cc b/dcmjpls/libsrc/djcodecd.cc
index 3e75759..f3c4fb7 100644
--- a/dcmjpls/libsrc/djcodecd.cc
+++ b/dcmjpls/libsrc/djcodecd.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2016, OFFIS e.V.
+ *  Copyright (C) 2007-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -69,8 +69,7 @@ OFBool DJLSDecoderBase::canChangeCoding(
   // this codec only handles conversion from JPEG-LS to uncompressed.
 
   DcmXfer newRep(newRepType);
-  if (newRep.isNotEncapsulated() &&
-     ((oldRepType == EXS_JPEGLSLossless)||(oldRepType == EXS_JPEGLSLossy)))
+  if (newRep.isNotEncapsulated() && (oldRepType == supportedTransferSyntax()))
      return OFTrue;
 
   return OFFalse;
@@ -181,17 +180,23 @@ OFCondition DJLSDecoderBase::decode(
     result = ((DcmItem *)dataset)->putAndInsertString(DCM_NumberOfFrames, numBuf);
   }
 
-  if (result.good())
+  if (result.good() && (dataset->ident() == EVR_dataset))
   {
+    DcmItem *ditem = OFreinterpret_cast(DcmItem*, dataset);
+
     // the following operations do not affect the Image Pixel Module
     // but other modules such as SOP Common.  We only perform these
     // changes if we're on the main level of the dataset,
     // which should always identify itself as dataset, not as item.
-    if ((dataset->ident() == EVR_dataset) && (djcp->getUIDCreation() == EJLSUC_always))
+    if (djcp->getUIDCreation() == EJLSUC_always)
     {
         // create new SOP instance UID
-        result = DcmCodec::newInstance((DcmItem *)dataset, NULL, NULL, NULL);
+        result = DcmCodec::newInstance(ditem, NULL, NULL, NULL);
     }
+
+    // set Lossy Image Compression to "01" (see DICOM part 3, C.7.6.1.1.5)
+    if (result.good() && (supportedTransferSyntax() == EXS_JPEGLSLossy)) result = ditem->putAndInsertString(DCM_LossyImageCompression, "01");
+
   }
 
   return result;
diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc
index 64686ff..d13da73 100644
--- a/dcmjpls/libsrc/djcodece.cc
+++ b/dcmjpls/libsrc/djcodece.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2015, OFFIS e.V.
+ *  Copyright (C) 2007-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -669,7 +669,8 @@ OFCondition DJLSEncoderBase::compressRawFrame(
 
     if (result.good())
     {
-      compressedSize = bytesWritten;
+      compressedSize = OFstatic_cast(unsigned long, bytesWritten);
+      fixPaddingIfNecessary(OFstatic_cast(Uint8 *, buffer), size, compressedSize);
       result = pixelSequence->storeCompressedFrame(offsetList, buffer, compressedSize, fragmentSize);
     }
 
@@ -1060,7 +1061,8 @@ OFCondition DJLSEncoderBase::compressCookedFrame(
   if (result.good())
   {
     // 'compressed_buffer_size' now contains the size of the compressed data in buffer
-    compressedSize = bytesWritten;
+    compressedSize = OFstatic_cast(unsigned long, bytesWritten);
+    fixPaddingIfNecessary(OFstatic_cast(Uint8 *, buffer), compressed_buffer_size, compressedSize);
     result = pixelSequence->storeCompressedFrame(offsetList, compressed_buffer, compressedSize, fragmentSize);
   }
 
@@ -1121,3 +1123,32 @@ OFCondition DJLSEncoderBase::convertToSampleInterleaved(
   }
   return EC_Normal;
 }
+
+void DJLSEncoderBase::fixPaddingIfNecessary(
+    Uint8 *buffer,
+    size_t bufSize,
+    unsigned long &bytesWritten)
+{
+  // check if an odd number of bytes was written and the buffer
+  // has space for the needed pad byte (which should in practice
+  // always be the case because the buffer always has even length).
+  if (buffer && ((bytesWritten % 2 )> 0) && (bufSize > bytesWritten))
+  {
+    // first write a zero pad byte after the end of the JPEG-LS bitstream
+    buffer[bytesWritten++] = 0;
+
+#ifndef DISABLE_FF_JPEG_BITSTREAM_PADDING
+    // look for the EOI marker
+    if ((bytesWritten > 2) && (buffer[bytesWritten-3] == 0xFF) && (buffer[bytesWritten-2] == 0xD9))
+    {
+      // we now have ff/d9/00 at the end of the JPEG bitstream,
+      // i.e. an end of image (EOI) marker followed by a pad byte.
+      // Replace this with ff/ff/d9, which is an "extended" EOI marker
+      // ending on an even byte boundary.
+      buffer[bytesWritten-2] = 0xFF;
+      buffer[bytesWritten-1] = 0xD9;
+    }
+  }
+#endif
+  return;
+}
diff --git a/dcmnet/CMakeLists.txt b/dcmnet/CMakeLists.txt
index 3440633..9873055 100644
--- a/dcmnet/CMakeLists.txt
+++ b/dcmnet/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmnet)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmnet_SOURCE_DIR}/include ${dcmtls_SOURCE_DIR}/include ${OPENSSL_INCDIR} ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${ZLIB_INCDIR})
+INCLUDE_DIRECTORIES("${dcmnet_SOURCE_DIR}/include" "${dcmtls_SOURCE_DIR}/include" ${OPENSSL_INCDIR} "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" ${ZLIB_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc apps include docs etc tests)
diff --git a/dcmnet/apps/CMakeLists.txt b/dcmnet/apps/CMakeLists.txt
index 4fe5a67..c3837ef 100644
--- a/dcmnet/apps/CMakeLists.txt
+++ b/dcmnet/apps/CMakeLists.txt
@@ -1,5 +1,5 @@
 # declare additional include directories needed for compression support
-INCLUDE_DIRECTORIES(${dcmjpls_SOURCE_DIR}/include ${dcmjpeg_SOURCE_DIR}/include ${dcmimage_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES("${dcmjpls_SOURCE_DIR}/include" "${dcmjpeg_SOURCE_DIR}/include" "${dcmimage_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include")
 
 # declare executables
 FOREACH(PROGRAM dcmrecv dcmsend echoscu findscu getscu movescu storescp storescu termscu)
@@ -9,7 +9,7 @@ ENDFOREACH(PROGRAM)
 # declare installation files
 IF(WITH_OPENSSL)
   IF(WIN32)
-    INSTALL(FILES ${OPENSSL_BINDIR}/dcmtkeay.dll ${OPENSSL_BINDIR}/dcmtkssl.dll DESTINATION ${DCMTK_INSTALL_BINDIR} COMPONENT bin)
+    INSTALL(FILES "${OPENSSL_BINDIR}/dcmtkeay.dll" "${OPENSSL_BINDIR}/dcmtkssl.dll" DESTINATION "${DCMTK_INSTALL_BINDIR}" COMPONENT bin)
   ENDIF(WIN32)
 ENDIF(WITH_OPENSSL)
 
diff --git a/dcmnet/apps/Makefile.dep b/dcmnet/apps/Makefile.dep
index bb92c41..6be8897 100644
--- a/dcmnet/apps/Makefile.dep
+++ b/dcmnet/apps/Makefile.dep
@@ -12,6 +12,7 @@ dcmrecv.o: dcmrecv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
@@ -35,7 +36,9 @@ dcmrecv.o: dcmrecv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -71,8 +74,6 @@ dcmrecv.o: dcmrecv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -118,13 +119,13 @@ dcmrecv.o: dcmrecv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcompat.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \
- ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../include/dcmtk/dcmnet/diutil.h
 dcmsend.o: dcmsend.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
@@ -139,6 +140,7 @@ dcmsend.o: dcmsend.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
@@ -164,7 +166,9 @@ dcmsend.o: dcmsend.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -198,8 +202,6 @@ dcmsend.o: dcmsend.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -246,11 +248,11 @@ dcmsend.o: dcmsend.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \
  ../../dcmjpeg/include/dcmtk/dcmjpeg/djdecode.h \
  ../../dcmjpeg/include/dcmtk/dcmjpeg/djutils.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \
@@ -291,7 +293,10 @@ echoscu.o: echoscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -307,14 +312,14 @@ echoscu.o: echoscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/assoc.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -359,7 +364,10 @@ findscu.o: findscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -377,9 +385,9 @@ findscu.o: findscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -391,7 +399,7 @@ findscu.o: findscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/assoc.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -428,7 +436,8 @@ getscu.o: getscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h ../include/dcmtk/dcmnet/scu.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h ../include/dcmtk/dcmnet/scu.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -442,7 +451,9 @@ getscu.o: getscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -480,8 +491,6 @@ getscu.o: getscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -529,11 +538,11 @@ getscu.o: getscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrmz.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpath.h
 movescu.o: movescu.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -550,6 +559,7 @@ movescu.o: movescu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
@@ -572,7 +582,9 @@ movescu.o: movescu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -587,7 +599,7 @@ movescu.o: movescu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/assoc.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -624,6 +636,7 @@ storescp.o: storescp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
@@ -649,7 +662,9 @@ storescp.o: storescp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -664,7 +679,7 @@ storescp.o: storescp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/assoc.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -679,8 +694,6 @@ storescp.o: storescp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/dcasccfg.h \
  ../include/dcmtk/dcmnet/dccftsmp.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
  ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
  ../include/dcmtk/dcmnet/dccfprmp.h ../include/dcmtk/dcmnet/dcasccff.h \
@@ -711,6 +724,7 @@ storescu.o: storescu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
@@ -733,7 +747,9 @@ storescu.o: storescu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -748,7 +764,7 @@ storescu.o: storescu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/assoc.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -763,8 +779,6 @@ storescu.o: storescu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/dcasccfg.h \
  ../include/dcmtk/dcmnet/dccftsmp.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
  ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
  ../include/dcmtk/dcmnet/dccfprmp.h ../include/dcmtk/dcmnet/dcasccff.h \
@@ -799,6 +813,7 @@ termscu.o: termscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -821,7 +836,9 @@ termscu.o: termscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -836,7 +853,7 @@ termscu.o: termscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/dimse.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dimse.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
diff --git a/dcmnet/apps/Makefile.in b/dcmnet/apps/Makefile.in
index 9a80242..765e1dd 100644
--- a/dcmnet/apps/Makefile.in
+++ b/dcmnet/apps/Makefile.in
@@ -30,7 +30,7 @@ LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include \
 LIBDIRS = -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc -L$(oflogdir)/libsrc \
 	-L$(dcmdatadir)/libsrc -L$(dcmtlsdir)/libsrc $(compr_libdirs)
 LOCALLIBS = -ldcmnet -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(TCPWRAPPERLIBS) \
-	$(CHARCONVLIBS)
+	$(CHARCONVLIBS) $(MATHLIBS)
 DCMTLSLIBS = -ldcmtls
 COMPR_LIBS = -ldcmjpls -lcharls -ldcmjpeg -lijg8 -lijg12 -lijg16 -ldcmimage -ldcmimgle
 
@@ -42,33 +42,33 @@ progs = echoscu storescu storescp findscu movescu termscu getscu dcmsend dcmrecv
 all: $(progs)
 
 echoscu: echoscu.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(LIBS)
 
 # add $(COMPR_LIBS) to the linking instructions if "storescu" is compiled
 # with ON_THE_FLY_COMPRESSION defined (see "config/docs/macros.txt")
 storescu: storescu.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(LIBS)
 
 storescp: storescp.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(LIBS)
 
 findscu: findscu.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(LIBS)
 
 movescu: movescu.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 termscu: termscu.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 getscu: getscu.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dcmsend: dcmsend.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(COMPR_LIBS) $(LOCALLIBS) $(TIFFLIBS) $(PNGLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(COMPR_LIBS) $(LOCALLIBS) $(TIFFLIBS) $(PNGLIBS) $(LIBS)
 
 dcmrecv: dcmrecv.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 install: all
 	$(configdir)/mkinstalldirs $(DESTDIR)$(bindir)
diff --git a/dcmnet/apps/echoscu.cc b/dcmnet/apps/echoscu.cc
index c486db1..a24b221 100644
--- a/dcmnet/apps/echoscu.cc
+++ b/dcmnet/apps/echoscu.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -147,23 +147,11 @@ main(int argc, char *argv[])
 
     T_ASC_Network *net;
     T_ASC_Parameters *params;
-    DIC_NODENAME localHost;
     DIC_NODENAME peerHost;
     T_ASC_Association *assoc;
     OFString temp_str;
 
-#ifdef HAVE_GUSI_H
-    /* needed for Macintosh */
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-    WSAData winSockData;
-    /* we need at least version 1.1 */
-    WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-    WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+  OFStandard::initializeNetwork();
 
   char tempstr[20];
   OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION , "DICOM verification (C-ECHO) SCU", rcsid);
@@ -540,9 +528,8 @@ main(int argc, char *argv[])
 
     /* Figure out the presentation addresses and copy the */
     /* corresponding values into the association parameters.*/
-    gethostname(localHost, sizeof(localHost) - 1);
     sprintf(peerHost, "%s:%d", opt_peer, OFstatic_cast(int, opt_port));
-    ASC_setPresentationAddresses(params, localHost, peerHost);
+    ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), peerHost);
 
     /* Set the presentation contexts which will be negotiated */
     /* when the network connection will be established */
@@ -660,9 +647,7 @@ main(int argc, char *argv[])
         exit(1);
     }
 
-#ifdef HAVE_WINSOCK_H
-    WSACleanup();
-#endif
+    OFStandard::shutdownNetwork();
 
 #ifdef WITH_OPENSSL
     if (tLayer && opt_writeSeedFile)
diff --git a/dcmnet/apps/findscu.cc b/dcmnet/apps/findscu.cc
index 3a2e1c8..d57b498 100644
--- a/dcmnet/apps/findscu.cc
+++ b/dcmnet/apps/findscu.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2014, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -20,6 +20,7 @@
  */
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
 #include "dcmtk/dcmnet/dfindscu.h"
 #include "dcmtk/dcmnet/diutil.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
@@ -99,17 +100,7 @@ int main(int argc, char *argv[])
     */
     OFBool                opt_automaticDataCorrection = OFFalse;
 
-#ifdef HAVE_GUSI_H
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-    WSAData winSockData;
-    /* we need at least version 1.1 */
-    WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-    WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+  OFStandard::initializeNetwork();
 
   char tempstr[20];
   OFString temp_str;
@@ -635,9 +626,7 @@ int main(int argc, char *argv[])
     cond = findscu.dropNetwork();
     if (cond.bad()) OFLOG_ERROR(findscuLogger, DimseCondition::dump(temp_str, cond));
 
-#ifdef HAVE_WINSOCK_H
-    WSACleanup();
-#endif
+    OFStandard::shutdownNetwork();
 
 #ifdef WITH_OPENSSL
     if (tLayer && opt_writeSeedFile)
diff --git a/dcmnet/apps/getscu.cc b/dcmnet/apps/getscu.cc
index 1e7f85e..533d004 100644
--- a/dcmnet/apps/getscu.cc
+++ b/dcmnet/apps/getscu.cc
@@ -21,10 +21,6 @@
 
 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/ofstd/ofconapp.h"
 #include "dcmtk/ofstd/oflist.h"
 #include "dcmtk/dcmnet/scu.h"
@@ -90,12 +86,6 @@ main(int argc, char *argv[])
   const char *opt_ourTitle = APPLICATIONTITLE;
   OFList<OFString> fileNameList;
 
-#ifdef HAVE_GUSI_H
-  /* needed for Macintosh */
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
   char tempstr[20];
   OFString temp_str;
   OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION , "DICOM retrieve (C-GET) SCU", rcsid);
@@ -148,6 +138,8 @@ main(int argc, char *argv[])
       cmd.addOption("--prefer-mpeg4-2-2d",   "+x2",     "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (2D)");
       cmd.addOption("--prefer-mpeg4-2-3d",   "+x3",     "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (3D)");
       cmd.addOption("--prefer-mpeg4-2-st",   "+xo",     "prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS");
+      cmd.addOption("--prefer-hevc",         "+x4",     "prefer HEVC/H.265 Main Profile / Level 5.1 TS");
+      cmd.addOption("--prefer-hevc10",       "+x5",     "prefer HEVC/H.265 Main 10 Profile / Level 5.1 TS");
       cmd.addOption("--prefer-rle",          "+xr",     "prefer RLE lossless TS");
 #ifdef WITH_ZLIB
       cmd.addOption("--prefer-deflated",     "+xd",     "prefer deflated explicit VR little endian TS");
@@ -254,6 +246,8 @@ main(int argc, char *argv[])
     if (cmd.findOption("--prefer-mpeg4-2-2d")) opt_store_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For2DVideo;
     if (cmd.findOption("--prefer-mpeg4-2-3d")) opt_store_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For3DVideo;
     if (cmd.findOption("--prefer-mpeg4-2-st")) opt_store_networkTransferSyntax = EXS_MPEG4StereoHighProfileLevel4_2;
+    if (cmd.findOption("--prefer-hevc")) opt_store_networkTransferSyntax = EXS_HEVCMainProfileLevel5_1;
+    if (cmd.findOption("--prefer-hevc10")) opt_store_networkTransferSyntax = EXS_HEVCMain10ProfileLevel5_1;
     if (cmd.findOption("--prefer-rle")) opt_store_networkTransferSyntax = EXS_RLELossless;
 #ifdef WITH_ZLIB
     if (cmd.findOption("--prefer-deflated")) opt_store_networkTransferSyntax = EXS_DeflatedLittleEndianExplicit;
diff --git a/dcmnet/apps/movescu.cc b/dcmnet/apps/movescu.cc
index 17271f9..cf78643 100644
--- a/dcmnet/apps/movescu.cc
+++ b/dcmnet/apps/movescu.cc
@@ -27,11 +27,6 @@
 #define INCLUDE_CSTDARG
 #define INCLUDE_CERRNO
 #include "dcmtk/ofstd/ofstdinc.h"
-
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/ofconapp.h"
 #include "dcmtk/dcmnet/dicom.h"
@@ -233,28 +228,16 @@ addPresentationContext(T_ASC_Parameters *params,
 int
 main(int argc, char *argv[])
 {
-    T_ASC_Parameters *params = NULL;
-    const char *opt_peer;
-    OFCmdUnsignedInt opt_port = 104;
-    DIC_NODENAME localHost;
-    DIC_NODENAME peerHost;
-    T_ASC_Association *assoc = NULL;
-    const char *opt_peerTitle = PEERAPPLICATIONTITLE;
-    const char *opt_ourTitle = APPLICATIONTITLE;
-    OFList<OFString> fileNameList;
-
-#ifdef HAVE_GUSI_H
-    /* needed for Macintosh */
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
+  T_ASC_Parameters *params = NULL;
+  const char *opt_peer;
+  OFCmdUnsignedInt opt_port = 104;
+  DIC_NODENAME peerHost;
+  T_ASC_Association *assoc = NULL;
+  const char *opt_peerTitle = PEERAPPLICATIONTITLE;
+  const char *opt_ourTitle = APPLICATIONTITLE;
+  OFList<OFString> fileNameList;
 
-#ifdef HAVE_WINSOCK_H
-    WSAData winSockData;
-    /* we need at least version 1.1 */
-    WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-    WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+  OFStandard::initializeNetwork();
 
   char tempstr[20];
   OFString temp_str;
@@ -311,6 +294,8 @@ main(int argc, char *argv[])
       cmd.addOption("--prefer-mpeg4-2-2d",   "+x2",     "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (2D)");
       cmd.addOption("--prefer-mpeg4-2-3d",   "+x3",     "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (3D)");
       cmd.addOption("--prefer-mpeg4-2-st",   "+xo",     "prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS");
+      cmd.addOption("--prefer-hevc",         "+x4",     "prefer HEVC/H.265 Main Profile / Level 5.1 TS");
+      cmd.addOption("--prefer-hevc10",       "+x5",     "prefer HEVC/H.265 Main 10 Profile / Level 5.1 TS");
       cmd.addOption("--prefer-rle",          "+xr",     "prefer RLE lossless TS");
 #ifdef WITH_ZLIB
       cmd.addOption("--prefer-deflated",     "+xd",     "prefer deflated explicit VR little endian TS");
@@ -472,6 +457,8 @@ main(int argc, char *argv[])
       if (cmd.findOption("--prefer-mpeg4-2-2d")) opt_in_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For2DVideo;
       if (cmd.findOption("--prefer-mpeg4-2-3d")) opt_in_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For3DVideo;
       if (cmd.findOption("--prefer-mpeg4-2-st")) opt_in_networkTransferSyntax = EXS_MPEG4StereoHighProfileLevel4_2;
+      if (cmd.findOption("--prefer-hevc")) opt_in_networkTransferSyntax = EXS_HEVCMainProfileLevel5_1;
+      if (cmd.findOption("--prefer-hevc10")) opt_in_networkTransferSyntax = EXS_HEVCMain10ProfileLevel5_1;
       if (cmd.findOption("--prefer-rle")) opt_in_networkTransferSyntax = EXS_RLELossless;
 #ifdef WITH_ZLIB
       if (cmd.findOption("--prefer-deflated")) opt_in_networkTransferSyntax = EXS_DeflatedLittleEndianExplicit;
@@ -574,6 +561,8 @@ main(int argc, char *argv[])
         app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-2d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
         app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-3d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
         app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-st", opt_in_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2);
+        app.checkConflict("--write-xfer-little", "--prefer-hevc", opt_in_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1);
+        app.checkConflict("--write-xfer-little", "--prefer-hevc10", opt_in_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1);
         app.checkConflict("--write-xfer-little", "--prefer-rle", opt_in_networkTransferSyntax == EXS_RLELossless);
         // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed.
         opt_writeTransferSyntax = EXS_LittleEndianExplicit;
@@ -596,6 +585,8 @@ main(int argc, char *argv[])
         app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-2d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
         app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-3d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
         app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-st", opt_in_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2);
+        app.checkConflict("--write-xfer-big", "--prefer-hevc", opt_in_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1);
+        app.checkConflict("--write-xfer-big", "--prefer-hevc10", opt_in_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1);
         app.checkConflict("--write-xfer-big", "--prefer-rle", opt_in_networkTransferSyntax == EXS_RLELossless);
         // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed.
         opt_writeTransferSyntax = EXS_BigEndianExplicit;
@@ -618,6 +609,8 @@ main(int argc, char *argv[])
         app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-2d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
         app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-3d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
         app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-st", opt_in_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2);
+        app.checkConflict("--write-xfer-implicit", "--prefer-hevc", opt_in_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1);
+        app.checkConflict("--write-xfer-implicit", "--prefer-hevc10", opt_in_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1);
         app.checkConflict("--write-xfer-implicit", "--prefer-rle", opt_in_networkTransferSyntax == EXS_RLELossless);
         // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed.
         opt_writeTransferSyntax = EXS_LittleEndianImplicit;
@@ -641,6 +634,8 @@ main(int argc, char *argv[])
         app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-2d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
         app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-3d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
         app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-st", opt_in_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2);
+        app.checkConflict("--write-xfer-deflated", "--prefer-hevc", opt_in_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1);
+        app.checkConflict("--write-xfer-deflated", "--prefer-hevc10", opt_in_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1);
         app.checkConflict("--write-xfer-deflated", "--prefer-rle", opt_in_networkTransferSyntax == EXS_RLELossless);
         opt_writeTransferSyntax = EXS_DeflatedLittleEndianExplicit;
       }
@@ -800,9 +795,8 @@ main(int argc, char *argv[])
     }
     ASC_setAPTitles(params, opt_ourTitle, opt_peerTitle, NULL);
 
-    gethostname(localHost, sizeof(localHost) - 1);
     sprintf(peerHost, "%s:%d", opt_peer, OFstatic_cast(int, opt_port));
-    ASC_setPresentationAddresses(params, localHost, peerHost);
+    ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), peerHost);
 
     /*
      * We also add a presentation context for the corresponding
@@ -921,9 +915,7 @@ main(int argc, char *argv[])
         exit(EXITCODE_CANNOT_CLOSE_ASSOCIATION);
     }
 
-#ifdef HAVE_WINSOCK_H
-    WSACleanup();
-#endif
+    OFStandard::shutdownNetwork();
 
     return cmove_status_code;
 }
@@ -1155,6 +1147,22 @@ acceptSubAssoc(T_ASC_Network *aNet, T_ASC_Association **assoc)
           transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax;
           numTransferSyntaxes = 4;
           break;
+        case EXS_HEVCMainProfileLevel5_1:
+          /* we prefer HEVC/H.265 Main Profile/L5.1 */
+          transferSyntaxes[0] = UID_HEVCMainProfileLevel5_1TransferSyntax;
+          transferSyntaxes[1] = UID_LittleEndianExplicitTransferSyntax;
+          transferSyntaxes[2] = UID_BigEndianExplicitTransferSyntax;
+          transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax;
+          numTransferSyntaxes = 4;
+          break;
+        case EXS_HEVCMain10ProfileLevel5_1:
+          /* we prefer HEVC/H.265 Main 10 Profile/L5.1 */
+          transferSyntaxes[0] = UID_HEVCMain10ProfileLevel5_1TransferSyntax;
+          transferSyntaxes[1] = UID_LittleEndianExplicitTransferSyntax;
+          transferSyntaxes[2] = UID_BigEndianExplicitTransferSyntax;
+          transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax;
+          numTransferSyntaxes = 4;
+          break;
         case EXS_RLELossless:
           /* we prefer RLE Lossless */
           transferSyntaxes[0] = UID_RLELosslessTransferSyntax;
@@ -1374,6 +1382,9 @@ storeSCPCallback(
          {
            OFLOG_ERROR(movescuLogger, "cannot write DICOM file: " << ofname);
            rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources;
+
+           // delete incomplete file
+           OFStandard::deleteFile(ofname);
          }
 
         /* should really check the image to make sure it is consistent,
@@ -1465,11 +1476,11 @@ static OFCondition storeSCP(
       /* remove file */
       if (!opt_ignore)
       {
-        if (strcmp(imageFileName, NULL_DEVICE_NAME) != 0) unlink(imageFileName);
+        if (strcmp(imageFileName, NULL_DEVICE_NAME) != 0) OFStandard::deleteFile(imageFileName);
       }
 #ifdef _WIN32
     } else if (opt_ignore) {
-        if (strcmp(imageFileName, NULL_DEVICE_NAME) != 0) unlink(imageFileName); // delete the temporary file
+        if (strcmp(imageFileName, NULL_DEVICE_NAME) != 0) OFStandard::deleteFile(imageFileName); // delete the temporary file
 #endif
     }
 
diff --git a/dcmnet/apps/storescp.cc b/dcmnet/apps/storescp.cc
index 0a6678a..ce427fa 100644
--- a/dcmnet/apps/storescp.cc
+++ b/dcmnet/apps/storescp.cc
@@ -41,10 +41,6 @@ BEGIN_EXTERN_C
 #endif
 END_EXTERN_C
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #ifdef HAVE_WINDOWS_H
 #include <direct.h>      /* for _mkdir() */
 #endif
@@ -238,18 +234,7 @@ int main(int argc, char *argv[])
   T_ASC_Network *net;
   DcmAssociationConfiguration asccfg;
 
-#ifdef HAVE_GUSI_H
-  /* needed for Macintosh */
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-  WSAData winSockData;
-  /* we need at least version 1.1 */
-  WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-  WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+  OFStandard::initializeNetwork();
 
   OFString temp_str;
   OFOStringStream optStream;
@@ -298,6 +283,8 @@ int main(int argc, char *argv[])
       cmd.addOption("--prefer-mpeg4-2-2d",      "+x2",     "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (2D)");
       cmd.addOption("--prefer-mpeg4-2-3d",      "+x3",     "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (3D)");
       cmd.addOption("--prefer-mpeg4-2-st",      "+xo",     "prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS");
+      cmd.addOption("--prefer-hevc",            "+x4",     "prefer HEVC/H.265 Main Profile / Level 5.1 TS");
+      cmd.addOption("--prefer-hevc10",          "+x5",     "prefer HEVC/H.265 Main 10 Profile / Level 5.1 TS");
       cmd.addOption("--prefer-rle",             "+xr",     "prefer RLE lossless TS");
 #ifdef WITH_ZLIB
       cmd.addOption("--prefer-deflated",        "+xd",     "prefer deflated expl. VR little endian TS");
@@ -559,6 +546,8 @@ int main(int argc, char *argv[])
     if (cmd.findOption("--prefer-mpeg4-2-2d")) opt_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For2DVideo;
     if (cmd.findOption("--prefer-mpeg4-2-3d")) opt_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For3DVideo;
     if (cmd.findOption("--prefer-mpeg4-2-st")) opt_networkTransferSyntax = EXS_MPEG4StereoHighProfileLevel4_2;
+    if (cmd.findOption("--prefer-hevc")) opt_networkTransferSyntax = EXS_HEVCMainProfileLevel5_1;
+    if (cmd.findOption("--prefer-hevc10")) opt_networkTransferSyntax = EXS_HEVCMain10ProfileLevel5_1;
     if (cmd.findOption("--prefer-rle")) opt_networkTransferSyntax = EXS_RLELossless;
 #ifdef WITH_ZLIB
     if (cmd.findOption("--prefer-deflated")) opt_networkTransferSyntax = EXS_DeflatedLittleEndianExplicit;
@@ -624,6 +613,8 @@ int main(int argc, char *argv[])
       app.checkConflict("--config-file", "--prefer-mpeg4-2-2d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
       app.checkConflict("--config-file", "--prefer-mpeg4-2-3d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
       app.checkConflict("--config-file", "--prefer-mpeg4-2-st", opt_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2);
+      app.checkConflict("--config-file", "--prefer-hevc", opt_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1);
+      app.checkConflict("--config-file", "--prefer-hevc10", opt_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1);
       app.checkConflict("--config-file", "--prefer-rle", opt_networkTransferSyntax == EXS_RLELossless);
 #ifdef WITH_ZLIB
       app.checkConflict("--config-file", "--prefer-deflated", opt_networkTransferSyntax == EXS_DeflatedLittleEndianExplicit);
@@ -705,6 +696,8 @@ int main(int argc, char *argv[])
       app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-2d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
       app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-3d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
       app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-st", opt_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2);
+      app.checkConflict("--write-xfer-little", "--prefer-hevc", opt_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1);
+      app.checkConflict("--write-xfer-little", "--prefer-hevc10", opt_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1);
       app.checkConflict("--write-xfer-little", "--prefer-rle", opt_networkTransferSyntax == EXS_RLELossless);
       // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed.
       opt_writeTransferSyntax = EXS_LittleEndianExplicit;
@@ -727,6 +720,8 @@ int main(int argc, char *argv[])
       app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-2d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
       app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-3d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
       app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-st", opt_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2);
+      app.checkConflict("--write-xfer-big", "--prefer-hevc", opt_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1);
+      app.checkConflict("--write-xfer-big", "--prefer-hevc10", opt_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1);
       app.checkConflict("--write-xfer-big", "--prefer-rle", opt_networkTransferSyntax == EXS_RLELossless);
       // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed.
       opt_writeTransferSyntax = EXS_BigEndianExplicit;
@@ -749,6 +744,8 @@ int main(int argc, char *argv[])
       app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-2d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
       app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-3d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
       app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-st", opt_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2);
+      app.checkConflict("--write-xfer-implicit", "--prefer-hevc", opt_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1);
+      app.checkConflict("--write-xfer-implicit", "--prefer-hevc10", opt_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1);
       app.checkConflict("--write-xfer-implicit", "--prefer-rle", opt_networkTransferSyntax == EXS_RLELossless);
       // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed.
       opt_writeTransferSyntax = EXS_LittleEndianImplicit;
@@ -772,6 +769,8 @@ int main(int argc, char *argv[])
       app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-2d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
       app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-3d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
       app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-st", opt_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2);
+      app.checkConflict("--write-xfer-deflated", "--prefer-hevc", opt_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1);
+      app.checkConflict("--write-xfer-deflated", "--prefer-hevc10", opt_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1);
       app.checkConflict("--write-xfer-deflated", "--prefer-rle", opt_networkTransferSyntax == EXS_RLELossless);
       opt_writeTransferSyntax = EXS_DeflatedLittleEndianExplicit;
     }
@@ -1049,32 +1048,13 @@ int main(int argc, char *argv[])
 #elif defined(_WIN32)
   if (opt_forkedChild)
   {
-    // child process
-    DUL_markProcessAsForkedChild();
-
-    char buf[256];
-    DWORD bytesRead = 0;
-    HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE);
-
-    // read socket handle number from stdin, i.e. the anonymous pipe
-    // to which our parent process has written the handle number.
-    if (ReadFile(hStdIn, buf, sizeof(buf) - 1, &bytesRead, NULL))
-    {
-      // make sure buffer is zero terminated
-      buf[bytesRead] = '\0';
-      dcmExternalSocketHandle.set(atoi(buf));
-    }
-    else
-    {
-      OFLOG_ERROR(storescpLogger, "cannot read socket handle: " << GetLastError());
-      return 1;
-    }
+    // we are a child process in multi-process mode
+    if (DUL_readSocketHandleAsForkedChild().bad()) return 1;
   }
   else
   {
     // parent process
-    if (opt_forkMode)
-      DUL_requestForkOnTransportConnectionReceipt(argc, argv);
+    if (opt_forkMode) DUL_requestForkOnTransportConnectionReceipt(argc, argv);
   }
 #endif
 
@@ -1214,9 +1194,7 @@ int main(int argc, char *argv[])
     return 1;
   }
 
-#ifdef HAVE_WINSOCK_H
-  WSACleanup();
-#endif
+  OFStandard::shutdownNetwork();
 
 #ifdef WITH_OPENSSL
   delete tLayer;
@@ -1473,6 +1451,22 @@ static OFCondition acceptAssociation(T_ASC_Network *net, DcmAssociationConfigura
       transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax;
       numTransferSyntaxes = 4;
       break;
+    case EXS_HEVCMainProfileLevel5_1:
+      /* we prefer HEVC/H.265 Main Profile/L5.1 */
+      transferSyntaxes[0] = UID_HEVCMainProfileLevel5_1TransferSyntax;
+      transferSyntaxes[1] = UID_LittleEndianExplicitTransferSyntax;
+      transferSyntaxes[2] = UID_BigEndianExplicitTransferSyntax;
+      transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax;
+      numTransferSyntaxes = 4;
+      break;
+    case EXS_HEVCMain10ProfileLevel5_1:
+      /* we prefer HEVC/H.265 Main 10 Profile/L5.1 */
+      transferSyntaxes[0] = UID_HEVCMain10ProfileLevel5_1TransferSyntax;
+      transferSyntaxes[1] = UID_LittleEndianExplicitTransferSyntax;
+      transferSyntaxes[2] = UID_BigEndianExplicitTransferSyntax;
+      transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax;
+      numTransferSyntaxes = 4;
+      break;
     case EXS_RLELossless:
       /* we prefer RLE Lossless */
       transferSyntaxes[0] = UID_RLELosslessTransferSyntax;
@@ -2015,6 +2009,17 @@ storeSCPCallback(
             OFLOG_WARN(storescpLogger, "element PatientName " << DCM_PatientName << " absent or empty in data set, using '"
                  << tmpName << "' instead");
           }
+          else
+          {
+              DcmElement *patElem = NULL;
+              OFString charset;
+              (*imageDataSet)->findAndGetElement(DCM_PatientName, patElem); // patElem cannot be NULL, see above
+              (*imageDataSet)->findAndGetOFStringArray(DCM_SpecificCharacterSet, charset);
+              if (!charset.empty() && !(charset == "ISO_IR 100") && (patElem->containsExtendedCharacters()))
+              {
+                  OFLOG_WARN(storescpLogger, "Patient name not in Latin-1 (charset: " << charset << "), ASCII dir name may be broken");
+              }
+          }
 
           /* substitute non-ASCII characters in patient name to ASCII "equivalent" */
           const size_t length = tmpName.length();
@@ -2140,6 +2145,9 @@ storeSCPCallback(
       {
         OFLOG_ERROR(storescpLogger, "cannot write DICOM file: " << fileName << ": " << cond.text());
         rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources;
+
+        // delete incomplete file
+        OFStandard::deleteFile(fileName);
       }
 
       // check the image to make sure it is consistent, i.e. that its sopClass and sopInstance correspond
diff --git a/dcmnet/apps/storescu.cc b/dcmnet/apps/storescu.cc
index 91e33c5..f19ec5b 100644
--- a/dcmnet/apps/storescu.cc
+++ b/dcmnet/apps/storescu.cc
@@ -33,10 +33,6 @@ BEGIN_EXTERN_C
 #endif
 END_EXTERN_C
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/ofconapp.h"
 #include "dcmtk/ofstd/ofstring.h"
@@ -195,22 +191,11 @@ int main(int argc, char *argv[])
 
   T_ASC_Network *net;
   T_ASC_Parameters *params;
-  DIC_NODENAME localHost;
   DIC_NODENAME peerHost;
   T_ASC_Association *assoc;
   DcmAssociationConfiguration asccfg;  // handler for association configuration profiles
 
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-  WSAData winSockData;
-  /* we need at least version 1.1 */
-  WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-  WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+  OFStandard::initializeNetwork();
 
   OFString temp_str;
   OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION , "DICOM storage (C-STORE) SCU", rcsid);
@@ -267,6 +252,8 @@ int main(int argc, char *argv[])
       cmd.addOption("--propose-mpeg4-2-2d",   "-x2",     "propose MPEG4 AVC/H.264 HP / Level 4.2 TS (2D)");
       cmd.addOption("--propose-mpeg4-2-3d",   "-x3",     "propose MPEG4 AVC/H.264 HP / Level 4.2 TS (3D)");
       cmd.addOption("--propose-mpeg4-2-st",   "-xo",     "propose MPEG4 AVC/H.264 Stereo / Level 4.2 TS");
+      cmd.addOption("--propose-hevc",         "-x4",     "propose HEVC/H.265 Main Profile / Level 5.1 TS");
+      cmd.addOption("--propose-hevc10",       "-x5",     "propose HEVC/H.265 Main 10 Profile / Level 5.1 TS");
       cmd.addOption("--propose-rle",          "-xr",     "propose RLE lossless TS\nand all uncompressed transfer syntaxes");
 #ifdef WITH_ZLIB
       cmd.addOption("--propose-deflated",     "-xd",     "propose deflated expl. VR little endian TS\nand all uncompressed transfer syntaxes");
@@ -440,6 +427,8 @@ int main(int argc, char *argv[])
       if (cmd.findOption("--propose-mpeg4-2-2d")) opt_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For2DVideo;
       if (cmd.findOption("--propose-mpeg4-2-3d")) opt_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For3DVideo;
       if (cmd.findOption("--propose-mpeg4-2-st")) opt_networkTransferSyntax = EXS_MPEG4StereoHighProfileLevel4_2;
+      if (cmd.findOption("--propose-hevc")) opt_networkTransferSyntax = EXS_HEVCMainProfileLevel5_1;
+      if (cmd.findOption("--propose-hevc10")) opt_networkTransferSyntax = EXS_HEVCMain10ProfileLevel5_1;
       if (cmd.findOption("--propose-rle")) opt_networkTransferSyntax = EXS_RLELossless;
 #ifdef WITH_ZLIB
       if (cmd.findOption("--propose-deflated")) opt_networkTransferSyntax = EXS_DeflatedLittleEndianExplicit;
@@ -469,6 +458,8 @@ int main(int argc, char *argv[])
         app.checkConflict("--config-file", "--propose-mpeg4-2-2d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
         app.checkConflict("--config-file", "--propose-mpeg4-2-3d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
         app.checkConflict("--config-file", "--propose-mpeg4-2-st", opt_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2);
+        app.checkConflict("--config-file", "--propose-hevc", opt_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1);
+        app.checkConflict("--config-file", "--propose-hevc10", opt_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1);
         app.checkConflict("--config-file", "--propose-rle", opt_networkTransferSyntax == EXS_RLELossless);
 #ifdef WITH_ZLIB
         app.checkConflict("--config-file", "--propose-deflated", opt_networkTransferSyntax == EXS_DeflatedLittleEndianExplicit);
@@ -926,9 +917,8 @@ int main(int argc, char *argv[])
 
     /* Figure out the presentation addresses and copy the */
     /* corresponding values into the association parameters.*/
-    gethostname(localHost, sizeof(localHost) - 1);
     sprintf(peerHost, "%s:%d", opt_peer, OFstatic_cast(int, opt_port));
-    ASC_setPresentationAddresses(params, localHost, peerHost);
+    ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), peerHost);
 
     /* Configure User Identity Negotiation*/
     if (opt_identMode != ASC_USER_IDENTITY_NONE)
@@ -1086,9 +1076,7 @@ int main(int argc, char *argv[])
       return 1;
     }
 
-#ifdef HAVE_WINSOCK_H
-    WSACleanup();
-#endif
+    OFStandard::shutdownNetwork();
 
 #ifdef WITH_OPENSSL
     if (tLayer && opt_writeSeedFile)
@@ -1229,7 +1217,7 @@ addStoragePresentationContexts(T_ASC_Parameters *params,
   OFList<OFString> fallbackSyntaxes;
   // - If little endian implicit is preferred, we don't need any fallback syntaxes
   //   because it is the default transfer syntax and all applications must support it.
-  // - If MPEG2 or MPEG4 is preferred, we don't want to propose any fallback solution
+  // - If MPEG2, MPEG4 or HEVC is preferred, we don't want to propose any fallback solution
   //   because this is not required and we cannot decompress the movie anyway.
   if ((opt_networkTransferSyntax != EXS_LittleEndianImplicit) &&
       (opt_networkTransferSyntax != EXS_MPEG2MainProfileAtMainLevel) &&
@@ -1238,7 +1226,9 @@ addStoragePresentationContexts(T_ASC_Parameters *params,
       (opt_networkTransferSyntax != EXS_MPEG4BDcompatibleHighProfileLevel4_1) &&
       (opt_networkTransferSyntax != EXS_MPEG4HighProfileLevel4_2_For2DVideo) &&
       (opt_networkTransferSyntax != EXS_MPEG4HighProfileLevel4_2_For3DVideo) &&
-      (opt_networkTransferSyntax != EXS_MPEG4StereoHighProfileLevel4_2))
+      (opt_networkTransferSyntax != EXS_MPEG4StereoHighProfileLevel4_2) &&
+      (opt_networkTransferSyntax != EXS_HEVCMainProfileLevel5_1) &&
+      (opt_networkTransferSyntax != EXS_HEVCMain10ProfileLevel5_1))
   {
     fallbackSyntaxes.push_back(UID_LittleEndianExplicitTransferSyntax);
     fallbackSyntaxes.push_back(UID_BigEndianExplicitTransferSyntax);
@@ -1578,7 +1568,7 @@ storeSCU(T_ASC_Association *assoc, const char *fname)
   cond = DIMSE_storeUser(assoc, presID, &req,
     NULL, dcmff.getDataset(), progressCallback, NULL,
     opt_blockMode, opt_dimse_timeout,
-    &rsp, &statusDetail, NULL, OFStandard::getFileSize(fname));
+    &rsp, &statusDetail, NULL, OFstatic_cast(long, OFStandard::getFileSize(fname)));
 
   /*
    * If store command completed normally, with a status
diff --git a/dcmnet/apps/termscu.cc b/dcmnet/apps/termscu.cc
index 3e67b56..4282d94 100644
--- a/dcmnet/apps/termscu.cc
+++ b/dcmnet/apps/termscu.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2005-2010, OFFIS e.V.
+ *  Copyright (C) 2005-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -68,24 +68,12 @@ int main( int argc, char *argv[] )
   T_ASC_Network *net;
   T_ASC_Parameters *params;
   T_ASC_Association *assoc;
-  DIC_NODENAME localHost;
   DIC_NODENAME peerHost;
   char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"  OFFIS_DCMTK_VERSION " " OFFIS_DCMTK_RELEASEDATE " $";
   const char* transferSyntaxes[] = { UID_LittleEndianImplicitTransferSyntax, UID_LittleEndianExplicitTransferSyntax, UID_BigEndianExplicitTransferSyntax };
   int transferSyntaxCount = 3;
 
-#ifdef HAVE_GUSI_H
-    // needed for Macintosh
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-    WSAData winSockData;
-    // we need at least version 1.1
-    WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-    WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+  OFStandard::initializeNetwork();
 
   char tempstr[20];
   OFString temp_str;
@@ -197,9 +185,8 @@ int main( int argc, char *argv[] )
 
   // figure out the presentation addresses and copy the
   // corresponding values into the association parameters.
-  gethostname( localHost, sizeof( localHost ) - 1 );
   sprintf( peerHost, "%s:%d", opt_peer, OFstatic_cast(int, opt_port));
-  ASC_setPresentationAddresses( params, localHost, peerHost );
+  ASC_setPresentationAddresses( params, OFStandard::getHostName().c_str(), peerHost );
 
   // set the presentation context which will be negotiated
   // when the network connection will be established
@@ -287,9 +274,7 @@ int main( int argc, char *argv[] )
     exit( 1 );
   }
 
-#ifdef HAVE_WINSOCK_H
-  WSACleanup();
-#endif
+  OFStandard::shutdownNetwork();
 
   return( 0 );
 }
diff --git a/dcmnet/docs/CMakeLists.txt b/dcmnet/docs/CMakeLists.txt
index 0e7ee00..44368c4 100644
--- a/dcmnet/docs/CMakeLists.txt
+++ b/dcmnet/docs/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(FILES asconfig.txt testing.txt DESTINATION ${DCMTK_INSTALL_DOCDIR} COMPONENT doc)
+INSTALL(FILES asconfig.txt testing.txt DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc)
diff --git a/dcmnet/docs/getscu.man b/dcmnet/docs/getscu.man
index bbbd82e..75f362c 100644
--- a/dcmnet/docs/getscu.man
+++ b/dcmnet/docs/getscu.man
@@ -144,6 +144,12 @@ preferred storage transfer syntaxes (incoming associations):
   +xo   --prefer-mpeg4-2-st
           prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS
 
+  +x4   --prefer-hevc
+          prefer HEVC H.265 Main Profile / Level 5.1 TS
+
+  +x5   --prefer-hevc10
+          prefer HEVC H.265 Main 10 Profile / Level 5.1 TS
+
   +xr   --prefer-rle
           prefer RLE lossless TS
 
@@ -264,7 +270,7 @@ SOPInstanceUID).
 
 \subsection getscu_dicom_conformance DICOM Conformance
 
-\subsubsection scu_conformance SCU Conformance
+\subsubsection getscu_scu_conformance SCU Conformance
 
 The \b getscu application supports the following SOP Classes as an SCU:
 
@@ -291,7 +297,7 @@ BigEndianExplicitTransferSyntax                      1.2.840.10008.1.2.2
 Which transfer syntaxes are actually proposed in what order, can be specified
 with the \e --propose options.
 
-\subsubsection storage_conformance Storage Conformance
+\subsubsection getscu_storage_conformance Storage Conformance
 
 The \b getscu application supports the following SOP Classes as an SCP:
 
@@ -457,6 +463,8 @@ MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax   1.2.840.10008.1.2.4.103
 MPEG4HighProfileLevel4_2_For2DVideoTransferSyntax    1.2.840.10008.1.2.4.104
 MPEG4HighProfileLevel4_2_For3DVideoTransferSyntax    1.2.840.10008.1.2.4.105
 MPEG4StereoHighProfileLevel4_2TransferSyntax         1.2.840.10008.1.2.4.106
+HEVCMainProfileLevel5_1TransferSyntax                1.2.840.10008.1.2.4.107
+HEVCMain10ProfileLevel5_1TransferSyntax              1.2.840.10008.1.2.4.108
 RLELosslessTransferSyntax                            1.2.840.10008.1.2.5
 \endverbatim
 
diff --git a/dcmnet/docs/movescu.man b/dcmnet/docs/movescu.man
index 32b8e95..e90de31 100644
--- a/dcmnet/docs/movescu.man
+++ b/dcmnet/docs/movescu.man
@@ -147,6 +147,12 @@ preferred network transfer syntaxes (incoming associations):
   +xo   --prefer-mpeg4-2-st
           prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS
 
+  +x4   --prefer-hevc
+          prefer HEVC H.265 Main Profile / Level 5.1 TS
+
+  +x5   --prefer-hevc10
+          prefer HEVC H.265 Main 10 Profile / Level 5.1 TS
+
   +xr   --prefer-rle
           prefer RLE lossless TS
 
@@ -418,7 +424,7 @@ BigEndianExplicitTransferSyntax                      1.2.840.10008.1.2.2
 Which transfer syntaxes are actually proposed in what order, can be specified
 with the \e --propose options.
 
-\subsubsection scp_conformance SCP Conformance
+\subsubsection movescu_scp_conformance SCP Conformance
 
 The \b movescu application supports the following SOP Classes as an SCP:
 
@@ -474,7 +480,11 @@ PseudoColorSoftcopyPresentationStateStorage          1.2.840.10008.5.1.4.1.1.11.
 BlendingSoftcopyPresentationStateStorage             1.2.840.10008.5.1.4.1.1.11.4
 XAXRFGrayscaleSoftcopyPresentationStateStorage       1.2.840.10008.5.1.4.1.1.11.5
 GrayscalePlanarMPRVolumetricPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.6
-CompositingPlanarMPRVolumetricPresentationStateStor. 1.2.840.10008.5.1.4.1.1.11.7
+CompositingPlanarMPRVolumetricPresent.StateStorage   1.2.840.10008.5.1.4.1.1.11.7
+AdvancedBlendingPresentationStateStorage             1.2.840.10008.5.1.4.1.1.11.8
+VolumeRenderingVolumetricPresentationStateStorage    1.2.840.10008.5.1.4.1.1.11.9
+SegmentedVolumeRenderingVolumetricPres.StateStorage  1.2.840.10008.5.1.4.1.1.11.10
+MultipleVolumeRenderingVolumetricPres.StateStorage   1.2.840.10008.5.1.4.1.1.11.11
 XRayAngiographicImageStorage                         1.2.840.10008.5.1.4.1.1.12.1
 EnhancedXAImageStorage                               1.2.840.10008.5.1.4.1.1.12.1.1
 XRayRadiofluoroscopicImageStorage                    1.2.840.10008.5.1.4.1.1.12.2
@@ -513,6 +523,8 @@ StereometricRelationshipStorage                      1.2.840.10008.5.1.4.1.1.77.
 OphthalmicTomographyImageStorage                     1.2.840.10008.5.1.4.1.1.77.1.5.4
 WideFieldOphthalmicPhoto.Stereogr.Proj.ImageStorage  1.2.840.10008.5.1.4.1.1.77.1.5.5
 WideFieldOphthalmicPhotogr.3DCoordinatesImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.6
+OphthalmicOpticalCoherenceTomogr.EnFaceImageStorage  1.2.840.10008.5.1.4.1.1.77.1.5.7
+OphthalmicOpticalCoh.Tomogr.BscanVolumeAnalysisStor. 1.2.840.10008.5.1.4.1.1.77.1.5.8
 VLWholeSlideMicroscopyImageStorage                   1.2.840.10008.5.1.4.1.1.77.1.6
 RETIRED_VLMultiFrameImageStorage                     1.2.840.10008.5.1.4.1.1.77.2
 LensometryMeasurementsStorage                        1.2.840.10008.5.1.4.1.1.78.1
@@ -545,6 +557,8 @@ RadiopharmaceuticalRadiationDoseSRStorage            1.2.840.10008.5.1.4.1.1.88.
 ColonCADSRStorage                                    1.2.840.10008.5.1.4.1.1.88.69
 ImplantationPlanSRDocumentStorage                    1.2.840.10008.5.1.4.1.1.88.70
 AcquisitionContextSRStorage                          1.2.840.10008.5.1.4.1.1.88.71
+SimplifiedAdultEchoSRStorage                         1.2.840.10008.5.1.4.1.1.88.72
+PatientRadiationDoseSRStorage                        1.2.840.10008.5.1.4.1.1.88.73
 ContentAssessmentResultsStorage                      1.2.840.10008.5.1.4.1.1.90.1
 EncapsulatedPDFStorage                               1.2.840.10008.5.1.4.1.1.104.1
 EncapsulatedCDAStorage                               1.2.840.10008.5.1.4.1.1.104.2
@@ -553,7 +567,6 @@ LegacyConvertedEnhancedPETImageStorage               1.2.840.10008.5.1.4.1.1.128
 RETIRED_StandalonePETCurveStorage                    1.2.840.10008.5.1.4.1.1.129
 EnhancedPETImageStorage                              1.2.840.10008.5.1.4.1.1.130
 BasicStructuredDisplayStorage                        1.2.840.10008.5.1.4.1.1.131
-CTDefinedProcedureProtocolStorage                    1.2.840.10008.5.1.4.1.1.200.1
 CTPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.2
 RTImageStorage                                       1.2.840.10008.5.1.4.1.1.481.1
 RTDoseStorage                                        1.2.840.10008.5.1.4.1.1.481.2
@@ -576,9 +589,6 @@ DICONDE_EddyCurrentMultiframeImageStorage            1.2.840.10008.5.1.4.1.1.601
 DRAFT_RTBeamsDeliveryInstructionStorage              1.2.840.10008.5.1.4.34.1
 RTBeamsDeliveryInstructionStorage                    1.2.840.10008.5.1.4.34.7
 RTBrachyApplicationSetupDeliveryInstructionStorage   1.2.840.10008.5.1.4.34.10
-GenericImplantTemplateStorage                        1.2.840.10008.5.1.4.43.1
-ImplantAssemblyTemplateStorage                       1.2.840.10008.5.1.4.44.1
-ImplantTemplateGroupStorage                          1.2.840.10008.5.1.4.45.1
 \endverbatim
 
 The \b movescu application will usually accept presentation contexts for all
diff --git a/dcmnet/docs/storescp.man b/dcmnet/docs/storescp.man
index 7ffa49f..a155981 100644
--- a/dcmnet/docs/storescp.man
+++ b/dcmnet/docs/storescp.man
@@ -129,6 +129,12 @@ preferred network transfer syntaxes (not with --config-file):
   +xo   --prefer-mpeg4-2-st
           prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS
 
+  +x4   --prefer-hevc
+          prefer HEVC H.265 Main Profile / Level 5.1 TS
+
+  +x5   --prefer-hevc10
+          prefer HEVC H.265 Main 10 Profile / Level 5.1 TS
+
   +xr   --prefer-rle
           prefer RLE lossless TS
 
@@ -447,10 +453,21 @@ and for option \e --sort-on-patientname
 \endverbatim
 
 where 'PatientName' is replaced by "ANONYMOUS" if the data element is empty or
-absent in the data set.  Please note, however, that for option
-\e --sort-on-study-uid the same subdirectory will be used for all DICOM objects
-that belong to the same study, i.e. in contrast to the other \e --sort-xxx
-options there is no guarantee that a study directory is ever completed.
+absent in the data set.  Any existing patient name is transformed in order to
+use only ASCII characters.  Please note that in this context only the DICOM
+default character set (ASCII, i.e. no entry in attribute Specific Character
+Set) and Latin-1 (Specific Character Set valued "ISO_IR 100") are supported.
+If another character set is found and the patient name contains non-ASCII
+characters, a warning is printed and the transformation is performed as if
+Latin-1 character set would be set in the file.  This may lead to unreadable
+or unexpected patient name directories and behaviour.  Thus, it is advisable
+to use \e --sort-on-patientname only if Latin-1 or ASCII patient names are
+expected to be received.
+
+For option \e --sort-on-study-uid the same subdirectory will be used for all
+DICOM objects that belong to the same study, i.e. in contrast to the other
+\e --sort-xxx options there is no guarantee that a study directory is ever
+completed.
 
 Option \e --timenames creates filenames from timestamps corresponding to the
 time, \b storescp writes a file to disk.  The format is
@@ -595,7 +612,11 @@ PseudoColorSoftcopyPresentationStateStorage          1.2.840.10008.5.1.4.1.1.11.
 BlendingSoftcopyPresentationStateStorage             1.2.840.10008.5.1.4.1.1.11.4
 XAXRFGrayscaleSoftcopyPresentationStateStorage       1.2.840.10008.5.1.4.1.1.11.5
 GrayscalePlanarMPRVolumetricPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.6
-CompositingPlanarMPRVolumetricPresentationStateStor. 1.2.840.10008.5.1.4.1.1.11.7
+CompositingPlanarMPRVolumetricPresent.StateStorage   1.2.840.10008.5.1.4.1.1.11.7
+AdvancedBlendingPresentationStateStorage             1.2.840.10008.5.1.4.1.1.11.8
+VolumeRenderingVolumetricPresentationStateStorage    1.2.840.10008.5.1.4.1.1.11.9
+SegmentedVolumeRenderingVolumetricPres.StateStorage  1.2.840.10008.5.1.4.1.1.11.10
+MultipleVolumeRenderingVolumetricPres.StateStorage   1.2.840.10008.5.1.4.1.1.11.11
 XRayAngiographicImageStorage                         1.2.840.10008.5.1.4.1.1.12.1
 EnhancedXAImageStorage                               1.2.840.10008.5.1.4.1.1.12.1.1
 XRayRadiofluoroscopicImageStorage                    1.2.840.10008.5.1.4.1.1.12.2
@@ -634,6 +655,8 @@ StereometricRelationshipStorage                      1.2.840.10008.5.1.4.1.1.77.
 OphthalmicTomographyImageStorage                     1.2.840.10008.5.1.4.1.1.77.1.5.4
 WideFieldOphthalmicPhoto.Stereogr.Proj.ImageStorage  1.2.840.10008.5.1.4.1.1.77.1.5.5
 WideFieldOphthalmicPhotogr.3DCoordinatesImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.6
+OphthalmicOpticalCoherenceTomogr.EnFaceImageStorage  1.2.840.10008.5.1.4.1.1.77.1.5.7
+OphthalmicOpticalCoh.Tomogr.BscanVolumeAnalysisStor. 1.2.840.10008.5.1.4.1.1.77.1.5.8
 VLWholeSlideMicroscopyImageStorage                   1.2.840.10008.5.1.4.1.1.77.1.6
 RETIRED_VLMultiFrameImageStorage                     1.2.840.10008.5.1.4.1.1.77.2
 LensometryMeasurementsStorage                        1.2.840.10008.5.1.4.1.1.78.1
@@ -667,6 +690,7 @@ ColonCADSRStorage                                    1.2.840.10008.5.1.4.1.1.88.
 ImplantationPlanSRDocumentStorage                    1.2.840.10008.5.1.4.1.1.88.70
 AcquisitionContextSRStorage                          1.2.840.10008.5.1.4.1.1.88.71
 SimplifiedAdultEchoSRStorage                         1.2.840.10008.5.1.4.1.1.88.72
+PatientRadiationDoseSRStorage                        1.2.840.10008.5.1.4.1.1.88.73
 ContentAssessmentResultsStorage                      1.2.840.10008.5.1.4.1.1.90.1
 EncapsulatedPDFStorage                               1.2.840.10008.5.1.4.1.1.104.1
 EncapsulatedCDAStorage                               1.2.840.10008.5.1.4.1.1.104.2
@@ -675,7 +699,6 @@ LegacyConvertedEnhancedPETImageStorage               1.2.840.10008.5.1.4.1.1.128
 RETIRED_StandalonePETCurveStorage                    1.2.840.10008.5.1.4.1.1.129
 EnhancedPETImageStorage                              1.2.840.10008.5.1.4.1.1.130
 BasicStructuredDisplayStorage                        1.2.840.10008.5.1.4.1.1.131
-CTDefinedProcedureProtocolStorage                    1.2.840.10008.5.1.4.1.1.200.1
 CTPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.2
 RTImageStorage                                       1.2.840.10008.5.1.4.1.1.481.1
 RTDoseStorage                                        1.2.840.10008.5.1.4.1.1.481.2
diff --git a/dcmnet/docs/storescu.man b/dcmnet/docs/storescu.man
index 6fcfdd0..218f83c 100644
--- a/dcmnet/docs/storescu.man
+++ b/dcmnet/docs/storescu.man
@@ -172,6 +172,12 @@ proposed transmission transfer syntaxes (not with --config-file):
   -xo   --propose-mpeg4-2-st
           propose MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS only
 
+  -x4   --propose-hevc
+          propose HEVC H.265 Main Profile / Level 5.1 TS only
+
+  -x5   --propose-hevc10
+          propose HEVC H.265 Main 10 Profile / Level 5.1 TS only
+
   -xr   --propose-rle
           propose RLE lossless TS
           and all uncompressed transfer syntaxes
@@ -454,6 +460,8 @@ MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax   1.2.840.10008.1.2.4.103
 MPEG4HighProfileLevel4_2_For2DVideoTransferSyntax    1.2.840.10008.1.2.4.104
 MPEG4HighProfileLevel4_2_For3DVideoTransferSyntax    1.2.840.10008.1.2.4.105
 MPEG4StereoHighProfileLevel4_2TransferSyntax         1.2.840.10008.1.2.4.106
+HEVCMainProfileLevel5_1TransferSyntax                1.2.840.10008.1.2.4.107
+HEVCMain10ProfileLevel5_1TransferSyntax              1.2.840.10008.1.2.4.108
 RLELosslessTransferSyntax                            1.2.840.10008.1.2.5
 \endverbatim
 
diff --git a/dcmnet/etc/CMakeLists.txt b/dcmnet/etc/CMakeLists.txt
index 24a5580..63b46ca 100644
--- a/dcmnet/etc/CMakeLists.txt
+++ b/dcmnet/etc/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(FILES storescp.cfg storescu.cfg DESTINATION ${DCMTK_INSTALL_ETCDIR} COMPONENT etc)
+INSTALL(FILES storescp.cfg storescu.cfg DESTINATION "${DCMTK_INSTALL_ETCDIR}" COMPONENT etc)
diff --git a/dcmnet/etc/storescp.cfg b/dcmnet/etc/storescp.cfg
index ad6cea6..db537d8 100644
--- a/dcmnet/etc/storescp.cfg
+++ b/dcmnet/etc/storescp.cfg
@@ -204,6 +204,7 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib
 # the following SOP classes are missing in the above list:
 #
 # - AcquisitionContextSRStorage
+# - AdvancedBlendingPresentationStateStorage
 # - BreastProjectionXRayImageStorageForPresentation
 # - BreastProjectionXRayImageStorageForProcessing
 # - ColorPaletteStorage
@@ -217,11 +218,17 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib
 # - LegacyConvertedEnhancedCTImageStorage
 # - LegacyConvertedEnhancedMRImageStorage
 # - LegacyConvertedEnhancedPETImageStorage
+# - MultipleVolumeRenderingVolumetricPresentationStateStorage
+# - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
+# - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage
 # - ParametricMapStorage
+# - PatientRadiationDoseSRStorage
 # - RadiopharmaceuticalRadiationDoseSRStorage
 # - RTBrachyApplicationSetupDeliveryInstructionStorage
+# - SegmentedVolumeRenderingVolumetricPresentationStateStorage
 # - SimplifiedAdultEchoSRStorage
 # - TractographyResultsStorage
+# - VolumeRenderingVolumetricPresentationStateStorage
 # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage
 # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage
 #
@@ -241,8 +248,8 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib
 [AllDICOMStorageSCP]
 #
 # Same as "GenericStorageSCP" but limited to non-retired and non-draft SOP Classes.
-# This allows for accepting all DICOM Storage SOP Classes that are currently defined
-# in the standard (an exception is made for some non-patient DICOM objects because
+# This allows for accepting (almost) all DICOM Storage SOP Classes that are currently
+# defined in the standard (an exception is made for some very new DICOM objects because
 # of the limitation of 128 Presentation Contexts for SCPs, see DCMTK Feature # 540).
 #
 PresentationContext1   = VerificationSOPClass\Uncompressed
@@ -382,7 +389,14 @@ PresentationContext128 = XRayRadiationDoseSRStorage\UncompressedOrZlib
 #
 # the following SOP classes are missing in the above list:
 #
+# - AdvancedBlendingPresentationStateStorage
 # - ColorPaletteStorage
+# - MultipleVolumeRenderingVolumetricPresentationStateStorage
+# - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
+# - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage
+# - PatientRadiationDoseSRStorage
+# - SegmentedVolumeRenderingVolumetricPresentationStateStorage
+# - VolumeRenderingVolumetricPresentationStateStorage
 #
 # - RETIRED_HardcopyColorImageStorage
 # - RETIRED_HardcopyGrayscaleImageStorage
diff --git a/dcmnet/etc/storescu.cfg b/dcmnet/etc/storescu.cfg
index a42412f..929a793 100644
--- a/dcmnet/etc/storescu.cfg
+++ b/dcmnet/etc/storescu.cfg
@@ -1,5 +1,5 @@
 #
-#  Copyright (C) 2003-2016, OFFIS e.V.
+#  Copyright (C) 2003-2017, OFFIS e.V.
 #  All rights reserved.  See COPYRIGHT file for details.
 #
 #  This software and supporting documentation were developed by
@@ -200,6 +200,7 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2
 # the following SOP classes are missing in the above list:
 #
 # - AcquisitionContextSRStorage
+# - AdvancedBlendingPresentationStateStorage
 # - ArterialPulseWaveformStorage
 # - AutorefractionMeasurementsStorage
 # - BasicStructuredDisplayStorage
@@ -234,11 +235,15 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2
 # - LegacyConvertedEnhancedPETImageStorage
 # - LensometryMeasurementsStorage
 # - MacularGridThicknessAndVolumeReportStorage
+# - MultipleVolumeRenderingVolumetricPresentationStateStorage
 # - OphthalmicAxialMeasurementsStorage
+# - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
+# - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage
 # - OphthalmicThicknessMapStorage
 # - OphthalmicTomographyImageStorage
 # - OphthalmicVisualFieldStaticPerimetryMeasurementsStorage
 # - ParametricMapStorage
+# - PatientRadiationDoseSRStorage
 # - RadiopharmaceuticalRadiationDoseSRStorage
 # - RealWorldValueMappingStorage
 # - RespiratoryWaveformStorage
@@ -247,6 +252,7 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2
 # - RTIonBeamsTreatmentRecordStorage
 # - RTIonPlanStorage
 # - SegmentationStorage
+# - SegmentedVolumeRenderingVolumetricPresentationStateStorage
 # - SimplifiedAdultEchoSRStorage
 # - SpectaclePrescriptionReportStorage
 # - SubjectiveRefractionMeasurementsStorage
@@ -256,6 +262,7 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2
 # - TractographyResultsStorage
 # - VisualAcuityMeasurementsStorage
 # - VLWholeSlideMicroscopyImageStorage
+# - VolumeRenderingVolumetricPresentationStateStorage
 # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage
 # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage
 # - XAXRFGrayscaleSoftcopyPresentationStateStorage
diff --git a/dcmnet/include/CMakeLists.txt b/dcmnet/include/CMakeLists.txt
index d9b5076..806843c 100644
--- a/dcmnet/include/CMakeLists.txt
+++ b/dcmnet/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmnet DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmnet DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmnet/include/dcmtk/dcmnet/assoc.h b/dcmnet/include/dcmtk/dcmnet/assoc.h
index ab6c453..78f003c 100644
--- a/dcmnet/include/dcmtk/dcmnet/assoc.h
+++ b/dcmnet/include/dcmtk/dcmnet/assoc.h
@@ -365,7 +365,8 @@ ASC_acceptPresentationContext(
     T_ASC_Parameters * params,
     T_ASC_PresentationContextID presentationContextID,
     const char* transferSyntax,
-    T_ASC_SC_ROLE acceptedRole = ASC_SC_ROLE_DEFAULT);
+    T_ASC_SC_ROLE acceptedRole = ASC_SC_ROLE_DEFAULT,
+    const OFBool alwaysAcceptDefaultRole = OFFalse);
 
 DCMTK_DCMNET_EXPORT OFCondition
 ASC_acceptContextsWithPreferredTransferSyntaxes(
@@ -640,7 +641,14 @@ ASC_dumpConnectionParameters(T_ASC_Association *association, STD_NAMESPACE ostre
     @return The role as a string
  */
 DCMTK_DCMNET_EXPORT const char*
-ASC_role2String(T_ASC_SC_ROLE role);
+ASC_role2String(const T_ASC_SC_ROLE role);
+
+/** Converts given ASC role to DUL role
+ *  @param  role The role to convert
+    @return The role as DUL role
+ */
+DCMTK_DCMNET_EXPORT DUL_SC_ROLE
+ascRole2dulRole(const T_ASC_SC_ROLE role);
 
 
 #endif
diff --git a/dcmnet/include/dcmtk/dcmnet/cond.h b/dcmnet/include/dcmtk/dcmnet/cond.h
index 11a3c12..3c46947 100644
--- a/dcmnet/include/dcmtk/dcmnet/cond.h
+++ b/dcmnet/include/dcmtk/dcmnet/cond.h
@@ -152,6 +152,7 @@ const unsigned short DULC_TCPWRAPPER                       = 0x324;
 const unsigned short DULC_FORKEDCHILD                      = 0x325;
 const unsigned short DULC_CANNOTFORK                       = 0x326;
 const unsigned short DULC_ILLEGALREJECTSOURCE              = 0x327;
+const unsigned short DULC_CANNOTREADSOCKETHANDLE         = 0x328;
 
 // condition constants used in the DUL module
 extern DCMTK_DCMNET_EXPORT const OFConditionConst DUL_ASSOCIATIONREJECTED;       /* DUL Association Rejected */
@@ -176,6 +177,7 @@ extern DCMTK_DCMNET_EXPORT const OFConditionConst DUL_REQUESTASSOCIATIONFAILED;
 extern DCMTK_DCMNET_EXPORT const OFConditionConst DUL_UNEXPECTEDPDU;             /* Received unexpected PDU */
 extern DCMTK_DCMNET_EXPORT const OFConditionConst DUL_UNSUPPORTEDPEERPROTOCOL;   /* DUL Unsupported peer protocol */
 extern DCMTK_DCMNET_EXPORT const OFConditionConst DUL_WRONGDATATYPE;             /* DUL Wrong Data Type Specified for Request */
+extern DCMTK_DCMNET_EXPORT const OFConditionConst DUL_CANNOTREADSOCKETHANDLE;    /* Cannot read socket handle from pipe */
 
 // other condition constants used in the network module (codes 1000 to 1023)
 extern DCMTK_DCMNET_EXPORT const OFConditionConst NET_EC_InvalidSOPClassUID;               /* Invalid SOP Class UID */
diff --git a/dcmnet/include/dcmtk/dcmnet/dcasccfg.h b/dcmnet/include/dcmtk/dcmnet/dcasccfg.h
index a28891c..c7bc419 100644
--- a/dcmnet/include/dcmtk/dcmnet/dcasccfg.h
+++ b/dcmnet/include/dcmtk/dcmnet/dcasccfg.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2015, OFFIS e.V.
+ *  Copyright (C) 2003-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -128,6 +128,14 @@ public:
     const char *abstractSyntaxUID,
     T_ASC_SC_ROLE role);
 
+  /** adds empty role list, also returns ok if list is already existing.
+   *  If key is not yet known, a new list is created under this key.
+   *  @param key role list key, must not be NULL
+   *  @return EC_Normal if successful, an error code otherwise
+   */
+  OFCondition createEmptyRoleList(
+    const char *key);
+
   /** adds the given abstract syntax UID and extended negotiation data to
    *  the list of extended negotiation items maintained under the given key.
    *  If key is not yet known, a new list is created under this key.
@@ -193,6 +201,19 @@ public:
    */
   OFString findTSKey(const OFList<OFString>& tslist);
 
+  /** Option to always accept a default role as association acceptor.
+   *  If OFFalse (default) the acceptor will reject a presentation context proposed
+   *  with Default role (no role selection at all) when it is configured for role
+   *  SCP only. If this option is set to OFTrue then such presentation contexts will
+   *  be accepted in Default role (i.e. acceptor does not return role selection for
+   *  this presentation context at all). Overall, if set to OFTrue, there are no
+   *  requestor proposals possible that lead to a complete rejection of a presentation
+   *  context. See also role documentation in dul.h.
+   *  @param  enabled If OFTrue, do not reject Default role proposals when configured
+   *          for SCP role. OFFalse (default behaviour): Reject such proposals.
+   */
+  void setAlwaysAcceptDefaultRole(const OFBool enabled);
+
   /** dumps all profiles or a selected profile to the given output stream.
    *  Mainly useful for debugging.
    *  @param out output stream to be used
@@ -230,6 +251,16 @@ private:
 
   /// map of profiles
   DcmProfileMap profiles_;
+
+  /// Option to always accept a default role as association acceptor.
+  /// If OFFalse (default) the acceptor will reject a presentation context proposed
+  /// with Default role (no role selection at all) when it is configured for role
+  /// SCP only. If this option is set to OFTrue then such presentation contexts will
+  /// be accepted in Default role (i.e. acceptor does not return role selection for
+  /// this presentation context at all). Overall, if set to OFTrue, there are no
+  /// requestor proposals possible that lead to a complete rejection of a presentation
+  /// context. See also role documentation in dul.h.
+  OFBool alwaysAcceptDefaultRole_;
 };
 
 #endif
diff --git a/dcmnet/include/dcmtk/dcmnet/dccfrsmp.h b/dcmnet/include/dcmtk/dcmnet/dccfrsmp.h
index 4696bde..0db7eb5 100644
--- a/dcmnet/include/dcmtk/dcmnet/dccfrsmp.h
+++ b/dcmnet/include/dcmtk/dcmnet/dccfrsmp.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2011, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -141,6 +141,15 @@ public:
     const char *abstractSyntaxUID,
     T_ASC_SC_ROLE role);
 
+  /** add empty list within map.
+   *  If key is new, new list is created. Otherwise the request
+   *  is ignored (no error).
+   *  @param key map key
+   *  @return EC_Normal if successful, an error code otherwise
+   */
+  OFCondition addEmpty(
+    const char *key);
+
   /** checks if the key is known
    *  @param key key name, must not be NULL
    *  @return true if key is known, false otherwise
diff --git a/dcmnet/include/dcmtk/dcmnet/dcmlayer.h b/dcmnet/include/dcmtk/dcmnet/dcmlayer.h
index c446a8b..e6591e1 100644
--- a/dcmnet/include/dcmtk/dcmnet/dcmlayer.h
+++ b/dcmnet/include/dcmtk/dcmnet/dcmlayer.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2011, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -24,6 +24,7 @@
 #define DCMLAYER_H
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
 #include "dcmtk/ofstd/oftypes.h"
 #include "dcmtk/ofstd/ofstring.h"
 
@@ -31,6 +32,7 @@
 #include "dcmtk/ofstd/ofstdinc.h"
 
 #include "dcmtk/dcmnet/dndefine.h"
+#include "dcmtk/dcmnet/dntypes.h"
 
 /** this enum represents the result of a transport layer operation
  *  which may be a transparent TCP/IP or a secure TLS operation.
@@ -90,7 +92,7 @@ public:
    *    transparent layer is used.
    *  @return pointer to new connection object if successful, NULL otherwise.
    */
-  virtual DcmTransportConnection *createConnection(int openSocket, OFBool useSecureLayer);
+  virtual DcmTransportConnection *createConnection(DcmNativeSocketType openSocket, OFBool useSecureLayer);
 
 private:
 
diff --git a/dcmnet/include/dcmtk/dcmnet/dcmtrans.h b/dcmnet/include/dcmtk/dcmnet/dcmtrans.h
index 97e9f10..75bdc55 100644
--- a/dcmnet/include/dcmtk/dcmnet/dcmtrans.h
+++ b/dcmnet/include/dcmtk/dcmnet/dcmtrans.h
@@ -24,6 +24,7 @@
 #define DCMTRANS_H
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
 #include "dcmtk/ofstd/ofglobal.h"     /* for OFGlobal */
 #include "dcmtk/ofstd/oftypes.h"      /* for OFBool */
 #include "dcmtk/ofstd/ofstream.h"     /* for ostream */
@@ -65,7 +66,7 @@ public:
    *    the connection must already be established on socket level. This object
    *    takes over control of the socket.
    */
-  DcmTransportConnection(int openSocket);
+  DcmTransportConnection(DcmNativeSocketType openSocket);
 
   /** destructor
    */
@@ -183,12 +184,12 @@ protected:
   /** returns the socket file descriptor managed by this object.
    *  @return socket file descriptor
    */
-  int getSocket() { return theSocket; }
+  DcmNativeSocketType getSocket() { return theSocket; }
 
   /** set the socket file descriptor managed by this object.
    *  @param socket file descriptor
    */
-  void setSocket(int socket) { theSocket = socket; }
+  void setSocket(DcmNativeSocketType socket) { theSocket = socket; }
 
 private:
 
@@ -234,8 +235,8 @@ private:
    */
   static OFBool fastSelectReadableAssociation(DcmTransportConnection *connections[], int connCount, int timeout);
 
-  /// the socket file descriptor used by the transport connection.
-  int theSocket;
+  /// the socket file descriptor/handle used by the transport connection.
+  DcmNativeSocketType theSocket;
 };
 
 
@@ -250,7 +251,7 @@ public:
    *    the connection must already be established on socket level. This object
    *    takes over control of the socket.
    */
-  DcmTCPConnection(int openSocket);
+  DcmTCPConnection(DcmNativeSocketType openSocket);
 
   /** destructor
    */
diff --git a/dcmnet/include/dcmtk/dcmnet/dcompat.h b/dcmnet/include/dcmtk/dcmnet/dcompat.h
index 87a1667..e9112be 100644
--- a/dcmnet/include/dcmtk/dcmnet/dcompat.h
+++ b/dcmnet/include/dcmtk/dcmnet/dcompat.h
@@ -91,25 +91,11 @@
 #define INCLUDE_UNISTD
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-/* Use the Grand Unified Sockets Interface (GUSI) on Macintosh */
-#include <GUSI.h>
-#endif
-
 #ifdef HAVE_WINDOWS_H
-#include <windows.h>  /* this includes either winsock.h or winsock2.h */
-#else
-#ifdef HAVE_WINSOCK_H
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>  /* for Windows defines */
+#elif defined(HAVE_WINSOCK_H)
 #include <winsock.h>  /* include winsock.h directly i.e. on MacOS */
-#ifdef macintosh
-/*
-** The WinSock header on Macintosh does not declare the WORD type nor the MAKEWORD
-** macro need to initialize the WinSock library.
-*/
-typedef u_short WORD;
-#define MAKEWORD(a,b) ((WORD) (((a)&0xff)<<8) | ((b)&0xff) )
-#endif
-#endif
 #endif
 
 BEGIN_EXTERN_C
@@ -169,7 +155,6 @@ END_EXTERN_C
 
 #ifdef HAVE_PROTOTYPE_FLOCK
 #define dcmtk_flock flock
-#define dcmtk_plockerr perror
 #endif
 
 #ifndef HAVE_PROTOTYPE_FLOCK
@@ -178,7 +163,6 @@ BEGIN_EXTERN_C
 DCMTK_DCMNET_EXPORT int flock(int fd, int operation);
 END_EXTERN_C
 #define dcmtk_flock flock
-#define dcmtk_plockerr perror
 #else
 /*
  * Simulate the flock function calls
@@ -191,7 +175,6 @@ END_EXTERN_C
 #define   LOCK_UN   8    /* unlock */
 
 DCMTK_DCMNET_EXPORT int dcmtk_flock(int fd, int operation);
-DCMTK_DCMNET_EXPORT void dcmtk_plockerr(const char *s);
 
 #endif /* !HAVE_FLOCK */
 #endif
@@ -360,15 +343,12 @@ DCMTK_DCMNET_EXPORT int access(const char* path, int amode);
 
 #endif /* HAVE_ACCESS */
 
-#ifndef HAVE_STRERROR
-DCMTK_DCMNET_EXPORT char *strerror(int e);
-#endif
-
 #ifdef _WIN32
 #define NULL_DEVICE_NAME "nul"
 #else
 #define NULL_DEVICE_NAME "/dev/null"
 #endif
 
+DCMTK_DCMNET_EXPORT void dcmtk_plockerr(const char *s);
 
 #endif /* DCOMPAT_H */
diff --git a/dcmnet/include/dcmtk/dcmnet/dntypes.h b/dcmnet/include/dcmtk/dcmnet/dntypes.h
new file mode 100644
index 0000000..c6a4eec
--- /dev/null
+++ b/dcmnet/include/dcmtk/dcmnet/dntypes.h
@@ -0,0 +1,40 @@
+/*
+ *
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmnet
+ *
+ *  Author:  Jan Schlamelcher
+ *
+ *  Purpose: global type and constant definitions
+ *
+ */
+
+#ifndef DNTYPES_H
+#define DNTYPES_H
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+#include "dcmtk/ofstd/oftypes.h"
+#include "dcmtk/dcmnet/dndefine.h"
+
+#ifdef _WIN32
+typedef OFuintptr_t DcmNativeSocketType;
+#define DCMNET_INVALID_SOCKET INVALID_SOCKET
+#elif !defined(DOXYGEN)
+typedef int DcmNativeSocketType;
+#define DCMNET_INVALID_SOCKET -1
+#else
+/// The data type for representing a TCP socket that is used by the underlying network API.
+typedef /* unspecified */ DcmNativeSocketType;
+#endif
+
+#endif /* !DNTYPES_H */
diff --git a/dcmnet/include/dcmtk/dcmnet/dul.h b/dcmnet/include/dcmtk/dcmnet/dul.h
index 3272de7..3f1ea79 100644
--- a/dcmnet/include/dcmtk/dcmnet/dul.h
+++ b/dcmnet/include/dcmtk/dcmnet/dul.h
@@ -71,6 +71,7 @@
 #include "dcmtk/dcmnet/extneg.h"
 #include "dcmtk/dcmnet/dicom.h"
 #include "dcmtk/dcmnet/dcuserid.h"
+#include "dcmtk/dcmnet/dntypes.h"
 
 class DcmTransportConnection;
 class DcmTransportLayer;
@@ -84,13 +85,6 @@ class LST_HEAD;
  */
 extern DCMTK_DCMNET_EXPORT OFGlobal<OFBool> dcmDisableGethostbyaddr;   /* default: OFFalse */
 
-/** Global flag specifying whether to reject presentation contexts in case of an
- *  unsuccessful SCP/SCU role selection (strict) or to return the corresponding
- *  user data item with appropriate values (default). This applies to association
- *  acceptors only.
- */
-extern DCMTK_DCMNET_EXPORT OFGlobal<OFBool> dcmStrictRoleSelection;   /* default: OFFalse */
-
 /** Global timeout in seconds for connecting to remote hosts.
  *  Default value is -1, which selects infinite timeout, i.e. blocking connect().
  */
@@ -100,7 +94,7 @@ extern DCMTK_DCMNET_EXPORT OFGlobal<Sint32> dcmConnectionTimeout;   /* default:
  *  will be used by dcmnet the next time receiveTransportConnectionTCP() is called.
  *  Useful for use with proxy applications, but inherently thread unsafe!
  */
-extern DCMTK_DCMNET_EXPORT OFGlobal<int> dcmExternalSocketHandle;   /* default: -1 */
+extern DCMTK_DCMNET_EXPORT OFGlobal<DcmNativeSocketType> dcmExternalSocketHandle;   /* default: platform specific value that denotes <i>invalid</i> */
 
 /** When compiled with WITH_TCPWRAPPER, DCMTK server processes may use the TCP
  *  wrapper library to enforce access control - see hosts_access(5).  If this
@@ -189,6 +183,48 @@ typedef struct {
     OFBool useSecureLayer;
 }   DUL_ASSOCIATESERVICEPARAMETERS;
 
+/** Enum describing the possible role settings for role negotiation sub items.
+ *  DCMTK implements the following role negotiation behaviour for association
+ *  acceptors:
+ *  @verbatim
+ *  +--------------------+------------------+---------+
+ *  | Requestor Proposal | Acceptor Setting | Result  |
+ *  +--------------------+------------------+---------+
+ *  | SCU                | SCP              | NONE    |
+ *  | SCU                | SCU              | SCU     |
+ *  | SCU                | SCU/SCP          | SCU     |
+ *  | SCU                | DEFAULT          | DEFAULT |
+ *  | SCP                | SCP              | SCP     |
+ *  | SCP                | SCU              | NONE    |
+ *  | SCP                | SCU/SCP          | SCP     |
+ *  | SCP                | DEFAULT          | DEFAULT |
+ *  | SCU/SCP            | SCP              | SCP     |
+ *  | SCU/SCP            | SCU              | SCU     |
+ *  | SCU/SCP            | SCU/SCP          | SCU/SCP |
+ *  | SCU/SCP            | DEFAULT          | DEFAULT |
+ *  | DEFAULT            | SCP              | Reject  |
+ *  | DEFAULT            | SCU              | DEFAULT |
+ *  | DEFAULT            | SCU/SCP          | DEFAULT |
+ *  | DEFAULT            | DEFAULT          | DEFAULT |
+ *  +--------------------+------------------+---------+
+ *  @endverbatim
+ *  NONE, SCU, SCP as well as SCU/SCP denote the related flags in the
+ *  association role selection user items. The "Reject" case denotes that
+ *  such a presentation context will be rejected by the association acceptor:
+ *  If the requestor connects with default role but the acceptor explicitly
+ *  requires the SCP role (only) then the presentation context
+ *  will be rejected. All other cases do not lead to rejection but to actual
+ *  "negotiation".
+ *
+ *  The Reject case can be avoided by setting a related option available in
+ *  association acceptance code like ASC_acceptPresentationContext() or DcmSCP.
+ *  to OFTrue (reading something like "alwaysAcceptDefaultRole" since when enabled,
+ *  with the Reject being disabled all Default role proposals will be accepted).
+ *  This can make sense for faulty Requestors, e.g. faulty Storage Commitment Servers
+ *  connecting on a second connection for delivering an N-EVENT-REPORT, or broken
+ *  Retrieve requestors proposing GET-based SOP Classes for retrieval using the Default
+ *  role instead of the required SCP role.
+ */
 typedef enum {
     DUL_SC_ROLE_NONE,
     DUL_SC_ROLE_DEFAULT,
@@ -348,7 +384,7 @@ typedef enum {
 */
 
 #define DUL_DULCOMPAT     2768240730UL
-#define DUL_DIMSECOMPAT   655360UL
+#define DUL_DIMSECOMPAT   786432UL
 #define DUL_MAXPDUCOMPAT  4278190335UL
 
 /* Define the function prototypes for this facility.
@@ -439,8 +475,9 @@ DCMTK_DCMNET_EXPORT OFString& dumpExtNegList(OFString& str, SOPClassExtendedNego
 
 DCMTK_DCMNET_EXPORT OFBool
 DUL_dataWaiting(DUL_ASSOCIATIONKEY * callerAssociation, int timeout);
-DCMTK_DCMNET_EXPORT int
-DUL_networkSocket(DUL_NETWORKKEY * callerNet);
+
+DCMTK_DCMNET_EXPORT DcmNativeSocketType DUL_networkSocket(DUL_NETWORKKEY * callerNet);
+
 DCMTK_DCMNET_EXPORT OFBool
 DUL_associationWaiting(DUL_NETWORKKEY * callerNet, int timeout);
 
@@ -483,6 +520,15 @@ DCMTK_DCMNET_EXPORT OFBool DUL_processIsForkedChild();
  */
 DCMTK_DCMNET_EXPORT void DUL_markProcessAsForkedChild();
 
+/** this helper function calls DUL_markProcessAsForkedChild(), then reads
+ *  the socket handle from the pipe opened by the parent process and
+ *  stores it in the global variable dcmExternalSocketHandle. This is
+ *  in most cases everything needed to prepare the network layer to act
+ *  as a forked child on Win32. On other operating system, the function does nothing.
+ * @return EC_Normal if successful, an error code otherwise.
+ */
+DCMTK_DCMNET_EXPORT OFCondition DUL_readSocketHandleAsForkedChild();
+
 /** this function marks the current process as a multi-process server and enables
  *  the creation of child processes for each incoming TCP transport connection
  *  in receiveTransportConnectionTCP().
diff --git a/dcmnet/include/dcmtk/dcmnet/scp.h b/dcmnet/include/dcmtk/dcmnet/scp.h
index d0018bf..224163b 100644
--- a/dcmnet/include/dcmtk/dcmnet/scp.h
+++ b/dcmnet/include/dcmtk/dcmnet/scp.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2009-2016, OFFIS e.V.
+ *  Copyright (C) 2009-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -170,7 +170,16 @@ public:
    *  @param abstractSyntax [in] The UID of the abstract syntax (e.g.\ SOP class) to add
    *  @param xferSyntaxes   [in] List of transfer syntaxes (UIDs) that should be supported
    *                             for the given abstract syntax name
-   *  @param role           [in] The role to be negotiated
+   *  @param requestorRole  [in] The role to be negotiated. This denotes the role of the
+   *                        the association requestor that this instance should accept, i.e. if
+   *                        set to ASC_SC_ROLE_SCP it means that the association requestor
+   *                        is allowed to negotiate the SCP role, thus, that this DcmSCP instance
+   *                        will be playing the SCU role for this abstract syntax. The default
+   *                        role (ASC_SC_ROLE_DEFAULT) implicates that this DcmSCP instance
+   *                        will be allowed to play the SCP role only, i.e. it will acknowledge
+   *                        such an explicit SCU role request, but also it will accept a proposal
+   *                        for the abstract syntax with no explicit role being proposed
+   *                        at all (since per default the requestor is SCU and the acceptor SCP).
    *  @param profile        [in] The profile the abstract syntax should be added to. The
    *                             default is to add it to the DcmSCP's internal standard
    *                             profile called "DEFAULT".
@@ -178,7 +187,7 @@ public:
    */
   virtual OFCondition addPresentationContext(const OFString &abstractSyntax,
                                              const OFList<OFString> &xferSyntaxes,
-                                             const T_ASC_SC_ROLE role = ASC_SC_ROLE_DEFAULT,
+                                             const T_ASC_SC_ROLE requestorRole = ASC_SC_ROLE_DEFAULT,
                                              const OFString &profile = "DEFAULT");
 
   /** Set SCP's TCP/IP listening port
@@ -290,6 +299,19 @@ public:
    */
   void setProgressNotificationMode(const OFBool mode);
 
+  /** Option to always accept a default role as association acceptor.
+   *  If OFFalse (default) the acceptor will reject a presentation context proposed
+   *  with Default role (no role selection at all) when it is configured for role
+   *  SCP only. If this option is set to OFTrue then such presentation contexts will
+   *  be accepted in Default role (i.e. acceptor does not return role selection for
+   *  this presentation context at all). Overall, if set to OFTrue, there are no
+   *  requestor proposals possible that lead to a complete rejection of a presentation
+   *  context. See also role documentation in dul.h.
+   *  @param  enabled If OFTrue, do not reject Default role proposals when configured
+   *          for SCP role. OFFalse (default behaviour): Reject such proposals.
+   */
+  void setAlwaysAcceptDefaultRole(const OFBool enabled);
+
   /* Get methods for SCP settings */
 
   /** Returns TCP/IP port number SCP listens for new connection requests
diff --git a/dcmnet/include/dcmtk/dcmnet/scpcfg.h b/dcmnet/include/dcmtk/dcmnet/scpcfg.h
index 8ab72b4..972ca0e 100644
--- a/dcmnet/include/dcmtk/dcmnet/scpcfg.h
+++ b/dcmnet/include/dcmtk/dcmnet/scpcfg.h
@@ -194,6 +194,19 @@ public:
    */
   void setProgressNotificationMode(const OFBool mode);
 
+  /** Option to always accept a default role as association acceptor.
+   *  If OFFalse (default) the acceptor will reject a presentation context proposed
+   *  with Default role (no role selection at all) when it is configured for role
+   *  SCP only. If this option is set to OFTrue then such presentation contexts will
+   *  be accepted in Default role (i.e. acceptor does not return role selection for
+   *  this presentation context at all). Overall, if set to OFTrue, there are no
+   *  requestor proposals possible that lead to a complete rejection of a presentation
+   *  context. See also role documentation in dul.h.
+   *  @param  enabled If OFTrue, do not reject Default role proposals when configured
+   *          for SCP role. OFFalse (default behaviour): Reject such proposals.
+   */
+  void setAlwaysAcceptDefaultRole(const OFBool enabled);
+
   /* Get methods for SCP settings */
 
   /** Returns TCP/IP port number SCP listens for new connection requests
diff --git a/dcmnet/include/dcmtk/dcmnet/scu.h b/dcmnet/include/dcmtk/dcmnet/scu.h
index 2090051..26d8ff5 100644
--- a/dcmnet/include/dcmtk/dcmnet/scu.h
+++ b/dcmnet/include/dcmtk/dcmnet/scu.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2008-2015, OFFIS e.V.
+ *  Copyright (C) 2008-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -233,10 +233,13 @@ public:
    *  @param abstractSyntax [in] The abstract syntax (UID) to look for
    *  @param transferSyntax [in] The transfer syntax (UID) to look for. If empty, the transfer
    *                             syntax is not checked.
+   *  @param requestorRole  [in] The role to look for (denoting the role the association
+   *                             requestor plays)
    *  @return Adequate Presentation context ID that can be used. 0 if none found.
    */
   T_ASC_PresentationContextID findPresentationContextID(const OFString &abstractSyntax,
-                                                        const OFString &transferSyntax);
+                                                        const OFString &transferSyntax,
+                                                        const T_ASC_SC_ROLE requestorRole = ASC_SC_ROLE_DEFAULT);
 
   /** After a successful association negotiation, this function is called to return the
    *  presentation context ID that best matches the desired abstract syntax and transfer
@@ -245,6 +248,7 @@ public:
    *  - Else then tries to find an explicit VR uncompressed TS presentation context
    *  - Else then tries to find an implicit VR uncompressed TS presentation context
    *  - Else finally accepts each matching presentation ctx independent of TS.
+   *  @warning This method does not support filtering for a specific role, yet.
    *  @param abstractSyntax [in] The abstract syntax (UID) to look for
    *  @param transferSyntax [in] The transfer syntax (UID) to look for. If empty, the transfer
    *                             syntax is not checked.
diff --git a/dcmnet/libsrc/Makefile.dep b/dcmnet/libsrc/Makefile.dep
index c91f556..4ba4bbb 100644
--- a/dcmnet/libsrc/Makefile.dep
+++ b/dcmnet/libsrc/Makefile.dep
@@ -27,7 +27,10 @@ assoc.o: assoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -43,14 +46,14 @@ assoc.o: assoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/diutil.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/diutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -109,7 +112,10 @@ dcasccff.o: dcasccff.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -125,17 +131,15 @@ dcasccff.o: dcasccff.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/dccftsmp.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dccftsmp.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
  ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
  ../include/dcmtk/dcmnet/dccfprmp.h \
@@ -171,7 +175,10 @@ dcasccfg.o: dcasccfg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -187,17 +194,15 @@ dcasccfg.o: dcasccfg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/dccftsmp.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dccftsmp.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
  ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
  ../include/dcmtk/dcmnet/dccfprmp.h
@@ -292,7 +297,7 @@ dccfrsmp.o: dccfrsmp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -309,11 +314,12 @@ dccfrsmp.o: dccfrsmp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/dccfpcmp.h
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dccfpcmp.h
 dccftsmp.o: dccftsmp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dccftsmp.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
@@ -357,7 +363,10 @@ dccfuidh.o: dccfuidh.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -375,10 +384,10 @@ dccfuidh.o: dccfuidh.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h
 dcmlayer.o: dcmlayer.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -390,7 +399,8 @@ dcmlayer.o: dcmlayer.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcmtrans.h \
+ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/dcmtrans.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h
 dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -405,7 +415,7 @@ dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/dndefine.h \
- ../include/dcmtk/dcmnet/dcompat.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dcompat.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h \
@@ -425,7 +435,10 @@ dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -441,9 +454,9 @@ dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -457,7 +470,8 @@ dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \
+ ../../ofstd/include/dcmtk/ofstd/oftimer.h
 dcompat.o: dcompat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcompat.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
@@ -487,7 +501,10 @@ dcompat.o: dcompat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -503,9 +520,9 @@ dcompat.o: dcompat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/diutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
@@ -521,7 +538,8 @@ dcompat.o: dcompat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h
 dcuserid.o: dcuserid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcuserid.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -555,7 +573,10 @@ dcuserid.o: dcuserid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -570,10 +591,11 @@ dcuserid.o: dcuserid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcuid.h dulstruc.h
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
+ ../include/dcmtk/dcmnet/dntypes.h dulstruc.h
 dfindscu.o: dfindscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dfindscu.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -597,7 +619,10 @@ dfindscu.o: dfindscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -615,9 +640,9 @@ dfindscu.o: dfindscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -629,7 +654,7 @@ dfindscu.o: dfindscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/assoc.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -675,7 +700,10 @@ dimcancl.o: dimcancl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -691,9 +719,9 @@ dimcancl.o: dimcancl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -708,7 +736,8 @@ dimcancl.o: dimcancl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h
 dimcmd.o: dimcmd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
@@ -726,6 +755,7 @@ dimcmd.o: dimcmd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -738,7 +768,9 @@ dimcmd.o: dimcmd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -773,8 +805,8 @@ dimcmd.o: dimcmd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \
- dimcmd.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h dimcmd.h
 dimdump.o: dimdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
@@ -804,7 +836,10 @@ dimdump.o: dimdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -820,9 +855,9 @@ dimdump.o: dimdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -837,7 +872,8 @@ dimdump.o: dimdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h
 dimecho.o: dimecho.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
@@ -867,7 +903,10 @@ dimecho.o: dimecho.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -883,9 +922,9 @@ dimecho.o: dimecho.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -900,7 +939,8 @@ dimecho.o: dimecho.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h
 dimfind.o: dimfind.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
@@ -930,7 +970,10 @@ dimfind.o: dimfind.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -946,9 +989,9 @@ dimfind.o: dimfind.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -963,7 +1006,8 @@ dimfind.o: dimfind.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h
 dimget.o: dimget.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
@@ -993,7 +1037,10 @@ dimget.o: dimget.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1009,9 +1056,9 @@ dimget.o: dimget.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -1026,7 +1073,8 @@ dimget.o: dimget.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h
 dimmove.o: dimmove.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/oftimer.h \
@@ -1057,7 +1105,10 @@ dimmove.o: dimmove.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1073,9 +1124,9 @@ dimmove.o: dimmove.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -1090,7 +1141,8 @@ dimmove.o: dimmove.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h
 dimse.o: dimse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
@@ -1120,7 +1172,10 @@ dimse.o: dimse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1136,9 +1191,9 @@ dimse.o: dimse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -1153,8 +1208,9 @@ dimse.o: dimse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \
- dimcmd.h ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h dimcmd.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \
  ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
@@ -1205,7 +1261,10 @@ dimstore.o: dimstore.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1221,9 +1280,9 @@ dimstore.o: dimstore.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -1238,7 +1297,8 @@ dimstore.o: dimstore.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrmf.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h
 diutil.o: diutil.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -1255,6 +1315,7 @@ diutil.o: diutil.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
@@ -1275,7 +1336,9 @@ diutil.o: diutil.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1303,7 +1366,8 @@ diutil.o: diutil.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
@@ -1331,7 +1395,10 @@ dstorscp.o: dstorscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1349,10 +1416,10 @@ dstorscp.o: dstorscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -1382,8 +1449,6 @@ dstorscp.o: dstorscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1430,13 +1495,13 @@ dstorscp.o: dstorscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcompat.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \
- ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../include/dcmtk/dcmnet/diutil.h
 dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
@@ -1462,7 +1527,10 @@ dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1480,9 +1548,9 @@ dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -1513,8 +1581,6 @@ dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1559,11 +1625,12 @@ dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h ../include/dcmtk/dcmnet/diutil.h
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../include/dcmtk/dcmnet/diutil.h
 dul.o: dul.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
@@ -1593,7 +1660,10 @@ dul.o: dul.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1609,9 +1679,9 @@ dul.o: dul.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -1626,9 +1696,9 @@ dul.o: dul.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \
- dulstruc.h dulpriv.h dulfsm.h ../include/dcmtk/dcmnet/dcmtrans.h \
- ../include/dcmtk/dcmnet/dcmlayer.h \
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h dulstruc.h dulpriv.h dulfsm.h \
+ ../include/dcmtk/dcmnet/dcmtrans.h ../include/dcmtk/dcmnet/dcmlayer.h \
  ../../ofstd/include/dcmtk/ofstd/ofnetdb.h
 dulconst.o: dulconst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
@@ -1658,7 +1728,10 @@ dulconst.o: dulconst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1674,9 +1747,9 @@ dulconst.o: dulconst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/diutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
@@ -1692,8 +1765,8 @@ dulconst.o: dulconst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \
- dulstruc.h dulpriv.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h dulstruc.h dulpriv.h
 dulextra.o: dulextra.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
@@ -1722,7 +1795,10 @@ dulextra.o: dulextra.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1738,15 +1814,16 @@ dulextra.o: dulextra.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- dulstruc.h dulpriv.h ../include/dcmtk/dcmnet/dcmtrans.h \
- ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/diutil.h \
+ ../include/dcmtk/dcmnet/dntypes.h dulstruc.h dulpriv.h \
+ ../include/dcmtk/dcmnet/dcmtrans.h ../include/dcmtk/dcmnet/dcmlayer.h \
+ ../include/dcmtk/dcmnet/diutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -1786,7 +1863,10 @@ dulfsm.o: dulfsm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1802,16 +1882,16 @@ dulfsm.o: dulfsm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- dulstruc.h dulpriv.h dulfsm.h ../include/dcmtk/dcmnet/assoc.h \
- ../include/dcmtk/dcmnet/dcmtrans.h ../include/dcmtk/dcmnet/dcmlayer.h \
- ../include/dcmtk/dcmnet/diutil.h \
+ ../include/dcmtk/dcmnet/dntypes.h dulstruc.h dulpriv.h dulfsm.h \
+ ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dcmtrans.h \
+ ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/diutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -1838,6 +1918,7 @@ dulparse.o: dulparse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
@@ -1857,7 +1938,9 @@ dulparse.o: dulparse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1875,7 +1958,7 @@ dulparse.o: dulparse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/diutil.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/diutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -1916,7 +1999,10 @@ dulpres.o: dulpres.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1932,14 +2018,14 @@ dulpres.o: dulpres.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- dulstruc.h dulpriv.h dulfsm.h
+ ../include/dcmtk/dcmnet/dntypes.h dulstruc.h dulpriv.h dulfsm.h
 extneg.o: extneg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/extneg.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
@@ -1981,7 +2067,10 @@ scp.o: scp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1999,10 +2088,10 @@ scp.o: scp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -2032,8 +2121,6 @@ scp.o: scp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2080,13 +2167,13 @@ scp.o: scp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcompat.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \
- ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h \
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../include/dcmtk/dcmnet/diutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrmf.h
 scpcfg.o: scpcfg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \
@@ -2119,7 +2206,10 @@ scpcfg.o: scpcfg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2135,17 +2225,15 @@ scpcfg.o: scpcfg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/dccftsmp.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dccftsmp.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
  ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
  ../include/dcmtk/dcmnet/dccfprmp.h ../include/dcmtk/dcmnet/dimse.h \
@@ -2159,7 +2247,7 @@ scpcfg.o: scpcfg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h
+ ../include/dcmtk/dcmnet/diutil.h
 scppool.o: scppool.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/scppool.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
@@ -2182,7 +2270,10 @@ scppool.o: scppool.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2199,10 +2290,10 @@ scppool.o: scppool.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -2232,8 +2323,6 @@ scppool.o: scppool.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2280,13 +2369,13 @@ scppool.o: scppool.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcompat.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \
- ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../include/dcmtk/dcmnet/diutil.h
 scpthrd.o: scpthrd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/scpthrd.h ../include/dcmtk/dcmnet/scp.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -2307,7 +2396,10 @@ scpthrd.o: scpthrd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2325,10 +2417,10 @@ scpthrd.o: scpthrd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -2358,8 +2450,6 @@ scpthrd.o: scpthrd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2406,13 +2496,13 @@ scpthrd.o: scpthrd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcompat.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \
- ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../include/dcmtk/dcmnet/diutil.h
 scu.o: scu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/scu.h ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -2434,7 +2524,10 @@ scu.o: scu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2452,10 +2545,10 @@ scu.o: scu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2483,8 +2576,6 @@ scu.o: scu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2532,10 +2623,10 @@ scu.o: scu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h ../include/dcmtk/dcmnet/diutil.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcostrmf.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../include/dcmtk/dcmnet/diutil.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcostrmf.h
diff --git a/dcmnet/libsrc/assoc.cc b/dcmnet/libsrc/assoc.cc
index 8a3530e..6d2c478 100644
--- a/dcmnet/libsrc/assoc.cc
+++ b/dcmnet/libsrc/assoc.cc
@@ -90,6 +90,12 @@
 */
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+#ifdef HAVE_WINDOWS_H
+// on Windows, we need Winsock2 for network functions
+#include <winsock2.h>
+#endif
+
 #include "dcmtk/dcmnet/assoc.h"       /* always include the module header */
 #include "dcmtk/dcmnet/diutil.h"
 
@@ -290,10 +296,15 @@ ASC_createAssociationParameters(T_ASC_Parameters ** params,
             OFFIS_DTK_IMPLEMENTATION_VERSION_NAME,
             sizeof((*params)->ourImplementationVersionName)-1);
 
-    strcpy((*params)->DULparams.callingImplementationClassUID,
-        (*params)->ourImplementationClassUID);
-    strcpy((*params)->DULparams.callingImplementationVersionName,
-        (*params)->ourImplementationVersionName);
+    if (strlen(OFFIS_DTK_IMPLEMENTATION_VERSION_NAME) > 16)
+    {
+      DCMNET_WARN("DICOM implementation version name too long: " << OFFIS_DTK_IMPLEMENTATION_VERSION_NAME);
+    }
+
+    OFStandard::strlcpy((*params)->DULparams.callingImplementationClassUID,
+        (*params)->ourImplementationClassUID, DICOM_UI_LENGTH + 1);
+    OFStandard::strlcpy((*params)->DULparams.callingImplementationVersionName,
+        (*params)->ourImplementationVersionName, 16+1);
 
     strncpy((*params)->DULparams.applicationContextName,
             UID_StandardApplicationContext,
@@ -567,8 +578,8 @@ dulRole2ascRole(DUL_SC_ROLE role)
     return ar;
 }
 
-static DUL_SC_ROLE
-ascRole2dulRole(T_ASC_SC_ROLE role)
+DUL_SC_ROLE
+ascRole2dulRole(const T_ASC_SC_ROLE role)
 {
     DUL_SC_ROLE dr = DUL_SC_ROLE_DEFAULT;
     switch (role) {
@@ -583,7 +594,7 @@ ascRole2dulRole(T_ASC_SC_ROLE role)
 }
 
 const char*
-ASC_role2String(T_ASC_SC_ROLE role)
+ASC_role2String(const T_ASC_SC_ROLE role)
 {
     const char* s = NULL;
     switch (role) {
@@ -843,7 +854,8 @@ ASC_acceptPresentationContext(
     T_ASC_Parameters * params,
     T_ASC_PresentationContextID presentationContextID,
     const char* transferSyntax,
-    T_ASC_SC_ROLE acceptedRole)
+    T_ASC_SC_ROLE acceptedRole,
+    const OFBool alwaysAcceptDefaultRole)
  /*
   * The presentation context will be marked as accepted and the provided
   * transfer syntax name chosen.
@@ -863,22 +875,29 @@ ASC_acceptPresentationContext(
     proposedContext->result = ASC_P_ACCEPTANCE;
     proposedContext->acceptedSCRole = ascRole2dulRole(acceptedRole);
 
-    /* check whether the SCP/SCU role selection is successful */
-    if (dcmStrictRoleSelection.get())
+    /* Here we check the only role selection case which leads to clear rejection of the
+     * proposed presentation context: If the requestor connects with default role but the
+     * acceptor explicitly requires the SCP role (only) then the presentation context
+     * will be rejected. All other cases do not lead to rejection but to actual "negotiation".
+     * DCMTK's behaviour can be seen in the delaration of enum DUL_SC_ROLE (see dul.h).
+     * The logic of the role negotiation is implemented in constructSCUSCPRoles() (see dulconst.cc).
+     */
+    if ( (proposedContext->proposedSCRole == DUL_SC_ROLE_DEFAULT)
+      && (proposedContext->acceptedSCRole == DUL_SC_ROLE_SCP) )
     {
-        if (proposedContext->proposedSCRole != proposedContext->acceptedSCRole)
-        {
-            if (((proposedContext->proposedSCRole == DUL_SC_ROLE_DEFAULT) && (proposedContext->acceptedSCRole != DUL_SC_ROLE_SCU)) ||
-                ((proposedContext->proposedSCRole == DUL_SC_ROLE_SCU) && (proposedContext->acceptedSCRole != DUL_SC_ROLE_DEFAULT)) ||
-                ((proposedContext->proposedSCRole != DUL_SC_ROLE_SCUSCP) && (proposedContext->acceptedSCRole != DUL_SC_ROLE_SCUSCP)))
-            {
-                proposedContext->result = ASC_P_NOREASON;
-                DCMNET_ERROR("ASSOC: SCP/SCU role selection failed, proposed ("
-                    << ASC_role2String(dulRole2ascRole(proposedContext->proposedSCRole))
-                    << ") and accepted role (" << ASC_role2String(acceptedRole) << ") are incompatible");
-                return ASC_SCPSCUROLESELECTIONFAILED;
-            }
-        }
+      // If user wants to override rejection (e.g. for faulty clients), skip the check but print warning
+      if (alwaysAcceptDefaultRole)
+      {
+        DCMNET_WARN("ASSOC: Deliberately accepting Default role proposed by association requestor, "
+            << "while originally being configured for role SCP only");
+      }
+      else
+      {
+        proposedContext->result = ASC_P_NOREASON;
+          DCMNET_ERROR("ASSOC: SCP/SCU role selection failed, Default role (i.e. SCU) proposed "
+              << "but only SCP role configured for acceptance");
+          return ASC_SCPSCUROLESELECTIONFAILED;
+      }
     }
 
     acceptedContext = findPresentationContextID(
@@ -1533,18 +1552,32 @@ ASC_dumpParameters(OFString& str, T_ASC_Parameters * params, ASC_associateType d
         << "Their Implementation Class UID:    "
         << params->theirImplementationClassUID << OFendl
         << "Their Implementation Version Name: "
-        << params->theirImplementationVersionName << OFendl;
-
-    outstream << "Application Context Name:    "
+        << params->theirImplementationVersionName << OFendl
+        << "Application Context Name:    "
         << params->DULparams.applicationContextName << OFendl
         << "Calling Application Name:    "
         << params->DULparams.callingAPTitle << OFendl
         << "Called Application Name:     "
         << params->DULparams.calledAPTitle << OFendl
-        << "Responding Application Name: "
-        << params->DULparams.respondingAPTitle << OFendl;
+        << "Responding Application Name: ";
+
+    // the field "respondingAPTitle" in DULparams exists,
+    // but is never used for network communication because DICOM
+    // requires the responding AE title to be identical to the
+    // called AE title. This rule is enforced on the DUL layer
+    // but not visible here.
+    // To avoid confusion of the user we thus print the called
+    // AE title here (but only if respondingAPTitle is non-empty,
+    // which happens when an incoming association request is
+    // being responded to.
+    if (params->DULparams.respondingAPTitle[0] != '\0')
+    {
+      outstream << params->DULparams.calledAPTitle ;
+    }
 
-    outstream << "Our Max PDU Receive Size:    "
+    outstream
+        << OFendl
+        << "Our Max PDU Receive Size:    "
         << params->ourMaxPDUReceiveSize << OFendl
         << "Their Max PDU Receive Size:  "
         << params->theirMaxPDUReceiveSize << OFendl;
@@ -1595,8 +1628,9 @@ ASC_dumpParameters(OFString& str, T_ASC_Parameters * params, ASC_associateType d
     }
 
 #if 0
+    // the following output could be useful for debugging purposes
     outstream << "DUL Params --- BEGIN" << OFendl;
-    DUL_DumpParams(&params->DULparams);
+    outstream << DUL_DumpParams(temp_str, &params->DULparams);
     outstream << "DUL Params --- END" << OFendl;
 #endif
 
@@ -1660,7 +1694,11 @@ ASC_dataWaiting(T_ASC_Association * association, int timeout)
 OFBool
 ASC_associationWaiting(T_ASC_Network * network, int timeout)
 {
+#ifdef _WIN32
+    SOCKET s;
+#else
     int s;
+#endif
     struct timeval t;
     fd_set fdset;
     int nfound;
@@ -1668,8 +1706,13 @@ ASC_associationWaiting(T_ASC_Network * network, int timeout)
     if (network == NULL) return OFFalse;
 
     s = DUL_networkSocket(network->network);
+
+#ifdef _WIN32
+    if (s == INVALID_SOCKET) return OFFalse;
+#else
     if (s < 0)
         return OFFalse;
+#endif
 
     FD_ZERO(&fdset);
 #ifdef __MINGW32__
@@ -1681,9 +1724,10 @@ ASC_associationWaiting(T_ASC_Network * network, int timeout)
     t.tv_sec = timeout;
     t.tv_usec = 0;
 #ifdef HAVE_INTP_SELECT
-    nfound = select(s + 1, (int *)(&fdset), NULL, NULL, &t);
+    nfound = select(OFstatic_cast(int, s + 1), (int *)(&fdset), NULL, NULL, &t);
 #else
-    nfound = select(s + 1, &fdset, NULL, NULL, &t);
+    // the typecast is safe because Windows ignores the first select() parameter anyway
+    nfound = select(OFstatic_cast(int, s + 1), &fdset, NULL, NULL, &t);
 #endif
     if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
     {
@@ -1904,10 +1948,10 @@ ASC_requestAssociation(T_ASC_Network * network,
     (*assoc)->sendPDVBuffer = NULL;
 
     params->DULparams.maxPDU = params->ourMaxPDUReceiveSize;
-    strcpy(params->DULparams.callingImplementationClassUID,
-        params->ourImplementationClassUID);
-    strcpy(params->DULparams.callingImplementationVersionName,
-        params->ourImplementationVersionName);
+    OFStandard::strlcpy(params->DULparams.callingImplementationClassUID,
+        params->ourImplementationClassUID, DICOM_UI_LENGTH + 1);
+    OFStandard::strlcpy(params->DULparams.callingImplementationVersionName,
+        params->ourImplementationVersionName, 16+1);
 
     cond = DUL_RequestAssociation(&network->network, block, timeout,
                                   &(*assoc)->params->DULparams,
diff --git a/dcmnet/libsrc/cond.cc b/dcmnet/libsrc/cond.cc
index 602b991..7fb13a3 100644
--- a/dcmnet/libsrc/cond.cc
+++ b/dcmnet/libsrc/cond.cc
@@ -71,6 +71,7 @@ makeOFConditionConst(DUL_REQUESTASSOCIATIONFAILED, OFM_dcmnet, DULC_REQUESTASSOC
 makeOFConditionConst(DUL_UNEXPECTEDPDU,            OFM_dcmnet, DULC_UNEXPECTEDPDU           , OF_error, "Received unexpected PDU");
 makeOFConditionConst(DUL_UNSUPPORTEDPEERPROTOCOL,  OFM_dcmnet, DULC_UNSUPPORTEDPEERPROTOCOL , OF_error, "DUL Unsupported peer protocol");
 makeOFConditionConst(DUL_WRONGDATATYPE,            OFM_dcmnet, DULC_WRONGDATATYPE           , OF_error, "DUL Wrong Data Type Specified for Request");
+makeOFConditionConst(DUL_CANNOTREADSOCKETHANDLE,   OFM_dcmnet, DULC_CANNOTREADSOCKETHANDLE  , OF_error, "DUL Cannot Read Socket Handle from Pipe");
 
 makeOFConditionConst(NET_EC_InvalidSOPClassUID,              OFM_dcmnet, 1000, OF_error, "Invalid SOP Class UID");
 makeOFConditionConst(NET_EC_UnknownStorageSOPClass,          OFM_dcmnet, 1001, OF_error, "Unknown Storage SOP Class");
diff --git a/dcmnet/libsrc/dcasccfg.cc b/dcmnet/libsrc/dcasccfg.cc
index 5ccc9e4..8dbf506 100644
--- a/dcmnet/libsrc/dcasccfg.cc
+++ b/dcmnet/libsrc/dcasccfg.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2015, OFFIS e.V.
+ *  Copyright (C) 2003-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -30,6 +30,7 @@ DcmAssociationConfiguration::DcmAssociationConfiguration()
 , roleselection_()
 , extneg_()
 , profiles_()
+, alwaysAcceptDefaultRole_(OFFalse)
 {
 }
 
@@ -70,6 +71,7 @@ void DcmAssociationConfiguration::clear()
   roleselection_.clear();
   extneg_.clear();
   profiles_.clear();
+  alwaysAcceptDefaultRole_ = OFFalse;
 }
 
 OFCondition DcmAssociationConfiguration::addTransferSyntax(
@@ -105,6 +107,12 @@ OFCondition DcmAssociationConfiguration::addRole(
   return roleselection_.add(key, abstractSyntaxUID, role);
 }
 
+OFCondition DcmAssociationConfiguration::createEmptyRoleList(
+  const char* key)
+{
+  return roleselection_.addEmpty(key);
+}
+
 OFCondition DcmAssociationConfiguration::addExtendedNegotiation(
   const char *key,
   const char *abstractSyntaxUID,
@@ -531,7 +539,7 @@ OFCondition DcmAssociationConfiguration::evaluateAssociationParameters(
             found = OFTrue;
             result = ASC_acceptPresentationContext(
                 assoc.params, pc.presentationContextID,
-                pc.proposedTransferSyntaxes[j], acceptedRole);
+                pc.proposedTransferSyntaxes[j], acceptedRole, alwaysAcceptDefaultRole_);
             // SCP/SCU role selection failed, reject presentation context
             if (result == ASC_SCPSCUROLESELECTIONFAILED)
             {
@@ -589,6 +597,12 @@ OFCondition DcmAssociationConfiguration::evaluateAssociationParameters(
   return result;
 }
 
+void DcmAssociationConfiguration::setAlwaysAcceptDefaultRole(const OFBool enabled)
+{
+  alwaysAcceptDefaultRole_ = enabled;
+}
+
+
 
 void DcmAssociationConfiguration::dumpProfiles(
     STD_NAMESPACE ostream &out,
diff --git a/dcmnet/libsrc/dccfrsmp.cc b/dcmnet/libsrc/dccfrsmp.cc
index 72032a4..f4730ea 100644
--- a/dcmnet/libsrc/dccfrsmp.cc
+++ b/dcmnet/libsrc/dccfrsmp.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2010, OFFIS e.V.
+ *  Copyright (C) 2003-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -154,6 +154,21 @@ OFCondition DcmRoleSelectionMap::add(
   return EC_Normal;
 }
 
+OFCondition DcmRoleSelectionMap::addEmpty(
+  const char *key)
+{
+  if (!key) return EC_IllegalCall;
+  OFString skey(key);
+  OFMap<OFString, DcmRoleSelectionList*>::iterator it = map_.find(skey);
+
+  if (it == map_.end())
+  {
+    DcmRoleSelectionList *newentry = new DcmRoleSelectionList();
+    map_.insert(OFPair<OFString, DcmRoleSelectionList*>(skey, newentry));
+  }
+  return EC_Normal;
+}
+
 OFBool DcmRoleSelectionMap::isKnownKey(const char *key) const
 {
   if (!key) return OFFalse;
diff --git a/dcmnet/libsrc/dcmlayer.cc b/dcmnet/libsrc/dcmlayer.cc
index d83187c..3ea7f67 100644
--- a/dcmnet/libsrc/dcmlayer.cc
+++ b/dcmnet/libsrc/dcmlayer.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2010, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -28,7 +28,7 @@ DcmTransportLayer::~DcmTransportLayer()
 {
 }
 
-DcmTransportConnection * DcmTransportLayer::createConnection(int openSocket, OFBool useSecureLayer)
+DcmTransportConnection * DcmTransportLayer::createConnection(DcmNativeSocketType openSocket, OFBool useSecureLayer)
 {
   if (useSecureLayer) return NULL;  /* secure layer connections not supported */
   else return new DcmTCPConnection(openSocket);
diff --git a/dcmnet/libsrc/dcmtrans.cc b/dcmnet/libsrc/dcmtrans.cc
index f81316e..32eead6 100644
--- a/dcmnet/libsrc/dcmtrans.cc
+++ b/dcmnet/libsrc/dcmtrans.cc
@@ -21,6 +21,12 @@
  */
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+#ifdef HAVE_WINDOWS_H
+// on Windows, we need Winsock2 for network functions
+#include <winsock2.h>
+#endif
+
 #include "dcmtk/dcmnet/dcmtrans.h"
 #include "dcmtk/dcmnet/dcompat.h"     /* compatibility code for certain Unix dialects such as SunOS */
 #include "dcmtk/dcmnet/diutil.h"
@@ -32,6 +38,7 @@
 #define INCLUDE_CERRNO
 #define INCLUDE_CSIGNAL
 #include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/ofstd/oftimer.h"
 
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TIME_H
@@ -45,21 +52,22 @@ BEGIN_EXTERN_C
 #endif
 END_EXTERN_C
 
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>	/* Use the Grand Unified Sockets Interface (GUSI) on Macintosh */
+/* platform independent definition of EINTR */
+enum
+{
+#ifdef HAVE_WINSOCK_H
+    DCMNET_EINTR = WSAEINTR
+#else
+    DCMNET_EINTR = EINTR
 #endif
+};
 
 OFGlobal<Sint32> dcmSocketSendTimeout(60);
 OFGlobal<Sint32> dcmSocketReceiveTimeout(60);
 
-DcmTransportConnection::DcmTransportConnection(int openSocket)
+DcmTransportConnection::DcmTransportConnection(DcmNativeSocketType openSocket)
 : theSocket(openSocket)
 {
-#ifndef HAVE_GUSI_H
   if (theSocket >= 0)
   {
 #ifdef DISABLE_SEND_TIMEOUT
@@ -121,7 +129,6 @@ DcmTransportConnection::DcmTransportConnection(int openSocket)
       }
     }
   }
-#endif
 }
 
 DcmTransportConnection::~DcmTransportConnection()
@@ -175,15 +182,21 @@ OFBool DcmTransportConnection::safeSelectReadableAssociation(DcmTransportConnect
 
 OFBool DcmTransportConnection::fastSelectReadableAssociation(DcmTransportConnection *connections[], int connCount, int timeout)
 {
+
+#ifdef _WIN32
+  SOCKET socketfd = INVALID_SOCKET;
+  SOCKET maxsocketfd = INVALID_SOCKET;
+#else
   int socketfd = -1;
   int maxsocketfd = -1;
+#endif
+
   int i=0;
   struct timeval t;
   fd_set fdset;
-
   FD_ZERO(&fdset);
-  t.tv_sec = timeout;
-  t.tv_usec = 0;
+  OFTimer timer;
+  int lTimeout = timeout;
 
   for (i=0; i<connCount; i++)
   {
@@ -201,16 +214,42 @@ OFBool DcmTransportConnection::fastSelectReadableAssociation(DcmTransportConnect
     }
   }
 
+  OFBool done = OFFalse;
+  while (!done)
+  {
+    // timeval can be undefined after the call to select, see
+    // http://man7.org/linux/man-pages/man2/select.2.html
+    t.tv_sec = lTimeout;
+    t.tv_usec = 0;
+
 #ifdef HAVE_INTP_SELECT
-  int nfound = select(maxsocketfd + 1, (int *)(&fdset), NULL, NULL, &t);
+    int nfound = select(OFstatic_cast(int, maxsocketfd + 1), (int *)(&fdset), NULL, NULL, &t);
 #else
-  int nfound = select(maxsocketfd + 1, &fdset, NULL, NULL, &t);
+    // This is safe because on Win32 the first parameter of select() is ignored anyway
+    int nfound = select(OFstatic_cast(int, maxsocketfd + 1), &fdset, NULL, NULL, &t);
 #endif
-  if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
-  {
-    DU_logSelectResult(nfound);
+
+    if (nfound == 0) return OFFalse; // a regular timeout
+    else if (nfound > 0) done = OFTrue; // data available for reading
+    else
+    {
+        // check for interrupt call
+        if (OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR)
+        {
+            int diff = OFstatic_cast(int, timer.getDiff());
+            if (diff < timeout)
+            {
+                lTimeout = timeout - diff;
+                continue; // retry
+            }
+        }
+        else
+        {
+            DCMNET_ERROR("socket select returned with error: " << OFStandard::getLastNetworkErrorCode().message());
+            return OFFalse;
+        }
+    }
   }
-  if (nfound<=0) return OFFalse;      /* none available for reading */
 
   for (i=0; i<connCount; i++)
   {
@@ -243,7 +282,7 @@ void DcmTransportConnection::dumpConnectionParameters(STD_NAMESPACE ostream& out
 
 /* ================================================ */
 
-DcmTCPConnection::DcmTCPConnection(int openSocket)
+DcmTCPConnection::DcmTCPConnection(DcmNativeSocketType openSocket)
 : DcmTransportConnection(openSocket)
 {
 }
@@ -271,7 +310,7 @@ DcmTransportLayerStatus DcmTCPConnection::renegotiate(const char * /* newSuite *
 ssize_t DcmTCPConnection::read(void *buf, size_t nbyte)
 {
 #ifdef HAVE_WINSOCK_H
-  return recv(getSocket(), (char *)buf, nbyte, 0);
+  return recv(getSocket(), (char *)buf, OFstatic_cast(int, nbyte), 0);
 #else
   return ::read(getSocket(), (char *)buf, nbyte);
 #endif
@@ -280,7 +319,7 @@ ssize_t DcmTCPConnection::read(void *buf, size_t nbyte)
 ssize_t DcmTCPConnection::write(void *buf, size_t nbyte)
 {
 #ifdef HAVE_WINSOCK_H
-  return send(getSocket(), (char *)buf, nbyte, 0);
+  return send(getSocket(), (char *)buf, OFstatic_cast(int, nbyte), 0);
 #else
   return ::write(getSocket(), (char *)buf, nbyte);
 #endif
@@ -316,6 +355,8 @@ OFBool DcmTCPConnection::networkDataAvailable(int timeout)
   struct timeval t;
   fd_set fdset;
   int nfound;
+  OFTimer timer;
+  int lTimeout = timeout;
 
   FD_ZERO(&fdset);
 
@@ -326,27 +367,49 @@ OFBool DcmTCPConnection::networkDataAvailable(int timeout)
   FD_SET(getSocket(), &fdset);
 #endif
 
-  t.tv_sec = timeout;
-  t.tv_usec = 0;
+  while (1)
+  {
+      // timeval can be undefined after the call to select, see
+      // http://man7.org/linux/man-pages/man2/select.2.html
+      t.tv_sec = lTimeout;
+      t.tv_usec = 0;
 
 #ifdef HAVE_INTP_SELECT
-  nfound = select(getSocket() + 1, (int *)(&fdset), NULL, NULL, &t);
+      nfound = select(OFstatic_cast(int, getSocket() + 1), (int *)(&fdset), NULL, NULL, &t);
 #else
-  nfound = select(getSocket() + 1, &fdset, NULL, NULL, &t);
+      // This is safe because on Win32 the first parameter of select() is ignored anyway
+      nfound = select(OFstatic_cast(int, getSocket() + 1), &fdset, NULL, NULL, &t);
 #endif
-  if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
-  {
-    DU_logSelectResult(nfound);
-  }
-  if (nfound <= 0)
-  {
-    return OFFalse;
-  }
-  else
-  {
-    if (FD_ISSET(getSocket(), &fdset)) return OFTrue;
-    else return OFFalse;  /* This should not really happen */
+
+      if (nfound < 0)
+      {
+        // check for interrupt call
+        if (OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR)
+        {
+            int diff = OFstatic_cast(int, timer.getDiff());
+            if (diff < timeout)
+            {
+                lTimeout = timeout - diff;
+                continue; // retry
+            }
+        }
+        else
+        {
+            DCMNET_ERROR("socket select returned with error: " << OFStandard::getLastNetworkErrorCode().message());
+            return OFFalse;
+        }
+      }
+      if (nfound == 0)
+      {
+        return OFFalse; // a regular timeout
+      }
+      else
+      {
+        if (FD_ISSET(getSocket(), &fdset)) return OFTrue;
+        else return OFFalse;  /* This should not really happen */
+      }
   }
+  return OFFalse;
 }
 
 OFBool DcmTCPConnection::isTransparentConnection()
diff --git a/dcmnet/libsrc/dcompat.cc b/dcmnet/libsrc/dcompat.cc
index 424c240..69c0a7d 100644
--- a/dcmnet/libsrc/dcompat.cc
+++ b/dcmnet/libsrc/dcompat.cc
@@ -91,7 +91,6 @@
 #define INCLUDE_CSTDLIB
 #define INCLUDE_CSTDIO
 #define INCLUDE_CSTRING
-#define INCLUDE_CERRNO
 #define INCLUDE_UNISTD
 #include "dcmtk/ofstd/ofstdinc.h"
 
@@ -128,11 +127,6 @@ BEGIN_EXTERN_C
 #endif
 END_EXTERN_C
 
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>
-#include <winbase.h>
-#endif
-
 /*
  * On DEC alpha the linker moans if a library is empty.
  * So define a dummy variable.
@@ -152,11 +146,6 @@ int dcmtk_flock(int fd, int operation)
   return 0;
 }
 
-void dcmtk_plockerr(const char *s)
-{
-  DCMNET_WARN(s << ": flock not implemented");
-}
-
 #else /* macintosh */
 #ifdef _WIN32
 
@@ -218,22 +207,6 @@ int dcmtk_flock(int fd, int operation)
   else return -1; /* unknown lock operation */
 }
 
-void dcmtk_plockerr(const char *s)
-{
-  LPVOID lpMsgBuf=NULL;
-
-  FormatMessage(
-    FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
-    NULL,
-    GetLastError(),
-    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
-    (LPTSTR) &lpMsgBuf, 0, NULL);
-
-  if (lpMsgBuf && s)
-      DCMNET_ERROR(s << ": " << (const char*)lpMsgBuf);
-  LocalFree(lpMsgBuf);
-}
-
 #else /* USE__LOCKING */
 
 /* Note: this alternative emulation of flock() for Win32 uses _locking().
@@ -266,12 +239,6 @@ int dcmtk_flock(int fd, int operation)
     return status;
 }
 
-void dcmtk_plockerr(const char *s)
-{
-  char buf[256];
-  DCMNET_ERROR(s << ": " << OFStandard::strerror(errno, buf, sizeof(buf)));
-}
-
 #endif /* USE__LOCKING */
 #else /* _WIN32 */
 
@@ -325,12 +292,6 @@ int dcmtk_flock(int fd, int operation)
     return result;
 }
 
-void dcmtk_plockerr(const char *s)
-{
-  char buf[256];
-  DCMNET_ERROR(s << ": " << OFStandard::strerror(errno, buf, sizeof(buf)));
-}
-
 #endif /* _WIN32 */
 #endif /* macintosh */
 #endif /* HAVE_FLOCK */
@@ -379,36 +340,13 @@ int access(const char* path, int /* amode */)
 }
 #endif
 
-#endif
-
-#if 0 // never called, replaced by OFStandard::strerror()
-#ifndef HAVE_STRERROR
+#endif /* HAVE_ACCESS */
 
-#warning Your system does not seem to have the strerror() function
-
-/*
- * strerror does not appear to be available on SunOs 4.1.3
- */
-char *strerror(int errornum)
+DCMTK_DCMNET_EXPORT void dcmtk_plockerr(const char *s)
 {
-    static char string[256];
-    char *s = NULL;
-    /*
-     * These are not in the system include files,
-     * declare them here.
-     */
-    extern int sys_nerr;
-    extern char *sys_errlist[];
-
-    string[0] = '\0';
-    if (errornum < 0 || errornum >= sys_nerr) {
-        sprintf(string, "Error number: %d", errornum);
-	s = string;
-    } else {
-        s = sys_errlist[errornum];
-    }
-    return s;
-}
-
-#endif /* ! HAVE_STRERROR */
+#if !defined(HAVE_FLOCK) && defined(macintosh)
+  DCMNET_ERROR(s << ": flock not implemented");
+#else
+  DCMNET_ERROR(s << ": " << OFStandard::getLastSystemErrorCode().message());
 #endif
+}
diff --git a/dcmnet/libsrc/dfindscu.cc b/dcmnet/libsrc/dfindscu.cc
index 6343b15..e6280ec 100644
--- a/dcmnet/libsrc/dfindscu.cc
+++ b/dcmnet/libsrc/dfindscu.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2015, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -20,6 +20,7 @@
  */
 
 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
+
 #include "dcmtk/dcmnet/dfindscu.h"
 
 #define INCLUDE_CSTDLIB
@@ -28,7 +29,6 @@
 #define INCLUDE_CSTDARG
 #define INCLUDE_CERRNO
 #include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmnet/diutil.h"
 #include "dcmtk/dcmdata/dcfilefo.h"
 #include "dcmtk/dcmdata/dcdicent.h"
@@ -181,7 +181,6 @@ OFCondition DcmFindSCU::performQuery(
 {
     T_ASC_Association *assoc = NULL;
     T_ASC_Parameters *params = NULL;
-    DIC_NODENAME localHost;
     DIC_NODENAME peerHost;
     OFString temp_str;
 
@@ -201,9 +200,8 @@ OFCondition DcmFindSCU::performQuery(
 
     /* Figure out the presentation addresses and copy the */
     /* corresponding values into the association parameters.*/
-    gethostname(localHost, sizeof(localHost) - 1);
     sprintf(peerHost, "%s:%d", peer, OFstatic_cast(int, port));
-    ASC_setPresentationAddresses(params, localHost, peerHost);
+    ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), peerHost);
 
     /* Set the presentation contexts which will be negotiated */
     /* when the network connection will be established */
diff --git a/dcmnet/libsrc/dimse.cc b/dcmnet/libsrc/dimse.cc
index 43bee36..22c38af 100644
--- a/dcmnet/libsrc/dimse.cc
+++ b/dcmnet/libsrc/dimse.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
@@ -84,7 +84,6 @@
 #define INCLUDE_CSTDIO
 #define INCLUDE_CSTRING
 #define INCLUDE_CSTDARG
-#define INCLUDE_CERRNO
 #define INCLUDE_UNISTD
 #include "dcmtk/ofstd/ofstdinc.h"
 
@@ -919,9 +918,8 @@ DIMSE_sendMessage(
       {
         if (! dcmff.loadFile(dataFileName, EXS_Unknown).good())
         {
-          char buf[256];
           DCMNET_WARN(DIMSE_warn_str(assoc) << "sendMessage: cannot open DICOM file ("
-            << dataFileName << "): " << OFStandard::strerror(errno, buf, sizeof(buf)));
+            << dataFileName << "): " << OFStandard::getLastSystemErrorCode().message());
           cond = DIMSE_SENDFAILED;
         } else {
           dataObject = dcmff.getDataset();
@@ -1397,6 +1395,11 @@ OFCondition DIMSE_createFilestream(
       metainfo->insert(elem, OFTrue);
       const char *version = OFFIS_DTK_IMPLEMENTATION_VERSION_NAME2;
       ((DcmShortString*)elem)->putString(version);
+
+      if (strlen(OFFIS_DTK_IMPLEMENTATION_VERSION_NAME2) > 16)
+      {
+        DCMNET_WARN("DICOM implementation version name too long: " << OFFIS_DTK_IMPLEMENTATION_VERSION_NAME2);
+      }
     } else cond = EC_MemoryExhausted;
     if (NULL != (elem = new DcmApplicationEntity(sourceApplicationEntityTitle)))
     {
diff --git a/dcmnet/libsrc/dimstore.cc b/dcmnet/libsrc/dimstore.cc
index 1689993..cd42043 100644
--- a/dcmnet/libsrc/dimstore.cc
+++ b/dcmnet/libsrc/dimstore.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2010, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
@@ -206,7 +206,7 @@ DIMSE_storeUser(
 	if (imageFileTotalBytes > 0) progress.totalBytes = imageFileTotalBytes;
 	else
 	{
-          if (imageFileName != NULL) progress.totalBytes = OFStandard::getFileSize(imageFileName);
+          if (imageFileName != NULL) progress.totalBytes = OFstatic_cast(long, OFStandard::getFileSize(imageFileName));
           else progress.totalBytes = dcmGuessModalityBytes(request->AffectedSOPClassUID);
         }
 	callbackCtx.progress = &progress;
@@ -471,7 +471,7 @@ DIMSE_storeProvider( T_ASC_Association *assoc,
           delete filestream;
           if (cond != EC_Normal)
           {
-            if (strcmp(imageFileName, NULL_DEVICE_NAME) != 0) unlink(imageFileName);
+            if (strcmp(imageFileName, NULL_DEVICE_NAME) != 0) OFStandard::deleteFile(imageFileName);
           }
         }
     }
diff --git a/dcmnet/libsrc/diutil.cc b/dcmnet/libsrc/diutil.cc
index 905bc8c..fbcb026 100644
--- a/dcmnet/libsrc/diutil.cc
+++ b/dcmnet/libsrc/diutil.cc
@@ -123,7 +123,7 @@ DU_stripTrailingSpaces(char *s)
 
     if (s)
     {
-        n = strlen(s);
+        n = OFstatic_cast(int, strlen(s));
         for (i = n - 1; i >= 0 && isspace(TO_UCHAR(s[i])); i--)
             s[i] = '\0';
     }
@@ -135,7 +135,7 @@ DU_stripLeadingSpaces(char *s)
     int i, j, n;
 
     if (s == NULL) return;
-    n = strlen(s);
+    n = OFstatic_cast(int, strlen(s));
     if (n == 0) return;
     if (!isspace(TO_UCHAR(s[0]))) return; /* no leading space */
 
@@ -249,9 +249,9 @@ DU_findSOPClassAndInstanceInDataSet(
         /* gracefully correct space-padded UID strings */
         int slength;
 
-        if ((0 < (slength=strlen(sopClass)))&&(sopClass[slength-1]==' '))
+        if ((0 < (slength=OFstatic_cast(int, strlen(sopClass))))&&(sopClass[slength-1]==' '))
             sopClass[slength-1]=0;
-        if ((0 < (slength=strlen(sopInstance)))&&(sopInstance[slength-1]==' '))
+        if ((0 < (slength=OFstatic_cast(int, strlen(sopInstance))))&&(sopInstance[slength-1]==' '))
             sopInstance[slength-1]=0;
     }
     return result;
diff --git a/dcmnet/libsrc/dstorscp.cc b/dcmnet/libsrc/dstorscp.cc
index dcf6504..26cf9a1 100644
--- a/dcmnet/libsrc/dstorscp.cc
+++ b/dcmnet/libsrc/dstorscp.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2013-2014, OFFIS e.V.
+ *  Copyright (C) 2013-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -285,6 +285,9 @@ Uint16 DcmStorageSCP::checkAndProcessSTORERequest(const T_DIMSE_C_StoreRQ &reqMe
                 } else {
                     DCMNET_ERROR("cannot store received object: " << filename << ": " << status.text());
                     statusCode = STATUS_STORE_Refused_OutOfResources;
+
+                    // delete incomplete file
+                    OFStandard::deleteFile(filename);
                 }
             } else {
                 DCMNET_ERROR("cannot create directory for received object: " << directoryName << ": " << status.text());
diff --git a/dcmnet/libsrc/dstorscu.cc b/dcmnet/libsrc/dstorscu.cc
index a8863fb..4cd7acf 100644
--- a/dcmnet/libsrc/dstorscu.cc
+++ b/dcmnet/libsrc/dstorscu.cc
@@ -929,8 +929,6 @@ OFCondition DcmStorageSCU::sendSOPInstances()
 
 void DcmStorageSCU::notifySOPInstanceToBeSent(const TransferEntry & /*transferEntry*/)
 {
-    // avoid compiler warning
-    (void)transferEntry;
     // do nothing in the default implementation
 }
 
diff --git a/dcmnet/libsrc/dul.cc b/dcmnet/libsrc/dul.cc
index 9a9aedf..757b995 100644
--- a/dcmnet/libsrc/dul.cc
+++ b/dcmnet/libsrc/dul.cc
@@ -71,6 +71,11 @@
 
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+#ifdef HAVE_WINDOWS_H
+#include <winsock2.h>  /* for SO_EXCLUSIVEADDRUSE */
+#endif
+
 #include "dcmtk/dcmnet/diutil.h"
 
 #define INCLUDE_CSTDLIB
@@ -126,10 +131,6 @@ typedef void (*mySIG_TYP)(int);
 #endif
 END_EXTERN_C
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>       /* Use the Grand Unified Sockets Interface (GUSI) on Macintosh */
-#endif
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmnet/dcompat.h"
 #include "dcmtk/dcmnet/dicom.h"
@@ -147,9 +148,8 @@ END_EXTERN_C
 #include "dcmtk/ofstd/ofnetdb.h"
 
 OFGlobal<OFBool> dcmDisableGethostbyaddr(OFFalse);
-OFGlobal<OFBool> dcmStrictRoleSelection(OFFalse);
 OFGlobal<Sint32> dcmConnectionTimeout(-1);
-OFGlobal<int>    dcmExternalSocketHandle(-1);
+OFGlobal<DcmNativeSocketType> dcmExternalSocketHandle(DCMNET_INVALID_SOCKET);
 OFGlobal<const char *> dcmTCPWrapperDaemonName((const char *)NULL);
 OFGlobal<unsigned long> dcmEnableBackwardCompatibility(0);
 
@@ -186,7 +186,13 @@ static OFCondition
 get_association_parameter(void *paramAddress,
   DUL_DATA_TYPE paramType, size_t paramLength,
   DUL_DATA_TYPE outputType, void *outputAddress, size_t outputLength);
+
+#ifdef _WIN32
+static void setTCPBufferLength(SOCKET sock);
+#else
 static void setTCPBufferLength(int sock);
+#endif
+
 static OFCondition checkNetwork(PRIVATE_NETWORKKEY ** networkKey);
 static OFCondition checkAssociation(PRIVATE_ASSOCIATIONKEY ** association);
 static OFString dump_presentation_ctx(LST_HEAD ** l);
@@ -215,6 +221,44 @@ void DUL_markProcessAsForkedChild()
   processIsForkedChild = OFTrue;
 }
 
+OFCondition DUL_readSocketHandleAsForkedChild()
+{
+  OFCondition result = EC_Normal;
+
+#ifdef _WIN32
+  // we are a child process
+  DUL_markProcessAsForkedChild();
+
+  char buf[256];
+  DWORD bytesRead = 0;
+  HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE);
+
+  // read socket handle number from stdin, i.e. the anonymous pipe
+  // to which our parent process has written the handle number.
+  if (ReadFile(hStdIn, buf, sizeof(buf) - 1, &bytesRead, NULL))
+  {
+    // make sure buffer is zero terminated
+    buf[bytesRead] = '\0';
+    unsigned __int64 socketHandle = 0;
+    sscanf(buf, "%llu", &socketHandle);
+    // socketHandle is always 64-bit because we always use this type to
+    // pass the handle between parent and chile. Type DcmNativeSocketType
+    // can be 32-bit on a 32-bit Windows, however. We, therefore, cast to the
+    // appropriate type. This is safe because the handle in the parent
+    // also had type DcmNativeSocketType.
+    dcmExternalSocketHandle.set(OFstatic_cast(DcmNativeSocketType, socketHandle));
+  }
+  else
+  {
+    DCMNET_ERROR("cannot read socket handle: " << GetLastError());
+    result = DUL_CANNOTREADSOCKETHANDLE;
+  }
+#endif
+
+  return result;
+}
+
+
 void DUL_requestForkOnTransportConnectionReceipt(int argc, char *argv[])
 {
   shouldFork = OFTrue;
@@ -1002,6 +1046,7 @@ DUL_AbortAssociation(DUL_ASSOCIATIONKEY ** callerAssociation)
     DUL_ABORTITEMS abortItems = { 0, DUL_SCU_INITIATED_ABORT, 0 };
     int event = 0;
     unsigned char pduType = 0;
+    OFCondition tcpError = makeDcmnetCondition(DULC_TCPIOERROR, OF_error, "");
 
     PRIVATE_ASSOCIATIONKEY ** association = (PRIVATE_ASSOCIATIONKEY **) callerAssociation;
     OFCondition cond = checkAssociation(association);
@@ -1056,7 +1101,9 @@ DUL_AbortAssociation(DUL_ASSOCIATIONKEY ** callerAssociation)
           else event = INVALID_PDU;
           cond = PRV_StateMachine(NULL, association, event, (*association)->protocolState, NULL);
         }
-        if (cond.good()) done = OFTrue;
+        // the comparison with tcpError prevents a potential infinite loop if
+        // we are receiving garbage over the network connection.
+        if (cond.good() || (cond == tcpError)) done = OFTrue;
     }
     return EC_Normal;
 }
@@ -1499,8 +1546,13 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
 
     int reuse = 1;
 
+#ifdef _WIN32
+    SOCKET sock = dcmExternalSocketHandle.get();
+    if (sock != INVALID_SOCKET)
+#else
     int sock = dcmExternalSocketHandle.get();
     if (sock > 0)
+#endif
     {
       // use the socket file descriptor provided to us externally
       // instead of calling accept().
@@ -1509,9 +1561,8 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
       len = sizeof(from);
       if (getpeername(sock, &from, &len))
       {
-          char buf[256];
           OFOStringStream stream;
-          stream << "TCP Initialization Error: " << OFStandard::strerror(errno, buf, sizeof(buf))
+          stream << "TCP Initialization Error: " << OFStandard::getLastNetworkErrorCode().message()
                  << ", getpeername failed on socket " << sock << OFStringStream_ends;
           OFSTRINGSTREAM_GETOFSTRING(stream, msg)
           return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
@@ -1533,11 +1584,15 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
             timeout_val.tv_sec = timeout;
             timeout_val.tv_usec = 0;
 #ifdef HAVE_INTP_SELECT
-            nfound = select((*network)->networkSpecific.TCP.listenSocket + 1,
-                            (int *)(&fdset), NULL, NULL, &timeout_val);
+            nfound = select(
+              OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1),
+                           (int *)(&fdset), NULL, NULL, &timeout_val);
 #else
-            nfound = select((*network)->networkSpecific.TCP.listenSocket + 1,
-                            &fdset, NULL, NULL, &timeout_val);
+            // On Win32, it is safe to cast the first parameter to int
+            // because Windows ignores this parameter anyway.
+            nfound = select(
+              OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1),
+                           &fdset, NULL, NULL, &timeout_val);
 #endif
             if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
             {
@@ -1564,10 +1619,14 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
                 timeout_val.tv_sec = 5;
                 timeout_val.tv_usec = 0;
 #ifdef HAVE_INTP_SELECT
-                nfound = select((*network)->networkSpecific.TCP.listenSocket + 1,
+                nfound = select(
+                  OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1),
                                 (int *)(&fdset), NULL, NULL, &timeout_val);
 #else
-                nfound = select((*network)->networkSpecific.TCP.listenSocket + 1,
+                // On Win32, it is safe to cast the first parameter to int
+                // because Windows ignores this parameter anyway.
+                nfound = select(
+                  OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1),
                                 &fdset, NULL, NULL, &timeout_val);
 #endif
                 if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
@@ -1586,13 +1645,16 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
         do
         {
             sock = accept((*network)->networkSpecific.TCP.listenSocket, &from, &len);
+#ifdef _WIN32
+        } while (sock == INVALID_SOCKET && WSAGetLastError() == WSAEINTR);
+        if (sock == INVALID_SOCKET)
+#else
         } while (sock == -1 && errno == EINTR);
-
         if (sock < 0)
+#endif
         {
-            char buf[256];
             OFOStringStream stream;
-            stream << "TCP Initialization Error: " << OFStandard::strerror(errno, buf, sizeof(buf))
+            stream << "TCP Initialization Error: " << OFStandard::getLastNetworkErrorCode().message()
                    << ", accept failed on socket " << sock << OFStringStream_ends;
             OFSTRINGSTREAM_GETOFSTRING(stream, msg)
             return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
@@ -1619,9 +1681,8 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
             // fork failed, return error code
             close(sock);
 
-            char buf[256];
             OFString msg = "Multi-Process Error: ";
-            msg += OFStandard::strerror(errno, buf, sizeof(buf));
+            msg += OFStandard::getLastSystemErrorCode().message();
             msg += ", fork failed";
             return makeDcmnetCondition(DULC_CANNOTFORK, OF_error, msg.c_str());
         }
@@ -1655,6 +1716,17 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
              */
             cmdLine += " \"";
             cmdLine += command_argv[i];
+            /* if last character in argument value is a backslash, escape it
+             * since otherwise it would escape the quote appended in the following
+             * step, i.e. make sure that something like '\my\dir\' does not become
+             * '"\my\dir\"' but instead ends up as '"\my\dir\\"' (single quotes for
+             *  demonstration purposes). Make sure nobody passes a zero length string.
+             */
+            size_t len = strlen(command_argv[i]);
+            if ((len > 0) && (command_argv[i][len - 1] == '\\'))
+            {
+	            cmdLine += "\\";
+            }
             cmdLine += "\"";
         }
 
@@ -1740,9 +1812,10 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
 
                 // send number of socket handle in child process over anonymous pipe
                 DWORD bytesWritten;
-                char buf[20];
-                sprintf(buf, "%i", OFstatic_cast(int, OFreinterpret_cast(size_t, childSocketHandle)));
-                if (!WriteFile(hChildStdInWriteDup, buf, strlen(buf) + 1, &bytesWritten, NULL))
+                char buf[30];
+                // we pass the socket handle as a 64-bit unsigned integer, which should work for 32 and 64 bit Windows
+                sprintf(buf, "%llu", OFreinterpret_cast(unsigned __int64, childSocketHandle));
+                if (!WriteFile(hChildStdInWriteDup, buf, OFstatic_cast(DWORD, strlen(buf) + 1), &bytesWritten, NULL))
                 {
                     CloseHandle(hChildStdInWriteDup);
                     return makeDcmnetCondition(DULC_CANNOTFORK, OF_error, "Multi-Process Error: Writing to anonymous pipe failed");
@@ -1768,27 +1841,27 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
     }
 #endif
 
-#ifndef HAVE_GUSI_H
-    /* GUSI always returns an error for setsockopt() */
     sockarg.l_onoff = 0;
     if (setsockopt(sock, SOL_SOCKET, SO_LINGER, (char *) &sockarg, sizeof(sockarg)) < 0)
     {
-        char buf[256];
         OFOStringStream stream;
-        stream << "TCP Initialization Error: " << OFStandard::strerror(errno, buf, sizeof(buf))
+        stream << "TCP Initialization Error: " << OFStandard::getLastNetworkErrorCode().message()
                << ", setsockopt failed on socket " << sock << OFStringStream_ends;
         OFSTRINGSTREAM_GETOFSTRING(stream, msg)
         return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
     }
     reuse = 1;
+
+#ifdef _WIN32
+    if (setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *) &reuse, sizeof(reuse)) < 0)
+#else
     if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &reuse, sizeof(reuse)) < 0)
+#endif
     {
-        char buf[256];
         OFString msg = "TCP Initialization Error: ";
-        msg += OFStandard::strerror(errno, buf, sizeof(buf));
+        msg += OFStandard::getLastNetworkErrorCode().message();
         return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
     }
-#endif
     setTCPBufferLength(sock);
 
     /*
@@ -1825,9 +1898,8 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
 #endif
       if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char*)&tcpNoDelay, sizeof(tcpNoDelay)) < 0)
       {
-        char buf[256];
         OFString msg = "TCP Initialization Error: ";
-        msg += OFStandard::strerror(errno, buf, sizeof(buf));
+        msg += OFStandard::getLastNetworkErrorCode().message();
         return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
       }
 #ifdef DISABLE_NAGLE_ALGORITHM
@@ -1918,9 +1990,8 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
 #else
       (void) close(sock);
 #endif
-      char buf[256];
       OFString msg = "TCP Initialization Error: ";
-      msg += OFStandard::strerror(errno, buf, sizeof(buf));
+      msg += OFStandard::getLastNetworkErrorCode().message();
       return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
     }
 
@@ -2026,13 +2097,21 @@ initializeNetworkTCP(PRIVATE_NETWORKKEY ** key, void *parameter)
     (*key)->networkSpecific.TCP.tLayer = NULL;
     (*key)->networkSpecific.TCP.tLayerOwned = 0;
     (*key)->networkSpecific.TCP.port = -1;
+#ifdef _WIN32
+    (*key)->networkSpecific.TCP.listenSocket = INVALID_SOCKET;
+#else
     (*key)->networkSpecific.TCP.listenSocket = -1;
+#endif
 
     // Create listen socket if we're an application acceptor,
     // unless the socket handle has already been passed to us or
     // we are a forked child of an application acceptor, in which
     // case the socket also already exists.
+#ifdef _WIN32
+    if ((dcmExternalSocketHandle.get() == INVALID_SOCKET) &&
+#else
     if ((dcmExternalSocketHandle.get() < 0) &&
+#endif
         ((*key)->applicationFunction & DICOM_APPLICATION_ACCEPTOR) &&
         (! processIsForkedChild))
     {
@@ -2044,70 +2123,72 @@ initializeNetworkTCP(PRIVATE_NETWORKKEY ** key, void *parameter)
 #else
       size_t length;
 #endif
+
+#ifdef _WIN32
+      SOCKET sock;
+#else
       int sock;
+#endif
       struct sockaddr_in server;
 
       /* Create socket for Internet type communication */
       (*key)->networkSpecific.TCP.port = *(int *) parameter;
       (*key)->networkSpecific.TCP.listenSocket = socket(AF_INET, SOCK_STREAM, 0);
       sock = (*key)->networkSpecific.TCP.listenSocket;
+
+#ifdef _WIN32
+      if (sock == INVALID_SOCKET)
+#else
       if (sock < 0)
+#endif
       {
-        char buf[256];
         OFString msg = "TCP Initialization Error: ";
-        msg += OFStandard::strerror(errno, buf, sizeof(buf));
+        msg += OFStandard::getLastNetworkErrorCode().message();
         return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
       }
       reuse = 1;
-#ifdef HAVE_GUSI_H
-      /* GUSI always returns an error for setsockopt(...) */
+#ifdef _WIN32
+      if (setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *) &reuse, sizeof(reuse)) < 0)
 #else
       if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &reuse, sizeof(reuse)) < 0)
+#endif
       {
-        char buf[256];
         OFString msg = "TCP Initialization Error: ";
-        msg += OFStandard::strerror(errno, buf, sizeof(buf));
+        msg += OFStandard::getLastNetworkErrorCode().message();
           return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
       }
-#endif
+
       /* Name socket using wildcards */
       server.sin_family = AF_INET;
       server.sin_addr.s_addr = INADDR_ANY;
       server.sin_port = (unsigned short) htons((*key)->networkSpecific.TCP.port);
       if (bind(sock, (struct sockaddr *) & server, sizeof(server)))
       {
-        char buf[256];
         OFString msg = "TCP Initialization Error: ";
-        msg += OFStandard::strerror(errno, buf, sizeof(buf));
+        msg += OFStandard::getLastNetworkErrorCode().message();
         return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
       }
       /* Find out assigned port number and print it out */
       length = sizeof(server);
       if (getsockname(sock, (struct sockaddr *) &server, &length))
       {
-        char buf[256];
         OFString msg = "TCP Initialization Error: ";
-        msg += OFStandard::strerror(errno, buf, sizeof(buf));
+        msg += OFStandard::getLastNetworkErrorCode().message();
         return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
       }
-#ifdef HAVE_GUSI_H
-      /* GUSI always returns an error for setsockopt(...) */
-#else
       sockarg.l_onoff = 0;
       if (setsockopt(sock, SOL_SOCKET, SO_LINGER, (char *) &sockarg, sizeof(sockarg)) < 0)
       {
-        char buf[256];
         OFString msg = "TCP Initialization Error: ";
-        msg += OFStandard::strerror(errno, buf, sizeof(buf));
+        msg += OFStandard::getLastNetworkErrorCode().message();
         return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
       }
-#endif
+
       /* Listen on the socket */
       if (listen(sock, PRV_LISTENBACKLOG) < 0)
       {
-        char buf[256];
         OFString msg = "TCP Initialization Error: ";
-        msg += OFStandard::strerror(errno, buf, sizeof(buf));
+        msg += OFStandard::getLastNetworkErrorCode().message();
         return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
       }
     }
@@ -2281,15 +2362,15 @@ get_association_parameter(void *paramAddress,
 ** Algorithm:
 **      Description of the algorithm (optional) and any other notes.
 */
-static void
-setTCPBufferLength(int sock)
+#ifdef _WIN32
+static void setTCPBufferLength(SOCKET sock)
+#else
+static void setTCPBufferLength(int sock)
+#endif
 {
     char *TCPBufferLength;
     int bufLen;
 
-#ifdef HAVE_GUSI_H
-    /* GUSI always returns an error for setsockopt(...) */
-#else
     /*
      * check whether environment variable TCP_BUFFER_LENGTH is set.
      * If not, the the operating system is responsible for selecting
@@ -2312,7 +2393,6 @@ setTCPBufferLength(int sock)
             DCMNET_WARN("DUL: cannot parse environment variable TCP_BUFFER_LENGTH=" << TCPBufferLength);
     } else
         DCMNET_TRACE("  environment variable TCP_BUFFER_LENGTH not set, using the system defaults");
-#endif // HAVE_GUSI_H
 }
 
 
@@ -2339,8 +2419,8 @@ DUL_DumpParams(OFString& ret_str, DUL_ASSOCIATESERVICEPARAMETERS * params)
     OFOStringStream str;
     OFString temp_str;
 
-    str << "APP CTX NAME:" << params->applicationContextName << OFendl;
-    str << dump_uid(params->applicationContextName, "%13s");
+    str << "APP CTX NAME: " << params->applicationContextName << OFendl;
+    str << dump_uid(params->applicationContextName, "%14s") << OFendl;
     str << "AP TITLE:     " << params->callingAPTitle << OFendl
         << "AP TITLE:     " << params->calledAPTitle << OFendl
         << "AP TITLE:     " << params->respondingAPTitle << OFendl
@@ -2349,10 +2429,10 @@ DUL_DumpParams(OFString& ret_str, DUL_ASSOCIATESERVICEPARAMETERS * params)
         << "PRES ADDR:    " << params->callingPresentationAddress << OFendl
         << "PRES ADDR:    " << params->calledPresentationAddress << OFendl
         << "REQ IMP UID:  " << params->callingImplementationClassUID << OFendl;
-    str << dump_uid(params->callingImplementationClassUID, "%13s");
+    str << dump_uid(params->callingImplementationClassUID, "%14s") << OFendl;
     str << "REQ VERSION:  " << params->callingImplementationVersionName << OFendl
         << "ACC IMP UID:  " << params->calledImplementationClassUID << OFendl;
-    str << dump_uid(params->calledImplementationClassUID, "%13s");
+    str << dump_uid(params->calledImplementationClassUID, "%14s") << OFendl;
     str << "ACC VERSION:  " << params->calledImplementationVersionName << OFendl
         << "Requested Presentation Ctx" << OFendl;
     str << dump_presentation_ctx(&params->requestedPresentationContext);
@@ -2427,17 +2507,17 @@ dump_presentation_ctx(LST_HEAD ** l)
     (void) LST_Position(l, (LST_NODE*)ctx);
 
     while (ctx != NULL) {
-        str << "  Context ID:           " << ctx->presentationContextID << OFendl
-            << "  Abstract Syntax:      " << ctx->abstractSyntax << OFendl;
-        str << dump_uid(ctx->abstractSyntax, "%24s");
-        str << "  Result field:         " << (int) ctx->result << OFendl;
+        str << "  Context ID:            " << (int)ctx->presentationContextID << OFendl
+            << "  Abstract Syntax:       " << ctx->abstractSyntax << OFendl;
+        str << dump_uid(ctx->abstractSyntax, "%25s") << OFendl;
+        str << "  Result field:          " << (int) ctx->result << OFendl;
         for (l_index = 0; l_index < (int) DIM_OF(scMap); l_index++) {
             if (ctx->proposedSCRole == scMap[l_index].role)
-                str << "  Proposed SCU/SCP Role:  " << scMap[l_index].text << OFendl;
+                str << "  Proposed SCU/SCP Role: " << scMap[l_index].text << OFendl;
         }
         for (l_index = 0; l_index < (int) DIM_OF(scMap); l_index++) {
             if (ctx->acceptedSCRole == scMap[l_index].role)
-                str << "  Accepted SCU/SCP Role:  " << scMap[l_index].text << OFendl;
+                str << "  Accepted SCU/SCP Role: " << scMap[l_index].text << OFendl;
         }
         str << "  Proposed Xfer Syntax(es)" << OFendl;
         if (ctx->proposedTransferSyntax != NULL) {
@@ -2446,13 +2526,13 @@ dump_presentation_ctx(LST_HEAD ** l)
                 (void) LST_Position(&ctx->proposedTransferSyntax, (LST_NODE*)transfer);
 
             while (transfer != NULL) {
-                str << "                  " << transfer->transferSyntax << OFendl;
-                str << dump_uid(transfer->transferSyntax, "%18s");
+                str << "                         " << transfer->transferSyntax << OFendl;
+                str << dump_uid(transfer->transferSyntax, "%25s") << OFendl;
                 transfer = (DUL_TRANSFERSYNTAX*)LST_Next(&ctx->proposedTransferSyntax);
             }
         }
-        str << "  Accepted Xfer Syntax: " << ctx->acceptedTransferSyntax << OFendl;
-        str << dump_uid(ctx->acceptedTransferSyntax, "%24s");
+        str << "  Accepted Xfer Syntax:  " << ctx->acceptedTransferSyntax << OFendl;
+        str << dump_uid(ctx->acceptedTransferSyntax, "%25s") << OFendl;
         ctx = (DUL_PRESENTATIONCONTEXT*)LST_Next(l);
     }
 
diff --git a/dcmnet/libsrc/dulconst.cc b/dcmnet/libsrc/dulconst.cc
index 810634a..da7757d 100644
--- a/dcmnet/libsrc/dulconst.cc
+++ b/dcmnet/libsrc/dulconst.cc
@@ -1012,6 +1012,9 @@ constructSCUSCPRoles(unsigned char type,
           presentationCtx = (DUL_PRESENTATIONCONTEXT*)LST_Next(&params->requestedPresentationContext);
       }
   } else {  // type != DUL_TYPEASSOCIATERQ
+     /* The implemented behaviour is documented in dul.h (see DUL_SC_ROLE enum definition).
+      * The error case is already handled in ASC_acceptPresentationContext() in assoc.cc.
+      */
       presentationCtx = params->acceptedPresentationContext != NULL ?
           (DUL_PRESENTATIONCONTEXT*)LST_Head(&params->acceptedPresentationContext) :
           (DUL_PRESENTATIONCONTEXT*)NULL;
diff --git a/dcmnet/libsrc/dulextra.cc b/dcmnet/libsrc/dulextra.cc
index f7d143f..4976308 100644
--- a/dcmnet/libsrc/dulextra.cc
+++ b/dcmnet/libsrc/dulextra.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2010, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
@@ -74,6 +74,11 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
+#ifdef HAVE_WINDOWS_H
+// on Windows, we need Winsock2 for network functions
+#include <winsock2.h>
+#endif
+
 #define INCLUDE_CSTDLIB
 #define INCLUDE_CSTDIO
 #define INCLUDE_CSTRING
@@ -113,10 +118,9 @@ DcmTransportConnection *DUL_getTransportConnection(DUL_ASSOCIATIONKEY * callerAs
   else return ((PRIVATE_ASSOCIATIONKEY *)callerAssociation)->connection;
 }
 
-int
-DUL_networkSocket(DUL_NETWORKKEY * callerNet)
+DcmNativeSocketType DUL_networkSocket(DUL_NETWORKKEY * callerNet)
 {
-    if (callerNet == NULL) return -1;
+    if (callerNet == NULL) return DCMNET_INVALID_SOCKET;
     PRIVATE_NETWORKKEY *net = (PRIVATE_NETWORKKEY*)callerNet;
     return net->networkSpecific.TCP.listenSocket;
 }
@@ -125,8 +129,8 @@ OFBool
 DUL_associationWaiting(DUL_NETWORKKEY * callerNet, int timeout)
 {
     PRIVATE_NETWORKKEY *net;
-    int                 s;
-    OFBool             assocWaiting = OFFalse;
+    DcmNativeSocketType s;
+    OFBool              assocWaiting = OFFalse;
     struct timeval      t;
     fd_set              fdset;
     int                 nfound;
@@ -139,19 +143,15 @@ DUL_associationWaiting(DUL_NETWORKKEY * callerNet, int timeout)
     s = net->networkSpecific.TCP.listenSocket;
 
     FD_ZERO(&fdset);
-#ifdef __MINGW32__
-    // on MinGW, FD_SET expects an unsigned first argument
-    FD_SET((unsigned int) s, &fdset);
-#else
     FD_SET(s, &fdset);
-#endif
 
     t.tv_sec = timeout;
     t.tv_usec = 0;
 #ifdef HAVE_INTP_SELECT
-    nfound = select(s + 1, (int *)(&fdset), NULL, NULL, &t);
+    nfound = select(OFstatic_cast(int, s + 1), (int *)(&fdset), NULL, NULL, &t);
 #else
-    nfound = select(s + 1, &fdset, NULL, NULL, &t);
+    // This is safe because on Windows the first select() parameter is ignored anyway
+    nfound = select(OFstatic_cast(int, s + 1), &fdset, NULL, NULL, &t);
 #endif
     if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
     {
diff --git a/dcmnet/libsrc/dulfsm.cc b/dcmnet/libsrc/dulfsm.cc
index 1b6cf78..3cb5cf1 100644
--- a/dcmnet/libsrc/dulfsm.cc
+++ b/dcmnet/libsrc/dulfsm.cc
@@ -64,6 +64,11 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
+#ifdef HAVE_WINDOWS_H
+// on Windows, we need Winsock2 for network functions
+#include <winsock2.h>
+#endif
+
 #define INCLUDE_CSTDLIB
 #define INCLUDE_CSTDIO
 #define INCLUDE_CSTRING
@@ -98,10 +103,6 @@ BEGIN_EXTERN_C
 #endif
 END_EXTERN_C
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>       /* Use the Grand Unified Sockets Interface (GUSI) on Macintosh */
-#endif
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmnet/dicom.h"
 #include "dcmtk/dcmnet/lst.h"
@@ -123,6 +124,16 @@ END_EXTERN_C
 #define INADDR_NONE 0xffffffff
 #endif
 
+/* platform independent definition of EINTR */
+enum
+{
+#ifdef HAVE_WINSOCK_H
+    DCMNET_EINTR = WSAEINTR
+#else
+    DCMNET_EINTR = EINTR
+#endif
+};
+
 static OFCondition
 AE_1_TransportConnect(PRIVATE_NETWORKKEY ** network,
         PRIVATE_ASSOCIATIONKEY ** association, int nextState, void *params);
@@ -278,7 +289,12 @@ defragmentTCP(DcmTransportConnection *connection, DUL_BLOCKOPTIONS block, time_t
 
 static OFString dump_pdu(const char *type, void *buffer, unsigned long length);
 
+#ifdef _WIN32
+static void setTCPBufferLength(SOCKET sock);
+#else
 static void setTCPBufferLength(int sock);
+#endif
+
 OFCondition
 translatePresentationContextList(LST_HEAD ** internalList,
                                  LST_HEAD ** SCUSCPRoleList,
@@ -351,6 +367,7 @@ static FSM_FUNCTION FSM_FunctionTable[] = {
 
 static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
     {
+        // EVENT,                    STATE,  ACTION,   NEXT_STATE
         {A_ASSOCIATE_REQ_LOCAL_USER, STATE1, AE_1, STATE4, "", "", NULL},
         {A_ASSOCIATE_REQ_LOCAL_USER, STATE2, NOACTION, NOSTATE, "", "", NULL},
         {A_ASSOCIATE_REQ_LOCAL_USER, STATE3, NOACTION, NOSTATE, "", "", NULL},
@@ -363,7 +380,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {A_ASSOCIATE_REQ_LOCAL_USER, STATE10, NOACTION, NOSTATE, "", "", NULL},
         {A_ASSOCIATE_REQ_LOCAL_USER, STATE11, NOACTION, NOSTATE, "", "", NULL},
         {A_ASSOCIATE_REQ_LOCAL_USER, STATE12, NOACTION, NOSTATE, "", "", NULL},
-    {A_ASSOCIATE_REQ_LOCAL_USER, STATE13, NOACTION, NOSTATE, "", "", NULL}},
+        {A_ASSOCIATE_REQ_LOCAL_USER, STATE13, NOACTION, NOSTATE, "", "", NULL}},
 
     {
         {TRANS_CONN_CONFIRM_LOCAL_USER, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -378,7 +395,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {TRANS_CONN_CONFIRM_LOCAL_USER, STATE10, NOACTION, NOSTATE, "", "", NULL},
         {TRANS_CONN_CONFIRM_LOCAL_USER, STATE11, NOACTION, NOSTATE, "", "", NULL},
         {TRANS_CONN_CONFIRM_LOCAL_USER, STATE12, NOACTION, NOSTATE, "", "", NULL},
-    {TRANS_CONN_CONFIRM_LOCAL_USER, STATE13, NOACTION, NOSTATE, "", "", NULL}},
+        {TRANS_CONN_CONFIRM_LOCAL_USER, STATE13, NOACTION, NOSTATE, "", "", NULL}},
 
     {
         {A_ASSOCIATE_AC_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -393,7 +410,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {A_ASSOCIATE_AC_PDU_RCV, STATE10, AA_8, STATE13, "", "", NULL},
         {A_ASSOCIATE_AC_PDU_RCV, STATE11, AA_8, STATE13, "", "", NULL},
         {A_ASSOCIATE_AC_PDU_RCV, STATE12, AA_8, STATE13, "", "", NULL},
-    {A_ASSOCIATE_AC_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}},
+        {A_ASSOCIATE_AC_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}},
 
     {
         {A_ASSOCIATE_RJ_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -408,7 +425,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {A_ASSOCIATE_RJ_PDU_RCV, STATE10, AA_8, STATE13, "", "", NULL},
         {A_ASSOCIATE_RJ_PDU_RCV, STATE11, AA_8, STATE13, "", "", NULL},
         {A_ASSOCIATE_RJ_PDU_RCV, STATE12, AA_8, STATE13, "", "", NULL},
-    {A_ASSOCIATE_RJ_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}},
+        {A_ASSOCIATE_RJ_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}},
 
     {
         {TRANS_CONN_INDICATION, STATE1, AE_5, STATE2, "", "", NULL},
@@ -423,7 +440,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {TRANS_CONN_INDICATION, STATE10, NOACTION, NOSTATE, "", "", NULL},
         {TRANS_CONN_INDICATION, STATE11, NOACTION, NOSTATE, "", "", NULL},
         {TRANS_CONN_INDICATION, STATE12, NOACTION, NOSTATE, "", "", NULL},
-    {TRANS_CONN_INDICATION, STATE13, NOACTION, NOSTATE, "", "", NULL}},
+        {TRANS_CONN_INDICATION, STATE13, NOACTION, NOSTATE, "", "", NULL}},
 
     {
         {A_ASSOCIATE_RQ_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -438,7 +455,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {A_ASSOCIATE_RQ_PDU_RCV, STATE10, AA_8, STATE13, "", "", NULL},
         {A_ASSOCIATE_RQ_PDU_RCV, STATE11, AA_8, STATE13, "", "", NULL},
         {A_ASSOCIATE_RQ_PDU_RCV, STATE12, AA_8, STATE13, "", "", NULL},
-    {A_ASSOCIATE_RQ_PDU_RCV, STATE13, AA_7, STATE13, "", "", NULL}},
+        {A_ASSOCIATE_RQ_PDU_RCV, STATE13, AA_7, STATE13, "", "", NULL}},
 
     {
         {A_ASSOCIATE_RESPONSE_ACCEPT, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -453,7 +470,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {A_ASSOCIATE_RESPONSE_ACCEPT, STATE10, NOACTION, NOSTATE, "", "", NULL},
         {A_ASSOCIATE_RESPONSE_ACCEPT, STATE11, NOACTION, NOSTATE, "", "", NULL},
         {A_ASSOCIATE_RESPONSE_ACCEPT, STATE12, NOACTION, NOSTATE, "", "", NULL},
-    {A_ASSOCIATE_RESPONSE_ACCEPT, STATE13, NOACTION, NOSTATE, "", "", NULL}},
+        {A_ASSOCIATE_RESPONSE_ACCEPT, STATE13, NOACTION, NOSTATE, "", "", NULL}},
 
     {
         {A_ASSOCIATE_RESPONSE_REJECT, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -468,7 +485,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {A_ASSOCIATE_RESPONSE_REJECT, STATE10, NOACTION, NOSTATE, "", "", NULL},
         {A_ASSOCIATE_RESPONSE_REJECT, STATE11, NOACTION, NOSTATE, "", "", NULL},
         {A_ASSOCIATE_RESPONSE_REJECT, STATE12, NOACTION, NOSTATE, "", "", NULL},
-    {A_ASSOCIATE_RESPONSE_REJECT, STATE13, NOACTION, NOSTATE, "", "", NULL}},
+        {A_ASSOCIATE_RESPONSE_REJECT, STATE13, NOACTION, NOSTATE, "", "", NULL}},
 
     {
         {P_DATA_REQ, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -483,7 +500,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {P_DATA_REQ, STATE10, NOACTION, NOSTATE, "", "", NULL},
         {P_DATA_REQ, STATE11, NOACTION, NOSTATE, "", "", NULL},
         {P_DATA_REQ, STATE12, NOACTION, NOSTATE, "", "", NULL},
-    {P_DATA_REQ, STATE13, NOACTION, NOSTATE, "", "", NULL}},
+        {P_DATA_REQ, STATE13, NOACTION, NOSTATE, "", "", NULL}},
 
     {
         {P_DATA_TF_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -498,7 +515,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {P_DATA_TF_PDU_RCV, STATE10, AA_8, STATE13, "", "", NULL},
         {P_DATA_TF_PDU_RCV, STATE11, AA_8, STATE13, "", "", NULL},
         {P_DATA_TF_PDU_RCV, STATE12, AA_8, STATE13, "", "", NULL},
-    {P_DATA_TF_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}},
+        {P_DATA_TF_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}},
 
     {
         {A_RELEASE_REQ, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -513,7 +530,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {A_RELEASE_REQ, STATE10, NOACTION, NOSTATE, "", "", NULL},
         {A_RELEASE_REQ, STATE11, NOACTION, NOSTATE, "", "", NULL},
         {A_RELEASE_REQ, STATE12, NOACTION, NOSTATE, "", "", NULL},
-    {A_RELEASE_REQ, STATE13, NOACTION, NOSTATE, "", "", NULL}},
+        {A_RELEASE_REQ, STATE13, NOACTION, NOSTATE, "", "", NULL}},
 
     {
         {A_RELEASE_RQ_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -528,7 +545,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {A_RELEASE_RQ_PDU_RCV, STATE10, AA_8, STATE13, "", "", NULL},
         {A_RELEASE_RQ_PDU_RCV, STATE11, AA_8, STATE13, "", "", NULL},
         {A_RELEASE_RQ_PDU_RCV, STATE12, AA_8, STATE13, "", "", NULL},
-    {A_RELEASE_RQ_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}},
+        {A_RELEASE_RQ_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}},
 
     {
         {A_RELEASE_RP_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -543,7 +560,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {A_RELEASE_RP_PDU_RCV, STATE10, AR_10, STATE12, "", "", NULL},
         {A_RELEASE_RP_PDU_RCV, STATE11, AR_3, STATE1, "", "", NULL},
         {A_RELEASE_RP_PDU_RCV, STATE12, AA_8, STATE13, "", "", NULL},
-    {A_RELEASE_RP_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}},
+        {A_RELEASE_RP_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}},
 
     {
         {A_RELEASE_RESP, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -558,7 +575,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {A_RELEASE_RESP, STATE10, NOACTION, NOSTATE, "", "", NULL},
         {A_RELEASE_RESP, STATE11, NOACTION, NOSTATE, "", "", NULL},
         {A_RELEASE_RESP, STATE12, AR_4, STATE13, "", "", NULL},
-    {A_RELEASE_RESP, STATE13, NOACTION, NOSTATE, "", "", NULL}},
+        {A_RELEASE_RESP, STATE13, NOACTION, NOSTATE, "", "", NULL}},
 
     {
         {A_ABORT_REQ, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -573,7 +590,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {A_ABORT_REQ, STATE10, AA_1, STATE13, "", "", NULL},
         {A_ABORT_REQ, STATE11, AA_1, STATE13, "", "", NULL},
         {A_ABORT_REQ, STATE12, AA_1, STATE13, "", "", NULL},
-    {A_ABORT_REQ, STATE13, NOACTION, NOSTATE, "", "", NULL}},
+        {A_ABORT_REQ, STATE13, NOACTION, NOSTATE, "", "", NULL}},
 
     {
         {A_ABORT_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -588,7 +605,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {A_ABORT_PDU_RCV, STATE10, AA_3, STATE1, "", "", NULL},
         {A_ABORT_PDU_RCV, STATE11, AA_3, STATE1, "", "", NULL},
         {A_ABORT_PDU_RCV, STATE12, AA_3, STATE1, "", "", NULL},
-    {A_ABORT_PDU_RCV, STATE13, AA_2, STATE1, "", "", NULL}},
+        {A_ABORT_PDU_RCV, STATE13, AA_2, STATE1, "", "", NULL}},
 
     {
         {TRANS_CONN_CLOSED, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -603,25 +620,36 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {TRANS_CONN_CLOSED, STATE10, AA_4, STATE1, "", "", NULL},
         {TRANS_CONN_CLOSED, STATE11, AA_4, STATE1, "", "", NULL},
         {TRANS_CONN_CLOSED, STATE12, AA_4, STATE1, "", "", NULL},
-    {TRANS_CONN_CLOSED, STATE13, AR_5, STATE1, "", "", NULL}},
+        {TRANS_CONN_CLOSED, STATE13, AR_5, STATE1, "", "", NULL}},
 
     {
         {ARTIM_TIMER_EXPIRED, STATE1, NOACTION, NOSTATE, "", "", NULL},
         {ARTIM_TIMER_EXPIRED, STATE2, AA_2T, STATE1, "", "", NULL},
         {ARTIM_TIMER_EXPIRED, STATE3, NOACTION, NOSTATE, "", "", NULL},
         {ARTIM_TIMER_EXPIRED, STATE4, NOACTION, NOSTATE, "", "", NULL},
-        {ARTIM_TIMER_EXPIRED, STATE5, NOACTION, NOSTATE, "", "", NULL},
+
+        // DICOM part 8 does not define an action and state for the
+        // situation where a timeout occurs while we are waiting for an
+        // incoming A-ASSOCIATE-AC or A-ASSOCIATE-RJ. We close the transport
+        // connection, return an error code indicating a timout,
+        // and reset the FSM to idle state (STATE1).
+        {ARTIM_TIMER_EXPIRED, STATE5, AA_2T, STATE1, "", "", NULL},
+
         {ARTIM_TIMER_EXPIRED, STATE6, NOACTION, NOSTATE, "", "", NULL},
-/* This next line is not per the standard.  We added a timeout action
-** in this state.
-*/
+
+        // DICOM part 8 does not define an action and state for the
+        // situation where a timeout occurs while we are waiting for an
+        // incoming A-RELEASE-RSP. We close the transport
+        // connection, return an error code indicating a timout,
+        // and reset the FSM to idle state (STATE1).
         {ARTIM_TIMER_EXPIRED, STATE7, AA_2T, STATE1, "", "", NULL},
+
         {ARTIM_TIMER_EXPIRED, STATE8, NOACTION, NOSTATE, "", "", NULL},
         {ARTIM_TIMER_EXPIRED, STATE9, NOACTION, NOSTATE, "", "", NULL},
         {ARTIM_TIMER_EXPIRED, STATE10, NOACTION, NOSTATE, "", "", NULL},
         {ARTIM_TIMER_EXPIRED, STATE11, NOACTION, NOSTATE, "", "", NULL},
         {ARTIM_TIMER_EXPIRED, STATE12, NOACTION, NOSTATE, "", "", NULL},
-    {ARTIM_TIMER_EXPIRED, STATE13, AA_2, STATE1, "", "", NULL}},
+        {ARTIM_TIMER_EXPIRED, STATE13, AA_2, STATE1, "", "", NULL}},
 
     {
         {INVALID_PDU, STATE1, NOACTION, NOSTATE, "", "", NULL},
@@ -636,7 +664,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = {
         {INVALID_PDU, STATE10, AA_8, STATE13, "", "", NULL},
         {INVALID_PDU, STATE11, AA_8, STATE13, "", "", NULL},
         {INVALID_PDU, STATE12, AA_8, STATE13, "", "", NULL},
-    {INVALID_PDU, STATE13, AA_7, STATE13, "", "", NULL}}
+        {INVALID_PDU, STATE13, AA_7, STATE13, "", "", NULL}}
 };
 
 
@@ -994,10 +1022,10 @@ AE_3_AssociateConfirmationAccept(PRIVATE_NETWORKKEY ** /*network*/,
         (*association)->maxPDV = assoc.userInfo.maxLength.maxLength;
         (*association)->maxPDVAcceptor =
             assoc.userInfo.maxLength.maxLength;
-        strcpy(service->calledImplementationClassUID,
-               assoc.userInfo.implementationClassUID.data);
-        strcpy(service->calledImplementationVersionName,
-               assoc.userInfo.implementationVersionName.data);
+        OFStandard::strlcpy(service->calledImplementationClassUID,
+               assoc.userInfo.implementationClassUID.data, DICOM_UI_LENGTH + 1);
+        OFStandard::strlcpy(service->calledImplementationVersionName,
+               assoc.userInfo.implementationVersionName.data, 16 + 1);
 
         (*association)->associationState = DUL_ASSOC_ESTABLISHED;
         (*association)->protocolState = nextState;
@@ -1199,10 +1227,10 @@ AE_6_ExamineAssociateRequest(PRIVATE_NETWORKKEY ** /*network*/,
         (*association)->maxPDV = assoc.userInfo.maxLength.maxLength;
         (*association)->maxPDVRequestor =
             assoc.userInfo.maxLength.maxLength;
-        strcpy(service->callingImplementationClassUID,
-               assoc.userInfo.implementationClassUID.data);
-        strcpy(service->callingImplementationVersionName,
-               assoc.userInfo.implementationVersionName.data);
+        OFStandard::strlcpy(service->callingImplementationClassUID,
+               assoc.userInfo.implementationClassUID.data, DICOM_UI_LENGTH + 1);
+        OFStandard::strlcpy(service->callingImplementationVersionName,
+               assoc.userInfo.implementationVersionName.data, 16 + 1);
         (*association)->associationState = DUL_ASSOC_ESTABLISHED;
 
         destroyPresentationContextList(&assoc.presentationContextList);
@@ -2183,7 +2211,11 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network,
     int  port;
     struct sockaddr_in server;
     OFStandard::OFHostent hp;
+#ifdef _WIN32
+    SOCKET s;
+#else
     int s;
+#endif
     struct linger sockarg;
 
     if (sscanf(params->calledPresentationAddress, "%[^:]:%d", node, &port) != 2)
@@ -2194,11 +2226,14 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network,
     }
 
     s = socket(AF_INET, SOCK_STREAM, 0);
+#ifdef _WIN32
+    if (s == INVALID_SOCKET)
+#else
     if (s < 0)
+#endif
     {
-      char buf[256];
       OFString msg = "TCP Initialization Error: ";
-      msg += OFStandard::strerror(errno, buf, sizeof(buf));
+      msg += OFStandard::getLastNetworkErrorCode().message();
       return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
     }
     server.sin_family = AF_INET;
@@ -2250,7 +2285,7 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network,
     int rc;
     do {
         rc = connect(s, (struct sockaddr *) & server, sizeof(server));
-    } while (rc == -1 && errno == EINTR);
+    } while (rc == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
 
 #ifdef HAVE_WINSOCK_H
     if (rc == SOCKET_ERROR && WSAGetLastError() == WSAEWOULDBLOCK)
@@ -2273,8 +2308,9 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network,
         timeout.tv_usec = 0;
 
         do {
-            rc = select(s + 1, NULL, &fdSet, NULL, &timeout);
-        } while (rc == -1 && errno == EINTR);
+            // the typecast is safe because Windows ignores the first select() parameter anyway
+            rc = select(OFstatic_cast(int, s + 1), NULL, &fdSet, NULL, &timeout);
+        } while (rc == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
 
         if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
         {
@@ -2301,9 +2337,8 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network,
             if ((*association)->connection) delete (*association)->connection;
             (*association)->connection = NULL;
 
-            char buf[256];
             OFString msg = "TCP Initialization Error: ";
-            msg += OFStandard::strerror(errno, buf, sizeof(buf));
+            msg += OFStandard::getLastNetworkErrorCode().message();
             msg += " (Timeout)";
             return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
   }
@@ -2374,9 +2409,8 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network,
         if ((*association)->connection) delete (*association)->connection;
         (*association)->connection = NULL;
 
-        char buf[256];
         OFString msg = "TCP Initialization Error: ";
-        msg += OFStandard::strerror(errno, buf, sizeof(buf));
+        msg += OFStandard::getLastNetworkErrorCode().message();
         return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
     } else {
         // success - we've opened a TCP transport connection
@@ -2400,25 +2434,19 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network,
 #endif
           (*association)->networkState = NETWORK_DISCONNECTED;
 
-          char buf[256];
           OFString msg = "TCP Initialization Error: ";
-          msg += OFStandard::strerror(errno, buf, sizeof(buf));
+          msg += OFStandard::getLastNetworkErrorCode().message();
           return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
         }
         sockarg.l_onoff = 0;
         sockarg.l_linger = 0;
 
-#ifdef HAVE_GUSI_H
-        /* GUSI always returns an error for setsockopt(...) */
-#else
         if (setsockopt(s, SOL_SOCKET, SO_LINGER, (char *) &sockarg, (int) sizeof(sockarg)) < 0)
         {
-          char buf[256];
           OFString msg = "TCP Initialization Error: ";
-          msg += OFStandard::strerror(errno, buf, sizeof(buf));
+          msg += OFStandard::getLastNetworkErrorCode().message();
           return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
         }
-#endif
         setTCPBufferLength(s);
 
         /*
@@ -2455,9 +2483,8 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network,
 #endif
           if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&tcpNoDelay, sizeof(tcpNoDelay)) < 0)
           {
-            char buf[256];
             OFString msg = "TCP Initialization Error: ";
-            msg += OFStandard::strerror(errno, buf, sizeof(buf));
+            msg += OFStandard::getLastNetworkErrorCode().message();
             return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
           }
 #ifdef DISABLE_NAGLE_ALGORITHM
@@ -2550,12 +2577,11 @@ sendAssociationRQTCP(PRIVATE_NETWORKKEY ** /*network*/,
 
     do {
       nbytes = (*association)->connection ? (*association)->connection->write((char*)b, size_t(associateRequest.length + 6)) : 0;
-    } while (nbytes == -1 && errno == EINTR);
+    } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
     if ((unsigned long) nbytes != associateRequest.length + 6)
     {
-      char buf[256];
       OFString msg = "TCP I/O Error (";
-      msg += OFStandard::strerror(errno, buf, sizeof(buf));
+      msg += OFStandard::getLastNetworkErrorCode().message();
       msg += ") occurred in routine: sendAssociationRQTCP";
       return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str());
     }
@@ -2634,12 +2660,11 @@ sendAssociationACTCP(PRIVATE_NETWORKKEY ** /*network*/,
 
     do {
       nbytes = (*association)->connection ? (*association)->connection->write((char*)b, size_t(associateReply.length + 6)) : 0;
-    } while (nbytes == -1 && errno == EINTR);
+    } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
     if ((unsigned long) nbytes != associateReply.length + 6)
     {
-      char buf[256];
       OFString msg = "TCP I/O Error (";
-      msg += OFStandard::strerror(errno, buf, sizeof(buf));
+      msg += OFStandard::getLastNetworkErrorCode().message();
       msg += ") occurred in routine: sendAssociationACTCP";
       return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str());
     }
@@ -2710,12 +2735,11 @@ sendAssociationRJTCP(PRIVATE_NETWORKKEY ** /*network*/,
     {
         do {
           nbytes = (*association)->connection ? (*association)->connection->write((char*)b, size_t(pdu.length + 6)) : 0;
-        } while (nbytes == -1 && errno == EINTR);
+        } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
         if ((unsigned long) nbytes != pdu.length + 6)
         {
-          char buf[256];
           OFString msg = "TCP I/O Error (";
-          msg += OFStandard::strerror(errno, buf, sizeof(buf));
+          msg += OFStandard::getLastNetworkErrorCode().message();
           msg += ") occurred in routine: sendAssociationRJTCP";
           return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str());
         }
@@ -2771,12 +2795,11 @@ sendAbortTCP(DUL_ABORTITEMS * abortItems,
     if (cond.good()) {
         do {
           nbytes = (*association)->connection ? (*association)->connection->write((char*)b, size_t(pdu.length + 6)) : 0;
-        } while (nbytes == -1 && errno == EINTR);
+        } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
         if ((unsigned long) nbytes != pdu.length + 6)
         {
-          char buf[256];
           OFString msg = "TCP I/O Error (";
-          msg += OFStandard::strerror(errno, buf, sizeof(buf));
+          msg += OFStandard::getLastNetworkErrorCode().message();
           msg += ") occurred in routine: sendAbortTCP";
           return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str());
         }
@@ -2832,12 +2855,11 @@ sendReleaseRQTCP(PRIVATE_ASSOCIATIONKEY ** association)
     if (cond.good()) {
         do {
           nbytes = (*association)->connection ? (*association)->connection->write((char*)b, size_t(pdu.length + 6)) : 0;
-        } while (nbytes == -1 && errno == EINTR);
+        } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
         if ((unsigned long) nbytes != pdu.length + 6)
         {
-          char buf[256];
           OFString msg = "TCP I/O Error (";
-          msg += OFStandard::strerror(errno, buf, sizeof(buf));
+          msg += OFStandard::getLastNetworkErrorCode().message();
           msg += ") occurred in routine: sendReleaseRQTCP";
           return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str());
         }
@@ -2894,12 +2916,11 @@ sendReleaseRPTCP(PRIVATE_ASSOCIATIONKEY ** association)
     if (cond.good()) {
         do {
           nbytes = (*association)->connection ? (*association)->connection->write((char*)b, size_t(pdu.length + 6)) : 0;
-        } while (nbytes == -1 && errno == EINTR);
+        } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
         if ((unsigned long) nbytes != pdu.length + 6)
         {
-          char buf[256];
           OFString msg = "TCP I/O Error (";
-          msg += OFStandard::strerror(errno, buf, sizeof(buf));
+          msg += OFStandard::getLastNetworkErrorCode().message();
           msg += ") occurred in routine: sendReleaseRPTCP";
           return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str());
         }
@@ -2969,8 +2990,9 @@ sendPDataTCP(PRIVATE_ASSOCIATIONKEY ** association,
 
     /* start a loop iterate over all PDVs in the given */
     /* list and send every PDVs data over the network */
-    while (cond.good() && count-- > 0)
+    while (cond.good() && count > 0)
     {
+        --count;
         /* determine length of PDV */
         length = pdv->fragmentLength;
         /* determine data to be set */
@@ -3047,14 +3069,13 @@ writeDataPDU(PRIVATE_ASSOCIATIONKEY ** association,
     do
     {
       nbytes = (*association)->connection ? (*association)->connection->write((char*)head, size_t(length)) : 0;
-    } while (nbytes == -1 && errno == EINTR);
+    } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
 
     /* if not all head information was sent, return an error */
     if ((unsigned long) nbytes != length)
     {
-        char buf[256];
         OFString msg = "TCP I/O Error (";
-        msg += OFStandard::strerror(errno, buf, sizeof(buf));
+        msg += OFStandard::getLastNetworkErrorCode().message();
         msg += ") occurred in routine: writeDataPDU";
         return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str());
     }
@@ -3064,14 +3085,13 @@ writeDataPDU(PRIVATE_ASSOCIATIONKEY ** association,
     {
       nbytes = (*association)->connection ? (*association)->connection->write((char*)pdu->presentationDataValue.data,
         size_t(pdu->presentationDataValue.length - 2)) : 0;
-    } while (nbytes == -1 && errno == EINTR);
+    } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
 
         /* if not all head information was sent, return an error */
     if ((unsigned long) nbytes != pdu->presentationDataValue.length - 2)
     {
-        char buf[256];
         OFString msg = "TCP I/O Error (";
-        msg += OFStandard::strerror(errno, buf, sizeof(buf));
+        msg += OFStandard::getLastNetworkErrorCode().message();
         msg += ") occurred in routine: writeDataPDU";
         return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str());
     }
@@ -3652,7 +3672,7 @@ defragmentTCP(DcmTransportConnection *connection, DUL_BLOCKOPTIONS block, time_t
             /* data has become available, now call read(). */
             bytesRead = connection->read((char*)b, size_t(l));
 
-        } while (bytesRead == -1 && errno == EINTR);
+        } while (bytesRead == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
 
         /* if we actually received data, move the buffer pointer to its own end, update the variable */
         /* that determines the end of the first loop, and update the reference parameter return variable */
@@ -3737,15 +3757,16 @@ dump_pdu(const char *type, void *buffer, unsigned long length)
 ** Algorithm:
 **      Description of the algorithm (optional) and any other notes.
 */
-static void
-setTCPBufferLength(int sock)
+
+#ifdef _WIN32
+static void setTCPBufferLength(SOCKET sock)
+#else
+static void setTCPBufferLength(int sock)
+#endif
 {
     char *TCPBufferLength;
     int bufLen;
 
-#ifdef HAVE_GUSI_H
-    /* GUSI always returns an error for setsockopt(...) */
-#else
     /*
      * check whether environment variable TCP_BUFFER_LENGTH is set.
      * If not, the the operating system is responsible for selecting
@@ -3768,7 +3789,6 @@ setTCPBufferLength(int sock)
             DCMNET_WARN("DULFSM: cannot parse environment variable TCP_BUFFER_LENGTH=" << TCPBufferLength);
     } else
         DCMNET_TRACE("  environment variable TCP_BUFFER_LENGTH not set, using the system defaults");
-#endif // HAVE_GUSI_H
 }
 
 /* translatePresentationContextList
diff --git a/dcmnet/libsrc/dulparse.cc b/dcmnet/libsrc/dulparse.cc
index 1d344f5..8b6cb83 100644
--- a/dcmnet/libsrc/dulparse.cc
+++ b/dcmnet/libsrc/dulparse.cc
@@ -710,11 +710,13 @@ parseSCUSCPRole(PRV_SCUSCPROLE * role, unsigned char *buf,
     if (role->length - 4 < UIDLength)
         return makeLengthError("SCU-SCP role list UID", role->length, 0, UIDLength);
 
-    OFStandard::strlcpy(role->SOPClassUID, (char*)buf, sizeof(role->SOPClassUID));
-    if (UIDLength > sizeof(role->SOPClassUID))
+    if (UIDLength > DICOM_UI_LENGTH)
     {
-      DCMNET_WARN("Provided role SOP Class UID " << role->SOPClassUID << " is shorter than its announced length " << UIDLength << " (ignored)");
+      DCMNET_WARN("Provided role SOP Class UID length " << UIDLength
+      << " is larger than maximum allowed UID length " << DICOM_UI_LENGTH << " (will use 64 bytes max)");
+      UIDLength = DICOM_UI_LENGTH;
     }
+    OFStandard::strlcpy(role->SOPClassUID, (char*)buf, UIDLength+1 /* +1 for 0-byte */);
     buf += UIDLength;
     role->SCURole = *buf++;
     role->SCPRole = *buf++;
@@ -724,7 +726,7 @@ parseSCUSCPRole(PRV_SCUSCPROLE * role, unsigned char *buf,
     DCMNET_TRACE("Subitem parse: Type "
             << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(2) << (unsigned int)role->type
             << STD_NAMESPACE dec << ", Length " << STD_NAMESPACE setw(4) << (int)role->length
-            << ", Content: " << role->SOPClassUID << " " << (int)role->SCURole << " " << (int)role->SCPRole);
+            << ", Content: SOP Class: " << role->SOPClassUID << " SCU: " << (int)role->SCURole << " SCP: " << (int)role->SCPRole);
     return EC_Normal;
 }
 
diff --git a/dcmnet/libsrc/dulstruc.h b/dcmnet/libsrc/dulstruc.h
index 8178359..22da6ec 100644
--- a/dcmnet/libsrc/dulstruc.h
+++ b/dcmnet/libsrc/dulstruc.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2010, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
@@ -100,9 +100,9 @@ typedef struct {
     union {
   struct {
       int port;
-      int listenSocket;
-            DcmTransportLayer *tLayer;
-            int tLayerOwned;
+      DcmNativeSocketType listenSocket;
+      DcmTransportLayer *tLayer;
+      int tLayerOwned;
   }   TCP;
     }   networkSpecific;
 }   PRIVATE_NETWORKKEY;
diff --git a/dcmnet/libsrc/dwrap.c b/dcmnet/libsrc/dwrap.c
index 7f5dce7..07e0838 100644
--- a/dcmnet/libsrc/dwrap.c
+++ b/dcmnet/libsrc/dwrap.c
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2012, OFFIS e.V.
+ *  Copyright (C) 2012-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -23,6 +23,10 @@
 
 #ifdef WITH_TCPWRAPPER
 
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
 #include <tcpd.h>               /* for hosts_ctl */
 #include <syslog.h>
 
diff --git a/dcmnet/libsrc/scp.cc b/dcmnet/libsrc/scp.cc
index 8796ed0..10b553e 100644
--- a/dcmnet/libsrc/scp.cc
+++ b/dcmnet/libsrc/scp.cc
@@ -31,18 +31,7 @@ DcmSCP::DcmSCP() :
   m_assoc(NULL),
   m_cfg()
 {
-#ifdef HAVE_GUSI_H
-  // needed for Macintosh.
-  GUSISetup( GUSIwithSIOUXSockets );
-  GUSISetup( GUSIwithInternetSockets );
-#endif
-
-#ifdef HAVE_WINSOCK_H
-  WSAData winSockData;
-  // we need at least version 1.1.
-  WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-  WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+  OFStandard::initializeNetwork();
 }
 
 // ----------------------------------------------------------------------------
@@ -55,9 +44,7 @@ DcmSCP::~DcmSCP()
     dropAndDestroyAssociation();
   }
 
-#ifdef HAVE_WINSOCK_H
-  WSACleanup();
-#endif
+  OFStandard::shutdownNetwork();
 }
 
 // ----------------------------------------------------------------------------
@@ -760,7 +747,7 @@ OFCondition DcmSCP::receiveSTORERequest(T_DIMSE_C_StoreRQ &reqMessage,
 }
 
 
-OFCondition DcmSCP::sendSTOREResponse(T_ASC_PresentationContextID presID,
+OFCondition DcmSCP::sendSTOREResponse(const T_ASC_PresentationContextID presID,
                                       const T_DIMSE_C_StoreRQ &reqMessage,
                                       const Uint16 rspStatusCode)
 {
@@ -1649,10 +1636,10 @@ void DcmSCP::setMaxReceivePDULength(const Uint32 maxRecPDU)
 
 OFCondition DcmSCP::addPresentationContext(const OFString &abstractSyntax,
                                            const OFList<OFString> &xferSyntaxes,
-                                           const T_ASC_SC_ROLE role,
+                                           const T_ASC_SC_ROLE requestorRole,
                                            const OFString &profile)
 {
-  return m_cfg->addPresentationContext(abstractSyntax, xferSyntaxes, role, profile);
+  return m_cfg->addPresentationContext(abstractSyntax, xferSyntaxes, requestorRole, profile);
 }
 
 // ----------------------------------------------------------------------------
@@ -1748,6 +1735,13 @@ void DcmSCP::setProgressNotificationMode(const OFBool mode)
 
 // ----------------------------------------------------------------------------
 
+void DcmSCP::setAlwaysAcceptDefaultRole(const OFBool enabled)
+{
+  m_cfg->setAlwaysAcceptDefaultRole(enabled);
+}
+
+// ----------------------------------------------------------------------------
+
 /* Get methods for SCP settings and current association information */
 
 OFBool DcmSCP::getRefuseAssociation() const
diff --git a/dcmnet/libsrc/scpcfg.cc b/dcmnet/libsrc/scpcfg.cc
index 560f0ae..ba9810e 100644
--- a/dcmnet/libsrc/scpcfg.cc
+++ b/dcmnet/libsrc/scpcfg.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2012-2015, OFFIS e.V.
+ *  Copyright (C) 2012-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -197,6 +197,13 @@ void DcmSCPConfig::setProgressNotificationMode(const OFBool mode)
 
 // ----------------------------------------------------------------------------
 
+void DcmSCPConfig::setAlwaysAcceptDefaultRole(const OFBool enabled)
+{
+  m_assocConfig.setAlwaysAcceptDefaultRole(enabled);
+}
+
+// ----------------------------------------------------------------------------
+
 /* Get methods for SCP settings and current association information */
 
 OFBool DcmSCPConfig::getRefuseAssociation() const
@@ -372,12 +379,16 @@ OFCondition DcmSCPConfig::addPresentationContext(const OFString &abstractSyntax,
 
   // create role key and amend configuration (if required)
   OFString DCMSCP_RO_KEY;
-  if ( role != ASC_SC_ROLE_DEFAULT )
+  DCMSCP_RO_KEY = profileName;
+  DCMSCP_RO_KEY += "_ROLEKEY";
+  result = m_assocConfig.createEmptyRoleList(DCMSCP_RO_KEY.c_str());
+  if (result.good() && (role != ASC_SC_ROLE_DEFAULT))
   {
-    DCMSCP_RO_KEY = profileName;
-    DCMSCP_RO_KEY += "_ROLEKEY";
     result = m_assocConfig.addRole(DCMSCP_RO_KEY.c_str(), abstractSyntax.c_str(), role);
   }
+  if (result.bad())
+    return result;
+
 
   // create new profile if required and add presentation context as just defined.
   // we always use the same presentation context list.
@@ -390,7 +401,7 @@ OFCondition DcmSCPConfig::addPresentationContext(const OFString &abstractSyntax,
     {
       // finally add new presentation context to list and profile to configuration
       if ( result.good() ) result = m_assocConfig.addPresentationContext(DCMSCP_PC_KEY.c_str(), abstractSyntax.c_str(), DCMSCP_TS_KEY.c_str());
-      if ( result.good() ) result = m_assocConfig.addProfile(profileName.c_str(), DCMSCP_PC_KEY.c_str(), DCMSCP_RO_KEY.empty() ? NULL : DCMSCP_RO_KEY.c_str());
+      if ( result.good() ) result = m_assocConfig.addProfile(profileName.c_str(), DCMSCP_PC_KEY.c_str(), DCMSCP_RO_KEY.c_str());
     }
     else
     {
diff --git a/dcmnet/libsrc/scu.cc b/dcmnet/libsrc/scu.cc
index 1e0ecd4..475486f 100644
--- a/dcmnet/libsrc/scu.cc
+++ b/dcmnet/libsrc/scu.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2008-2015, OFFIS e.V.
+ *  Copyright (C) 2008-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -55,18 +55,7 @@ DcmSCU::DcmSCU() :
   m_datasetConversionMode(OFFalse),
   m_progressNotificationMode(OFTrue)
 {
-
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-  WSAData winSockData;
-  /* we need at least version 1.1 */
-  WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-  WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+  OFStandard::initializeNetwork();
 }
 
 void DcmSCU::freeNetwork()
@@ -107,9 +96,7 @@ DcmSCU::~DcmSCU()
     freeNetwork();
   }
 
-#ifdef HAVE_WINSOCK_H
-  WSACleanup();
-#endif
+  OFStandard::shutdownNetwork();
 }
 
 
@@ -146,9 +133,8 @@ OFCondition DcmSCU::initNetwork()
 
   /* Figure out the presentation addresses and copy the */
   /* corresponding values into the association parameters.*/
-  DIC_NODENAME localHost;
   DIC_NODENAME peerHost;
-  gethostname(localHost, sizeof(localHost) - 1);
+  const OFString localHost = OFStandard::getHostName();
   /* Since the underlying dcmnet structures reserve only 64 bytes for peer
      as well as local host name, we check here for buffer overflow.
    */
@@ -157,13 +143,13 @@ OFCondition DcmSCU::initNetwork()
     DCMNET_ERROR("Maximum length of peer host name '" << m_peer << "' is longer than maximum of 57 characters");
     return EC_IllegalCall; // TODO: need to find better error code
   }
-  if (strlen(localHost) + 1 > 63)
+  if (localHost.size() + 1 > 63)
   {
     DCMNET_ERROR("Maximum length of local host name '" << localHost << "' is longer than maximum of 62 characters");
     return EC_IllegalCall; // TODO: need to find better error code
   }
   sprintf(peerHost, "%s:%d", m_peer.c_str(), OFstatic_cast(int, m_peerPort));
-  ASC_setPresentationAddresses(m_params, localHost, peerHost);
+  ASC_setPresentationAddresses(m_params, localHost.c_str(), peerHost);
 
   /* Add presentation contexts */
 
@@ -361,7 +347,8 @@ void DcmSCU::clearPresentationContexts()
 // Returns usable presentation context ID for a given abstract syntax UID and
 // transfer syntax UID. 0 if none matches.
 T_ASC_PresentationContextID DcmSCU::findPresentationContextID(const OFString &abstractSyntax,
-                                                              const OFString &transferSyntax)
+                                                              const OFString &transferSyntax,
+                                                              const T_ASC_SC_ROLE requestorRole)
 {
   if (!isConnected())
     return 0;
@@ -384,6 +371,7 @@ T_ASC_PresentationContextID DcmSCU::findPresentationContextID(const OFString &ab
     found &= (pc->result == ASC_P_ACCEPTANCE);
     if (!transferSyntax.empty())  // ignore transfer syntax if not specified
       found &= (strcmp(pc->acceptedTransferSyntax, transferSyntax.c_str()) == 0);
+    if (found) found &= pc->acceptedSCRole == ascRole2dulRole(requestorRole);
     if (!found) pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l);
   }
   if (found)
@@ -1386,7 +1374,11 @@ OFCondition DcmSCU::handleSTORERequest(const T_ASC_PresentationContextID /* pres
   }
   else
   {
+    DCMNET_ERROR("cannot write DICOM file: " << filename);
     cStoreReturnStatus = STATUS_STORE_Refused_OutOfResources;
+
+    // delete incomplete file
+    OFStandard::deleteFile(filename);
   }
 
   return result;
diff --git a/dcmnet/tests/Makefile.dep b/dcmnet/tests/Makefile.dep
index f2cec33..1c0b614 100644
--- a/dcmnet/tests/Makefile.dep
+++ b/dcmnet/tests/Makefile.dep
@@ -18,6 +18,7 @@ tdump.o: tdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -31,7 +32,9 @@ tdump.o: tdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -60,7 +63,8 @@ tdump.o: tdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcompat.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
@@ -85,6 +89,7 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -98,7 +103,9 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -129,6 +136,7 @@ tpool.o: tpool.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -142,7 +150,9 @@ tpool.o: tpool.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -181,8 +191,6 @@ tpool.o: tpool.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -229,14 +237,13 @@ tpool.o: tpool.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcompat.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \
- ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h \
- ../include/dcmtk/dcmnet/scu.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/scu.h
 tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
@@ -257,6 +264,7 @@ tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -270,7 +278,9 @@ tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -308,8 +318,6 @@ tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -356,11 +364,10 @@ tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcompat.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \
- ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h \
- ../include/dcmtk/dcmnet/scu.h
+ ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/scu.h
diff --git a/dcmnet/tests/Makefile.in b/dcmnet/tests/Makefile.in
index 0cf0e5c..c12b3af 100644
--- a/dcmnet/tests/Makefile.in
+++ b/dcmnet/tests/Makefile.in
@@ -21,7 +21,7 @@ LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include \
 LIBDIRS = -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc -L$(oflogdir)/libsrc \
 	-L$(dcmdatadir)/libsrc -L$(dcmtlsdir)/libsrc $(compr_libdirs)
 LOCALLIBS = -ldcmnet -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(TCPWRAPPERLIBS) \
-	$(CHARCONVLIBS)
+	$(CHARCONVLIBS) $(MATHLIBS)
 
 objs = tests.o tdump.o tpool.o tscuscp.o
 progs = tests
diff --git a/dcmnet/tests/tests.cc b/dcmnet/tests/tests.cc
index c22672c..322a91d 100644
--- a/dcmnet/tests/tests.cc
+++ b/dcmnet/tests/tests.cc
@@ -32,6 +32,7 @@ OFTEST_REGISTER(dcmnet_scp_stop_after_timeout);
 OFTEST_REGISTER(dcmnet_scp_no_stop_wo_request_noblock);
 OFTEST_REGISTER(dcmnet_scp_no_stop_wo_request_block);
 OFTEST_REGISTER(dcmnet_scp_no_term_notify_without_association);
+OFTEST_REGISTER(dcmnet_scp_role_selection);
 #endif // WITH_THREADS
 
 OFTEST_MAIN("dcmnet")
diff --git a/dcmnet/tests/tscuscp.cc b/dcmnet/tests/tscuscp.cc
index b478762..e6cd4b1 100644
--- a/dcmnet/tests/tscuscp.cc
+++ b/dcmnet/tests/tscuscp.cc
@@ -27,6 +27,9 @@
 #include "dcmtk/dcmnet/scp.h"
 #include "dcmtk/dcmnet/scu.h"
 
+static OFLogger t_scuscp_logger= OFLog::getLogger("dcmtk.test.tscuscp");
+
+
 /** SCP derived from DcmSCP in order to test two types of virtual methods:
  *  <ul>
  *    <li> Notifiers: Called for some events happening in DcmSCP. So far
@@ -139,12 +142,12 @@ struct TestSCP: DcmSCP, OFThread
 /** Configure Verification SOP class on server
  *  @param  cfg The SCP configuration to modify
  */
-void configure_scp_for_echo(DcmSCPConfig& cfg)
+void configure_scp_for_echo(DcmSCPConfig& cfg, T_ASC_SC_ROLE roleOfRequestor = ASC_SC_ROLE_DEFAULT)
 {
   cfg.setPort(11112);
   OFList<OFString> xfers;
   xfers.push_back(UID_LittleEndianImplicitTransferSyntax);
-  cfg.addPresentationContext(UID_VerificationSOPClass, xfers);
+  OFCHECK(cfg.addPresentationContext(UID_VerificationSOPClass, xfers, roleOfRequestor).good());
 }
 
 
@@ -337,4 +340,145 @@ OFTEST_FLAGS(dcmnet_scp_no_term_notify_without_association, EF_Slow)
 }
 
 
+/** Helper function for testing role selection, test "dcmnet_scp_role_selection".
+ *  @param  r_req The role selection setting from the association requestor
+ *  @param  r_acc The role selection setting configured for the association acceptor
+ *  @param  expected_result The expected result of the role negotiation, i.e. what the
+ *          acceptor will return to the client.
+ *  @param  expect_assoc_reject If OFTrue, it is expected that the negotiation fails,
+ *          default is OFFalse
+ */
+void test_role_selection(const T_ASC_SC_ROLE r_req,
+                         const T_ASC_SC_ROLE r_acc,
+                         const T_ASC_SC_ROLE expected_result,
+                         const OFBool expect_assoc_reject = OFFalse,
+                         const OFBool acceptDefaultInsteadOfSCP = OFFalse)
+{
+    // Make it possible to loop over roles, used for checking the
+    // negotiated presentation contexts.
+    static OFVector<T_ASC_SC_ROLE> roles;
+    if (roles.empty())
+    {
+      roles.push_back(ASC_SC_ROLE_DEFAULT);
+      roles.push_back(ASC_SC_ROLE_NONE);
+      roles.push_back(ASC_SC_ROLE_SCP);
+      roles.push_back(ASC_SC_ROLE_SCU);
+      roles.push_back(ASC_SC_ROLE_SCUSCP);
+    }
+
+    TestSCP scp;
+    DcmSCPConfig& config = scp.getConfig();
+    configure_scp_for_echo(config, r_acc);
+
+    config.setAETitle("ACCEPTOR");
+    config.setConnectionBlockingMode(DUL_NOBLOCK);
+    config.setConnectionTimeout(3);
+    config.setAlwaysAcceptDefaultRole(acceptDefaultInsteadOfSCP);
+
+    scp.start();
+    OFStandard::sleep(1);
+    DcmSCU scu;
+    scu.setPeerAETitle("ACCEPTOR");
+    scu.setAETitle("REQUESTOR");
+    scu.setPeerHostName("localhost");
+    scu.setPeerPort(11112);
+    OFList<OFString> ts;
+    ts.push_back(UID_LittleEndianImplicitTransferSyntax);
+    OFCHECK(scu.addPresentationContext(UID_VerificationSOPClass, ts, r_req).good());
+    OFCHECK(scu.initNetwork().good());
+    if (!expect_assoc_reject)
+      OFCHECK(scu.negotiateAssociation().good());
+    else
+    {
+      OFCHECK(scu.negotiateAssociation() == DUL_ASSOCIATIONREJECTED);
+    }
+    // Loop over roles and check for each role whether has been negotiated or not.
+    // Only a single role (the expected_result) should be successfully negotiated.
+    OFVector<T_ASC_SC_ROLE>::iterator it = roles.begin();
+    OFCondition result;
+    while (it != roles.end())
+    {
+      T_ASC_PresentationContextID id = scu.findPresentationContextID(UID_VerificationSOPClass, UID_LittleEndianImplicitTransferSyntax, (*it));
+      if ( ((*it) == expected_result) && !expect_assoc_reject)
+      {
+          if (id == 0)
+          {
+              OFCHECK_FAIL("Error while testing requestor role " << ASC_role2String(r_req)
+                  << " versus acceptor role " << ASC_role2String(r_acc)
+                  << ", expected result: " << ASC_role2String(expected_result) << ", but did not find related presentation context with that role");
+          }
+      }
+      else
+      {
+        if (id != 0)
+        {
+            OFCHECK_FAIL("Error while testing requestor role " << ASC_role2String(r_req)
+                << " versus acceptor role " << ASC_role2String(r_acc)
+                << ", expected result: " << ASC_role2String(expected_result) << ", but found unexpected presentation context for role " << ASC_role2String(*it));
+        }
+      }
+      it++;
+    }
+    scp.m_set_stop_after_assoc = OFTrue;
+    scp.m_set_stop_after_timeout = OFTrue; // also handles the association rejection case
+    // Only release association if we're connected (could happen we're not in case
+    // of test failures of if expect_assoc_reject is true)
+    if (scu.isConnected())
+      OFCHECK(scu.releaseAssociation().good());
+    scp.join();
+}
+
+// Test case that checks whether server returns after association if enabled
+OFTEST_FLAGS(dcmnet_scp_role_selection, EF_Slow)
+{
+    // The ollowing role selection behaviour should be implemented and
+    // is exercised in this test (copied from dul.h):
+    //  *  +--------------------+------------------+---------+
+    //  *  | Requestor Proposal | Acceptor Setting | Result  |
+    //  *  +--------------------+------------------+---------+
+    //  *  | SCU                | SCP              | NONE    |
+    //  *  | SCU                | SCU              | SCU     |
+    //  *  | SCU                | SCU/SCP          | SCU     |
+    //  *  | SCU                | DEFAULT          | DEFAULT |
+    //  *  | SCP                | SCP              | SCP     |
+    //  *  | SCP                | SCU              | NONE    |
+    //  *  | SCP                | SCU/SCP          | SCP     |
+    //  *  | SCP                | DEFAULT          | DEFAULT |
+    //  *  | SCU/SCP            | SCP              | SCP     |
+    //  *  | SCU/SCP            | SCU              | SCU     |
+    //  *  | SCU/SCP            | SCU/SCP          | SCU/SCP |
+    //  *  | SCU/SCP            | DEFAULT          | DEFAULT |
+    //  *  | DEFAULT            | SCP              | Reject  |
+    //  *  | DEFAULT            | SCU              | DEFAULT |
+    //  *  | DEFAULT            | SCU/SCP          | DEFAULT |
+    //  *  | DEFAULT            | DEFAULT          | DEFAULT |
+    //  *  +--------------------+------------------+---------+
+    //
+    //  The Reject case can be turned into returning DEFAULT role when
+    //  setting a specific option also being tested below.
+
+    test_role_selection(ASC_SC_ROLE_SCU, ASC_SC_ROLE_SCP,     ASC_SC_ROLE_NONE);
+    test_role_selection(ASC_SC_ROLE_SCU, ASC_SC_ROLE_SCU,     ASC_SC_ROLE_SCU);
+    test_role_selection(ASC_SC_ROLE_SCU, ASC_SC_ROLE_SCUSCP,  ASC_SC_ROLE_SCU);
+    test_role_selection(ASC_SC_ROLE_SCU, ASC_SC_ROLE_DEFAULT, ASC_SC_ROLE_DEFAULT);
+
+    test_role_selection(ASC_SC_ROLE_SCP, ASC_SC_ROLE_SCP,     ASC_SC_ROLE_SCP);
+    test_role_selection(ASC_SC_ROLE_SCP, ASC_SC_ROLE_SCU,     ASC_SC_ROLE_NONE);
+    test_role_selection(ASC_SC_ROLE_SCP, ASC_SC_ROLE_SCUSCP,  ASC_SC_ROLE_SCP);
+    test_role_selection(ASC_SC_ROLE_SCP, ASC_SC_ROLE_DEFAULT, ASC_SC_ROLE_DEFAULT);
+    test_role_selection(ASC_SC_ROLE_SCUSCP, ASC_SC_ROLE_SCP,     ASC_SC_ROLE_SCP);
+    test_role_selection(ASC_SC_ROLE_SCUSCP, ASC_SC_ROLE_SCU,     ASC_SC_ROLE_SCU);
+    test_role_selection(ASC_SC_ROLE_SCUSCP, ASC_SC_ROLE_SCUSCP,  ASC_SC_ROLE_SCUSCP);
+    test_role_selection(ASC_SC_ROLE_SCUSCP, ASC_SC_ROLE_DEFAULT, ASC_SC_ROLE_DEFAULT);
+
+    test_role_selection(ASC_SC_ROLE_DEFAULT, ASC_SC_ROLE_SCP,     ASC_SC_ROLE_NONE /* not evaluated */, OFTrue /* expect rejection */);
+    // Repeat the test but this time work around faulty clients by also accepting Default role
+    // instead of the originally configured SCP role.
+    test_role_selection(ASC_SC_ROLE_DEFAULT, ASC_SC_ROLE_SCP,     ASC_SC_ROLE_DEFAULT, OFFalse, OFTrue);
+    test_role_selection(ASC_SC_ROLE_DEFAULT, ASC_SC_ROLE_SCU,     ASC_SC_ROLE_DEFAULT);
+    test_role_selection(ASC_SC_ROLE_DEFAULT, ASC_SC_ROLE_SCUSCP,  ASC_SC_ROLE_DEFAULT);
+    test_role_selection(ASC_SC_ROLE_DEFAULT, ASC_SC_ROLE_DEFAULT, ASC_SC_ROLE_DEFAULT);
+
+}
+
 #endif // WITH_THREADS
diff --git a/dcmpmap/CMakeLists.txt b/dcmpmap/CMakeLists.txt
index 5871a54..ff7e16f 100644
--- a/dcmpmap/CMakeLists.txt
+++ b/dcmpmap/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmpmaps)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmpmaps_SOURCE_DIR}/include  ${dcmfg_SOURCE_DIR}/include ${dcmiod_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${ZLIB_INCDIR})
+INCLUDE_DIRECTORIES("${dcmpmaps_SOURCE_DIR}/include" "${dcmfg_SOURCE_DIR}/include" "${dcmiod_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" ${ZLIB_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc include)
diff --git a/dcmpmap/include/CMakeLists.txt b/dcmpmap/include/CMakeLists.txt
index fc29ca7..c9d071b 100644
--- a/dcmpmap/include/CMakeLists.txt
+++ b/dcmpmap/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmpmap DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE)
+INSTALL(DIRECTORY dcmtk/dcmpmap DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE)
diff --git a/dcmpmap/libsrc/Makefile.dep b/dcmpmap/libsrc/Makefile.dep
index a0c4bd7..4382d96 100644
--- a/dcmpmap/libsrc/Makefile.dep
+++ b/dcmpmap/libsrc/Makefile.dep
@@ -24,7 +24,10 @@ dpmmodparametricmapimage.o: dpmmodparametricmapimage.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -42,10 +45,10 @@ dpmmodparametricmapimage.o: dpmmodparametricmapimage.cc \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -67,12 +70,9 @@ dpmmodparametricmapimage.o: dpmmodparametricmapimage.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmpmap/dpmmodparametricmapimage.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
  ../include/dcmtk/dcmpmap/dpmdef.h
 dpmmodparametricmapseries.o: dpmmodparametricmapseries.cc \
@@ -101,7 +101,10 @@ dpmmodparametricmapseries.o: dpmmodparametricmapseries.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -119,10 +122,10 @@ dpmmodparametricmapseries.o: dpmmodparametricmapseries.cc \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -144,12 +147,9 @@ dpmmodparametricmapseries.o: dpmmodparametricmapseries.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmpmap/dpmmodparametricmapseries.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
  ../include/dcmtk/dcmpmap/dpmdef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
@@ -231,7 +231,9 @@ dpmparametricmapbase.o: dpmparametricmapbase.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -250,6 +252,7 @@ dpmparametricmapbase.o: dpmparametricmapbase.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -265,8 +268,6 @@ dpmparametricmapbase.o: dpmparametricmapbase.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmpmap/dpmtypes.h \
@@ -323,7 +324,6 @@ dpmparametricmapbase.o: dpmparametricmapbase.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/dcmpmap/dpmdef.h \
  ../include/dcmtk/dcmpmap/dpmparametricmapbase.h \
  ../../dcmfg/include/dcmtk/dcmfg/fginterface.h \
@@ -398,6 +398,7 @@ dpmparametricmapiod.o: dpmparametricmapiod.cc \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -409,7 +410,6 @@ dpmparametricmapiod.o: dpmparametricmapiod.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -572,7 +572,10 @@ dpmtypes.o: dpmtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -590,9 +593,9 @@ dpmtypes.o: dpmtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -621,8 +624,6 @@ dpmtypes.o: dpmtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -669,5 +670,4 @@ dpmtypes.o: dpmtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/dcmpmap/dpmdef.h
diff --git a/dcmpmap/libsrc/dpmparametricmapiod.cc b/dcmpmap/libsrc/dpmparametricmapiod.cc
index fe4a368..cb89c65 100644
--- a/dcmpmap/libsrc/dpmparametricmapiod.cc
+++ b/dcmpmap/libsrc/dpmparametricmapiod.cc
@@ -373,7 +373,7 @@ Uint8* DPMParametricMapIOD::WriteVisitor::DcmElementOf<IODImagePixelModule<Uint8
   if (m_pElement->setVR(EVR_OB).good())
   {
     Uint8* result;
-    if (m_pElement->createUint8Array(size, result).good())
+    if (m_pElement->createUint8Array(OFstatic_cast(Uint32, size), result).good())
       return result;
   }
   return OFnullptr;
@@ -387,7 +387,7 @@ Sint8* DPMParametricMapIOD::WriteVisitor::DcmElementOf<IODImagePixelModule<Sint8
   if (m_pElement->setVR(EVR_OB).good())
   {
     Uint8* result;
-    if (m_pElement->createUint8Array(size, result).good())
+    if (m_pElement->createUint8Array(OFstatic_cast(Uint32, size), result).good())
       return OFreinterpret_cast(Sint8*, result);
   }
   return OFnullptr;
@@ -401,7 +401,7 @@ Uint16* DPMParametricMapIOD::WriteVisitor::DcmElementOf<IODImagePixelModule<Uint
   if (m_pElement->setVR(EVR_OW).good())
   {
     Uint16* result;
-    if (m_pElement->createUint16Array(size / 2, result).good())
+    if (m_pElement->createUint16Array(OFstatic_cast(Uint32, size/2), result).good())
       return result;
   }
   return OFnullptr;
@@ -415,7 +415,7 @@ Sint16* DPMParametricMapIOD::WriteVisitor::DcmElementOf<IODImagePixelModule<Sint
   if (m_pElement->setVR(EVR_OW).good())
   {
     Uint16* result;
-    if (m_pElement->createUint16Array(size / 2, result).good())
+    if (m_pElement->createUint16Array(OFstatic_cast(Uint32, size/2), result).good())
       return OFreinterpret_cast(Sint16*, result);
   }
   return OFnullptr;
@@ -470,7 +470,7 @@ private:
     OFCondition createFloat32Array(const size_t size,
                                    Float32*& result)
     {
-       OFCondition status = createEmptyValue(size);
+       OFCondition status = createEmptyValue(OFstatic_cast(Uint32, size));
        result = OFreinterpret_cast(Float32*, getValue());
        return status;
     }
@@ -527,7 +527,7 @@ private:
 
     OFCondition createFloat64Array(const size_t size, Float64*& result)
     {
-       OFCondition status = createEmptyValue(size);
+       OFCondition status = createEmptyValue(OFstatic_cast(Uint32, size));
        result = OFreinterpret_cast(Float64*, getValue());
        return status;
     }
@@ -623,7 +623,7 @@ OFCondition DPMParametricMapIOD::Frames<PixelType>::addFrame(PixelType* data,
         OFVector<FGBase*>::const_iterator fg = perFrameInformation.begin();
         while ( result.good() && (fg != perFrameInformation.end()) )
         {
-          result = m_Map.m_FGInterface.addPerFrame(m_Map.m_Frames.size(), **fg);
+          result = m_Map.m_FGInterface.addPerFrame(OFstatic_cast(Uint32, m_Map.m_Frames.size()), **fg);
           if (result.bad())
           {
             DCMPMAP_ERROR("Could not add functional group: " << DcmFGTypes::FGType2OFString((*fg)->getType()));
@@ -636,7 +636,7 @@ OFCondition DPMParametricMapIOD::Frames<PixelType>::addFrame(PixelType* data,
   }
   // Clean up if necessary
   if (result.bad())
-    m_Map.m_FGInterface.deleteFrame(m_Map.m_Frames.size());
+    m_Map.m_FGInterface.deleteFrame(OFstatic_cast(Uint32, m_Map.m_Frames.size()));
   return result;
 }
 
diff --git a/dcmpmap/tests/Makefile.dep b/dcmpmap/tests/Makefile.dep
deleted file mode 100644
index c2b87ff..0000000
--- a/dcmpmap/tests/Makefile.dep
+++ /dev/null
@@ -1,548 +0,0 @@
-dump_pmp.o: dump_pmp.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmpmap/dpmparametricmapiod.h \
- ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \
- ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/oftypes.h \
- ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
- ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
- ../../ofstd/include/dcmtk/ofstd/offile.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oflist.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
- ../../oflog/include/dcmtk/oflog/oflog.h \
- ../../oflog/include/dcmtk/oflog/logger.h \
- ../../oflog/include/dcmtk/oflog/config.h \
- ../../oflog/include/dcmtk/oflog/config/defines.h \
- ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
- ../../oflog/include/dcmtk/oflog/loglevel.h \
- ../../oflog/include/dcmtk/oflog/tstring.h \
- ../../oflog/include/dcmtk/oflog/tchar.h \
- ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
- ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
- ../../oflog/include/dcmtk/oflog/layout.h \
- ../../oflog/include/dcmtk/oflog/streams.h \
- ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
- ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
- ../../oflog/include/dcmtk/oflog/spi/filter.h \
- ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
- ../../oflog/include/dcmtk/oflog/spi/logfact.h \
- ../../oflog/include/dcmtk/oflog/logmacro.h \
- ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
- ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
- ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
- ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
- ../../ofstd/include/dcmtk/ofstd/ofthread.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
- ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
- ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
- ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
- ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
- ../include/dcmtk/dcmpmap/dpmparametricmapbase.h \
- ../../dcmfg/include/dcmtk/dcmfg/fginterface.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \
- ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcpixseq.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
- ../../ofstd/include/dcmtk/ofstd/ofdate.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \
- ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
- ../../ofstd/include/dcmtk/ofstd/oftime.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrst.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvruc.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrut.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrobow.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcpixel.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrpobw.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcovlay.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrat.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrss.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrfl.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
- ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgtypes.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgdefine.h \
- ../../dcmfg/include/dcmtk/dcmfg/fg.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgbase.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgderimg.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgfracon.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgframeanatomy.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgframevoilut.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgidentpixeltransform.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgparametricmapframetype.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgpixmsr.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgplanor.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgplanpo.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgrealworldvaluemapping.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodcontentitemmacro.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodimage.h \
- ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
- ../../ofstd/include/dcmtk/ofstd/ofalign.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodcommn.h \
- ../../dcmiod/include/dcmtk/dcmiod/modpatient.h \
- ../../dcmiod/include/dcmtk/dcmiod/modpatientstudy.h \
- ../../ofstd/include/dcmtk/ofstd/ofoption.h \
- ../../dcmiod/include/dcmtk/dcmiod/modgeneralstudy.h \
- ../../dcmiod/include/dcmtk/dcmiod/modequipment.h \
- ../../dcmiod/include/dcmtk/dcmiod/modgeneralseries.h \
- ../../dcmiod/include/dcmtk/dcmiod/modfor.h \
- ../../dcmiod/include/dcmtk/dcmiod/modsopcommon.h \
- ../../dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodreferences.h \
- ../../dcmiod/include/dcmtk/dcmiod/modgeneralimage.h \
- ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \
- ../../dcmiod/include/dcmtk/dcmiod/modacquisitioncontext.h \
- ../../dcmiod/include/dcmtk/dcmiod/modenhequipment.h \
- ../../dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h \
- ../../dcmiod/include/dcmtk/dcmiod/modmultiframefg.h \
- ../../dcmiod/include/dcmtk/dcmiod/modimagepixel.h \
- ../../dcmiod/include/dcmtk/dcmiod/modfloatingpointimagepixel.h \
- ../include/dcmtk/dcmpmap/dpmmodparametricmapimage.h \
- ../include/dcmtk/dcmpmap/dpmdef.h \
- ../include/dcmtk/dcmpmap/dpmmodparametricmapseries.h \
- ../include/dcmtk/dcmpmap/dpmtypes.h
-make_pmp.o: make_pmp.cc ../../ofstd/include/dcmtk/ofstd/oftest.h \
- ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
- ../../ofstd/include/dcmtk/ofstd/oftypes.h \
- ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
- ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
- ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
- ../../ofstd/include/dcmtk/ofstd/oflist.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
- ../../ofstd/include/dcmtk/ofstd/ofthread.h \
- ../../ofstd/include/dcmtk/ofstd/offile.h \
- ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
- ../../oflog/include/dcmtk/oflog/oflog.h \
- ../../oflog/include/dcmtk/oflog/logger.h \
- ../../oflog/include/dcmtk/oflog/config.h \
- ../../oflog/include/dcmtk/oflog/config/defines.h \
- ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
- ../../oflog/include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../../oflog/include/dcmtk/oflog/tstring.h \
- ../../oflog/include/dcmtk/oflog/tchar.h \
- ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
- ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
- ../../oflog/include/dcmtk/oflog/layout.h \
- ../../oflog/include/dcmtk/oflog/streams.h \
- ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
- ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
- ../../oflog/include/dcmtk/oflog/spi/filter.h \
- ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
- ../../oflog/include/dcmtk/oflog/spi/logfact.h \
- ../../oflog/include/dcmtk/oflog/logmacro.h \
- ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
- ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
- ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
- ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \
- ../../ofstd/include/dcmtk/ofstd/ofdate.h \
- ../../ofstd/include/dcmtk/ofstd/oftime.h \
- ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
- ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
- ../include/dcmtk/dcmpmap/dpmparametricmapiod.h \
- ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \
- ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../include/dcmtk/dcmpmap/dpmparametricmapbase.h \
- ../../dcmfg/include/dcmtk/dcmfg/fginterface.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \
- ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcpixseq.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \
- ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrst.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvruc.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrut.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrobow.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcpixel.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrpobw.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcovlay.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrat.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrss.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrfl.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
- ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgtypes.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgdefine.h \
- ../../dcmfg/include/dcmtk/dcmfg/fg.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgbase.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgderimg.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgfracon.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgframeanatomy.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgframevoilut.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgidentpixeltransform.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgparametricmapframetype.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgpixmsr.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgplanor.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgplanpo.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgrealworldvaluemapping.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodcontentitemmacro.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodimage.h \
- ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
- ../../ofstd/include/dcmtk/ofstd/ofalign.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodcommn.h \
- ../../dcmiod/include/dcmtk/dcmiod/modpatient.h \
- ../../dcmiod/include/dcmtk/dcmiod/modpatientstudy.h \
- ../../ofstd/include/dcmtk/ofstd/ofoption.h \
- ../../dcmiod/include/dcmtk/dcmiod/modgeneralstudy.h \
- ../../dcmiod/include/dcmtk/dcmiod/modequipment.h \
- ../../dcmiod/include/dcmtk/dcmiod/modgeneralseries.h \
- ../../dcmiod/include/dcmtk/dcmiod/modfor.h \
- ../../dcmiod/include/dcmtk/dcmiod/modsopcommon.h \
- ../../dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodreferences.h \
- ../../dcmiod/include/dcmtk/dcmiod/modgeneralimage.h \
- ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \
- ../../dcmiod/include/dcmtk/dcmiod/modacquisitioncontext.h \
- ../../dcmiod/include/dcmtk/dcmiod/modenhequipment.h \
- ../../dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h \
- ../../dcmiod/include/dcmtk/dcmiod/modmultiframefg.h \
- ../../dcmiod/include/dcmtk/dcmiod/modimagepixel.h \
- ../../dcmiod/include/dcmtk/dcmiod/modfloatingpointimagepixel.h \
- ../include/dcmtk/dcmpmap/dpmmodparametricmapimage.h \
- ../include/dcmtk/dcmpmap/dpmdef.h \
- ../include/dcmtk/dcmpmap/dpmmodparametricmapseries.h \
- ../include/dcmtk/dcmpmap/dpmtypes.h
-rw_pmp.o: rw_pmp.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmpmap/dpmparametricmapiod.h \
- ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \
- ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/oftypes.h \
- ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
- ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
- ../../ofstd/include/dcmtk/ofstd/offile.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oflist.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
- ../../oflog/include/dcmtk/oflog/oflog.h \
- ../../oflog/include/dcmtk/oflog/logger.h \
- ../../oflog/include/dcmtk/oflog/config.h \
- ../../oflog/include/dcmtk/oflog/config/defines.h \
- ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
- ../../oflog/include/dcmtk/oflog/loglevel.h \
- ../../oflog/include/dcmtk/oflog/tstring.h \
- ../../oflog/include/dcmtk/oflog/tchar.h \
- ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
- ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
- ../../oflog/include/dcmtk/oflog/layout.h \
- ../../oflog/include/dcmtk/oflog/streams.h \
- ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
- ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
- ../../oflog/include/dcmtk/oflog/spi/filter.h \
- ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
- ../../oflog/include/dcmtk/oflog/spi/logfact.h \
- ../../oflog/include/dcmtk/oflog/logmacro.h \
- ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
- ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
- ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
- ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
- ../../ofstd/include/dcmtk/ofstd/ofthread.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
- ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
- ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
- ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
- ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
- ../include/dcmtk/dcmpmap/dpmparametricmapbase.h \
- ../../dcmfg/include/dcmtk/dcmfg/fginterface.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \
- ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcpixseq.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
- ../../ofstd/include/dcmtk/ofstd/ofdate.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \
- ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
- ../../ofstd/include/dcmtk/ofstd/oftime.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrst.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvruc.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrut.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrobow.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcpixel.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrpobw.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcovlay.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrat.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrss.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrfl.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
- ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgtypes.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgdefine.h \
- ../../dcmfg/include/dcmtk/dcmfg/fg.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgbase.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgderimg.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgfracon.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgframeanatomy.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgframevoilut.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgidentpixeltransform.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgparametricmapframetype.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgpixmsr.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgplanor.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgplanpo.h \
- ../../dcmfg/include/dcmtk/dcmfg/fgrealworldvaluemapping.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodcontentitemmacro.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodimage.h \
- ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
- ../../ofstd/include/dcmtk/ofstd/ofalign.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodcommn.h \
- ../../dcmiod/include/dcmtk/dcmiod/modpatient.h \
- ../../dcmiod/include/dcmtk/dcmiod/modpatientstudy.h \
- ../../ofstd/include/dcmtk/ofstd/ofoption.h \
- ../../dcmiod/include/dcmtk/dcmiod/modgeneralstudy.h \
- ../../dcmiod/include/dcmtk/dcmiod/modequipment.h \
- ../../dcmiod/include/dcmtk/dcmiod/modgeneralseries.h \
- ../../dcmiod/include/dcmtk/dcmiod/modfor.h \
- ../../dcmiod/include/dcmtk/dcmiod/modsopcommon.h \
- ../../dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h \
- ../../dcmiod/include/dcmtk/dcmiod/iodreferences.h \
- ../../dcmiod/include/dcmtk/dcmiod/modgeneralimage.h \
- ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \
- ../../dcmiod/include/dcmtk/dcmiod/modacquisitioncontext.h \
- ../../dcmiod/include/dcmtk/dcmiod/modenhequipment.h \
- ../../dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h \
- ../../dcmiod/include/dcmtk/dcmiod/modmultiframefg.h \
- ../../dcmiod/include/dcmtk/dcmiod/modimagepixel.h \
- ../../dcmiod/include/dcmtk/dcmiod/modfloatingpointimagepixel.h \
- ../include/dcmtk/dcmpmap/dpmmodparametricmapimage.h \
- ../include/dcmtk/dcmpmap/dpmdef.h \
- ../include/dcmtk/dcmpmap/dpmmodparametricmapseries.h \
- ../include/dcmtk/dcmpmap/dpmtypes.h
-tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/oftest.h \
- ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
- ../../ofstd/include/dcmtk/ofstd/oftypes.h \
- ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
- ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
- ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
- ../../ofstd/include/dcmtk/ofstd/oflist.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
- ../../ofstd/include/dcmtk/ofstd/ofthread.h \
- ../../ofstd/include/dcmtk/ofstd/offile.h \
- ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
- ../../oflog/include/dcmtk/oflog/oflog.h \
- ../../oflog/include/dcmtk/oflog/logger.h \
- ../../oflog/include/dcmtk/oflog/config.h \
- ../../oflog/include/dcmtk/oflog/config/defines.h \
- ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
- ../../oflog/include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../../oflog/include/dcmtk/oflog/tstring.h \
- ../../oflog/include/dcmtk/oflog/tchar.h \
- ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
- ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
- ../../oflog/include/dcmtk/oflog/layout.h \
- ../../oflog/include/dcmtk/oflog/streams.h \
- ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
- ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
- ../../oflog/include/dcmtk/oflog/spi/filter.h \
- ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
- ../../oflog/include/dcmtk/oflog/spi/logfact.h \
- ../../oflog/include/dcmtk/oflog/logmacro.h \
- ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
- ../../oflog/include/dcmtk/oflog/tracelog.h
diff --git a/dcmpstat/CMakeLists.txt b/dcmpstat/CMakeLists.txt
index a972c04..994da8b 100644
--- a/dcmpstat/CMakeLists.txt
+++ b/dcmpstat/CMakeLists.txt
@@ -2,9 +2,9 @@
 PROJECT(dcmpstat)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmpstat_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmnet_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${dcmqrdb_SOURCE_DIR}/include ${dcmsr_SOURCE_DIR}/include ${dcmsign_SOURCE_DIR}/include ${dcmtls_SOURCE_DIR}/include ${ZLIB_INCDIR} ${OPENSSL_INCDIR})
+INCLUDE_DIRECTORIES("${dcmpstat_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmnet_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" "${dcmqrdb_SOURCE_DIR}/include" "${dcmsr_SOURCE_DIR}/include" "${dcmsign_SOURCE_DIR}/include" "${dcmtls_SOURCE_DIR}/include" ${ZLIB_INCDIR} ${OPENSSL_INCDIR})
 
 # recurse into subdirectories
-FOREACH(SUBDIR libsrc apps include data etc)
+FOREACH(SUBDIR libsrc apps include data etc tests)
   ADD_SUBDIRECTORY(${SUBDIR})
 ENDFOREACH(SUBDIR)
diff --git a/dcmpstat/apps/CMakeLists.txt b/dcmpstat/apps/CMakeLists.txt
index 6f453ef..4bc6024 100644
--- a/dcmpstat/apps/CMakeLists.txt
+++ b/dcmpstat/apps/CMakeLists.txt
@@ -7,6 +7,10 @@ FOREACH(PROGRAM dcmmkcrv dcmmklut dcmp2pgm dcmprscp dcmprscu dcmpschk dcmpsmk dc
 ENDFOREACH(PROGRAM)
 
 # make sure executables are linked to the corresponding libraries
-FOREACH(PROGRAM dcmmkcrv dcmmklut dcmp2pgm dcmprscp dcmprscu dcmpsmk dcmpschk dcmpsprt dcmpsrcv dcmpssnd)
+FOREACH(PROGRAM dcmp2pgm dcmprscp dcmprscu dcmpsmk dcmpschk dcmpsprt dcmpsrcv dcmpssnd)
   DCMTK_TARGET_LINK_MODULES(${PROGRAM} dcmpstat dcmdsig dcmsr dcmimage dcmimgle dcmqrdb dcmnet dcmtls dcmdata oflog ofstd)
 ENDFOREACH(PROGRAM)
+
+FOREACH(PROGRAM dcmmkcrv dcmmklut)
+  DCMTK_TARGET_LINK_MODULES(${PROGRAM} dcmdsig dcmsr dcmimage dcmimgle dcmdata oflog ofstd)
+ENDFOREACH(PROGRAM)
diff --git a/dcmpstat/apps/Makefile.dep b/dcmpstat/apps/Makefile.dep
index 14c170d..a0580a8 100644
--- a/dcmpstat/apps/Makefile.dep
+++ b/dcmpstat/apps/Makefile.dep
@@ -17,6 +17,7 @@ dcmmkcrv.o: dcmmkcrv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -30,7 +31,9 @@ dcmmkcrv.o: dcmmkcrv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -68,8 +71,6 @@ dcmmkcrv.o: dcmmkcrv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -132,7 +133,10 @@ dcmmklut.o: dcmmklut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -150,10 +154,10 @@ dcmmklut.o: dcmmklut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -181,8 +185,6 @@ dcmmklut.o: dcmmklut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -249,7 +251,10 @@ dcmp2pgm.o: dcmp2pgm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -267,10 +272,10 @@ dcmp2pgm.o: dcmp2pgm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmpstat/dvpstyp.h ../include/dcmtk/dcmpstat/dpdefine.h \
@@ -302,8 +307,6 @@ dcmp2pgm.o: dcmp2pgm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -361,7 +364,6 @@ dcmp2pgm.o: dcmp2pgm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/qrdefine.h \
@@ -370,6 +372,7 @@ dcmp2pgm.o: dcmp2pgm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../ofstd/include/dcmtk/ofstd/offname.h \
  ../include/dcmtk/dcmpstat/dvcache.h ../include/dcmtk/dcmpstat/dvpstx.h \
@@ -411,7 +414,10 @@ dcmprscp.o: dcmprscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -429,10 +435,10 @@ dcmprscp.o: dcmprscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmpstat/dviface.h ../include/dcmtk/dcmpstat/dvpscf.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -465,8 +471,6 @@ dcmprscp.o: dcmprscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -524,7 +528,6 @@ dcmprscp.o: dcmprscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/qrdefine.h \
@@ -533,6 +536,7 @@ dcmprscp.o: dcmprscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../ofstd/include/dcmtk/ofstd/offname.h \
  ../include/dcmtk/dcmpstat/dvcache.h \
@@ -570,7 +574,10 @@ dcmprscu.o: dcmprscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -588,10 +595,10 @@ dcmprscu.o: dcmprscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmpstat/dviface.h ../include/dcmtk/dcmpstat/dvpscf.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -624,8 +631,6 @@ dcmprscu.o: dcmprscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -680,7 +685,6 @@ dcmprscu.o: dcmprscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/qrdefine.h \
@@ -689,6 +693,7 @@ dcmprscu.o: dcmprscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../ofstd/include/dcmtk/ofstd/offname.h \
  ../include/dcmtk/dcmpstat/dvcache.h \
@@ -736,6 +741,7 @@ dcmpschk.o: dcmpschk.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -749,7 +755,9 @@ dcmpschk.o: dcmpschk.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -787,8 +795,6 @@ dcmpschk.o: dcmpschk.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -838,6 +844,7 @@ dcmpschk.o: dcmpschk.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmpstat/dcmpstat.h ../include/dcmtk/dcmpstat/dvpstyp.h \
  ../include/dcmtk/dcmpstat/dvpsovl.h ../include/dcmtk/dcmpstat/dpdefine.h \
  ../include/dcmtk/dcmpstat/dvpsgll.h ../include/dcmtk/dcmpstat/dvpsrsl.h \
@@ -864,6 +871,7 @@ dcmpsmk.o: dcmpsmk.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -877,7 +885,9 @@ dcmpsmk.o: dcmpsmk.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -915,8 +925,6 @@ dcmpsmk.o: dcmpsmk.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -966,6 +974,7 @@ dcmpsmk.o: dcmpsmk.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmpstat/dcmpstat.h ../include/dcmtk/dcmpstat/dvpstyp.h \
  ../include/dcmtk/dcmpstat/dvpsovl.h ../include/dcmtk/dcmpstat/dpdefine.h \
  ../include/dcmtk/dcmpstat/dvpsgll.h ../include/dcmtk/dcmpstat/dvpsrsl.h \
@@ -994,7 +1003,10 @@ dcmpsprt.o: dcmpsprt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1012,10 +1024,10 @@ dcmpsprt.o: dcmpsprt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmpstat/dvpstyp.h ../include/dcmtk/dcmpstat/dpdefine.h \
@@ -1047,8 +1059,6 @@ dcmpsprt.o: dcmpsprt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1106,7 +1116,6 @@ dcmpsprt.o: dcmpsprt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/qrdefine.h \
@@ -1115,6 +1124,7 @@ dcmpsprt.o: dcmpsprt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../ofstd/include/dcmtk/ofstd/offname.h \
  ../include/dcmtk/dcmpstat/dvcache.h ../include/dcmtk/dcmpstat/dvpssp.h \
@@ -1157,7 +1167,10 @@ dcmpsrcv.o: dcmpsrcv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1175,10 +1188,10 @@ dcmpsrcv.o: dcmpsrcv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmpstat/dvpscf.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -1207,6 +1220,7 @@ dcmpsrcv.o: dcmpsrcv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \
@@ -1231,8 +1245,6 @@ dcmpsrcv.o: dcmpsrcv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1303,7 +1315,10 @@ dcmpssnd.o: dcmpssnd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1321,10 +1336,10 @@ dcmpssnd.o: dcmpssnd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmpstat/dvpscf.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -1356,6 +1371,7 @@ dcmpssnd.o: dcmpssnd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../include/dcmtk/dcmpstat/dvpshlp.h \
diff --git a/dcmpstat/apps/Makefile.in b/dcmpstat/apps/Makefile.in
index eaade7c..e64a781 100644
--- a/dcmpstat/apps/Makefile.in
+++ b/dcmpstat/apps/Makefile.in
@@ -75,10 +75,11 @@ LIBDIRS = -L$(top_srcdir)/libsrc $(dcmpstatlibdir) $(dcmqrdblibdir) $(dcmnetlibd
 LOCALLIBS = $(dcmpstatlib) $(dcmsignlib) $(dcmsrlib) $(dcmimagelib) $(dcmimglelib) \
 	$(dcmqrdblib) $(dcmnetlib) $(dcmtlslib) $(dcmdatalib) $(ofloglib) $(ofstdlib) \
 	$(TIFFLIBS) $(PNGLIBS) $(XMLLIBS) $(ZLIBLIBS) $(TCPWRAPPERLIBS) $(OPENSSLLIBS) \
-	$(CHARCONVLIBS)
-DCMMKLUT_LIBS = $(dcmimglelib) $(dcmdatalib) $(ofloglib) $(ofstdlib) $(XMLLIBS) $(ZLIBLIBS) \
-	$(CHARCONVLIBS)
-DCMMKCRV_LIBS = $(dcmdatalib) $(ofloglib) $(ofstdlib) $(XMLLIBS) $(ZLIBLIBS) $(CHARCONVLIBS)
+	$(CHARCONVLIBS) $(MATHLIBS)
+DCMMKLUT_LIBS = $(dcmimglelib) $(dcmdatalib) $(ofloglib) $(ofstdlib) $(XMLLIBS) \
+	$(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
+DCMMKCRV_LIBS = $(dcmdatalib) $(ofloglib) $(ofstdlib) $(XMLLIBS) $(ZLIBLIBS) \
+	$(CHARCONVLIBS) $(MATHLIBS)
 
 objs = dcmpsmk.o dcmp2pgm.o dcmmklut.o dcmmkcrv.o dcmpssnd.o dcmpsrcv.o dcmpsprt.o dcmprscu.o \
 	dcmprscp.o dcmpschk.o
@@ -88,34 +89,34 @@ progs = dcmpsmk dcmp2pgm dcmmklut dcmmkcrv dcmpssnd dcmpsrcv dcmpsprt dcmprscu d
 all: $(progs)
 
 dcmpsmk: dcmpsmk.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpsmk.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpsmk.o $(LOCALLIBS) $(LIBS)
 
 dcmp2pgm: dcmp2pgm.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmp2pgm.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmp2pgm.o $(LOCALLIBS) $(LIBS)
 
 dcmmklut: dcmmklut.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmmklut.o $(DCMMKLUT_LIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmmklut.o $(DCMMKLUT_LIBS) $(LIBS)
 
 dcmmkcrv: dcmmkcrv.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmmkcrv.o $(DCMMKCRV_LIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmmkcrv.o $(DCMMKCRV_LIBS) $(LIBS)
 
 dcmpssnd: dcmpssnd.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpssnd.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpssnd.o $(LOCALLIBS) $(LIBS)
 
 dcmpsrcv: dcmpsrcv.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpsrcv.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpsrcv.o $(LOCALLIBS) $(LIBS)
 
 dcmpsprt: dcmpsprt.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpsprt.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpsprt.o $(LOCALLIBS) $(LIBS)
 
 dcmprscu: dcmprscu.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmprscu.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmprscu.o $(LOCALLIBS) $(LIBS)
 
 dcmprscp: dcmprscp.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmprscp.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmprscp.o $(LOCALLIBS) $(LIBS)
 
 dcmpschk: dcmpschk.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpschk.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmpschk.o $(LOCALLIBS) $(LIBS)
 
 
 install: all
diff --git a/dcmpstat/apps/dcmmkcrv.cc b/dcmpstat/apps/dcmmkcrv.cc
index a2a7560..32ecbe0 100644
--- a/dcmpstat/apps/dcmmkcrv.cc
+++ b/dcmpstat/apps/dcmmkcrv.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2012, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -22,10 +22,6 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofconapp.h"
 #include "dcmtk/ofstd/ofcast.h"
@@ -199,7 +195,7 @@ int main(int argc, char *argv[])
         OFLOG_WARN(dcmmkcrvLogger, "too many curve points, can only handle " << MAX_POINTS << ".");
         done = OFTrue;
       } else {
-      	if (curvefile.good()) array[idx++] = d;
+        if (curvefile.good()) array[idx++] = d;
       }
     }
 
@@ -325,31 +321,31 @@ int main(int argc, char *argv[])
             OFLOG_INFO(dcmmkcrvLogger, "encoding curve data element as VR=US");
             element = new DcmUnsignedShort(DcmTag(DCM_RETIRED_CurveData, EVR_US));
             if (element==NULL) { OFLOG_FATAL(dcmmkcrvLogger, "out of memory"); return 1; }
-            element->putUint16Array(OFstatic_cast(Uint16 *,rawData), byteLength/sizeof(Uint16));
+            element->putUint16Array(OFstatic_cast(Uint16 *,rawData), OFstatic_cast(Uint32, byteLength/sizeof(Uint16)));
             break;
           case 1: // SS
             OFLOG_INFO(dcmmkcrvLogger, "encoding curve data element as VR=SS");
             element = new DcmSignedShort(DcmTag(DCM_RETIRED_CurveData, EVR_SS));
             if (element==NULL) { OFLOG_FATAL(dcmmkcrvLogger, "out of memory"); return 1; }
-            element->putSint16Array(OFstatic_cast(Sint16 *,rawData), byteLength/sizeof(Sint16));
+            element->putSint16Array(OFstatic_cast(Sint16 *,rawData), OFstatic_cast(Uint32, byteLength/sizeof(Sint16)));
             break;
           case 2: // FL
             OFLOG_INFO(dcmmkcrvLogger, "encoding curve data element as VR=FL");
             element = new DcmFloatingPointSingle(DcmTag(DCM_RETIRED_CurveData, EVR_FL));
             if (element==NULL) { OFLOG_FATAL(dcmmkcrvLogger, "out of memory"); return 1; }
-            element->putFloat32Array(OFstatic_cast(Float32 *,rawData), byteLength/sizeof(Float32));
+            element->putFloat32Array(OFstatic_cast(Float32 *,rawData), OFstatic_cast(Uint32, byteLength/sizeof(Float32)));
             break;
           case 3: // FD
             OFLOG_INFO(dcmmkcrvLogger, "encoding curve data element as VR=FD");
             element = new DcmFloatingPointDouble(DcmTag(DCM_RETIRED_CurveData, EVR_FD));
             if (element==NULL) { OFLOG_FATAL(dcmmkcrvLogger, "out of memory"); return 1; }
-            element->putFloat64Array(OFstatic_cast(Float64 *,rawData), byteLength/sizeof(Float64));
+            element->putFloat64Array(OFstatic_cast(Float64 *,rawData), OFstatic_cast(Uint32, byteLength/sizeof(Float64)));
             break;
           case 4: // SL
             OFLOG_INFO(dcmmkcrvLogger, "encoding curve data element as VR=SL");
             element = new DcmSignedLong(DcmTag(DCM_RETIRED_CurveData, EVR_SL));
             if (element==NULL) { OFLOG_FATAL(dcmmkcrvLogger, "out of memory"); return 1; }
-            element->putSint32Array(OFstatic_cast(Sint32 *,rawData), byteLength/sizeof(Sint32));
+            element->putSint32Array(OFstatic_cast(Sint32 *,rawData), OFstatic_cast(Uint32, byteLength/sizeof(Sint32)));
             break;
           default:
             OFLOG_FATAL(dcmmkcrvLogger, "unknown data VR, bailing out");
@@ -361,12 +357,12 @@ int main(int argc, char *argv[])
       case 1: // OB
         // create little endian byte order
         OFLOG_INFO(dcmmkcrvLogger, "encoding curve data element as VR=OB");
-        swapIfNecessary(EBO_LittleEndian, gLocalByteOrder, rawData, byteLength, align);
+        swapIfNecessary(EBO_LittleEndian, gLocalByteOrder, rawData, OFstatic_cast(Uint32, byteLength), align);
         element = new DcmOtherByteOtherWord(DCM_RETIRED_CurveData);
         if (element==NULL) { OFLOG_FATAL(dcmmkcrvLogger, "out of memory"); return 1; }
         element->setGTag(OFstatic_cast(Uint16,0x5000+2*opt_group));
         element->setVR(EVR_OB);
-        element->putUint8Array(OFstatic_cast(Uint8 *,rawData), byteLength);
+        element->putUint8Array(OFstatic_cast(Uint8 *,rawData), OFstatic_cast(Uint32, byteLength));
         dataset->insert(element, OFTrue);
         break;
       case 2: // OW
@@ -374,14 +370,14 @@ int main(int argc, char *argv[])
         OFLOG_INFO(dcmmkcrvLogger, "encoding curve data element as VR=OW");
         if (align != sizeof(Uint16))
         {
-          swapIfNecessary(EBO_LittleEndian, gLocalByteOrder, rawData, byteLength, align);
-          swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, rawData, byteLength, sizeof(Uint16));
+          swapIfNecessary(EBO_LittleEndian, gLocalByteOrder, rawData, OFstatic_cast(Uint32, byteLength), align);
+          swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, rawData, OFstatic_cast(Uint32, byteLength), sizeof(Uint16));
         }
         element = new DcmOtherByteOtherWord(DCM_RETIRED_CurveData);
         if (element==NULL) { OFLOG_FATAL(dcmmkcrvLogger, "out of memory"); return 1; }
         element->setGTag(OFstatic_cast(Uint16,0x5000+2*opt_group));
         element->setVR(EVR_OW);
-        element->putUint16Array(OFstatic_cast(Uint16 *,rawData), byteLength/sizeof(Uint16));
+        element->putUint16Array(OFstatic_cast(Uint16 *,rawData), OFstatic_cast(Uint32, byteLength/sizeof(Uint16)));
         dataset->insert(element, OFTrue);
         break;
       default:
diff --git a/dcmpstat/apps/dcmmklut.cc b/dcmpstat/apps/dcmmklut.cc
index e63771b..507208b 100644
--- a/dcmpstat/apps/dcmmklut.cc
+++ b/dcmpstat/apps/dcmmklut.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2012, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,10 +25,6 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
diff --git a/dcmpstat/apps/dcmp2pgm.cc b/dcmpstat/apps/dcmp2pgm.cc
index 7eae45c..b1e5878 100644
--- a/dcmpstat/apps/dcmp2pgm.cc
+++ b/dcmpstat/apps/dcmp2pgm.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2012, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,10 +26,6 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmpstat/dviface.h"
 #include "dcmtk/dcmpstat/dvpstx.h"    /* for DVPSTextObject */
diff --git a/dcmpstat/apps/dcmprscp.cc b/dcmpstat/apps/dcmprscp.cc
index c2eda42..2013adf 100644
--- a/dcmpstat/apps/dcmprscp.cc
+++ b/dcmpstat/apps/dcmprscp.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2014, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -21,10 +21,6 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 BEGIN_EXTERN_C
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>       /* for O_RDONLY */
@@ -108,18 +104,7 @@ static void cleanChildren()
 
 int main(int argc, char *argv[])
 {
-
-#ifdef HAVE_GUSI_H
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-    WSAData winSockData;
-    /* we need at least version 1.1 */
-    WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-    WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+    OFStandard::initializeNetwork();
 
     dcmDisableGethostbyaddr.set(OFTrue);  // disable hostname lookup
 
@@ -246,11 +231,11 @@ int main(int argc, char *argv[])
       OFString logfilename = logfileprefix;
       logfilename += ".log";
 
-      OFauto_ptr<dcmtk::log4cplus::Layout> layout(new dcmtk::log4cplus::PatternLayout(pattern));
+      OFunique_ptr<dcmtk::log4cplus::Layout> layout(new dcmtk::log4cplus::PatternLayout(pattern));
       dcmtk::log4cplus::SharedAppenderPtr logfile(new dcmtk::log4cplus::FileAppender(logfilename));
       dcmtk::log4cplus::Logger log = dcmtk::log4cplus::Logger::getRoot();
 
-      logfile->setLayout(layout);
+      logfile->setLayout(OFmove(layout));
       log.removeAllAppenders();
       log.addAppender(logfile);
     }
@@ -515,9 +500,7 @@ int main(int argc, char *argv[])
     } // finished
     cleanChildren();
 
-#ifdef HAVE_WINSOCK_H
-    WSACleanup();
-#endif
+    OFStandard::shutdownNetwork();
 
 #ifdef DEBUG
     dcmDataDict.clear();  /* useful for debugging with dmalloc */
diff --git a/dcmpstat/apps/dcmprscu.cc b/dcmpstat/apps/dcmprscu.cc
index bccc9ef..1393610 100644
--- a/dcmpstat/apps/dcmprscu.cc
+++ b/dcmpstat/apps/dcmprscu.cc
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 1999-2014, OFFIS e.V.
+ *  Copyright (C) 1999-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -19,11 +19,8 @@
  */
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
-#include "dcmtk/dcmnet/dcompat.h"     /* compatibility code, needs to be included before dirent.h */
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
+#include "dcmtk/dcmnet/dcompat.h"     /* compatibility code, needs to be included before dirent.h */
 
 #define INCLUDE_CCTYPE
 #include "dcmtk/ofstd/ofstdinc.h"
@@ -619,18 +616,7 @@ static OFCondition updateJobList(
 
 int main(int argc, char *argv[])
 {
-
-#ifdef HAVE_GUSI_H
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-    WSAData winSockData;
-    /* we need at least version 1.1 */
-    WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-    WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+    OFStandard::initializeNetwork();
 
     OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION , "Print spooler for presentation state viewer", rcsid);
     OFCommandLine cmd;
@@ -1139,9 +1125,7 @@ int main(int argc, char *argv[])
   delete tLayer;
 #endif
 
-#ifdef HAVE_WINSOCK_H
-    WSACleanup();
-#endif
+  OFStandard::shutdownNetwork();
 
 #ifdef DEBUG
     dcmDataDict.clear();  /* useful for debugging with dmalloc */
diff --git a/dcmpstat/apps/dcmpschk.cc b/dcmpstat/apps/dcmpschk.cc
index d69a63b..ff4af5b 100644
--- a/dcmpstat/apps/dcmpschk.cc
+++ b/dcmpstat/apps/dcmpschk.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2012, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,15 +25,6 @@
 #define INCLUDE_CSTDLIB
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>                   /* this includes either winsock.h or winsock2.h */
-#endif
-
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>                      /* needed for Macintosh */
-#include <SIOUX.h>
-#endif
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofstring.h"      /* for class OFString */
 #include "dcmtk/ofstd/ofconapp.h"      /* for OFConsoleApplication */
@@ -219,7 +210,7 @@ static int splitFields(
 {
     char* p;
     Uint32 foundFields = 0;
-    int len;
+    size_t len;
 
     do {
         p = strchr(line, splitChar);
@@ -345,7 +336,7 @@ static int checkelem(
                }
                for (i=0; (Uint32)i<vm; i++) {
                    char* s = fields[i];
-                   int slen = strlen(s);
+                   size_t slen = strlen(s);
                    if ((Uint32)slen > vr.getMaxValueLength()) {
                        OFLOG_WARN(dcmpschkLogger, MSG_lengthtoolarge << OFendl
                            << "   Affected length   : " << slen << " bytes, should be "
@@ -930,11 +921,7 @@ static int checkfile(const char *filename)
 
 int main(int argc, char *argv[])
 {
-
-#ifdef HAVE_GUSI_H
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
+    OFStandard::initializeNetwork();
 
 #ifdef WITH_TCPWRAPPER
     // this code makes sure that the linker cannot optimize away
@@ -943,13 +930,6 @@ int main(int argc, char *argv[])
     dcmTCPWrapperDaemonName.set(NULL);
 #endif
 
-#ifdef HAVE_WINSOCK_H
-    WSAData winSockData;
-    /* we need at least version 1.1 */
-    WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-    WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
-
     OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION , "Checking tool for presentation states", rcsid);
     OFCommandLine cmd;
     cmd.setOptionColumns(LONGCOL, SHORTCOL);
diff --git a/dcmpstat/apps/dcmpsmk.cc b/dcmpstat/apps/dcmpsmk.cc
index 8a0499c..064efb3 100644
--- a/dcmpstat/apps/dcmpsmk.cc
+++ b/dcmpstat/apps/dcmpsmk.cc
@@ -29,10 +29,6 @@
 #define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/ofstd/ofconapp.h"
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
@@ -60,11 +56,6 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"
 int main(int argc, char *argv[])
 {
 
-#ifdef HAVE_GUSI_H
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
-
 #ifdef WITH_TCPWRAPPER
     // this code makes sure that the linker cannot optimize away
     // the DUL part of the network module where the external flags
diff --git a/dcmpstat/apps/dcmpsprt.cc b/dcmpstat/apps/dcmpsprt.cc
index 850fde2..5b7a3a4 100644
--- a/dcmpstat/apps/dcmpsprt.cc
+++ b/dcmpstat/apps/dcmpsprt.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2012, OFFIS e.V.
+ *  Copyright (C) 1999-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -29,10 +29,6 @@
 #define INCLUDE_CCTYPE
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmpstat/dviface.h"
 #include "dcmtk/dcmpstat/dvpssp.h"
diff --git a/dcmpstat/apps/dcmpsrcv.cc b/dcmpstat/apps/dcmpsrcv.cc
index ad558df..64d8c46 100644
--- a/dcmpstat/apps/dcmpsrcv.cc
+++ b/dcmpstat/apps/dcmpsrcv.cc
@@ -21,10 +21,6 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 BEGIN_EXTERN_C
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>       /* for O_RDONLY */
@@ -457,6 +453,9 @@ storeProgressCallback(
         {
           OFLOG_ERROR(dcmpsrcvLogger, "Cannot write image file: " << context->fileName);
           rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources;
+
+          // delete incomplete file
+          OFStandard::deleteFile(context->fileName);
         }
       }
       saveImageToDB(context, req, context->fileName, rsp, statusDetail);
@@ -568,7 +567,7 @@ static OFCondition storeSCP(
         if (strcpy(imageFileName, NULL_DEVICE_NAME) != 0)
         {
           OFLOG_INFO(dcmpsrcvLogger, "Store SCP: Deleting Image File: " << imageFileName);
-          unlink(imageFileName);
+          OFStandard::deleteFile(imageFileName);
         }
         if (dbhandle) dbhandle->pruneInvalidRecords();
     }
@@ -722,7 +721,6 @@ static void terminateAllReceivers(DVConfiguration& dvi)
   OFBool recUseTLS=OFFalse;
   T_ASC_Network *net=NULL;
   T_ASC_Parameters *params=NULL;
-  DIC_NODENAME localHost;
   DIC_NODENAME peerHost;
   T_ASC_Association *assoc=NULL;
   OFBool prepared = OFTrue;
@@ -838,9 +836,8 @@ static void terminateAllReceivers(DVConfiguration& dvi)
       {
         ASC_setTransportLayerType(params, recUseTLS);
         ASC_setAPTitles(params, dvi.getNetworkAETitle(), recAETitle, NULL);
-        gethostname(localHost, sizeof(localHost) - 1);
         sprintf(peerHost, "%s:%d", "localhost", (int)recPort);
-        ASC_setPresentationAddresses(params, localHost, peerHost);
+        ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), peerHost);
         // we propose only the "shutdown" SOP class in implicit VR
         ASC_addPresentationContext(params, 1, UID_PrivateShutdownSOPClass, &xfer, 1);
         // request shutdown association, abort if some strange peer accepts it
@@ -852,9 +849,7 @@ static void terminateAllReceivers(DVConfiguration& dvi)
   } /* for loop */
 
   ASC_dropNetwork(&net);
-#ifdef HAVE_WINSOCK_H
-  WSACleanup();
-#endif
+  OFStandard::shutdownNetwork();
   return;
 }
 
@@ -866,18 +861,7 @@ static void terminateAllReceivers(DVConfiguration& dvi)
 
 int main(int argc, char *argv[])
 {
-
-#ifdef HAVE_GUSI_H
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-    WSAData winSockData;
-    /* we need at least version 1.1 */
-    WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-    WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+    OFStandard::initializeNetwork();
 
     int         opt_terminate = 0;         /* default: no terminate mode */
     const char *opt_cfgName   = NULL;      /* config file name */
@@ -1438,9 +1422,7 @@ int main(int argc, char *argv[])
       delete messageClient;
     }
 
-#ifdef HAVE_WINSOCK_H
-    WSACleanup();
-#endif
+    OFStandard::shutdownNetwork();
 
 #ifdef WITH_OPENSSL
     if (tLayer)
diff --git a/dcmpstat/apps/dcmpssnd.cc b/dcmpstat/apps/dcmpssnd.cc
index e944056..94b835a 100644
--- a/dcmpstat/apps/dcmpssnd.cc
+++ b/dcmpstat/apps/dcmpssnd.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2014, OFFIS e.V.
+ *  Copyright (C) 1999-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -21,10 +21,6 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 BEGIN_EXTERN_C
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>       /* for O_RDONLY */
@@ -324,18 +320,9 @@ static OFCondition addAllStoragePresentationContexts(T_ASC_Parameters *params, i
 
 int main(int argc, char *argv[])
 {
-    OFString temp_str;
-#ifdef HAVE_GUSI_H
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
+    OFStandard::initializeNetwork();
 
-#ifdef HAVE_WINSOCK_H
-    WSAData winSockData;
-    /* we need at least version 1.1 */
-    WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-    WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+    OFString temp_str;
 
     const char *opt_cfgName     = NULL;                /* config file name */
     const char *opt_target      = NULL;                /* send target name */
@@ -690,7 +677,6 @@ int main(int argc, char *argv[])
     /* open network connection */
     T_ASC_Network *net=NULL;
     T_ASC_Parameters *params=NULL;
-    DIC_NODENAME localHost;
     DIC_NODENAME peerHost;
     T_ASC_Association *assoc=NULL;
 
@@ -729,9 +715,8 @@ int main(int argc, char *argv[])
 
     ASC_setAPTitles(params, dvi.getNetworkAETitle(), targetAETitle, NULL);
 
-    gethostname(localHost, sizeof(localHost) - 1);
     sprintf(peerHost, "%s:%d", targetHostname, (int)targetPort);
-    ASC_setPresentationAddresses(params, localHost, peerHost);
+    ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), peerHost);
 
     cond = addAllStoragePresentationContexts(params, targetImplicitOnly);
     if (cond.bad())
@@ -948,9 +933,7 @@ int main(int argc, char *argv[])
       delete messageClient;
     }
 
-#ifdef HAVE_WINSOCK_H
-    WSACleanup();
-#endif
+    OFStandard::shutdownNetwork();
 
 #ifdef WITH_OPENSSL
     if (tLayer)
diff --git a/dcmpstat/data/CMakeLists.txt b/dcmpstat/data/CMakeLists.txt
index d256b9a..ea0e4aa 100644
--- a/dcmpstat/data/CMakeLists.txt
+++ b/dcmpstat/data/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(FILES philips.lut DESTINATION ${DCMTK_INSTALL_DATDIR} COMPONENT data)
+INSTALL(FILES philips.lut DESTINATION "${DCMTK_INSTALL_DATDIR}" COMPONENT data)
diff --git a/dcmpstat/docs/dcmmkcrv.man b/dcmpstat/docs/dcmmkcrv.man
index 421d45c..0d0c7e8 100644
--- a/dcmpstat/docs/dcmmkcrv.man
+++ b/dcmpstat/docs/dcmmkcrv.man
@@ -6,13 +6,13 @@
 \page dcmmkcrv dcmmkcrv: Add 2D curve data to image
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmmkcrv_synopsis SYNOPSIS
 
 \verbatim
 dcmmkcrv [options] dcmfile-in curvedata-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmmkcrv_description DESCRIPTION
 
 The \b dcmmkcrv utility allows one to create DICOM images containing curve data.
 Since curve data is hardly used by vendors today, this is intended as a
@@ -24,7 +24,7 @@ written back to file.  The output file is encoded with the same transfer
 syntax used for the input file.  This utility only supports the creation of
 two-dimensional curves.
 
-\section parameters PARAMETERS
+\section dcmmkcrv_parameters PARAMETERS
 
 \verbatim
 dcmfile-in    DICOM input image file
@@ -34,9 +34,9 @@ curvedata-in  curve data input file (text)
 dcmfile-out   DICOM output filename
 \endverbatim
 
-\section options OPTIONS
+\section dcmmkcrv_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmmkcrv_general_options general options
 
 \verbatim
   -h   --help
@@ -65,7 +65,7 @@ dcmfile-out   DICOM output filename
          use config file f for the logger
 \endverbatim
 
-\subsection curve_creation_options curve creation options
+\subsection dcmmkcrv_curve_creation_options curve creation options
 
 \verbatim
 curve type:
@@ -102,9 +102,9 @@ curve description:
         set Axis Units to x\y (default: absent)
 \endverbatim
 
-\section notes NOTES
+\section dcmmkcrv_notes NOTES
 
-\subsection syntax_data_file Syntax of the Curve Data File
+\subsection dcmmkcrv_syntax_data_file Syntax of the Curve Data File
 
 The curve data file is expected to be a plain ASCII text file containing
 numbers (integer or floating point) comprising the values of the point
@@ -119,7 +119,7 @@ value range or value range conversion is performed.  Example:
  256.451947    1.000000
 \endverbatim
 
-\section logging LOGGING
+\section dcmmkcrv_logging 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
@@ -138,7 +138,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmmkcrv_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -160,7 +160,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmmkcrv_environment ENVIRONMENT
 
 The \b dcmmkcrv utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -176,7 +176,7 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section copyright COPYRIGHT
+\section dcmmkcrv_copyright COPYRIGHT
 
 Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmpstat/docs/dcmmklut.man b/dcmpstat/docs/dcmmklut.man
index 03d3be2..fa7ab22 100644
--- a/dcmpstat/docs/dcmmklut.man
+++ b/dcmpstat/docs/dcmmklut.man
@@ -6,13 +6,13 @@
 \page dcmmklut dcmmklut: Create DICOM look-up tables
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmmklut_synopsis SYNOPSIS
 
 \verbatim
 dcmmklut [options] dcmimg-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmmklut_description DESCRIPTION
 
 The \b dcmmklut utility allows one to create a variety of DICOM Modality,
 Presentation and VOI look-up tables (LUT) and is intended for the creation
@@ -36,15 +36,15 @@ 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).
 
-\section parameters PARAMETERS
+\section dcmmklut_parameters PARAMETERS
 
 \verbatim
 dcmimg-out  DICOM output filename
 \endverbatim
 
-\section options OPTIONS
+\section dcmmklut_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmmklut_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -72,7 +72,7 @@ dcmimg-out  DICOM output filename
          use config file f for the logger
 \endverbatim
 
-\subsection lut_creation_options LUT creation options
+\subsection dcmmklut_lut_creation_options LUT creation options
 \verbatim
 LUT type:
 
@@ -170,7 +170,7 @@ LUT data VR:
          write LUT Data as SS (minimal support)
 \endverbatim
 
-\subsection file_options file options
+\subsection dcmmklut_file_options file options
 \verbatim
   +Fi  --dicom-input  [f]ilename: string
          read dataset from DICOM file f
@@ -179,13 +179,13 @@ LUT data VR:
          write LUT data to tabbed text file f
 \endverbatim
 
-\section notes NOTES
+\section dcmmklut_notes 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.
 
-\section logging LOGGING
+\section dcmmklut_logging 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
@@ -204,7 +204,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmmklut_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -226,7 +226,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmmklut_environment ENVIRONMENT
 
 The \b dcmmklut utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -242,11 +242,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dcmmklut_files FILES
 
 <em>\<datadir\>/philips.lut</em> - sample LUT in text format
 
-\section copyright COPYRIGHT
+\section dcmmklut_copyright COPYRIGHT
 
 Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmpstat/docs/dcmp2pgm.man b/dcmpstat/docs/dcmp2pgm.man
index 36f1a77..8254ac3 100644
--- a/dcmpstat/docs/dcmp2pgm.man
+++ b/dcmpstat/docs/dcmp2pgm.man
@@ -6,13 +6,13 @@
 \page dcmp2pgm dcmp2pgm: Read DICOM image and presentation state and render bitmap
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmp2pgm_synopsis SYNOPSIS
 
 \verbatim
 dcmp2pgm [options] dcmimage-in [bitmap-out]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmp2pgm_description DESCRIPTION
 
 The \b dcmp2pgm utility renders a monochrome DICOM image under the control of
 a grayscale softcopy presentation state object into a monochrome bitmap
@@ -26,7 +26,7 @@ gray scale range according to Barten's model (DICOM part 14) can be
 performed if the characteristic curve of the display system is available
 and defined in the configuration file.
 
-\section parameters PARAMETERS
+\section dcmp2pgm_parameters PARAMETERS
 
 \verbatim
 dcmimage-in  input DICOM image
@@ -34,9 +34,9 @@ dcmimage-in  input DICOM image
 bitmap-out   output DICOM image or PGM bitmap
 \endverbatim
 
-\section options OPTIONS
+\section dcmp2pgm_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmp2pgm_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -64,7 +64,7 @@ bitmap-out   output DICOM image or PGM bitmap
          use config file f for the logger
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcmp2pgm_processing_options processing options
 \verbatim
   -p   --pstate  [f]ilename: string
          process using presentation state file
@@ -76,7 +76,7 @@ bitmap-out   output DICOM image or PGM bitmap
          process using image frame f (default: 1)
 \endverbatim
 
-\subsection output_format output format
+\subsection dcmp2pgm_output_format output format
 \verbatim
   -D   --pgm
          save image as PGM (default)
@@ -85,15 +85,15 @@ bitmap-out   output DICOM image or PGM bitmap
          save image as DICOM secondary capture
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmp2pgm_output_options output options
 \verbatim
   +S   --save-pstate  [f]ilename: string
          save presentation state to file
 \endverbatim
 
-\section notes NOTES
+\section dcmp2pgm_notes NOTES
 
-\subsection limitations Limitations
+\subsection dcmp2pgm_limitations Limitations
 
 Please note that the \b dcmp2pgm tool does not render all aspects that are
 defined by the Grayscale Softcopy Presentation State (GSPS) object but only
@@ -107,7 +107,7 @@ Also concepts that were introduced after the initial definition of the GSPS
 IOD (see Supplement 33) are ignored.  This includes Supplement 120 with its
 extended features like e.g. Compound Graphics.
 
-\section logging LOGGING
+\section dcmp2pgm_logging 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
@@ -126,7 +126,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmp2pgm_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -148,7 +148,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmp2pgm_environment ENVIRONMENT
 
 The \b dcmp2pgm utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -164,11 +164,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dcmp2pgm_files FILES
 
 <em>\<etcdir\>/dcmpstat.cfg</em> - sample configuration file
 
-\section copyright COPYRIGHT
+\section dcmp2pgm_copyright COPYRIGHT
 
 Copyright (C) 1998-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmpstat/docs/dcmprscp.man b/dcmpstat/docs/dcmprscp.man
index f17c154..da6262a 100644
--- a/dcmpstat/docs/dcmprscp.man
+++ b/dcmpstat/docs/dcmprscp.man
@@ -6,13 +6,13 @@
 \page dcmprscp dcmprscp: DICOM basic grayscale print management SCP
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmprscp_synopsis SYNOPSIS
 
 \verbatim
 dcmprscp [options]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmprscp_description DESCRIPTION
 
 The \b dcmprscp utility implements the DICOM Basic Grayscale Print Management
 Service Class as SCP. It also supports the optional Presentation LUT SOP
@@ -26,9 +26,9 @@ to load a Stored Print object created by \b dcmprscp and to render a screen
 preview of the hardcopy.  The \b dcmprscp utility reads the characteristics of
 the printer to be emulated from the configuration file.
 
-\section options OPTIONS
+\section dcmprscp_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmprscp_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -62,7 +62,7 @@ the printer to be emulated from the configuration file.
          # compatibility only
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcmprscp_processing_options processing options
 \verbatim
   -c  --config  [f]ilename: string
         process using settings from configuration file
@@ -74,7 +74,7 @@ the printer to be emulated from the configuration file.
         dump all DIMSE messages
 \endverbatim
 
-\section logging LOGGING
+\section dcmprscp_logging 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
@@ -93,7 +93,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmprscp_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -115,7 +115,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmprscp_environment ENVIRONMENT
 
 The \b dcmprscp utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -131,15 +131,15 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dcmprscp_files FILES
 
 <em>\<etcdir\>/dcmpstat.cfg</em>, <em>\<etcdir\>/printers.cfg</em> - sample configuration files
 
-\section see_also SEE ALSO
+\section dcmprscp_see_also SEE ALSO
 
 <b>dcmprscu</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmprscp_copyright COPYRIGHT
 
 Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmpstat/docs/dcmprscu.man b/dcmpstat/docs/dcmprscu.man
index 09b3038..7fa53e9 100644
--- a/dcmpstat/docs/dcmprscu.man
+++ b/dcmpstat/docs/dcmprscu.man
@@ -6,13 +6,13 @@
 \page dcmprscu dcmprscu: Print spooler for presentation state viewer
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmprscu_synopsis SYNOPSIS
 
 \verbatim
 dcmprscu [options] [dcmfile-in...]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmprscu_description DESCRIPTION
 
 The \b dcmprscu utility implements the DICOM Basic Grayscale Print Management
 Service Class as SCU.  It also supports the optional Basic Annotation Box
@@ -38,15 +38,15 @@ The \b dcmprscu utility can be run either in "printer mode", in which case
 the file name of a Stored Print object must be passed, or in "spool mode",
 in which case commands are read periodically from a spool directory.
 
-\section parameters PARAMETERS
+\section dcmprscu_parameters PARAMETERS
 
 \verbatim
 dcmfile-in  stored print file(s) to be spooled
 \endverbatim
 
-\section options OPTIONS
+\section dcmprscu_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmprscu_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -74,7 +74,7 @@ dcmfile-in  stored print file(s) to be spooled
          use config file f for the logger
 \endverbatim
 
-\subsection print_options print options
+\subsection dcmprscu_print_options print options
 \verbatim
        --noprint
          do not create print-out (no n-action-rq)
@@ -86,7 +86,7 @@ dcmfile-in  stored print file(s) to be spooled
          transmit basic grayscale images in MONOCHROME1
 \endverbatim
 
-\subsection mode_options mode options
+\subsection dcmprscu_mode_options mode options
 \verbatim
   +p   --print
          printer mode, print file(s) and terminate (default)
@@ -95,7 +95,7 @@ dcmfile-in  stored print file(s) to be spooled
          spooler mode, use job prefix n
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcmprscu_processing_options processing options
 \verbatim
   -c   --config  [f]ilename: string
          process using settings from configuration file
@@ -107,13 +107,13 @@ dcmfile-in  stored print file(s) to be spooled
          dump all DIMSE messages
 \endverbatim
 
-\subsection spooler_options spooler options (only with --spool)
+\subsection dcmprscu_spooler_options spooler options (only with --spool)
 \verbatim
        --sleep  [d]elay: integer (default: 1)
          sleep d seconds between spooler checks
 \endverbatim
 
-\subsection film_session_options basic film session options (not with --spool):
+\subsection dcmprscu_film_session_options basic film session options (not with --spool):
 \verbatim
        --copies  [v]alue: integer (1..100, default: 1)
          set number of copies to v
@@ -134,7 +134,7 @@ dcmfile-in  stored print file(s) to be spooled
          set film session owner ID to v
 \endverbatim
 
-\section logging LOGGING
+\section dcmprscu_logging 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
@@ -153,7 +153,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmprscu_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -175,7 +175,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmprscu_environment ENVIRONMENT
 
 The \b dcmprscu utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -191,15 +191,15 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dcmprscu_files FILES
 
 <em>\<etcdir\>/dcmpstat.cfg</em>, <em>\<etcdir\>/printers.cfg</em> - sample configuration files
 
-\section see_also SEE ALSO
+\section dcmprscu_see_also SEE ALSO
 
 <b>dcmprscp</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmprscu_copyright COPYRIGHT
 
 Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmpstat/docs/dcmpschk.man b/dcmpstat/docs/dcmpschk.man
index b8fdd26..a060142 100644
--- a/dcmpstat/docs/dcmpschk.man
+++ b/dcmpstat/docs/dcmpschk.man
@@ -6,13 +6,13 @@
 \page dcmpschk dcmpschk: Checking tool for presentation states
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmpschk_synopsis SYNOPSIS
 
 \verbatim
 dcmpschk [options] [dcmfile-in...]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmpschk_description DESCRIPTION
 
 The \b dcmpschk utility checks DICOM Grayscale Softcopy Presentation State
 objects for conformance with the standard.  The test is performed in three
@@ -37,15 +37,15 @@ phases:
     which contain the Mask Module.  These will be rejected with a message
     that the Mask Module is not supported.
 
-\section parameters PARAMETERS
+\section dcmpschk_parameters PARAMETERS
 
 \verbatim
 dcmfile-in  presentation state file(s) to be checked
 \endverbatim
 
-\section options OPTIONS
+\section dcmpschk_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmpschk_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -73,7 +73,7 @@ dcmfile-in  presentation state file(s) to be checked
          use config file f for the logger
 \endverbatim
 
-\section logging LOGGING
+\section dcmpschk_logging 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
@@ -92,7 +92,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmpschk_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -114,7 +114,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmpschk_environment ENVIRONMENT
 
 The \b dcmpschk utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -130,7 +130,7 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section copyright COPYRIGHT
+\section dcmpschk_copyright COPYRIGHT
 
 Copyright (C) 2000-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmpstat/docs/dcmpsmk.man b/dcmpstat/docs/dcmpsmk.man
index c6cf584..58ff17a 100644
--- a/dcmpstat/docs/dcmpsmk.man
+++ b/dcmpstat/docs/dcmpsmk.man
@@ -6,13 +6,13 @@
 \page dcmpsmk dcmpsmk: Create DICOM grayscale softcopy presentation state
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmpsmk_synopsis SYNOPSIS
 
 \verbatim
 dcmpsmk [options] dcmfile-in dcmfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmpsmk_description DESCRIPTION
 
 The \b dcmpsmk utility reads a DICOM image file and creates a grayscale
 softcopy presentation state object according to Supplement 33.  The
@@ -23,7 +23,7 @@ The newly created presentation state references the source image and
 contains values that should allow for a "reasonable" display of the image
 when rendered under control of the presentation state.
 
-\section parameters PARAMETERS
+\section dcmpsmk_parameters PARAMETERS
 
 \verbatim
 dcmfile-in   DICOM image file(s) to be read
@@ -31,9 +31,9 @@ dcmfile-in   DICOM image file(s) to be read
 dcmfile-out  DICOM presentation state file to be created
 \endverbatim
 
-\section options OPTIONS
+\section dcmpsmk_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmpsmk_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -61,7 +61,7 @@ dcmfile-out  DICOM presentation state file to be created
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input optons
+\subsection dcmpsmk_input_options input optons
 \verbatim
 input file format:
 
@@ -92,7 +92,7 @@ input transfer syntax:
          read with implicit VR little endian TS
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcmpsmk_processing_options processing options
 \verbatim
 VOI transform handling:
 
@@ -163,7 +163,7 @@ location of referenced image:
          image located on storage medium
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmpsmk_output_options output options
 \verbatim
 output transfer syntax:
 
@@ -180,13 +180,13 @@ output transfer syntax:
           write with implicit VR little endian TS
 \endverbatim
 
-\section notes NOTES
+\section dcmpsmk_notes NOTES
 
 If more than one input file (\e dcmfile-in) is specified, the additional image
 files are only referenced from the created presentation state file, but no
 further (e.g. display-related) information is taken over.
 
-\section logging LOGGING
+\section dcmpsmk_logging 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
@@ -205,7 +205,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmpsmk_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -227,7 +227,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmpsmk_environment ENVIRONMENT
 
 The \b dcmpsmk utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -243,7 +243,7 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section copyright COPYRIGHT
+\section dcmpsmk_copyright COPYRIGHT
 
 Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmpstat/docs/dcmpsprt.man b/dcmpstat/docs/dcmpsprt.man
index ab40f9f..7e4d2bd 100644
--- a/dcmpstat/docs/dcmpsprt.man
+++ b/dcmpstat/docs/dcmpsprt.man
@@ -6,13 +6,13 @@
 \page dcmpsprt dcmpsprt: Read DICOM images and presentation states and render print job
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmpsprt_synopsis SYNOPSIS
 
 \verbatim
 dcmpsprt [options] dcmfile-in...
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmpsprt_description DESCRIPTION
 
 The \b dcmpsprt utility reads one or more DICOM images and presentation states
 and creates a print job.  The print job consists of one Stored Print object
@@ -21,15 +21,15 @@ specified in the configuration file.  The print job can optionally be spooled
 to the printer.  In this case, \b dcmpsprt calls the \b dcmprscu application
 which performs communication with the printer.
 
-\section parameters PARAMETERS
+\section dcmpsprt_parameters PARAMETERS
 
 \verbatim
 dcmfile-in  DICOM image file(s) to be printed
 \endverbatim
 
-\section options OPTIONS
+\section dcmpsprt_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmpsprt_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -57,7 +57,7 @@ dcmfile-in  DICOM image file(s) to be printed
          use config file f for the logger
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dcmpsprt_processing_options processing options
 \verbatim
   +p   --pstate  [p]state file: string
          render the following image with presentation state p
@@ -70,7 +70,7 @@ dcmfile-in  DICOM image file(s) to be printed
          select printer with identifier n from cfg file
 \endverbatim
 
-\subsection spooling_options spooling options
+\subsection dcmpsprt_spooling_options spooling options
 \verbatim
   -s   --spool
          spool print job to DICOM printer
@@ -79,7 +79,7 @@ dcmfile-in  DICOM image file(s) to be printed
          do not spool print job to DICOM printer (default)
 \endverbatim
 
-\subsection film_orientation_options film orientation options
+\subsection dcmpsprt_film_orientation_options film orientation options
 \verbatim
        --portrait
          set portrait orientation
@@ -91,7 +91,7 @@ dcmfile-in  DICOM image file(s) to be printed
          use printer default (default)
 \endverbatim
 
-\subsection trim_border_options trim (border) options
+\subsection dcmpsprt_trim_border_options trim (border) options
 \verbatim
        --trim
          set trim on
@@ -103,7 +103,7 @@ dcmfile-in  DICOM image file(s) to be printed
          use printer default (default)
 \endverbatim
 
-\subsection behavior_options requested decimate/crop behavior options
+\subsection dcmpsprt_behavior_options requested decimate/crop behavior options
 \verbatim
        --request-decimate
          request decimate
@@ -118,7 +118,7 @@ dcmfile-in  DICOM image file(s) to be printed
          use printer default (default)
 \endverbatim
 
-\subsection print_presentation_LUT_options print presentation LUT options
+\subsection dcmpsprt_print_presentation_LUT_options print presentation LUT options
 \verbatim
        --default-plut
          do not create presentation LUT (default)
@@ -140,7 +140,7 @@ dcmfile-in  DICOM image file(s) to be printed
          set reflected ambient light to v (in cd/m^2)
 \endverbatim
 
-\subsection film_options basic film session options (only with --spool)
+\subsection dcmpsprt_film_options basic film session options (only with --spool)
 \verbatim
        --copies  [v]alue: integer (1..100, default: 1)
          set number of copies to v
@@ -161,7 +161,7 @@ dcmfile-in  DICOM image file(s) to be printed
          set film session owner ID to v
 \endverbatim
 
-\subsection annotation_options annotation options
+\subsection dcmpsprt_annotation_options annotation options
 \verbatim
        --no-annotation
          do not create annotation (default)
@@ -188,7 +188,7 @@ dcmfile-in  DICOM image file(s) to be printed
          do not prepend illumination to annotation
 \endverbatim
 
-\subsection overlay_options overlay options
+\subsection dcmpsprt_overlay_options overlay options
 \verbatim
   +O   --overlay  [f]ilename: string, [x] [y]: integer
          load overlay data from PBM file f and display at position (x,y)
@@ -197,7 +197,7 @@ dcmfile-in  DICOM image file(s) to be printed
          use overlay gray level v (default: 4095 = white)
 \endverbatim
 
-\subsection other_print_options other print options
+\subsection dcmpsprt_other_print_options other print options
 \verbatim
   -l   --layout  [c]olumns [r]ows: integer (default: 1 1)
          use 'STANDARD\c,r' image display format
@@ -245,7 +245,7 @@ dcmfile-in  DICOM image file(s) to be printed
          set image box configuration information to v
 \endverbatim
 
-\section logging LOGGING
+\section dcmpsprt_logging 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
@@ -264,7 +264,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmpsprt_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -286,7 +286,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmpsprt_environment ENVIRONMENT
 
 The \b dcmpsprt utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -302,15 +302,15 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dcmpsprt_files FILES
 
 <em>\<etcdir\>/dcmpstat.cfg</em>, <em>\<etcdir\>/printers.cfg</em> - sample configuration files
 
-\section see_also SEE ALSO
+\section dcmpsprt_see_also SEE ALSO
 
 <b>dcmprscu</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmpsprt_copyright COPYRIGHT
 
 Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmpstat/docs/dcmpsrcv.man b/dcmpstat/docs/dcmpsrcv.man
index 1cf03d2..de92865 100644
--- a/dcmpstat/docs/dcmpsrcv.man
+++ b/dcmpstat/docs/dcmpsrcv.man
@@ -6,13 +6,13 @@
 \page dcmpsrcv dcmpsrcv: Network receive for presentation state viewer
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmpsrcv_synopsis SYNOPSIS
 
 \verbatim
 dcmpsrcv [options] config-file
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmpsrcv_description DESCRIPTION
 
 The \b dcmpsrcv application is invoked by the Grayscale Softcopy Presentation
 State Viewer and is not intended to be invoked manually.  The application
@@ -24,15 +24,15 @@ as the \b storescp utility as SCP, but does not support encapsulated transfer
 syntaxes.  Incoming images are stored in the common viewer database.  See the
 full conformance statement for further details.
 
-\section parameters PARAMETERS
+\section dcmpsrcv_parameters PARAMETERS
 
 \verbatim
 config-file  configuration file to be read
 \endverbatim
 
-\section options OPTIONS
+\section dcmpsrcv_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmpsrcv_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -63,7 +63,7 @@ config-file  configuration file to be read
          terminate all running receivers
 \endverbatim
 
-\section logging LOGGING
+\section dcmpsrcv_logging 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
@@ -82,7 +82,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmpsrcv_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -104,7 +104,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmpsrcv_environment ENVIRONMENT
 
 The \b dcmpsrcv utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -120,15 +120,15 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dcmpsrcv_files FILES
 
 <em>\<etcdir\>/dcmpstat.cfg</em> - sample configuration file
 
-\section see_also SEE ALSO
+\section dcmpsrcv_see_also SEE ALSO
 
 <b>dcmpssnd</b>(1), <b>storescp</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmpsrcv_copyright COPYRIGHT
 
 Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmpstat/docs/dcmpssnd.man b/dcmpstat/docs/dcmpssnd.man
index fd6d648..fc64ba6 100644
--- a/dcmpstat/docs/dcmpssnd.man
+++ b/dcmpstat/docs/dcmpssnd.man
@@ -6,13 +6,13 @@
 \page dcmpssnd dcmpssnd: Network send for presentation state viewer
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmpssnd_synopsis SYNOPSIS
 
 \verbatim
 dcmpssnd [options] config-file target study [series] [instance]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmpssnd_description DESCRIPTION
 
 The \b dcmpssnd application is invoked by the Grayscale Softcopy Presentation
 State Viewer and is not intended to be invoked manually.  The application
@@ -27,7 +27,7 @@ but does not support encapsulated transfer syntaxes.  See the full
 conformance statement for further details.
 
 
-\section parameters PARAMETERS
+\section dcmpssnd_parameters PARAMETERS
 
 \verbatim
 config-file  configuration file to be read
@@ -41,9 +41,9 @@ series       series instance UID (default: send complete study)
 instance     SOP instance UID (default: send complete series)
 \endverbatim
 
-\section options OPTIONS
+\section dcmpssnd_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmpssnd_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -71,7 +71,7 @@ instance     SOP instance UID (default: send complete series)
          use config file f for the logger
 \endverbatim
 
-\section logging LOGGING
+\section dcmpssnd_logging 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
@@ -90,7 +90,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmpssnd_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -112,7 +112,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmpssnd_environment ENVIRONMENT
 
 The \b dcmpssnd utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -128,15 +128,15 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dcmpssnd_files FILES
 
 <em>\<etcdir\>/dcmpstat.cfg</em> - sample configuration file
 
-\section see_also SEE ALSO
+\section dcmpssnd_see_also SEE ALSO
 
 <b>dcmpsrcv</b>(1), <b>storescu</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmpssnd_copyright COPYRIGHT
 
 Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmpstat/etc/CMakeLists.txt b/dcmpstat/etc/CMakeLists.txt
index 1326a1e..abbf5c1 100644
--- a/dcmpstat/etc/CMakeLists.txt
+++ b/dcmpstat/etc/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(FILES dcmpstat.cfg printers.cfg DESTINATION ${DCMTK_INSTALL_ETCDIR} COMPONENT etc)
+INSTALL(FILES dcmpstat.cfg printers.cfg DESTINATION "${DCMTK_INSTALL_ETCDIR}" COMPONENT etc)
diff --git a/dcmpstat/include/CMakeLists.txt b/dcmpstat/include/CMakeLists.txt
index 04ce8bb..86d4b43 100644
--- a/dcmpstat/include/CMakeLists.txt
+++ b/dcmpstat/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmpstat DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmpstat DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmpstat/include/dcmtk/dcmpstat/dvcache.h b/dcmpstat/include/dcmtk/dcmpstat/dvcache.h
index 2763343..a590330 100644
--- a/dcmpstat/include/dcmtk/dcmpstat/dvcache.h
+++ b/dcmpstat/include/dcmtk/dcmpstat/dvcache.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2012, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -167,7 +167,7 @@ class DCMTK_DCMPSTAT_EXPORT DVInstanceCache
      */
     inline Uint32 getCount() const
     {
-        return List.size();
+        return OFstatic_cast(Uint32, List.size());
     }
 
     /** sets internal cursor to specified position in cache list
@@ -318,7 +318,7 @@ class DCMTK_DCMPSTAT_EXPORT DVInstanceCache
      */
     inline ItemStruct *getItem() const
     {
-		OFListConstIterator(ItemStruct *) it = Iterator;
+        OFListConstIterator(ItemStruct *) it = Iterator;
         return (it != List.end()) ? (*Iterator) : (ItemStruct *)NULL;
     }
 
@@ -482,7 +482,7 @@ class DCMTK_DCMPSTAT_EXPORT DVSeriesCache
      */
     inline Uint32 getCount() const
     {
-        return List.size();
+        return OFstatic_cast(Uint32, List.size());
     }
 
     /** sets internal cursor to specified position in cache list
@@ -603,7 +603,7 @@ class DCMTK_DCMPSTAT_EXPORT DVSeriesCache
      */
     inline ItemStruct *getItem() const
     {
-		OFListConstIterator(ItemStruct *) it = Iterator;
+        OFListConstIterator(ItemStruct *) it = Iterator;
         return (it != List.end()) ? (*Iterator) : (ItemStruct *)NULL;
     }
 
@@ -756,7 +756,7 @@ class DCMTK_DCMPSTAT_EXPORT DVStudyCache
      */
     inline Uint32 getCount() const
     {
-        return List.size();
+        return OFstatic_cast(Uint32, List.size());
     }
 
     /** sets internal cursor to specified position in cache list
@@ -849,7 +849,7 @@ class DCMTK_DCMPSTAT_EXPORT DVStudyCache
      */
     inline ItemStruct *getItem() const
     {
-		OFListConstIterator(ItemStruct *) it = Iterator;
+        OFListConstIterator(ItemStruct *) it = Iterator;
         return (it != List.end()) ? (*Iterator) : (ItemStruct *)NULL;
     }
 
diff --git a/dcmpstat/libsrc/Makefile.dep b/dcmpstat/libsrc/Makefile.dep
index af477de..4936ec5 100644
--- a/dcmpstat/libsrc/Makefile.dep
+++ b/dcmpstat/libsrc/Makefile.dep
@@ -20,7 +20,10 @@ dcmpstat.o: dcmpstat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -38,10 +41,10 @@ dcmpstat.o: dcmpstat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -69,8 +72,6 @@ dcmpstat.o: dcmpstat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -149,7 +150,10 @@ dviface.o: dviface.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -167,10 +171,10 @@ dviface.o: dviface.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmpstat/dvpstyp.h ../include/dcmtk/dcmpstat/dpdefine.h \
@@ -202,8 +206,6 @@ dviface.o: dviface.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -261,7 +263,6 @@ dviface.o: dviface.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/qrdefine.h \
@@ -270,6 +271,7 @@ dviface.o: dviface.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../ofstd/include/dcmtk/ofstd/offname.h \
  ../include/dcmtk/dcmpstat/dvcache.h ../include/dcmtk/dcmpstat/dvpsdef.h \
@@ -376,6 +378,7 @@ dvpsab.o: dvpsab.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -388,7 +391,9 @@ dvpsab.o: dvpsab.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -442,6 +447,7 @@ dvpsabl.o: dvpsabl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -454,7 +460,9 @@ dvpsabl.o: dvpsabl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -507,6 +515,7 @@ dvpsal.o: dvpsal.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -519,7 +528,9 @@ dvpsal.o: dvpsal.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -564,6 +575,7 @@ dvpsall.o: dvpsall.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -576,7 +588,9 @@ dvpsall.o: dvpsall.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -624,8 +638,6 @@ dvpsall.o: dvpsall.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -686,7 +698,10 @@ dvpscf.o: dvpscf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -704,10 +719,10 @@ dvpscf.o: dvpscf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmpstat/dvpstyp.h ../include/dcmtk/dcmpstat/dpdefine.h \
@@ -736,7 +751,10 @@ dvpscu.o: dvpscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -754,10 +772,10 @@ dvpscu.o: dvpscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -786,8 +804,6 @@ dvpscu.o: dvpscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -847,6 +863,7 @@ dvpscul.o: dvpscul.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -859,7 +876,9 @@ dvpscul.o: dvpscul.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -909,7 +928,10 @@ dvpsda.o: dvpsda.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -927,10 +949,10 @@ dvpsda.o: dvpsda.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -958,8 +980,6 @@ dvpsda.o: dvpsda.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1023,6 +1043,7 @@ dvpsdal.o: dvpsdal.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1035,7 +1056,9 @@ dvpsdal.o: dvpsdal.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1078,8 +1101,6 @@ dvpsdal.o: dvpsdal.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1145,7 +1166,10 @@ dvpsfs.o: dvpsfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1163,10 +1187,10 @@ dvpsfs.o: dvpsfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1194,8 +1218,6 @@ dvpsfs.o: dvpsfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1247,6 +1269,7 @@ dvpsfs.o: dvpsfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../include/dcmtk/dcmpstat/dvpsdef.h ../include/dcmtk/dcmpstat/dvpshlp.h \
  ../include/dcmtk/dcmpstat/dvpscf.h ../include/dcmtk/dcmpstat/dvpspl.h \
@@ -1291,7 +1314,10 @@ dvpsga.o: dvpsga.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1309,10 +1335,10 @@ dvpsga.o: dvpsga.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
@@ -1348,8 +1374,6 @@ dvpsga.o: dvpsga.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1405,6 +1429,7 @@ dvpsgal.o: dvpsgal.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1417,7 +1442,9 @@ dvpsgal.o: dvpsgal.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1465,8 +1492,6 @@ dvpsgal.o: dvpsgal.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1529,7 +1554,10 @@ dvpsgl.o: dvpsgl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1547,10 +1575,10 @@ dvpsgl.o: dvpsgl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1578,8 +1606,6 @@ dvpsgl.o: dvpsgl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1639,6 +1665,7 @@ dvpsgll.o: dvpsgll.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1651,7 +1678,9 @@ dvpsgll.o: dvpsgll.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1694,8 +1723,6 @@ dvpsgll.o: dvpsgll.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1765,7 +1792,10 @@ dvpsgr.o: dvpsgr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1783,10 +1813,10 @@ dvpsgr.o: dvpsgr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1814,8 +1844,6 @@ dvpsgr.o: dvpsgr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1876,6 +1904,7 @@ dvpsgrl.o: dvpsgrl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1888,7 +1917,9 @@ dvpsgrl.o: dvpsgrl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1931,8 +1962,6 @@ dvpsgrl.o: dvpsgrl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1992,6 +2021,7 @@ dvpshlp.o: dvpshlp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -2011,7 +2041,9 @@ dvpshlp.o: dvpshlp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2050,8 +2082,6 @@ dvpshlp.o: dvpshlp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2111,6 +2141,7 @@ dvpsib.o: dvpsib.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -2123,7 +2154,9 @@ dvpsib.o: dvpsib.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2165,8 +2198,6 @@ dvpsib.o: dvpsib.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2218,6 +2249,7 @@ dvpsib.o: dvpsib.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../include/dcmtk/dcmpstat/dvpsdef.h ../include/dcmtk/dcmpstat/dvpspll.h \
  ../include/dcmtk/dcmpstat/dvpscf.h ../include/dcmtk/dcmpstat/dvpshlp.h \
@@ -2240,6 +2272,7 @@ dvpsibl.o: dvpsibl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -2252,7 +2285,9 @@ dvpsibl.o: dvpsibl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2297,8 +2332,6 @@ dvpsibl.o: dvpsibl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2348,6 +2381,7 @@ dvpsibl.o: dvpsibl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../include/dcmtk/dcmpstat/dvpshlp.h
 dvpsmsg.o: dvpsmsg.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -2374,7 +2408,10 @@ dvpsmsg.o: dvpsmsg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2392,10 +2429,10 @@ dvpsmsg.o: dvpsmsg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2404,6 +2441,7 @@ dvpsmsg.o: dvpsmsg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofnetdb.h
 dvpsov.o: dvpsov.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpsov.h \
@@ -2427,7 +2465,10 @@ dvpsov.o: dvpsov.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2445,10 +2486,10 @@ dvpsov.o: dvpsov.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2476,8 +2517,6 @@ dvpsov.o: dvpsov.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2537,6 +2576,7 @@ dvpsovl.o: dvpsovl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -2549,7 +2589,9 @@ dvpsovl.o: dvpsovl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2592,8 +2634,6 @@ dvpsovl.o: dvpsovl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2654,6 +2694,7 @@ dvpspl.o: dvpspl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -2672,7 +2713,9 @@ dvpspl.o: dvpspl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2710,6 +2753,7 @@ dvpspl.o: dvpspl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -2745,7 +2789,10 @@ dvpspl2.o: dvpspl2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2762,9 +2809,9 @@ dvpspl2.o: dvpspl2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2806,6 +2853,7 @@ dvpspl2.o: dvpspl2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h
 dvpspll.o: dvpspll.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -2842,7 +2890,10 @@ dvpspll.o: dvpspll.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2857,15 +2908,16 @@ dvpspll.o: dvpspll.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -2905,8 +2957,6 @@ dvpspll.o: dvpspll.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2963,7 +3013,10 @@ dvpspr.o: dvpspr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2981,10 +3034,10 @@ dvpspr.o: dvpspr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmpstat/dvpspr.h \
  ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
@@ -3001,6 +3054,7 @@ dvpspr.o: dvpspr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -3047,7 +3101,10 @@ dvpsprt.o: dvpsprt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3062,15 +3119,16 @@ dvpsprt.o: dvpsprt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -3103,8 +3161,6 @@ dvpsprt.o: dvpsprt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -3154,7 +3210,6 @@ dvpsprt.o: dvpsprt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofalign.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/qrdefine.h \
@@ -3191,6 +3246,7 @@ dvpsri.o: dvpsri.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -3203,7 +3259,9 @@ dvpsri.o: dvpsri.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3252,6 +3310,7 @@ dvpsril.o: dvpsril.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -3270,7 +3329,9 @@ dvpsril.o: dvpsril.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3321,6 +3382,7 @@ dvpsrs.o: dvpsrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -3333,7 +3395,9 @@ dvpsrs.o: dvpsrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3385,6 +3449,7 @@ dvpsrsl.o: dvpsrsl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -3403,7 +3468,9 @@ dvpsrsl.o: dvpsrsl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3469,7 +3536,10 @@ dvpssp.o: dvpssp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3484,15 +3554,16 @@ dvpssp.o: dvpssp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -3523,8 +3594,6 @@ dvpssp.o: dvpssp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -3631,7 +3700,10 @@ dvpsspl.o: dvpsspl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3647,9 +3719,9 @@ dvpsspl.o: dvpsspl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3667,6 +3739,7 @@ dvpsspl.o: dvpsspl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -3688,8 +3761,6 @@ dvpsspl.o: dvpsspl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -3741,7 +3812,6 @@ dvpsspl.o: dvpsspl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofalign.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/qrdefine.h \
@@ -3775,6 +3845,7 @@ dvpssv.o: dvpssv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -3793,7 +3864,9 @@ dvpssv.o: dvpssv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3847,6 +3920,7 @@ dvpssvl.o: dvpssvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -3865,7 +3939,9 @@ dvpssvl.o: dvpssvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3919,7 +3995,10 @@ dvpstat.o: dvpstat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3937,10 +4016,10 @@ dvpstat.o: dvpstat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3968,8 +4047,6 @@ dvpstat.o: dvpstat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4066,7 +4143,10 @@ dvpstx.o: dvpstx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4084,10 +4164,10 @@ dvpstx.o: dvpstx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4115,8 +4195,6 @@ dvpstx.o: dvpstx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4177,6 +4255,7 @@ dvpstxl.o: dvpstxl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -4189,7 +4268,9 @@ dvpstxl.o: dvpstxl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4232,8 +4313,6 @@ dvpstxl.o: dvpstxl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4299,7 +4378,10 @@ dvpsvl.o: dvpsvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4317,10 +4399,10 @@ dvpsvl.o: dvpsvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4348,8 +4430,6 @@ dvpsvl.o: dvpsvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4410,6 +4490,7 @@ dvpsvll.o: dvpsvll.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -4422,7 +4503,9 @@ dvpsvll.o: dvpsvll.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4465,8 +4548,6 @@ dvpsvll.o: dvpsvll.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4533,7 +4614,10 @@ dvpsvw.o: dvpsvw.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4551,9 +4635,9 @@ dvpsvw.o: dvpsvw.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -4579,8 +4663,6 @@ dvpsvw.o: dvpsvw.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4648,7 +4730,10 @@ dvpsvwl.o: dvpsvwl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4666,10 +4751,10 @@ dvpsvwl.o: dvpsvwl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -4716,7 +4801,10 @@ dvsighdl.o: dvsighdl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4734,9 +4822,9 @@ dvsighdl.o: dvsighdl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
diff --git a/dcmpstat/libsrc/dcmpstat.cc b/dcmpstat/libsrc/dcmpstat.cc
index 4744c49..d1a3bd2 100644
--- a/dcmpstat/libsrc/dcmpstat.cc
+++ b/dcmpstat/libsrc/dcmpstat.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2013, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -1576,8 +1576,8 @@ OFCondition DcmPresentationState::getPolyShutterVertex(size_t idx, Sint32& x, Si
 {
   x=0;
   y=0;
-  OFCondition result = verticesOfThePolygonalShutter.getSint32(y,2*idx);
-  if (EC_Normal==result) result = verticesOfThePolygonalShutter.getSint32(x,2*idx+1);
+  OFCondition result = verticesOfThePolygonalShutter.getSint32(y,OFstatic_cast(Uint32, 2*idx));
+  if (EC_Normal==result) result = verticesOfThePolygonalShutter.getSint32(x,OFstatic_cast(Uint32, 2*idx+1));
   return result;
 }
 
diff --git a/dcmpstat/libsrc/dviface.cc b/dcmpstat/libsrc/dviface.cc
index c7f44bc..d9d811f 100644
--- a/dcmpstat/libsrc/dviface.cc
+++ b/dcmpstat/libsrc/dviface.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2016, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -21,6 +21,7 @@
 
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
 #include "dcmtk/dcmpstat/dviface.h"
 
 #include "dcmtk/dcmpstat/dvpsdef.h"   /* for constants */
@@ -92,7 +93,6 @@ BEGIN_EXTERN_C
 END_EXTERN_C
 
 #ifdef HAVE_WINDOWS_H
-#include <windows.h>
 #include <winbase.h>     /* for CreateProcess */
 #endif
 
@@ -224,13 +224,13 @@ DVInterface::DVInterface(const char *config_file, OFBool useLog)
 
             // This will badly interact with oflog config files :(
             const char *pattern = "%D, Level %p, Module DCMPSTAT%n%m%n";
-            OFauto_ptr<dcmtk::log4cplus::Layout> layout(new dcmtk::log4cplus::PatternLayout(pattern));
+            OFunique_ptr<dcmtk::log4cplus::Layout> layout(new dcmtk::log4cplus::PatternLayout(pattern));
             dcmtk::log4cplus::SharedAppenderPtr logfile(new dcmtk::log4cplus::FileAppender(filepath, STD_NAMESPACE ios::app));
             // We can't use OFLog::getLogger() here because that doesn't let us
             // configure the object
             dcmtk::log4cplus::Logger log = dcmtk::log4cplus::Logger::getInstance("dcmtk.dcmpstat.logfile");
 
-            logfile->setLayout(layout);
+            logfile->setLayout(OFmove(layout));
             log.addAppender(logfile);
             log.setLogLevel(getLogLevel());
 
@@ -2459,22 +2459,11 @@ OFCondition DVInterface::terminateQueryRetrieveServer()
   if (getQueryRetrieveServerName()==NULL) return EC_IllegalCall;
   if (configPath.empty()) return EC_IllegalCall;
 
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-  WSAData winSockData;
-  /* we need at least version 1.1 */
-  WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-  WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+  OFStandard::initializeNetwork();
 
   OFCondition result = EC_Normal;
   T_ASC_Network *net=NULL;
   T_ASC_Parameters *params=NULL;
-  DIC_NODENAME localHost;
   DIC_NODENAME peerHost;
   T_ASC_Association *assoc=NULL;
 
@@ -2487,9 +2476,8 @@ OFCondition DVInterface::terminateQueryRetrieveServer()
     if (cond.good())
     {
       ASC_setAPTitles(params, getNetworkAETitle(), getQueryRetrieveAETitle(), NULL);
-      gethostname(localHost, sizeof(localHost) - 1);
       sprintf(peerHost, "localhost:%d", OFstatic_cast(int, getQueryRetrievePort()));
-      ASC_setPresentationAddresses(params, localHost, peerHost);
+      ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), peerHost);
 
       const char* transferSyntaxes[] = { UID_LittleEndianImplicitTransferSyntax };
       cond = ASC_addPresentationContext(params, 1, UID_PrivateShutdownSOPClass, transferSyntaxes, 1);
@@ -2504,9 +2492,7 @@ OFCondition DVInterface::terminateQueryRetrieveServer()
     ASC_dropNetwork(&net);
   } else result = EC_IllegalCall;
 
-#ifdef HAVE_WINSOCK_H
-  WSACleanup();
-#endif
+  OFStandard::shutdownNetwork();
 
   return result;
 }
@@ -3609,22 +3595,11 @@ OFCondition DVInterface::terminatePrintServer()
   if (getPrintServerName()==NULL) return EC_IllegalCall;
   if (configPath.empty()) return EC_IllegalCall;
 
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-  WSAData winSockData;
-  /* we need at least version 1.1 */
-  WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-  WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+  OFStandard::initializeNetwork();
 
   OFCondition result = EC_Normal;
   T_ASC_Network *net=NULL;
   T_ASC_Parameters *params=NULL;
-  DIC_NODENAME localHost;
   DIC_NODENAME peerHost;
   T_ASC_Association *assoc=NULL;
   const char *target = NULL;
@@ -3735,9 +3710,8 @@ OFCondition DVInterface::terminatePrintServer()
         }
 
         ASC_setAPTitles(params, getNetworkAETitle(), getTargetAETitle(target), NULL);
-        gethostname(localHost, sizeof(localHost) - 1);
         sprintf(peerHost, "%s:%d", getTargetHostname(target), OFstatic_cast(int, getTargetPort(target)));
-        ASC_setPresentationAddresses(params, localHost, peerHost);
+        ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), peerHost);
 
         if (cond.good()) cond = ASC_setTransportLayerType(params, useTLS);
 
@@ -3755,9 +3729,7 @@ OFCondition DVInterface::terminatePrintServer()
     } else result = EC_IllegalCall;
   }
 
-#ifdef HAVE_WINSOCK_H
-  WSACleanup();
-#endif
+  OFStandard::shutdownNetwork();
 
   return result;    // result of last process only
 }
diff --git a/dcmpstat/libsrc/dvpscu.cc b/dcmpstat/libsrc/dvpscu.cc
index fdfb6ad..f5efccf 100644
--- a/dcmpstat/libsrc/dvpscu.cc
+++ b/dcmpstat/libsrc/dvpscu.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2010, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -67,7 +67,7 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
 {
   OFCondition result = EC_Normal;
   DcmStack stack;
-  
+
   curveGroup = group;
   DcmElement *d_curveDimensions = NULL;
   DcmElement *d_numberOfPoints = NULL;
@@ -77,19 +77,19 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
   DcmElement *d_curveDescription = NULL;
   DcmElement *d_axisUnits = NULL;
   DcmElement *d_curveLabel = NULL;
-  
+
   /* first we look for the Curve Data */
   DcmTagKey key(0x5000 + group,0x3000);
   if (EC_Normal == dset.search(key, stack, ESM_fromHere, OFFalse))
   {
-    d_curveData = (DcmElement *)(stack.top());  
+    d_curveData = (DcmElement *)(stack.top());
   } else return EC_IllegalCall;
-  
+
   key.setElement(0x0005); // Curve Dimensions
   stack.clear();
   if (EC_Normal == dset.search(key, stack, ESM_fromHere, OFFalse))
   {
-    d_curveDimensions = (DcmElement *)(stack.top());  
+    d_curveDimensions = (DcmElement *)(stack.top());
   } else return EC_IllegalCall;
 
   key.setElement(0x0110); // Curve Data Descriptor
@@ -103,42 +103,42 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
   stack.clear();
   if (EC_Normal == dset.search(key, stack, ESM_fromHere, OFFalse))
   {
-    d_numberOfPoints = (DcmElement *)(stack.top());  
+    d_numberOfPoints = (DcmElement *)(stack.top());
   } else return EC_IllegalCall;
 
   key.setElement(0x0020); // Type of Data
   stack.clear();
   if (EC_Normal == dset.search(key, stack, ESM_fromHere, OFFalse))
   {
-    d_typeOfData = (DcmElement *)(stack.top());  
+    d_typeOfData = (DcmElement *)(stack.top());
   } else return EC_IllegalCall;
 
   key.setElement(0x0103); // Data Value Representation
   stack.clear();
   if (EC_Normal == dset.search(key, stack, ESM_fromHere, OFFalse))
   {
-    d_dataVR = (DcmElement *)(stack.top());  
+    d_dataVR = (DcmElement *)(stack.top());
   } else return EC_IllegalCall;
 
   key.setElement(0x0022); // Curve Description
   stack.clear();
   if (EC_Normal == dset.search(key, stack, ESM_fromHere, OFFalse))
   {
-    d_curveDescription = (DcmElement *)(stack.top());  
+    d_curveDescription = (DcmElement *)(stack.top());
   }
 
   key.setElement(0x0030); // Axis Units
   stack.clear();
   if (EC_Normal == dset.search(key, stack, ESM_fromHere, OFFalse))
   {
-    d_axisUnits = (DcmElement *)(stack.top());  
+    d_axisUnits = (DcmElement *)(stack.top());
   }
 
   key.setElement(0x2500); // Curve Label
   stack.clear();
   if (EC_Normal == dset.search(key, stack, ESM_fromHere, OFFalse))
   {
-    d_curveLabel = (DcmElement *)(stack.top());  
+    d_curveLabel = (DcmElement *)(stack.top());
   }
 
   Uint16 u=0;
@@ -147,7 +147,7 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
     // Curve Dimensions unreadable or != 2, bail out
     return EC_IllegalCall;
   }
-  
+
   u=0;
   if ((EC_Normal != d_numberOfPoints->getUint16(u,0))||(u == 0))
   {
@@ -168,36 +168,36 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
 
   if ((d_curveDescription) &&(EC_Normal == d_curveDescription->getOFString(aString,0)))
   {
-    curveDescription = aString; 
+    curveDescription = aString;
   }
-  
+
   if ((d_axisUnits) &&(EC_Normal == d_axisUnits->getOFString(aString,0)))
   {
-    axisUnitsX = aString; 
+    axisUnitsX = aString;
   }
   if ((d_axisUnits) &&(EC_Normal == d_axisUnits->getOFString(aString,1)))
   {
-    axisUnitsY = aString; 
+    axisUnitsY = aString;
   }
 
   if ((d_curveLabel) &&(EC_Normal == d_curveLabel->getOFString(aString,0)))
   {
-    curveLabel = aString; 
+    curveLabel = aString;
   }
-  
+
   Uint16 dataVR=0;
   if (EC_Normal != d_dataVR->getUint16(dataVR,0))
   {
     // cannot read curve data VR, bail out
     return EC_IllegalCall;
-  } 
+  }
 
   curveData = new double[numberOfPoints*2];
   if (curveData==NULL) return EC_MemoryExhausted;
 
   void *rawData=NULL;
   size_t align=0;
-  
+
   Uint8 *pui8=NULL;
   Uint16 *pui16=NULL;
   Sint16 *psi16=NULL;
@@ -210,15 +210,15 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
     case EVR_OW:
     case EVR_ox:
     case EVR_US:
-      
+
       if (EC_Normal == d_curveData->getUint8Array(pui8))
       {
-      	rawData = pui8;
+        rawData = pui8;
         align = 1;
-      } 
+      }
       else if (EC_Normal == d_curveData->getUint16Array(pui16))
       {
-      	rawData = pui16;
+        rawData = pui16;
         align = sizeof(Uint16);
       }
       else result = EC_IllegalCall;
@@ -226,28 +226,28 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
     case EVR_SS:
       if (EC_Normal == d_curveData->getSint16Array(psi16))
       {
-      	rawData = psi16;
+        rawData = psi16;
         align = sizeof(Sint16);
       } else result = EC_IllegalCall;
       break;
     case EVR_FL:
       if (EC_Normal == d_curveData->getFloat32Array(pfl32))
       {
-      	rawData = pfl32;
+        rawData = pfl32;
         align = sizeof(Float32);
       } else result = EC_IllegalCall;
       break;
     case EVR_FD:
       if (EC_Normal == d_curveData->getFloat64Array(pfl64))
       {
-      	rawData = pfl64;
+        rawData = pfl64;
         align = sizeof(Float64);
       } else result = EC_IllegalCall;
       break;
     case EVR_SL:
       if (EC_Normal == d_curveData->getSint32Array(psi32))
       {
-      	rawData = psi32;
+        rawData = psi32;
         align = sizeof(Sint32);
       } else result = EC_IllegalCall;
       break;
@@ -255,18 +255,18 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
       result = EC_IllegalCall;
       break;
   }
-  
+
   size_t byteLength = (size_t)(d_curveData->getLength());
   size_t maxidx = 2*numberOfPoints;
   size_t i;
-  
+
   switch (dataVR)
   {
     case 0: // VR=US. align can be 1 or 2
       if ((align==1)||(align==sizeof(Uint16)))
       {
-        if (align==1) swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, rawData, byteLength, sizeof(Uint16));
-        if (maxidx*sizeof(Uint16) <= byteLength) 
+        if (align==1) swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, rawData, OFstatic_cast(Uint32, byteLength), sizeof(Uint16));
+        if (maxidx*sizeof(Uint16) <= byteLength)
         {
           for (i=0; i<maxidx; i++) curveData[i] = (double)(((Uint16 *)rawData)[i]);
         } else result=EC_IllegalCall;
@@ -275,8 +275,8 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
     case 1: // VR=SS. align can be 1 or 2
       if ((align==1)||(align==sizeof(Sint16)))
       {
-        if (align==1) swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, rawData, byteLength, sizeof(Sint16));
-        if (maxidx*sizeof(Sint16) <= byteLength) 
+        if (align==1) swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, rawData, OFstatic_cast(Uint32, byteLength), sizeof(Sint16));
+        if (maxidx*sizeof(Sint16) <= byteLength)
         {
           for (i=0; i<maxidx; i++) curveData[i] = (double)(((Sint16 *)rawData)[i]);
         } else result=EC_IllegalCall;
@@ -285,11 +285,11 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
     case 2: // VR=FL. align can be 1, 2, 4
       if ((align==1)||(align==sizeof(Uint16))||(align==sizeof(Float32)))
       {
-      	// if data is word aligned, first swap back to little endian OB
-      	if (align==sizeof(Uint16)) swapIfNecessary(EBO_LittleEndian, gLocalByteOrder, rawData, byteLength, sizeof(Uint16));
-        if ((align==1)||(align==sizeof(Uint16))) 
-          swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, rawData, byteLength, sizeof(Float32));
-        if (maxidx*sizeof(Float32) <= byteLength) 
+        // if data is word aligned, first swap back to little endian OB
+        if (align==sizeof(Uint16)) swapIfNecessary(EBO_LittleEndian, gLocalByteOrder, rawData, OFstatic_cast(Uint32, byteLength), sizeof(Uint16));
+        if ((align==1)||(align==sizeof(Uint16)))
+          swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, rawData, OFstatic_cast(Uint32, byteLength), sizeof(Float32));
+        if (maxidx*sizeof(Float32) <= byteLength)
         {
           for (i=0; i<maxidx; i++) curveData[i] = (double)(((Float32 *)rawData)[i]);
         } else result=EC_IllegalCall;
@@ -298,11 +298,11 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
     case 3: // VR=FD. align can be 1, 2, 8
       if ((align==1)||(align==sizeof(Uint16))||(align==sizeof(Float64)))
       {
-      	// if data is word aligned, first swap back to little endian OB
-      	if (align==sizeof(Uint16)) swapIfNecessary(EBO_LittleEndian, gLocalByteOrder, rawData, byteLength, sizeof(Uint16));
+        // if data is word aligned, first swap back to little endian OB
+        if (align==sizeof(Uint16)) swapIfNecessary(EBO_LittleEndian, gLocalByteOrder, rawData, OFstatic_cast(Uint32, byteLength), sizeof(Uint16));
         if ((align==1)||(align==sizeof(Uint16)))
-          swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, rawData, byteLength, sizeof(Float64));
-        if (maxidx*sizeof(Float64) <= byteLength) 
+          swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, rawData, OFstatic_cast(Uint32, byteLength), sizeof(Float64));
+        if (maxidx*sizeof(Float64) <= byteLength)
         {
           for (i=0; i<maxidx; i++) curveData[i] = (double)(((Float64 *)rawData)[i]);
         } else result=EC_IllegalCall;
@@ -311,11 +311,11 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
     case 4: // VR=SL. align can be 1, 2, 4
       if ((align==1)||(align==sizeof(Uint16))||(align==sizeof(Sint32)))
       {
-      	// if data is word aligned, first swap back to little endian OB
-      	if (align==sizeof(Uint16)) swapIfNecessary(EBO_LittleEndian, gLocalByteOrder, rawData, byteLength, sizeof(Uint16));
+        // if data is word aligned, first swap back to little endian OB
+        if (align==sizeof(Uint16)) swapIfNecessary(EBO_LittleEndian, gLocalByteOrder, rawData, OFstatic_cast(Uint32, byteLength), sizeof(Uint16));
         if ((align==1)||(align==sizeof(Uint16)))
-          swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, rawData, byteLength, sizeof(Sint32));
-        if (maxidx*sizeof(Sint32) <= byteLength) 
+          swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, rawData, OFstatic_cast(Uint32, byteLength), sizeof(Sint32));
+        if (maxidx*sizeof(Sint32) <= byteLength)
         {
           for (i=0; i<maxidx; i++) curveData[i] = (double)(((Sint32 *)rawData)[i]);
         } else result=EC_IllegalCall;
@@ -324,8 +324,8 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
     default:
       result = EC_IllegalCall;
       break;
-  }  
-    
+  }
+
   return result;
 }
 
diff --git a/dcmpstat/libsrc/dvpsgll.cc b/dcmpstat/libsrc/dvpsgll.cc
index 90bf466..d82d208 100644
--- a/dcmpstat/libsrc/dvpsgll.cc
+++ b/dcmpstat/libsrc/dvpsgll.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2010, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -174,7 +174,7 @@ OFCondition DVPSGraphicLayer_PList::addGraphicLayer(
      const char *gLayerDescription)
 {
   sortGraphicLayers(1);
-  Sint32 layerOrder = size()+1;
+  Sint32 layerOrder = OFstatic_cast(Sint32, size()+1);
   return addGraphicLayer(gLayer, layerOrder, gLayerDescription);
 }
 
@@ -200,8 +200,8 @@ void DVPSGraphicLayer_PList::sortGraphicLayers(Sint32 lowestLayer)
     {
       if ((*first)->getGLOrder() < currentSize)
       {
-      	current = first;
-      	currentSize = (*first)->getGLOrder();
+        current = first;
+        currentSize = (*first)->getGLOrder();
       }
       ++first;
     }
@@ -342,7 +342,7 @@ OFCondition DVPSGraphicLayer_PList::toFrontGraphicLayer(size_t idx)
     DVPSGraphicLayer *layer = *first;
     list_.erase(first);
     sortGraphicLayers(1);
-    Sint32 layerOrder = size()+1;
+    Sint32 layerOrder = OFstatic_cast(Sint32, size()+1);
     layer->setGLOrder(layerOrder);
     list_.push_back(layer);
   } else return EC_IllegalCall;
diff --git a/dcmpstat/libsrc/dvpsgr.cc b/dcmpstat/libsrc/dvpsgr.cc
index fc41d36..042f3e8 100644
--- a/dcmpstat/libsrc/dvpsgr.cc
+++ b/dcmpstat/libsrc/dvpsgr.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2010, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -53,7 +53,7 @@ OFCondition DVPSGraphicObject::read(DcmItem &dset)
 {
   OFCondition result = EC_Normal;
   DcmStack stack;
-  DcmUnsignedShort graphicDimensions(DCM_GraphicDimensions); // VR=US, VM=1, Type 1 
+  DcmUnsignedShort graphicDimensions(DCM_GraphicDimensions); // VR=US, VM=1, Type 1
 
   READ_FROM_DATASET(DcmCodeString, graphicAnnotationUnits)
   READ_FROM_DATASET(DcmUnsignedShort, graphicDimensions)
@@ -61,9 +61,9 @@ OFCondition DVPSGraphicObject::read(DcmItem &dset)
   READ_FROM_DATASET(DcmFloatingPointSingle, graphicData)
   READ_FROM_DATASET(DcmCodeString, graphicType)
   READ_FROM_DATASET(DcmCodeString, graphicFilled)
-  
+
   /* Now perform basic sanity checks */
-  
+
   if (graphicAnnotationUnits.getLength() == 0)
   {
     result=EC_IllegalCall;
@@ -87,7 +87,7 @@ OFCondition DVPSGraphicObject::read(DcmItem &dset)
       DCMPSTAT_WARN("presentation state contains a graphic object SQ item with graphicDimensions != 2");
     }
   }
-  
+
   if (numberOfGraphicPoints.getLength() == 0)
   {
     result=EC_IllegalCall;
@@ -98,7 +98,7 @@ OFCondition DVPSGraphicObject::read(DcmItem &dset)
     result=EC_IllegalCall;
     DCMPSTAT_WARN("presentation state contains a graphic object SQ item with numberOfGraphicPoints VM != 1");
   }
-  
+
   if (graphicData.getLength() == 0)
   {
     result=EC_IllegalCall;
@@ -109,7 +109,7 @@ OFCondition DVPSGraphicObject::read(DcmItem &dset)
     result=EC_IllegalCall;
     DCMPSTAT_WARN("presentation state contains a graphic object SQ item with graphicData VM < 2");
   }
-  
+
   if (graphicType.getLength() == 0)
   {
     result=EC_IllegalCall;
@@ -120,13 +120,13 @@ OFCondition DVPSGraphicObject::read(DcmItem &dset)
     result=EC_IllegalCall;
     DCMPSTAT_WARN("presentation state contains a graphic object SQ item with graphicType VM != 1");
   }
-  
+
   if ((graphicFilled.getLength() > 0)&&(graphicFilled.getVM() != 1))
   {
     result=EC_IllegalCall;
     DCMPSTAT_WARN("presentation state contains a graphic object SQ item with graphicFilled present but VM != 1");
   }
-  
+
   return result;
 }
 
@@ -134,16 +134,16 @@ OFCondition DVPSGraphicObject::write(DcmItem &dset)
 {
   OFCondition result = EC_Normal;
   DcmElement *delem=NULL;
-  DcmUnsignedShort graphicDimensions(DCM_GraphicDimensions); // VR=US, VM=1, Type 1 
+  DcmUnsignedShort graphicDimensions(DCM_GraphicDimensions); // VR=US, VM=1, Type 1
   Uint16 dimensions=2;
   graphicDimensions.putUint16(dimensions,0);
-  
+
   ADD_TO_DATASET(DcmCodeString, graphicAnnotationUnits)
   ADD_TO_DATASET(DcmUnsignedShort, graphicDimensions)
   ADD_TO_DATASET(DcmUnsignedShort, numberOfGraphicPoints)
   ADD_TO_DATASET(DcmFloatingPointSingle, graphicData)
   ADD_TO_DATASET(DcmCodeString, graphicType)
-  
+
   // strictly speaking we are not allowed to include graphicFilled
   // when the graphicType is "POLYLINE" or "INTERPOLATED" and the
   // first point of graphicData is not equal the last point.
@@ -180,8 +180,8 @@ OFCondition DVPSGraphicObject::getPoint(size_t idx, Float32& x, Float32& y)
   OFCondition result = EC_IllegalCall;
   if ((idx*2+1)<graphicData.getVM())
   {
-    result = graphicData.getFloat32(x, 2*idx);
-    if (result==EC_Normal) result = graphicData.getFloat32(y, 2*idx+1);
+    result = graphicData.getFloat32(x, OFstatic_cast(Uint32, 2*idx));
+    if (result==EC_Normal) result = graphicData.getFloat32(y, OFstatic_cast(Uint32, 2*idx+1));
   }
   return result;
 }
@@ -205,8 +205,8 @@ OFBool DVPSGraphicObject::isFilled()
   OFString aString;
   graphicFilled.getOFString(aString,0);
   if (aString == "Y") return OFTrue; else return OFFalse;
-} 
-  
+}
+
 
 OFCondition DVPSGraphicObject::setData(size_t number, const Float32 *data, DVPSannotationUnit unit)
 {
@@ -215,13 +215,13 @@ OFCondition DVPSGraphicObject::setData(size_t number, const Float32 *data, DVPSa
   numberOfGraphicPoints.clear();
   graphicData.clear();
   graphicAnnotationUnits.clear();
-  
-  OFCondition result = graphicData.putFloat32Array(data, 2*number);
+
+  OFCondition result = graphicData.putFloat32Array(data, OFstatic_cast(Uint32, 2*number));
   if (EC_Normal==result) result = numberOfGraphicPoints.putUint16(npoints,0);
   if (EC_Normal==result)
   {
-    if (unit==DVPSA_display) result=graphicAnnotationUnits.putString("DISPLAY"); 
-    else result=graphicAnnotationUnits.putString("PIXEL");     
+    if (unit==DVPSA_display) result=graphicAnnotationUnits.putString("DISPLAY");
+    else result=graphicAnnotationUnits.putString("PIXEL");
   }
   return result;
 }
@@ -232,20 +232,20 @@ OFCondition DVPSGraphicObject::setGraphicType(DVPSGraphicType gtype)
   switch (gtype)
   {
     case DVPST_interpolated:
-      cname = "INTERPOLATED"; 
-      break;    
+      cname = "INTERPOLATED";
+      break;
     case DVPST_circle:
-      cname = "CIRCLE"; 
-      break;    
+      cname = "CIRCLE";
+      break;
     case DVPST_ellipse:
-      cname = "ELLIPSE"; 
-      break;    
+      cname = "ELLIPSE";
+      break;
     case DVPST_polyline:
-      cname = "POLYLINE"; 
-      break;    
+      cname = "POLYLINE";
+      break;
     case DVPST_point:
-      cname = "POINT"; 
-      break;    
+      cname = "POINT";
+      break;
   }
   return graphicType.putString(cname);
 }
@@ -253,7 +253,7 @@ OFCondition DVPSGraphicObject::setGraphicType(DVPSGraphicType gtype)
 OFCondition DVPSGraphicObject::setFilled(OFBool filled)
 {
   OFCondition result = EC_Normal;
-  if (filled) result=graphicFilled.putString("Y"); 
+  if (filled) result=graphicFilled.putString("Y");
   else result=graphicFilled.putString("N");
   return result;
 }
diff --git a/dcmpstat/libsrc/dvpsmsg.cc b/dcmpstat/libsrc/dvpsmsg.cc
index f0a6bc1..113116d 100644
--- a/dcmpstat/libsrc/dvpsmsg.cc
+++ b/dcmpstat/libsrc/dvpsmsg.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2010, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -22,15 +22,12 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#include "dcmtk/dcmnet/dcompat.h"
-
-BEGIN_EXTERN_C
 #ifdef HAVE_WINDOWS_H
-#include <windows.h>
-#include <winbase.h>
+// on Windows, we need Winsock2 for network functions
+#include <winsock2.h>
 #endif
-END_EXTERN_C
 
+#include "dcmtk/dcmnet/dcompat.h"
 #include "dcmtk/dcmpstat/dvpsmsg.h"
 #include "dcmtk/ofstd/ofstring.h"    /* for class OFString */
 #include "dcmtk/ofstd/ofbmanip.h"    /* for OFBitmanipTemplate<> */
@@ -128,12 +125,12 @@ void DVPSIPCMessage::resizePayload(Uint32 i)
 void DVPSIPCMessage::addStringToPayload(const char *str)
 {
   Uint32 length = 0;
-  if (str) length = strlen(str); else str = "";
+  if (str) length = OFstatic_cast(Uint32, strlen(str)); else str = "";
   Uint32 padBytes = 4 - (length % 4);
   resizePayload(sizeof(Uint32)+length+padBytes);
 
   // write string length
-  addIntToPayload(length+padBytes);  
+  addIntToPayload(length+padBytes);
 
   // write string
   strcpy((char *)(payload + payloadUsed), str);
@@ -165,7 +162,7 @@ OFBool DVPSIPCMessage::extractStringFromPayload(OFString& str)
 
   str = (const char *)(payload+payloadReadOffset); // guaranteed to be zero terminated string
   payloadReadOffset += length;
-  return OFTrue;  
+  return OFTrue;
 }
 
 OFBool DVPSIPCMessage::extractIntFromPayload(Uint32& i)
@@ -174,13 +171,13 @@ OFBool DVPSIPCMessage::extractIntFromPayload(Uint32& i)
   if (payloadReadOffset + sizeof(Uint32) > payloadUsed) return OFFalse;
 
   // copy integer into temporary buffer and adjust byte order there
-  unsigned char *temp = new unsigned char[sizeof(Uint32)+8]; // allocate a bit more than needed to be safe  
+  unsigned char *temp = new unsigned char[sizeof(Uint32)+8]; // allocate a bit more than needed to be safe
   OFBitmanipTemplate<unsigned char>::copyMem(payload+payloadReadOffset, temp, sizeof(Uint32));
   swapIfNecessary(gLocalByteOrder, EBO_BigEndian, temp, sizeof(Uint32), sizeof(Uint32));
   payloadReadOffset += sizeof(Uint32);
-  
+
   i = *(Uint32 *)temp;
-  delete[] temp;  
+  delete[] temp;
   return OFTrue;
 }
 
@@ -197,7 +194,7 @@ void DVPSIPCMessage::erasePayload()
 OFBool DVPSIPCMessage::send(DcmTransportConnection &connection)
 {
   // adjust message type and length
-  *(Uint32 *)payload = messageType;  
+  *(Uint32 *)payload = messageType;
   *(Uint32 *)(payload + sizeof(Uint32)) = (payloadUsed - PAYLOAD_OFFSET);
   swapIfNecessary(EBO_BigEndian, gLocalByteOrder, payload, 2*sizeof(Uint32), sizeof(Uint32));
 
@@ -226,9 +223,9 @@ OFBool DVPSIPCMessage::receive(DcmTransportConnection &connection)
   }
 
   // read payload if any
-  if (payloadUsed > 0) 
+  if (payloadUsed > 0)
   {
-    if (connection.read(payload+PAYLOAD_OFFSET, (size_t)payloadUsed) <= 0) 
+    if (connection.read(payload+PAYLOAD_OFFSET, (size_t)payloadUsed) <= 0)
     {
       payloadUsed = PAYLOAD_OFFSET;
       return OFFalse;
@@ -257,16 +254,16 @@ DVPSIPCClient::DVPSIPCClient(Uint32 clientType, const char *txt, int thePort, OF
   if (performTransaction(msg))
   {
     if ((msg.getMessageType() != DVPSIPCMessage::assignApplicationID) || (! msg.extractIntFromPayload(applicationID)))
-    {      
+    {
       // protocol violation
-      serverActive = OFFalse;	
+      serverActive = OFFalse;
     }
   } else {
-    serverActive = OFFalse;	
+    serverActive = OFFalse;
   }
   return;
 }
- 
+
 DVPSIPCClient::~DVPSIPCClient()
 {
   if (connection)
@@ -280,8 +277,13 @@ void DVPSIPCClient::requestConnection()
 {
   if (connection) return; // connection already open
 
+#ifdef _WIN32
+  SOCKET s = socket(AF_INET, SOCK_STREAM, 0);
+  if (s == INVALID_SOCKET) return;
+#else
   int s = socket(AF_INET, SOCK_STREAM, 0);
   if (s < 0) return;
+#endif
 
   OFStandard::OFHostent hp = OFStandard::getHostByName("localhost");
   if (!hp) return;
@@ -294,7 +296,7 @@ void DVPSIPCClient::requestConnection()
   if (connect(s, (struct sockaddr *) & server, sizeof(server)) < 0)
   {
 #ifdef HAVE_WINSOCK_H
-    (void) shutdown(s,  1 /* SD_SEND */); 
+    (void) shutdown(s,  1 /* SD_SEND */);
     (void) closesocket(s);
 #else
     (void) close(s);
diff --git a/dcmpstat/libsrc/dvpspr.cc b/dcmpstat/libsrc/dvpspr.cc
index 6cee35d..c9f58f6 100644
--- a/dcmpstat/libsrc/dvpspr.cc
+++ b/dcmpstat/libsrc/dvpspr.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2010, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -21,6 +21,7 @@
  */
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
 #include "dcmtk/ofstd/ofstring.h"
 #include "dcmtk/dcmpstat/dvpsdef.h"
 #include "dcmtk/dcmpstat/dvpspr.h"
@@ -482,7 +483,6 @@ OFCondition DVPSPrintMessageHandler::negotiateAssociation(
   }
   
   T_ASC_Parameters *params=NULL;
-  DIC_NODENAME dnlocalHost;
   DIC_NODENAME dnpeerHost;
 
   OFCondition cond = ASC_initializeNetwork(NET_REQUESTOR, 0, 30, &net);
@@ -497,9 +497,8 @@ OFCondition DVPSPrintMessageHandler::negotiateAssociation(
   if (cond.bad()) return cond;
 
   ASC_setAPTitles(params, myAEtitle, peerAEtitle, NULL);
-  gethostname(dnlocalHost, sizeof(dnlocalHost) - 1);
   sprintf(dnpeerHost, "%s:%d", peerHost, peerPort);
-  ASC_setPresentationAddresses(params, dnlocalHost, dnpeerHost);
+  ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), dnpeerHost);
 
   /* presentation contexts */
   const char* transferSyntaxes[3];
diff --git a/dcmpstat/libsrc/dvpssp.cc b/dcmpstat/libsrc/dvpssp.cc
index 37c3adc..99b0f1a 100644
--- a/dcmpstat/libsrc/dvpssp.cc
+++ b/dcmpstat/libsrc/dvpssp.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2010, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -1232,14 +1232,14 @@ OFCondition DVPSStoredPrint::deleteSpooledImages()
 {
   OFCondition result = EC_IllegalCall;
   char *c = NULL;
-  unsigned long deleteImageBoxes=0;
+  size_t deleteImageBoxes=0;
 
   updateCache();
   if (currentValuesValid)
   {
         deleteImageBoxes = currentNumCols * currentNumRows;
     if (deleteImageBoxes > imageBoxContentList.size()) deleteImageBoxes = imageBoxContentList.size();
-    result = imageBoxContentList.deleteMultipleImages((size_t)deleteImageBoxes);
+    result = imageBoxContentList.deleteMultipleImages(deleteImageBoxes);
   }
   if (EC_Normal != configurationInformation.getString(c)) c = NULL;
   presentationLUTList.cleanup(c, imageBoxContentList);
@@ -1528,7 +1528,7 @@ OFCondition DVPSStoredPrint::printSCUcreateBasicFilmBox(DVPSPrintMessageHandler&
         if (numItems > imageBoxContentList.size()) numItems = imageBoxContentList.size();
         for (i=0; i<numItems; i++)
         {
-           item = seq->getItem(i);
+           item = seq->getItem(OFstatic_cast(Uint32, i));
            stack.clear();
            READ_FROM_DATASET2(DcmUniqueIdentifier, refsopclassuid)
            READ_FROM_DATASET2(DcmUniqueIdentifier, refsopinstanceuid)
@@ -1551,7 +1551,7 @@ OFCondition DVPSStoredPrint::printSCUcreateBasicFilmBox(DVPSPrintMessageHandler&
         if (numItems > annotationContentList.size()) numItems = annotationContentList.size();
         for (i=0; i<numItems; i++)
         {
-           item = seq->getItem(i);
+           item = seq->getItem(OFstatic_cast(Uint32, i));
            stack.clear();
            READ_FROM_DATASET2(DcmUniqueIdentifier, refsopclassuid)
            READ_FROM_DATASET2(DcmUniqueIdentifier, refsopinstanceuid)
diff --git a/dcmpstat/libsrc/dvpstat.cc b/dcmpstat/libsrc/dvpstat.cc
index 37225d6..d603272 100644
--- a/dcmpstat/libsrc/dvpstat.cc
+++ b/dcmpstat/libsrc/dvpstat.cc
@@ -1263,7 +1263,7 @@ Uint16 DVPresentationState::getOverlayInImageGroup(size_t idx)
   Uint16 group;
   do
   {
-    group = (Uint16) (currentImage->getOverlayGroupNumber(currentIndex++));
+    group = (Uint16) (currentImage->getOverlayGroupNumber(OFstatic_cast(Uint32, currentIndex++)));
     if (!overlayList.haveOverlayGroup(group))
     {
       // group is not shadowed by the presentation state
diff --git a/dcmpstat/libsrc/dvpsvw.cc b/dcmpstat/libsrc/dvpsvw.cc
index 8aea5e2..427a79a 100644
--- a/dcmpstat/libsrc/dvpsvw.cc
+++ b/dcmpstat/libsrc/dvpsvw.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2013, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -60,13 +60,13 @@ OFCondition DVPSVOIWindow::read(size_t idx, DcmDecimalString &wcenter, DcmDecima
   if (wcenter.getVM() <= idx) return EC_IllegalCall;
   if (wwidth.getVM() <= idx) return EC_IllegalCall;
   Float64 wc=0.0, ww=0.0;
-  OFCondition result = wcenter.getFloat64(wc, idx);
-  if (EC_Normal==result) result= wwidth.getFloat64(ww, idx);
+  OFCondition result = wcenter.getFloat64(wc, OFstatic_cast(Uint32, idx));
+  if (EC_Normal==result) result= wwidth.getFloat64(ww, OFstatic_cast(Uint32, idx));
   if (EC_Normal==result)
   {
     windowCenter = wc;
     windowWidth = ww;
-    if (expl && (expl->getVM() > idx)) expl->getOFString(windowCenterWidthExplanation, idx);
+    if (expl && (expl->getVM() > idx)) expl->getOFString(windowCenterWidthExplanation, OFstatic_cast(Uint32, idx));
     else
     {
       // create default description for VOI Window
diff --git a/dcmpstat/tests/CMakeLists.txt b/dcmpstat/tests/CMakeLists.txt
new file mode 100644
index 0000000..f3fae24
--- /dev/null
+++ b/dcmpstat/tests/CMakeLists.txt
@@ -0,0 +1,5 @@
+# declare executables
+DCMTK_ADD_EXECUTABLE(msgserv msgserv)
+
+# make sure executables are linked to the corresponding libraries
+DCMTK_TARGET_LINK_MODULES(msgserv dcmpstat dcmdsig dcmsr dcmimage dcmimgle dcmqrdb dcmnet dcmtls dcmdata oflog ofstd)
diff --git a/dcmpstat/tests/Makefile.dep b/dcmpstat/tests/Makefile.dep
index d3b45e0..16d372c 100644
--- a/dcmpstat/tests/Makefile.dep
+++ b/dcmpstat/tests/Makefile.dep
@@ -19,7 +19,10 @@ msgserv.o: msgserv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -37,16 +40,17 @@ msgserv.o: msgserv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
diff --git a/dcmpstat/tests/Makefile.in b/dcmpstat/tests/Makefile.in
index 3049c87..40d0a99 100644
--- a/dcmpstat/tests/Makefile.in
+++ b/dcmpstat/tests/Makefile.in
@@ -33,7 +33,7 @@ LIBDIRS = -L$(top_srcdir)/libsrc -L$(dcmnetdir)/libsrc -L$(ofstddir)/libsrc \
 	-L$(dcmimagedir)/libsrc -L$(dcmsrdir)/libsrc
 LOCALLIBS = -ldcmpstat -ldcmdsig -ldcmsr -ldcmimage -ldcmimgle -ldcmqrdb -ldcmnet \
 	-ldcmtls -ldcmdata -loflog -lofstd $(TIFFLIBS) $(PNGLIBS) $(XMLLIBS) $(ZLIBLIBS) \
-	$(TCPWRAPPERLIBS) $(OPENSSLLIBS) $(CHARCONVLIBS)
+	$(TCPWRAPPERLIBS) $(OPENSSLLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
 objs = msgserv.o
 progs = msgserv
@@ -42,7 +42,7 @@ progs = msgserv
 all: $(progs)
 
 msgserv: msgserv.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ msgserv.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ msgserv.o $(LOCALLIBS) $(LIBS)
 
 
 check:
diff --git a/dcmpstat/tests/msgserv.cc b/dcmpstat/tests/msgserv.cc
index 1951477..b34b9c9 100644
--- a/dcmpstat/tests/msgserv.cc
+++ b/dcmpstat/tests/msgserv.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2014, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -21,8 +21,10 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
+#ifdef HAVE_WINDOWS_H
+#include <winsock2.h>
+#elif defined(HAVE_WINSOCK_H)
+#include <winsock.h>  /* include winsock.h directly i.e. on MacOS */
 #endif
 
 BEGIN_EXTERN_C
@@ -92,11 +94,7 @@ static const char *applicationType(Uint32 i)
 
 int main(int argc, char *argv[])
 {
-
-#ifdef HAVE_GUSI_H
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
+    OFStandard::initializeNetwork();
 
 #ifdef WITH_TCPWRAPPER
     // this code makes sure that the linker cannot optimize away
@@ -105,13 +103,6 @@ int main(int argc, char *argv[])
     dcmTCPWrapperDaemonName.set(NULL);
 #endif
 
-#ifdef HAVE_WINSOCK_H
-    WSAData winSockData;
-    /* we need at least version 1.1 */
-    WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-    WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
-
     OFCmdUnsignedInt opt_port = 0;                   /* listen port */
     Uint32           clientID = 0;                   /* IDs assigned to connecting clients */
 
@@ -155,23 +146,29 @@ int main(int argc, char *argv[])
 #endif
 
     /* open listen socket */
+#ifdef _WIN32
+    SOCKET s = socket(AF_INET, SOCK_STREAM, 0);
+    if (s == INVALID_SOCKET)
+#else
     int s = socket(AF_INET, SOCK_STREAM, 0);
     if (s < 0)
+#endif
     {
       OFLOG_FATAL(msgservLogger, "failed to create socket");
       return 10;
     }
 
-#ifdef HAVE_GUSI_H
-    /* GUSI always returns an error for setsockopt(...) */
-#else
     int reuse = 1;
+
+#ifdef _WIN32
+    if (setsockopt(s, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *) &reuse, sizeof(reuse)) < 0)
+#else
     if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *) &reuse, sizeof(reuse)) < 0)
+#endif
     {
       OFLOG_FATAL(msgservLogger, "failed to set socket options");
       return 10;
     }
-#endif
 
     /* Name socket using wildcards */
     struct sockaddr_in server;
@@ -204,9 +201,10 @@ int main(int argc, char *argv[])
       t.tv_usec = 0;
 
 #ifdef HAVE_INTP_SELECT
-      nfound = select(s + 1, (int *)(&fdset), NULL, NULL, &t);
+      nfound = select(OFstatic_cast(int, s + 1), (int *)(&fdset), NULL, NULL, &t);
 #else
-      nfound = select(s + 1, &fdset, NULL, NULL, &t);
+      // the typecast is safe because Windows ignores the first select() parameter anyway
+      nfound = select(OFstatic_cast(int, s + 1), &fdset, NULL, NULL, &t);
 #endif
 
       if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
@@ -217,7 +215,11 @@ int main(int argc, char *argv[])
       if (nfound > 0)
       {
         // incoming connection detected
+#ifdef _WIN32
+        SOCKET sock=0;
+#else
         int sock=0;
+#endif
         struct sockaddr from;
 #ifdef HAVE_DECLARATION_SOCKLEN_T
         socklen_t len = sizeof(from);
@@ -229,24 +231,29 @@ int main(int argc, char *argv[])
         do
         {
           sock = accept(s, &from, &len);
+#ifdef _WIN32
+        } while ((sock == INVALID_SOCKET)&&(errno == WSAEINTR));
+        if (sock == INVALID_SOCKET)
+#else
         } while ((sock == -1)&&(errno == EINTR));
-
         if (sock < 0)
+#endif
         {
           OFLOG_FATAL(msgservLogger, "unable to accept incoming connection");
           return 10;
         }
 
-#ifdef HAVE_GUSI_H
-        /* GUSI always returns an error for setsockopt(...) */
-#else
         reuse = 1;
+
+#ifdef _WIN32
+        if (setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *) &reuse, sizeof(reuse)) < 0)
+#else
         if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &reuse, sizeof(reuse)) < 0)
+#endif
         {
           OFLOG_FATAL(msgservLogger, "failed to set socket options");
           return 10;
         }
-#endif
 
         // now we can handle the incoming connection
         DcmTCPConnection connection(sock);
@@ -350,9 +357,7 @@ int main(int argc, char *argv[])
       }
     }
 
-#ifdef HAVE_WINSOCK_H
-    WSACleanup();
-#endif
+    OFStandard::shutdownNetwork();
 
     return 0;
 }
diff --git a/dcmqrdb/CMakeLists.txt b/dcmqrdb/CMakeLists.txt
index a9d169e..0c0d3ae 100644
--- a/dcmqrdb/CMakeLists.txt
+++ b/dcmqrdb/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmqrdb)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmqrdb_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmnet_SOURCE_DIR}/include ${ZLIB_INCDIR})
+INCLUDE_DIRECTORIES("${dcmqrdb_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmnet_SOURCE_DIR}/include" ${ZLIB_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc apps include docs etc)
diff --git a/dcmqrdb/apps/Makefile.dep b/dcmqrdb/apps/Makefile.dep
index 387deb2..ab45577 100644
--- a/dcmqrdb/apps/Makefile.dep
+++ b/dcmqrdb/apps/Makefile.dep
@@ -17,6 +17,7 @@ dcmqridx.o: dcmqridx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \
  ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -40,7 +41,9 @@ dcmqridx.o: dcmqridx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -68,6 +71,7 @@ dcmqridx.o: dcmqridx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../include/dcmtk/dcmqrdb/dcmqrdbs.h ../include/dcmtk/dcmqrdb/qrdefine.h \
  ../include/dcmtk/dcmqrdb/dcmqrdbi.h ../include/dcmtk/dcmqrdb/dcmqrdba.h \
@@ -91,6 +95,7 @@ dcmqrscp.o: dcmqrscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -110,7 +115,9 @@ dcmqrscp.o: dcmqrscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -128,6 +135,7 @@ dcmqrscp.o: dcmqrscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -139,8 +147,17 @@ dcmqrscp.o: dcmqrscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dcasccff.h \
  ../include/dcmtk/dcmqrdb/dcmqropt.h ../include/dcmtk/dcmqrdb/dcmqrcnf.h \
  ../include/dcmtk/dcmqrdb/qrdefine.h ../include/dcmtk/dcmqrdb/dcmqrsrv.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dcasccfg.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccftsmp.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfuidh.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfpcmp.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfrsmp.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfenmp.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfprmp.h \
  ../include/dcmtk/dcmqrdb/dcmqrptb.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \
  ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \
@@ -151,10 +168,7 @@ dcmqrscp.o: dcmqrscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofpwd.h \
  ../include/dcmtk/dcmqrdb/dcmqrdbi.h ../include/dcmtk/dcmqrdb/dcmqrdba.h \
  ../../ofstd/include/dcmtk/ofstd/offname.h \
- ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcmqrti.o: dcmqrti.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmqrdb/dcmqrtis.h \
@@ -186,7 +200,10 @@ dcmqrti.o: dcmqrti.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -202,9 +219,9 @@ dcmqrti.o: dcmqrti.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
@@ -212,6 +229,7 @@ dcmqrti.o: dcmqrti.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
diff --git a/dcmqrdb/apps/Makefile.in b/dcmqrdb/apps/Makefile.in
index f46abf7..db17224 100644
--- a/dcmqrdb/apps/Makefile.in
+++ b/dcmqrdb/apps/Makefile.in
@@ -36,7 +36,7 @@ LOCALINCLUDES = $(dcmnetinc) $(dcmdatainc) $(ofstdinc) $(ofloginc)
 LIBDIRS = -L$(top_srcdir)/libsrc $(dcmnetlibdir) $(dcmdatalibdir) \
 	$(ofstdlibdir) $(ofloglibdir)
 LOCALLIBS = -ldcmqrdb $(dcmnetlib) $(dcmdatalib) $(ofstdlib) $(ofloglib) \
-	$(ZLIBLIBS) $(TCPWRAPPERLIBS) $(CHARCONVLIBS)
+	$(ZLIBLIBS) $(TCPWRAPPERLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
 objs = dcmqrscp.o dcmqrti.o dcmqridx.o
 progs = dcmqrscp dcmqrti dcmqridx
@@ -45,13 +45,13 @@ progs = dcmqrscp dcmqrti dcmqridx
 all: $(progs)
 
 dcmqrscp: dcmqrscp.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmqrscp.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmqrscp.o $(LOCALLIBS) $(LIBS)
 
 dcmqrti: dcmqrti.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmqrti.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmqrti.o $(LOCALLIBS) $(LIBS)
 
 dcmqridx: dcmqridx.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmqridx.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ dcmqridx.o $(LOCALLIBS) $(LIBS)
 
 
 install: all
diff --git a/dcmqrdb/apps/dcmqridx.cc b/dcmqrdb/apps/dcmqridx.cc
index 2b45d1b..d36f132 100644
--- a/dcmqrdb/apps/dcmqridx.cc
+++ b/dcmqrdb/apps/dcmqridx.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2012, OFFIS e.V.
+ *  Copyright (C) 1993-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -92,12 +92,6 @@ int main (int argc, char *argv[])
      cmd.addOption("--print",   "-p", "list contents of database index file");
      cmd.addOption("--not-new", "-n", "set instance reviewed status to 'not new'");
 
-#ifdef HAVE_GUSI_H
-    /* needed for Macintosh */
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
-
     /* evaluate command line */
     prepareCmdLineArgs(argc, argv, OFFIS_CONSOLE_APPLICATION);
     if (app.parseCommandLine(cmd, argc, argv))
diff --git a/dcmqrdb/apps/dcmqrscp.cc b/dcmqrdb/apps/dcmqrscp.cc
index 37104da..e3cad0e 100644
--- a/dcmqrdb/apps/dcmqrscp.cc
+++ b/dcmqrdb/apps/dcmqrscp.cc
@@ -25,7 +25,6 @@
 #define INCLUDE_CSTDIO
 #define INCLUDE_CSTRING
 #define INCLUDE_CSTDARG
-#define INCLUDE_CERRNO
 #define INCLUDE_CTIME
 #define INCLUDE_LIBC
 #include "dcmtk/ofstd/ofstdinc.h"
@@ -49,9 +48,6 @@ BEGIN_EXTERN_C
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
-#ifdef HAVE_SYS_ERRNO_H
-#include <sys/errno.h>
-#endif
 #ifdef HAVE_IO_H
 #include <io.h>
 #endif
@@ -60,6 +56,7 @@ END_EXTERN_C
 #include "dcmtk/ofstd/ofconapp.h"
 #include "dcmtk/dcmnet/dicom.h"
 #include "dcmtk/dcmnet/dimse.h"
+#include "dcmtk/dcmnet/dcasccff.h"
 #include "dcmtk/dcmqrdb/dcmqropt.h"
 #include "dcmtk/dcmqrdb/dcmqrcnf.h"
 #include "dcmtk/dcmqrdb/dcmqrsrv.h"
@@ -102,6 +99,19 @@ OFCmdUnsignedInt opt_port = 0;
 #define SHORTCOL 4
 #define LONGCOL 22
 
+static void mangleAssociationProfileKey(OFString& key)
+{
+  for (size_t ui = 0; ui < key.size();)
+  {
+    if (!isspace(key[ui]))
+    {
+      key[ui] = toupper(key[ui]);
+      ++ui;
+    }
+    else key.erase(ui, 1);
+  }
+}
+
 int
 main(int argc, char *argv[])
 {
@@ -109,19 +119,9 @@ main(int argc, char *argv[])
   OFCmdUnsignedInt overridePort = 0;
   OFCmdUnsignedInt overrideMaxPDU = 0;
   DcmQueryRetrieveOptions options;
+  DcmAssociationConfiguration asccfg;
 
-#ifdef HAVE_GUSI_H
-  /* needed for Macintosh */
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
-#ifdef HAVE_WINSOCK_H
-  WSAData winSockData;
-  /* we need at least version 1.1 */
-  WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-  WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
+  OFStandard::initializeNetwork();
 
   char tempstr[20];
   OFString temp_str;
@@ -184,6 +184,10 @@ main(int argc, char *argv[])
 #endif
 
   cmd.addGroup("network options:");
+    cmd.addSubGroup("association negotiation profiles from configuration file:");
+      cmd.addOption("--assoc-config-file",      "-xf",  3,   "[f]ilename, [i]n-profile, [o]ut-profile: string",
+                                                             "use profile i from f for incoming associations\n"
+                                                             "use profile o from f for outgoing associations");
     cmd.addSubGroup("preferred network transfer syntaxes (incoming associations):");
       cmd.addOption("--prefer-uncompr",         "+x=",       "prefer explicit VR local byte order (default)");
       cmd.addOption("--prefer-little",          "+xe",       "prefer explicit VR little endian TS");
@@ -203,6 +207,8 @@ main(int argc, char *argv[])
       cmd.addOption("--prefer-mpeg4-2-2d",      "+x2",       "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (2D)");
       cmd.addOption("--prefer-mpeg4-2-3d",      "+x3",       "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (3D)");
       cmd.addOption("--prefer-mpeg4-2-st",      "+xo",       "prefer MPEG4 AVC/H.264 Stereo / Level 4.2 TS");
+      cmd.addOption("--prefer-hevc",            "+x4",       "prefer HEVC/H.265 Main Profile / Level 5.1 TS");
+      cmd.addOption("--prefer-hevc10",          "+x5",       "prefer HEVC/H.265 Main 10 Profile / Level 5.1 TS");
       cmd.addOption("--prefer-rle",             "+xr",       "prefer RLE lossless TS");
 #ifdef WITH_ZLIB
       cmd.addOption("--prefer-deflated",        "+xd",       "prefer deflated expl. VR little endian TS");
@@ -230,6 +236,8 @@ main(int argc, char *argv[])
       cmd.addOption("--propose-mpeg4-2-2d",     "-x2",       "propose MPEG4 AVC/H.264 HP / Level 4.2 TS (2D)");
       cmd.addOption("--propose-mpeg4-2-3d",     "-x3",       "propose MPEG4 AVC/H.264 HP / Level 4.2 TS (3D)");
       cmd.addOption("--propose-mpeg4-2-st",     "-xo",       "propose MPEG4 AVC/H.264 Stereo / Level 4.2 TS");
+      cmd.addOption("--propose-hevc",           "-x4",       "propose HEVC/H.265 Main Profile / Level 5.1 TS");
+      cmd.addOption("--propose-hevc10",         "-x5",       "propose HEVC/H.265 Main 10 Profile / Level 5.1 TS");
       cmd.addOption("--propose-rle",            "-xr",       "propose RLE lossless TS\nand all uncompressed transfer syntaxes");
 #ifdef WITH_ZLIB
       cmd.addOption("--propose-deflated",       "-xd",       "propose deflated expl. VR little endian TS\nand all uncompressed transfer syntaxes");
@@ -417,6 +425,8 @@ main(int argc, char *argv[])
       if (cmd.findOption("--prefer-mpeg4-2-2d")) options.networkTransferSyntax_ = EXS_MPEG4HighProfileLevel4_2_For2DVideo;
       if (cmd.findOption("--prefer-mpeg4-2-3d")) options.networkTransferSyntax_ = EXS_MPEG4HighProfileLevel4_2_For3DVideo;
       if (cmd.findOption("--prefer-mpeg4-2-st")) options.networkTransferSyntax_ = EXS_MPEG4StereoHighProfileLevel4_2;
+      if (cmd.findOption("--prefer-hevc")) options.networkTransferSyntax_ = EXS_HEVCMainProfileLevel5_1;
+      if (cmd.findOption("--prefer-hevc10")) options.networkTransferSyntax_ = EXS_HEVCMain10ProfileLevel5_1;
       if (cmd.findOption("--prefer-rle")) options.networkTransferSyntax_ = EXS_RLELossless;
 #ifdef WITH_ZLIB
       if (cmd.findOption("--prefer-deflated")) options.networkTransferSyntax_ = EXS_DeflatedLittleEndianExplicit;
@@ -445,6 +455,8 @@ main(int argc, char *argv[])
       if (cmd.findOption("--propose-mpeg4-2-2d")) options.networkTransferSyntaxOut_ = EXS_MPEG4HighProfileLevel4_2_For2DVideo;
       if (cmd.findOption("--propose-mpeg4-2-3d")) options.networkTransferSyntaxOut_ = EXS_MPEG4HighProfileLevel4_2_For3DVideo;
       if (cmd.findOption("--propose-mpeg4-2-st")) options.networkTransferSyntaxOut_ = EXS_MPEG4StereoHighProfileLevel4_2;
+      if (cmd.findOption("--propose-hevc")) options.networkTransferSyntaxOut_ = EXS_HEVCMainProfileLevel5_1;
+      if (cmd.findOption("--propose-hevc10")) options.networkTransferSyntaxOut_ = EXS_HEVCMain10ProfileLevel5_1;
       if (cmd.findOption("--propose-rle")) options.networkTransferSyntaxOut_ = EXS_RLELossless;
 #ifdef WITH_ZLIB
       if (cmd.findOption("--propose-deflated")) options.networkTransferSyntaxOut_ = EXS_DeflatedLittleEndianExplicit;
@@ -488,6 +500,95 @@ main(int argc, char *argv[])
       if (cmd.findOption("--ignore")) options.ignoreStoreData_ = OFTrue;
       if (cmd.findOption("--uid-padding")) options.correctUIDPadding_ = OFTrue;
 
+      if (cmd.findOption("--assoc-config-file"))
+      {
+        // check conflicts with other command line options
+        app.checkConflict("--assoc-config-file", "--prefer-little", options.networkTransferSyntax_ == EXS_LittleEndianExplicit);
+        app.checkConflict("--assoc-config-file", "--prefer-big", options.networkTransferSyntax_ == EXS_BigEndianExplicit);
+        app.checkConflict("--assoc-config-file", "--prefer-lossless", options.networkTransferSyntax_ == EXS_JPEGProcess14SV1);
+        app.checkConflict("--assoc-config-file", "--prefer-jpeg8", options.networkTransferSyntax_ == EXS_JPEGProcess1);
+        app.checkConflict("--assoc-config-file", "--prefer-jpeg12", options.networkTransferSyntax_ == EXS_JPEGProcess2_4);
+        app.checkConflict("--assoc-config-file", "--prefer-j2k-lossless", options.networkTransferSyntax_ == EXS_JPEG2000LosslessOnly);
+        app.checkConflict("--assoc-config-file", "--prefer-j2k-lossy", options.networkTransferSyntax_ == EXS_JPEG2000);
+        app.checkConflict("--assoc-config-file", "--prefer-jls-lossless", options.networkTransferSyntax_ == EXS_JPEGLSLossless);
+        app.checkConflict("--assoc-config-file", "--prefer-jls-lossy", options.networkTransferSyntax_ == EXS_JPEGLSLossy);
+        app.checkConflict("--assoc-config-file", "--prefer-mpeg2", options.networkTransferSyntax_ == EXS_MPEG2MainProfileAtMainLevel);
+        app.checkConflict("--assoc-config-file", "--prefer-mpeg2-high", options.networkTransferSyntax_ == EXS_MPEG2MainProfileAtHighLevel);
+        app.checkConflict("--assoc-config-file", "--prefer-mpeg4", options.networkTransferSyntax_ == EXS_MPEG4HighProfileLevel4_1);
+        app.checkConflict("--assoc-config-file", "--prefer-mpeg4-bd", options.networkTransferSyntax_ == EXS_MPEG4BDcompatibleHighProfileLevel4_1);
+        app.checkConflict("--assoc-config-file", "--prefer-mpeg4-2-2d", options.networkTransferSyntax_ == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
+        app.checkConflict("--assoc-config-file", "--prefer-mpeg4-2-3d", options.networkTransferSyntax_ == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
+        app.checkConflict("--assoc-config-file", "--prefer-mpeg4-2-st", options.networkTransferSyntax_ == EXS_MPEG4StereoHighProfileLevel4_2);
+        app.checkConflict("--assoc-config-file", "--prefer-hevc", options.networkTransferSyntax_ == EXS_HEVCMainProfileLevel5_1);
+        app.checkConflict("--assoc-config-file", "--prefer-hevc10", options.networkTransferSyntax_ == EXS_HEVCMain10ProfileLevel5_1);
+        app.checkConflict("--assoc-config-file", "--prefer-rle", options.networkTransferSyntax_ == EXS_RLELossless);
+#ifdef WITH_ZLIB
+        app.checkConflict("--assoc-config-file", "--prefer-deflated", options.networkTransferSyntax_ == EXS_DeflatedLittleEndianExplicit);
+#endif
+        app.checkConflict("--assoc-config-file", "--implicit", options.networkTransferSyntax_ == EXS_LittleEndianImplicit);
+
+        app.checkConflict("--assoc-config-file", "--propose-little", options.networkTransferSyntaxOut_ == EXS_LittleEndianExplicit);
+        app.checkConflict("--assoc-config-file", "--propose-big", options.networkTransferSyntaxOut_ == EXS_BigEndianExplicit);
+        app.checkConflict("--assoc-config-file", "--propose-implicit", options.networkTransferSyntaxOut_ == EXS_LittleEndianImplicit);
+        app.checkConflict("--assoc-config-file", "--propose-lossless", options.networkTransferSyntaxOut_ == EXS_JPEGProcess14SV1);
+        app.checkConflict("--assoc-config-file", "--propose-jpeg8", options.networkTransferSyntaxOut_ == EXS_JPEGProcess1);
+        app.checkConflict("--assoc-config-file", "--propose-jpeg12", options.networkTransferSyntaxOut_ == EXS_JPEGProcess2_4);
+        app.checkConflict("--assoc-config-file", "--propose-j2k-lossless", options.networkTransferSyntaxOut_ == EXS_JPEG2000LosslessOnly);
+        app.checkConflict("--assoc-config-file", "--propose-j2k-lossy", options.networkTransferSyntaxOut_ == EXS_JPEG2000);
+        app.checkConflict("--assoc-config-file", "--propose-jls-lossless", options.networkTransferSyntaxOut_ == EXS_JPEGLSLossless);
+        app.checkConflict("--assoc-config-file", "--propose-jls-lossy", options.networkTransferSyntaxOut_ == EXS_JPEGLSLossy);
+        app.checkConflict("--assoc-config-file", "--propose-mpeg2", options.networkTransferSyntaxOut_ == EXS_MPEG2MainProfileAtMainLevel);
+        app.checkConflict("--assoc-config-file", "--propose-mpeg2-high", options.networkTransferSyntaxOut_ == EXS_MPEG2MainProfileAtHighLevel);
+        app.checkConflict("--assoc-config-file", "--propose-mpeg4", options.networkTransferSyntaxOut_ == EXS_MPEG4HighProfileLevel4_1);
+        app.checkConflict("--assoc-config-file", "--propose-mpeg4-bd", options.networkTransferSyntaxOut_ == EXS_MPEG4BDcompatibleHighProfileLevel4_1);
+        app.checkConflict("--assoc-config-file", "--propose-mpeg4-2-2d", options.networkTransferSyntaxOut_ == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
+        app.checkConflict("--assoc-config-file", "--propose-mpeg4-2-3d", options.networkTransferSyntaxOut_ == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
+        app.checkConflict("--assoc-config-file", "--propose-mpeg4-2-st", options.networkTransferSyntaxOut_ == EXS_MPEG4StereoHighProfileLevel4_2);
+        app.checkConflict("--assoc-config-file", "--propose-hevc", options.networkTransferSyntaxOut_ == EXS_HEVCMainProfileLevel5_1);
+        app.checkConflict("--assoc-config-file", "--propose-hevc10", options.networkTransferSyntaxOut_ == EXS_HEVCMain10ProfileLevel5_1);
+        app.checkConflict("--assoc-config-file", "--propose-rle", options.networkTransferSyntaxOut_ == EXS_RLELossless);
+#ifdef WITH_ZLIB
+        app.checkConflict("--assoc-config-file", "--propose-deflated", options.networkTransferSyntaxOut_ == EXS_DeflatedLittleEndianExplicit);
+#endif
+
+        app.checkValue(cmd.getValue(options.associationConfigFile));
+        app.checkValue(cmd.getValue(options.incomingProfile));
+        app.checkValue(cmd.getValue(options.outgoingProfile));
+
+        // read configuration file
+        OFCondition cond = DcmAssociationConfigurationFile::initialize(asccfg, options.associationConfigFile.c_str());
+        if (cond.bad())
+        {
+          OFLOG_FATAL(dcmqrscpLogger, "cannot read association config file: " << cond.text());
+          return 1;
+        }
+
+        const OFString unmangledInProfile = options.incomingProfile;
+        const OFString unmangledOutProfile = options.outgoingProfile;
+
+        /* perform name mangling for config file keys */
+        mangleAssociationProfileKey(options.incomingProfile);
+        mangleAssociationProfileKey(options.outgoingProfile);
+
+        if (!asccfg.isKnownProfile(options.incomingProfile.c_str()))
+        {
+          OFLOG_FATAL(dcmqrscpLogger, "unknown configuration profile name: " << unmangledInProfile);
+          return 1;
+        }
+
+        if (!asccfg.isKnownProfile(options.outgoingProfile.c_str()))
+        {
+          OFLOG_FATAL(dcmqrscpLogger, "unknown configuration profile name: " << unmangledOutProfile);
+          return 1;
+        }
+
+        if (!asccfg.isValidSCPProfile(options.incomingProfile.c_str()))
+        {
+          OFLOG_FATAL(dcmqrscpLogger, "profile '" << unmangledInProfile << "' is not valid for incoming use, duplicate abstract syntaxes found");
+          return 1;
+        }
+      }
+
       cmd.beginOptionBlock();
       if (cmd.findOption("--enable-new-vr")) dcmEnableGenerationOfNewVRs();
       if (cmd.findOption("--disable-new-vr")) dcmDisableGenerationOfNewVRs();
@@ -523,6 +624,8 @@ main(int argc, char *argv[])
         app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-2d", options.networkTransferSyntax_ == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
         app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-3d", options.networkTransferSyntax_ == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
         app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-st", options.networkTransferSyntax_ == EXS_MPEG4StereoHighProfileLevel4_2);
+        app.checkConflict("--write-xfer-little", "--prefer-hevc", options.networkTransferSyntax_ == EXS_HEVCMainProfileLevel5_1);
+        app.checkConflict("--write-xfer-little", "--prefer-hevc10", options.networkTransferSyntax_ == EXS_HEVCMain10ProfileLevel5_1);
         app.checkConflict("--write-xfer-little", "--prefer-rle", options.networkTransferSyntax_ == EXS_RLELossless);
         // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed.
 #endif
@@ -546,6 +649,8 @@ main(int argc, char *argv[])
         app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-2d", options.networkTransferSyntax_ == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
         app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-3d", options.networkTransferSyntax_ == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
         app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-st", options.networkTransferSyntax_ == EXS_MPEG4StereoHighProfileLevel4_2);
+        app.checkConflict("--write-xfer-big", "--prefer-hevc", options.networkTransferSyntax_ == EXS_HEVCMainProfileLevel5_1);
+        app.checkConflict("--write-xfer-big", "--prefer-hevc10", options.networkTransferSyntax_ == EXS_HEVCMain10ProfileLevel5_1);
         app.checkConflict("--write-xfer-big", "--prefer-rle", options.networkTransferSyntax_ == EXS_RLELossless);
         // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed.
 #endif
@@ -569,6 +674,8 @@ main(int argc, char *argv[])
         app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-2d", options.networkTransferSyntax_ == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
         app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-3d", options.networkTransferSyntax_ == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
         app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-st", options.networkTransferSyntax_ == EXS_MPEG4StereoHighProfileLevel4_2);
+        app.checkConflict("--write-xfer-implicit", "--prefer-hevc", options.networkTransferSyntax_ == EXS_HEVCMainProfileLevel5_1);
+        app.checkConflict("--write-xfer-implicit", "--prefer-hevc10", options.networkTransferSyntax_ == EXS_HEVCMain10ProfileLevel5_1);
         app.checkConflict("--write-xfer-implicit", "--prefer-rle", options.networkTransferSyntax_ == EXS_RLELossless);
         // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed.
 #endif
@@ -593,6 +700,8 @@ main(int argc, char *argv[])
         app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-2d", options.networkTransferSyntax_ == EXS_MPEG4HighProfileLevel4_2_For2DVideo);
         app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-3d", options.networkTransferSyntax_ == EXS_MPEG4HighProfileLevel4_2_For3DVideo);
         app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-st", options.networkTransferSyntax_ == EXS_MPEG4StereoHighProfileLevel4_2);
+        app.checkConflict("--write-xfer-deflated", "--prefer-hevc", options.networkTransferSyntax_ == EXS_HEVCMainProfileLevel5_1);
+        app.checkConflict("--write-xfer-deflated", "--prefer-hevc10", options.networkTransferSyntax_ == EXS_HEVCMain10ProfileLevel5_1);
         app.checkConflict("--write-xfer-deflated", "--prefer-rle", options.networkTransferSyntax_ == EXS_RLELossless);
 #endif
         options.writeTransferSyntax_ = EXS_DeflatedLittleEndianExplicit;
@@ -668,9 +777,8 @@ main(int argc, char *argv[])
 
     /* read config file */
     if (access(opt_configFileName, R_OK) < 0) {
-      char buf[256];
       OFLOG_FATAL(dcmqrscpLogger, "cannot access " << opt_configFileName << ": "
-        << OFStandard::strerror(errno, buf, sizeof(buf)));
+        << OFStandard::getLastSystemErrorCode().message());
       return 10;
     }
 
@@ -797,7 +905,7 @@ main(int argc, char *argv[])
     DcmQueryRetrieveIndexDatabaseHandleFactory factory(&config);
 #endif
 
-    DcmQueryRetrieveSCP scp(config, options, factory);
+    DcmQueryRetrieveSCP scp(config, options, factory, asccfg);
     scp.setDatabaseFlags(opt_checkFindIdentifier, opt_checkMoveIdentifier);
 
     /* loop waiting for associations */
@@ -813,9 +921,7 @@ main(int argc, char *argv[])
       return 10;
     }
 
-#ifdef HAVE_WINSOCK_H
-    WSACleanup();
-#endif
+    OFStandard::shutdownNetwork();
 
     return 0;
 }
diff --git a/dcmqrdb/apps/dcmqrti.cc b/dcmqrdb/apps/dcmqrti.cc
index 741b5a5..0e78905 100644
--- a/dcmqrdb/apps/dcmqrti.cc
+++ b/dcmqrdb/apps/dcmqrti.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2014, OFFIS e.V.
+ *  Copyright (C) 1993-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -94,18 +94,7 @@ int main( int argc, char *argv[] )
   char tempstr[20];
   OFString temp_str;
 
-#ifdef HAVE_GUSI_H
-  // needed for Macintosh
-  GUSISetup( GUSIwithSIOUXSockets );
-  GUSISetup( GUSIwithInternetSockets );
-#endif
-
-#ifdef HAVE_WINSOCK_H
-  WSAData winSockData;
-  // we need at least version 1.1
-  WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-  WSAStartup( winSockVersionNeeded, &winSockData );
-#endif
+  OFStandard::initializeNetwork();
 
   // initialize conf structure
   conf.setAETitle(APPLICATIONTITLE);
@@ -390,9 +379,7 @@ int main( int argc, char *argv[] )
     returnValue = 1;
   }
 
-#ifdef HAVE_WINSOCK_H
-  WSACleanup();
-#endif
+  OFStandard::shutdownNetwork();
 
   // return result
   return( returnValue );
diff --git a/dcmqrdb/docs/CMakeLists.txt b/dcmqrdb/docs/CMakeLists.txt
index be9870b..164b375 100644
--- a/dcmqrdb/docs/CMakeLists.txt
+++ b/dcmqrdb/docs/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(FILES dcmqrcnf.txt dcmqrset.txt DESTINATION ${DCMTK_INSTALL_DOCDIR} COMPONENT doc)
+INSTALL(FILES dcmqrcnf.txt dcmqrset.txt DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc)
diff --git a/dcmqrdb/docs/dcmqridx.man b/dcmqrdb/docs/dcmqridx.man
index 3ba8023..3db2401 100644
--- a/dcmqrdb/docs/dcmqridx.man
+++ b/dcmqrdb/docs/dcmqridx.man
@@ -6,26 +6,26 @@
 \page dcmqridx dcmqridx: Register a DICOM image file in an image database index file
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmqridx_synopsis SYNOPSIS
 
 \verbatim
 dcmqridx [options] index-out [dcmfile-in...]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmqridx_description DESCRIPTION
 
 The \b dcmqridx utility registers DICOM image files in the database index file
 used by the \b dcmqrscp and \b dcmqrti applications.  No image files are copied.
 \b dcmqridx can also list the contents of the database index file.
 
-\section parameters PARAMETERS
+\section dcmqridx_parameters PARAMETERS
 \verbatim
 index-out   storage area for the index file (directory)
 
 dcmfile-in  DICOM image file to be registered in the index file
 \endverbatim
 
-\section options OPTIONS
+\section dcmqridx_options OPTIONS
 
 \verbatim
   -h   --help
@@ -60,7 +60,7 @@ dcmfile-in  DICOM image file to be registered in the index file
          set instance reviewed status to 'not new'
 \endverbatim
 
-\section notes NOTES
+\section dcmqridx_notes NOTES
 
 \b dcmqridx attempts to add a reference to the database index file for each
 image-file provided on the command line.
@@ -68,7 +68,7 @@ image-file provided on the command line.
 \b dcmqridx disables the database back-end quota system so that no image files
 will be deleted.
 
-\section logging LOGGING
+\section dcmqridx_logging 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
@@ -87,7 +87,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmqridx_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -109,7 +109,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmqridx_environment ENVIRONMENT
 
 The \b dcmqridx utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -125,11 +125,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dcmqridx_see_also SEE ALSO
 
 <b>dcmqrscp</b>(1), <b>dcmqrti</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmqridx_copyright COPYRIGHT
 
 Copyright (C) 1993-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmqrdb/docs/dcmqrscp.man b/dcmqrdb/docs/dcmqrscp.man
index 4857262..0193217 100644
--- a/dcmqrdb/docs/dcmqrscp.man
+++ b/dcmqrdb/docs/dcmqrscp.man
@@ -6,13 +6,13 @@
 \page dcmqrscp dcmqrscp: DICOM image archive (central test node)
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmqrscp_synopsis SYNOPSIS
 
 \verbatim
 dcmqrscp [options] [port]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmqrscp_description DESCRIPTION
 
 The Image Central Test Node (\b dcmqrscp) Application implements a simple image
 archive.  It manages a number of storage areas and allows images to be stored
@@ -33,15 +33,15 @@ that date but must be re-created.  Use \b dcmqridx for that task or re-send all
 images to the server after deleting all old files (and creating a new empty
 \e index.dat file).
 
-\section parameters PARAMETERS
+\section dcmqrscp_parameters PARAMETERS
 
 \verbatim
 port  tcp/ip port number to listen on (default: in config file)
 \endverbatim
 
-\section options OPTIONS
+\section dcmqrscp_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmqrscp_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -82,7 +82,7 @@ port  tcp/ip port number to listen on (default: in config file)
   # example configuration file dcmqrscp.cfg).
 \endverbatim
 
-\subsection multiprocess_options multi-process options
+\subsection dcmqrscp_multiprocess_options multi-process options
 \verbatim
   -s    --single-process
           single process mode
@@ -100,7 +100,7 @@ port  tcp/ip port number to listen on (default: in config file)
   # on systems that support the fork() call, i.e. not on Windows.
 \endverbatim
 
-\subsection database_options database options
+\subsection dcmqrscp_database_options database options
 \verbatim
 association negotiation:
 
@@ -182,8 +182,15 @@ restriction of query/retrieve models:
           do not support Patient/Study Only Q/R models
 \endverbatim
 
-\subsection network_options network options
+\subsection dcmqrscp_network_options network options
 \verbatim
+association negotiation profiles from configuration file:
+
+  -xf   --assoc-config-file
+          [f]ilename, [i]n-profile, [o]ut-profile: string
+          use profile i from f for incoming associations
+          use profile o from f for outgoing associations
+
 preferred network transfer syntaxes (incoming associations):
 
   +x=   --prefer-uncompr
@@ -237,6 +244,12 @@ preferred network transfer syntaxes (incoming associations):
   +xo   --prefer-mpeg4-2-st
           prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS
 
+  +x4   --prefer-hevc
+          prefer HEVC H.265 Main Profile / Level 5.1 TS
+
+  +x5   --prefer-hevc10
+          prefer HEVC H.265 Main 10 Profile / Level 5.1 TS
+
   +xr   --prefer-rle
           prefer RLE lossless TS
 
@@ -310,6 +323,12 @@ proposed transmission transfer syntaxes (outgoing associations):
   -xo   --propose-mpeg4-2-st
           propose MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS only
 
+  -x4   --propose-hevc
+          propose HEVC H.265 Main Profile / Level 5.1 TS only
+
+  -x5   --propose-hevc10
+          propose HEVC H.265 Main 10 Profile / Level 5.1 TS only
+
   -xr   --propose-rle
           propose RLE lossless TS
           and all uncompressed transfer syntaxes
@@ -362,7 +381,7 @@ other network options:
           silently correct space-padded UIDs
 \endverbatim
 
-\subsection encoding_options encoding options
+\subsection dcmqrscp_encoding_options encoding options
 \verbatim
 post-1993 value representations:
 
@@ -378,7 +397,7 @@ post-1993 value representations:
   # these value representations.
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmqrscp_output_options output options
 \verbatim
 bit preserving mode:
 
@@ -449,12 +468,15 @@ deflate compression level (only with --propose-deflated or
           0=uncompressed, 1=fastest, 9=best compression
 
 specific character set:
+
+  # the following options require support from an underlying character
+  # encoding library (see output of --version on which one is available)
+
   +Cr   --use-request-charset
-          try to convert all element values that are
-          affected by Specific Character Set (0008,0005)
-          to the one specified in the request data set,
-          fall back to the one specified via
-          --convert-to-xxx if that is not possible
+          try to convert all element values that are affected by
+          Specific Character Set (0008,0005) to the one specified
+          in the request data set, fall back to the one specified
+          via --convert-to-xxx if that is not possible
           (default, unless overridden by config file)
 
   -Cr   --override-charset
@@ -473,8 +495,8 @@ specific character set:
           convert affected element values to ISO 8859-1
 
   +C    --convert-to-charset  [c]harset: string
-          convert affected element values to the character
-          set specified by the DICOM defined term c
+          convert affected element values to the character set
+          specified by the DICOM defined term c
 
   -Ct   --transliterate
           try to approximate characters that cannot be
@@ -485,9 +507,9 @@ specific character set:
           in destination character set
 \endverbatim
 
-\section notes NOTES
+\section dcmqrscp_notes NOTES
 
-\subsection operation Operation
+\subsection dcmqrscp_operation Operation
 
 \b dcmqrscp waits for another application to connect at the presentation
 address (port number) specified in its configuration file (or overridden by a
@@ -512,9 +534,9 @@ C-CANCEL messages to interrupt query/retrieve operations.
 Under normal operations \b dcmqrscp will never exit, it keeps on waiting for
 new associations until killed.
 
-\subsection dicom_conformance DICOM Conformance
+\subsection dcmqrscp_dicom_conformance DICOM Conformance
 
-\subsubsection scu_conformance SCU Conformance
+\subsubsection dcmqrscp_scu_conformance SCU Conformance
 
 The \b dcmqrscp application supports the following SOP Classes as an SCU:
 
@@ -674,12 +696,19 @@ MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax   1.2.840.10008.1.2.4.103
 MPEG4HighProfileLevel4_2_For2DVideoTransferSyntax    1.2.840.10008.1.2.4.104
 MPEG4HighProfileLevel4_2_For3DVideoTransferSyntax    1.2.840.10008.1.2.4.105
 MPEG4StereoHighProfileLevel4_2TransferSyntax         1.2.840.10008.1.2.4.106
+HEVCMainProfileLevel5_1TransferSyntax                1.2.840.10008.1.2.4.107
+HEVCMain10ProfileLevel5_1TransferSyntax              1.2.840.10008.1.2.4.108
 RLELosslessTransferSyntax                            1.2.840.10008.1.2.5
 \endverbatim
 
 The \b dcmqrscp application does not support extended negotiation.
 
-\subsubsection scp_conformance SCP Conformance
+Presentation contexts for other SOP Classes may be configured via the
+\e --assoc-config-file option by selecting an appropriate profile for outgoing
+associations.  The selected profile will completely override the above mentioned
+default configuration.
+
+\subsubsection dcmqrscp_scp_conformance SCP Conformance
 
 The \b dcmqrscp application supports the following SOP Classes as an SCP:
 
@@ -745,7 +774,11 @@ PseudoColorSoftcopyPresentationStateStorage          1.2.840.10008.5.1.4.1.1.11.
 BlendingSoftcopyPresentationStateStorage             1.2.840.10008.5.1.4.1.1.11.4
 XAXRFGrayscaleSoftcopyPresentationStateStorage       1.2.840.10008.5.1.4.1.1.11.5
 GrayscalePlanarMPRVolumetricPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.6
-CompositingPlanarMPRVolumetricPresentationStateStor. 1.2.840.10008.5.1.4.1.1.11.7
+CompositingPlanarMPRVolumetricPresent.StateStorage   1.2.840.10008.5.1.4.1.1.11.7
+AdvancedBlendingPresentationStateStorage             1.2.840.10008.5.1.4.1.1.11.8
+VolumeRenderingVolumetricPresentationStateStorage    1.2.840.10008.5.1.4.1.1.11.9
+SegmentedVolumeRenderingVolumetricPres.StateStorage  1.2.840.10008.5.1.4.1.1.11.10
+MultipleVolumeRenderingVolumetricPres.StateStorage   1.2.840.10008.5.1.4.1.1.11.11
 XRayAngiographicImageStorage                         1.2.840.10008.5.1.4.1.1.12.1
 EnhancedXAImageStorage                               1.2.840.10008.5.1.4.1.1.12.1.1
 XRayRadiofluoroscopicImageStorage                    1.2.840.10008.5.1.4.1.1.12.2
@@ -784,6 +817,8 @@ StereometricRelationshipStorage                      1.2.840.10008.5.1.4.1.1.77.
 OphthalmicTomographyImageStorage                     1.2.840.10008.5.1.4.1.1.77.1.5.4
 WideFieldOphthalmicPhoto.Stereogr.Proj.ImageStorage  1.2.840.10008.5.1.4.1.1.77.1.5.5
 WideFieldOphthalmicPhotogr.3DCoordinatesImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.6
+OphthalmicOpticalCoherenceTomogr.EnFaceImageStorage  1.2.840.10008.5.1.4.1.1.77.1.5.7
+OphthalmicOpticalCoh.Tomogr.BscanVolumeAnalysisStor. 1.2.840.10008.5.1.4.1.1.77.1.5.8
 VLWholeSlideMicroscopyImageStorage                   1.2.840.10008.5.1.4.1.1.77.1.6
 RETIRED_VLMultiFrameImageStorage                     1.2.840.10008.5.1.4.1.1.77.2
 LensometryMeasurementsStorage                        1.2.840.10008.5.1.4.1.1.78.1
@@ -817,6 +852,7 @@ ColonCADSRStorage                                    1.2.840.10008.5.1.4.1.1.88.
 ImplantationPlanSRDocumentStorage                    1.2.840.10008.5.1.4.1.1.88.70
 AcquisitionContextSRStorage                          1.2.840.10008.5.1.4.1.1.88.71
 SimplifiedAdultEchoSRStorage                         1.2.840.10008.5.1.4.1.1.88.72
+PatientRadiationDoseSRStorage                        1.2.840.10008.5.1.4.1.1.88.73
 ContentAssessmentResultsStorage                      1.2.840.10008.5.1.4.1.1.90.1
 EncapsulatedPDFStorage                               1.2.840.10008.5.1.4.1.1.104.1
 EncapsulatedCDAStorage                               1.2.840.10008.5.1.4.1.1.104.2
@@ -825,7 +861,6 @@ LegacyConvertedEnhancedPETImageStorage               1.2.840.10008.5.1.4.1.1.128
 RETIRED_StandalonePETCurveStorage                    1.2.840.10008.5.1.4.1.1.129
 EnhancedPETImageStorage                              1.2.840.10008.5.1.4.1.1.130
 BasicStructuredDisplayStorage                        1.2.840.10008.5.1.4.1.1.131
-CTDefinedProcedureProtocolStorage                    1.2.840.10008.5.1.4.1.1.200.1
 CTPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.2
 RTImageStorage                                       1.2.840.10008.5.1.4.1.1.481.1
 RTDoseStorage                                        1.2.840.10008.5.1.4.1.1.481.2
@@ -887,12 +922,22 @@ MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax   1.2.840.10008.1.2.4.103
 MPEG4HighProfileLevel4_2_For2DVideoTransferSyntax    1.2.840.10008.1.2.4.104
 MPEG4HighProfileLevel4_2_For3DVideoTransferSyntax    1.2.840.10008.1.2.4.105
 MPEG4StereoHighProfileLevel4_2TransferSyntax         1.2.840.10008.1.2.4.106
+HEVCMainProfileLevel5_1TransferSyntax                1.2.840.10008.1.2.4.107
+HEVCMain10ProfileLevel5_1TransferSyntax              1.2.840.10008.1.2.4.108
 RLELosslessTransferSyntax                            1.2.840.10008.1.2.5
 \endverbatim
 
 The \b dcmqrscp application does not support extended negotiation.
 
-\subsubsection query_keys Query Keys
+Presentation contexts for other SOP Classes may be configured via the
+\e --assoc-config-file option by selecting an appropriate profile for incoming
+associations.  The selected profile will override only the above mentioned
+storage SOP classes, \b dcmqrscp will accept contexts with the above mentioned
+FIND, GET, MOVE and private shutdown SOP Classes additionally to the ones
+defined in the selected profile.  Please note that an appropriate profile for
+<b>role negotiation</b> must be defined and used for enabling GET support.
+
+\subsubsection dcmqrscp_query_keys Query Keys
 
 The \b dcmqrscp application supports the following attributes as query keys.
 
@@ -901,16 +946,14 @@ Query/Retrieve Level: PATIENT (or STUDY for the Study Root Q/R model)
 \verbatim
 (0010,0010) PatientName
 (0010,0020) PatientID
+(0010,0021) IssuerOfPatientID
 (0010,0030) PatientBirthDate
 (0010,0032) PatientBirthTime
 (0010,0040) PatientSex
-(0010,1000) OtherPatientIDs
+(0010,1000) OtherPatientIDs (retired)
 (0010,1001) OtherPatientNames
 (0010,2160) EthnicGroup
 (0010,4000) PatientComments
-(0020,1200) NumberOfPatientRelatedStudies
-(0020,1202) NumberOfPatientRelatedSeries
-(0020,1204) NumberOfPatientRelatedInstances
 \endverbatim
 
 Query/Retrieve Level: STUDY
@@ -931,8 +974,6 @@ Query/Retrieve Level: STUDY
 (0020,000D) StudyInstanceUID
 (0020,0010) StudyID
 (0020,1070) RETIRED_OtherStudyNumbers
-(0020,1206) NumberOfStudyRelatedSeries
-(0020,1208) NumberOfStudyRelatedInstances
 \endverbatim
 
 Query/Retrieve Level: SERIES
@@ -950,12 +991,12 @@ Query/Retrieve Level: IMAGE
 (0020,0013) InstanceNumber
 \endverbatim
 
-\subsection configuration Configuration
+\subsection dcmqrscp_configuration Configuration
 
 The \b dcmqrscp program uses the same configuration file as the \b dcmqrti
 program.  See the documentation on configuration for more information.
 
-\subsection access_control Access Control
+\subsection dcmqrscp_access_control Access Control
 
 When compiled on Unix platforms with TCP wrapper support, host-based access
 control can be enabled with the \e --access-control command line option.  In
@@ -964,7 +1005,7 @@ tables for \b dcmqrscp are enforced.  The default locations of the host access
 control tables are <em>/etc/hosts.allow</em> and <em>/etc/hosts.deny</em>.
 Further details are described in <b>hosts_access</b>(5).
 
-\section logging LOGGING
+\section dcmqrscp_logging 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
@@ -983,7 +1024,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmqrscp_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -1005,7 +1046,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmqrscp_environment ENVIRONMENT
 
 The \b dcmqrscp utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -1021,17 +1062,18 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dcmqrscp_files FILES
 
 <em>\<docdir\>/dcmqrcnf.txt</em> - configuration information
 \n<em>\<docdir\>/dcmqrset.txt</em> - setup information
 \n<em>\<etcdir\>/dcmqrscp.cfg</em> - example configuration file
+\n<em>\<etcdir\>/dcmqrprf.cfg</em> - example configuration file for association profiles
 
-\section see_also SEE ALSO
+\section dcmqrscp_see_also SEE ALSO
 
 <b>dcmqridx</b>(1), <b>dcmqrti</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmqrscp_copyright COPYRIGHT
 
 Copyright (C) 1993-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmqrdb/docs/dcmqrti.man b/dcmqrdb/docs/dcmqrti.man
index e47aea9..995ddbc 100644
--- a/dcmqrdb/docs/dcmqrti.man
+++ b/dcmqrdb/docs/dcmqrti.man
@@ -6,13 +6,13 @@
 \page dcmqrti dcmqrti: The Terminal Initiator Telnet Client Program
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmqrti_synopsis SYNOPSIS
 
 \verbatim
 dcmqrti [options] peer...
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmqrti_description DESCRIPTION
 
 The \b dcmqrti program (telnet initiator) is an interactive character based
 program intended to be used for examining the dcmqrscp image databases and
@@ -30,15 +30,15 @@ titles.  Thus only the accessible databases and peer applications discovered
 in the configuration file are available as choices within the \b dcmqrti user
 interface.
 
-\section parameters PARAMETERS
+\section dcmqrti_parameters PARAMETERS
 
 \verbatim
 peer  peer host name or symbolic name from cfg file
 \endverbatim
 
-\section options OPTIONS
+\section dcmqrti_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmqrti_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -70,7 +70,7 @@ peer  peer host name or symbolic name from cfg file
           (default: /usr/local/etc/dcmqrscp.cfg)
 \endverbatim
 
-\subsection network_options network options
+\subsection dcmqrti_network_options network options
 \verbatim
   -to   --timeout  [s]econds: integer (default: unlimited)
           timeout for connection requests
@@ -92,7 +92,7 @@ peer  peer host name or symbolic name from cfg file
           (default: use value from configuration file)
 \endverbatim
 
-\subsection other_options other options
+\subsection dcmqrti_other_options other options
 \verbatim
   -u    --disable-new-vr
           disable support for new VRs, convert to OB
@@ -101,14 +101,14 @@ peer  peer host name or symbolic name from cfg file
           connect to remote database defined in cfg file
 \endverbatim
 
-\section NOTES
+\section dcmqrti_NOTES
 
-\subsection commands Commands
+\subsection dcmqrti_commands Commands
 
 All commands can be abbreviated.  An abbreviation is allowed if it does not
 conflict with another command.
 
-\subsubsection help_command "help" Command
+\subsubsection dcmqrti_help_command "help" Command
 
 The "help" command gives a summary of all available commands. Its output is
 shown underneath.  In order to separate the examples from surrounding text,
@@ -135,7 +135,7 @@ exit                synonym for quit
 ------------------------------------------------------------
 \endverbatim
 
-\subsubsection title_command "title" Command
+\subsubsection dcmqrti_title_command "title" Command
 
 The "title" command without an argument allows the user to list the known
 remote Application Entities (AE).  An example output might look like:
@@ -161,7 +161,7 @@ When invoked with an argument index, the "title" command will set the current
 peer AE.  The \b dcmqrti program will attempt to initiate an association to the
 current peer AE when asked to send a study/series/image or to send an echo.
 
-\subsubsection database_command "database" Command
+\subsubsection dcmqrti_database_command "database" Command
 
 The "database" command without an argument allows the user to list the know
 local databases (these correspond to dcmqrscp's Application Entity Titles).
@@ -188,7 +188,7 @@ When invoked with an argument index, the "database" command will set the
 current database.  The current database is used as the basis for further
 database specific actions.
 
-\subsubsection study_command "study" Command
+\subsubsection dcmqrti_study_command "study" Command
 
 The "study" command with no argument lists the studies in the current
 database.  An example output might look like:
@@ -215,7 +215,7 @@ When invoked with an argument index, the "study" command will set the current
 study.  The current study is used as the basis for further study specific
 actions.
 
-\subsubsection series_command "series" Command
+\subsubsection dcmqrti_series_command "series" Command
 
 The "series" command with no argument lists the series in the current study.
 An example output might look like:
@@ -244,7 +244,7 @@ When invoked with an argument index, the "series" command will set the current
 series.  The current series is used as the basis for further series specific
 actions.
 
-\subsubsection image_command "image" Command
+\subsubsection dcmqrti_image_command "image" Command
 
 The "image" command with no argument lists the images in the current series.
 An example output might look like:
@@ -280,12 +280,12 @@ When invoked with an argument index, the "image" command will set the current
 image.  The current image is used as the basis for further image specific
 actions.
 
-\subsubsection display_command "display" Command
+\subsubsection dcmqrti_display_command "display" Command
 
 The display command serves no purpose in the current version of DCMTK. It was
 used in prior releases to request the CTN Display Program to display an image.
 
-\subsubsection send_command "send" Command
+\subsubsection dcmqrti_send_command "send" Command
 
 The "send" command allows a complete study/series or individual image to be
 stored on a remote AE.  When this command is invoked, the \b dcmqrti program
@@ -328,7 +328,7 @@ Released Association (swallow:2001,ACME1)
 ------------------------------------------------------------
 \endverbatim
 
-\subsubsection echo_command "echo" Command
+\subsubsection dcmqrti_echo_command "echo" Command
 
 The "echo" command allows the user to verify connectivity with the current
 peer AE (defined via the "title" command).  When invoked, the \b dcmqrti
@@ -346,12 +346,12 @@ Released Association (localhost:2001,CMOVE)
 ------------------------------------------------------------
 \endverbatim
 
-\subsubsection quit_exit_commands "quit", "exit" Commands
+\subsubsection dcmqrti_quit_exit_commands "quit", "exit" Commands
 
 The "quit" and "exit" commands have the same effect.  They terminate the
 \b dcmqrti program.
 
-\subsection dicom_conformance DICOM Conformance
+\subsection dcmqrti_dicom_conformance DICOM Conformance
 
 The \b dcmqrti application supports the same set of SOP Classes as an SCU as
 the \b dcmqrscp application - see dcmqrscp documentation.
@@ -367,14 +367,14 @@ BigEndianExplicitTransferSyntax     1.2.840.10008.1.2.2
 
 The \b dcmqrti application does not support extended negotiation.
 
-\subsection configuration Configuration
+\subsection dcmqrti_configuration Configuration
 
 The \b dcmqrti program uses the same configuration file as the \b dcmqrscp
 program.  See the documentation on configuration for more information
 (<em>dcmqrcnf.txt</em> and the example configuration file
 <em>dcmqrscp.cfg</em>).
 
-\section logging LOGGING
+\section dcmqrti_logging 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
@@ -393,7 +393,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmqrti_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -415,7 +415,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmqrti_environment ENVIRONMENT
 
 The \b dcmqrti utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -431,17 +431,17 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dcmqrti_files FILES
 
 <em>\<docdir\>/dcmqrcnf.txt</em> - configuration information
 \n<em>\<docdir\>/dcmqrset.txt</em> - setup information
 \n<em>\<etcdir\>/dcmqrscp.cfg</em> - example configuration file
 
-\section see_also SEE ALSO
+\section dcmqrti_see_also SEE ALSO
 
 <b>dcmqrscp</b>(1)
 
-\section copyright COPYRIGHT
+\section dcmqrti_copyright COPYRIGHT
 
 Copyright (C) 1993-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmqrdb/etc/CMakeLists.txt b/dcmqrdb/etc/CMakeLists.txt
index a2bb7de..c125eb9 100644
--- a/dcmqrdb/etc/CMakeLists.txt
+++ b/dcmqrdb/etc/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(FILES dcmqrscp.cfg DESTINATION ${DCMTK_INSTALL_ETCDIR} COMPONENT etc)
+INSTALL(FILES dcmqrscp.cfg DESTINATION "${DCMTK_INSTALL_ETCDIR}" COMPONENT etc)
diff --git a/dcmqrdb/etc/dcmqrprf.cfg b/dcmqrdb/etc/dcmqrprf.cfg
new file mode 100644
index 0000000..6f6b95e
--- /dev/null
+++ b/dcmqrdb/etc/dcmqrprf.cfg
@@ -0,0 +1,1071 @@
+#
+#  Copyright (C) 2017, OFFIS e.V.
+#  All rights reserved.  See COPYRIGHT file for details.
+#
+#  This software and supporting documentation were developed by
+#
+#    OFFIS e.V.
+#    R&D Division Health
+#    Escherweg 2
+#    D-26121 Oldenburg, Germany
+#
+#  Module:  dcmqrdb
+#
+#  Author:  Jan Schlamelcher
+#
+#  Purpose: Sample storage profiles configuration file for dcmqrscp
+#
+
+# ============================================================================
+[[TransferSyntaxes]]
+# ============================================================================
+
+[Uncompressed]
+TransferSyntax1  = LocalEndianExplicit
+TransferSyntax2  = OppositeEndianExplicit
+TransferSyntax3  = LittleEndianImplicit
+
+[UncompressedOrZlib]
+TransferSyntax1  = DeflatedLittleEndianExplicit
+TransferSyntax2  = LocalEndianExplicit
+TransferSyntax3  = OppositeEndianExplicit
+TransferSyntax4  = LittleEndianImplicit
+
+[JPEGBaseline]
+TransferSyntax1 = JPEGBaseline
+
+[JPEGLossless]
+TransferSyntax1 = JPEGLossless:Non-hierarchical-1stOrderPrediction
+
+[RLE]
+TransferSyntax1 = RLELossless
+
+[MPEG2]
+TransferSyntax1 = MPEG2MainProfile at MainLevel
+#
+# commented out the following line since we do not support transcoding of MPEG2
+#
+#TransferSyntax2 = MPEG2MainProfile at HighLevel
+
+[MPEG4]
+TransferSyntax1 = MPEG4HighProfile/Level4.1
+#
+# commented out the following lines since we do not support transcoding of MPEG4
+#
+#TransferSyntax2 = MPEG4BDcompatibleHighProfile/Level4.1
+#TransferSyntax3 = MPEG4HighProfile/Level4.2For2DVideo
+#TransferSyntax4 = MPEG4HighProfile/Level4.2For3DVideo
+#TransferSyntax5 = MPEG4StereoHighProfile/Level4.2
+
+[AnyTransferSyntax]
+TransferSyntax1  = JPEG2000
+TransferSyntax2  = JPEG2000LosslessOnly
+TransferSyntax3  = JPEGExtended:Process2+4
+TransferSyntax4  = JPEGBaseline
+TransferSyntax5  = JPEGLossless:Non-hierarchical-1stOrderPrediction
+TransferSyntax6  = JPEGLSLossy
+TransferSyntax7  = JPEGLSLossless
+TransferSyntax8  = RLELossless
+TransferSyntax9  = MPEG2MainProfile at MainLevel
+TransferSyntax10 = MPEG2MainProfile at HighLevel
+TransferSyntax11 = MPEG4HighProfile/Level4.1
+TransferSyntax12 = MPEG4BDcompatibleHighProfile/Level4.1
+TransferSyntax13 = MPEG4HighProfile/Level4.2For2DVideo
+TransferSyntax14 = MPEG4HighProfile/Level4.2For3DVideo
+TransferSyntax15 = MPEG4StereoHighProfile/Level4.2
+TransferSyntax16 = HEVCMainProfile/Level5.1
+TransferSyntax17 = HEVCMain10Profile/Level5.1
+TransferSyntax18 = DeflatedLittleEndianExplicit
+TransferSyntax19 = LocalEndianExplicit
+TransferSyntax20 = OppositeEndianExplicit
+TransferSyntax21 = LittleEndianImplicit
+
+# ============================================================================
+[[PresentationContexts]]
+# ============================================================================
+
+[GenericStorageSCP]
+#
+# Don't forget to support the Verification SOP Class.
+#
+PresentationContext1   = VerificationSOPClass\Uncompressed
+#
+# Accept image SOP classes with virtually any transfer syntax we know.
+# Accept non-image SOP classes uncompressed or with zlib compression only.
+#
+PresentationContext2   = BreastTomosynthesisImageStorage\AnyTransferSyntax
+PresentationContext3   = ComputedRadiographyImageStorage\AnyTransferSyntax
+PresentationContext4   = CornealTopographyMapStorage\AnyTransferSyntax
+PresentationContext5   = CTImageStorage\AnyTransferSyntax
+PresentationContext6   = DigitalIntraOralXRayImageStorageForPresentation\AnyTransferSyntax
+PresentationContext7   = DigitalIntraOralXRayImageStorageForProcessing\AnyTransferSyntax
+PresentationContext8   = DigitalMammographyXRayImageStorageForPresentation\AnyTransferSyntax
+PresentationContext9   = DigitalMammographyXRayImageStorageForProcessing\AnyTransferSyntax
+PresentationContext10  = DigitalXRayImageStorageForPresentation\AnyTransferSyntax
+PresentationContext11  = DigitalXRayImageStorageForProcessing\AnyTransferSyntax
+PresentationContext12  = EnhancedCTImageStorage\AnyTransferSyntax
+PresentationContext13  = EnhancedMRColorImageStorage\AnyTransferSyntax
+PresentationContext14  = EnhancedMRImageStorage\AnyTransferSyntax
+PresentationContext15  = EnhancedPETImageStorage\AnyTransferSyntax
+PresentationContext16  = EnhancedUSVolumeStorage\AnyTransferSyntax
+PresentationContext17  = EnhancedXAImageStorage\AnyTransferSyntax
+PresentationContext18  = EnhancedXRFImageStorage\AnyTransferSyntax
+PresentationContext19  = IntravascularOpticalCoherenceTomographyImageStorageForPresentation\AnyTransferSyntax
+PresentationContext20  = IntravascularOpticalCoherenceTomographyImageStorageForProcessing\AnyTransferSyntax
+PresentationContext21  = MRImageStorage\AnyTransferSyntax
+PresentationContext22  = MultiframeGrayscaleByteSecondaryCaptureImageStorage\AnyTransferSyntax
+PresentationContext23  = MultiframeGrayscaleWordSecondaryCaptureImageStorage\AnyTransferSyntax
+PresentationContext24  = MultiframeSingleBitSecondaryCaptureImageStorage\AnyTransferSyntax
+PresentationContext25  = MultiframeTrueColorSecondaryCaptureImageStorage\AnyTransferSyntax
+PresentationContext26  = NuclearMedicineImageStorage\AnyTransferSyntax
+PresentationContext27  = OphthalmicPhotography16BitImageStorage\AnyTransferSyntax
+PresentationContext28  = OphthalmicPhotography8BitImageStorage\AnyTransferSyntax
+PresentationContext29  = OphthalmicThicknessMapStorage\AnyTransferSyntax
+PresentationContext30  = OphthalmicTomographyImageStorage\AnyTransferSyntax
+PresentationContext31  = PositronEmissionTomographyImageStorage\AnyTransferSyntax
+PresentationContext32  = RTImageStorage\AnyTransferSyntax
+PresentationContext33  = SecondaryCaptureImageStorage\AnyTransferSyntax
+PresentationContext34  = UltrasoundImageStorage\AnyTransferSyntax
+PresentationContext35  = UltrasoundMultiframeImageStorage\AnyTransferSyntax
+PresentationContext36  = VideoEndoscopicImageStorage\AnyTransferSyntax
+PresentationContext37  = VideoMicroscopicImageStorage\AnyTransferSyntax
+PresentationContext38  = VideoPhotographicImageStorage\AnyTransferSyntax
+PresentationContext39  = VLEndoscopicImageStorage\AnyTransferSyntax
+PresentationContext40  = VLMicroscopicImageStorage\AnyTransferSyntax
+PresentationContext41  = VLPhotographicImageStorage\AnyTransferSyntax
+PresentationContext42  = VLSlideCoordinatesMicroscopicImageStorage\AnyTransferSyntax
+PresentationContext43  = VLWholeSlideMicroscopyImageStorage\AnyTransferSyntax
+PresentationContext44  = XRay3DAngiographicImageStorage\AnyTransferSyntax
+PresentationContext45  = XRay3DCraniofacialImageStorage\AnyTransferSyntax
+PresentationContext46  = XRayAngiographicImageStorage\AnyTransferSyntax
+PresentationContext47  = XRayRadiofluoroscopicImageStorage\AnyTransferSyntax
+# retired
+PresentationContext48  = RETIRED_HardcopyColorImageStorage\AnyTransferSyntax
+PresentationContext49  = RETIRED_HardcopyGrayscaleImageStorage\AnyTransferSyntax
+PresentationContext50  = RETIRED_NuclearMedicineImageStorage\AnyTransferSyntax
+PresentationContext51  = RETIRED_UltrasoundImageStorage\AnyTransferSyntax
+PresentationContext52  = RETIRED_UltrasoundMultiframeImageStorage\AnyTransferSyntax
+PresentationContext53  = RETIRED_VLImageStorage\AnyTransferSyntax
+PresentationContext54  = RETIRED_VLMultiFrameImageStorage\AnyTransferSyntax
+PresentationContext55  = RETIRED_XRayAngiographicBiPlaneImageStorage\AnyTransferSyntax
+#
+# the following presentation contexts are for non-image SOP classes
+#
+PresentationContext56  = AmbulatoryECGWaveformStorage\UncompressedOrZlib
+PresentationContext57  = ArterialPulseWaveformStorage\UncompressedOrZlib
+PresentationContext58  = AutorefractionMeasurementsStorage\UncompressedOrZlib
+PresentationContext59  = BasicStructuredDisplayStorage\UncompressedOrZlib
+PresentationContext60  = BasicTextSRStorage\UncompressedOrZlib
+PresentationContext61  = BasicVoiceAudioWaveformStorage\UncompressedOrZlib
+PresentationContext62  = BlendingSoftcopyPresentationStateStorage\UncompressedOrZlib
+PresentationContext63  = CardiacElectrophysiologyWaveformStorage\UncompressedOrZlib
+PresentationContext64  = ChestCADSRStorage\UncompressedOrZlib
+PresentationContext65  = ColonCADSRStorage\UncompressedOrZlib
+PresentationContext66  = ColorSoftcopyPresentationStateStorage\UncompressedOrZlib
+PresentationContext67  = Comprehensive3DSRStorage\UncompressedOrZlib
+PresentationContext68  = ComprehensiveSRStorage\UncompressedOrZlib
+PresentationContext69  = DeformableSpatialRegistrationStorage\UncompressedOrZlib
+PresentationContext70  = EncapsulatedCDAStorage\UncompressedOrZlib
+PresentationContext71  = EncapsulatedPDFStorage\UncompressedOrZlib
+PresentationContext72  = EnhancedSRStorage\UncompressedOrZlib
+PresentationContext73  = GeneralAudioWaveformStorage\UncompressedOrZlib
+PresentationContext74  = GeneralECGWaveformStorage\UncompressedOrZlib
+PresentationContext75  = GenericImplantTemplateStorage\UncompressedOrZlib
+PresentationContext76  = GrayscaleSoftcopyPresentationStateStorage\UncompressedOrZlib
+PresentationContext77  = HemodynamicWaveformStorage\UncompressedOrZlib
+PresentationContext78  = ImplantAssemblyTemplateStorage\UncompressedOrZlib
+PresentationContext79  = ImplantationPlanSRDocumentStorage\UncompressedOrZlib
+PresentationContext80  = ImplantTemplateGroupStorage\UncompressedOrZlib
+PresentationContext81  = IntraocularLensCalculationsStorage\UncompressedOrZlib
+PresentationContext82  = KeratometryMeasurementsStorage\UncompressedOrZlib
+PresentationContext83  = KeyObjectSelectionDocumentStorage\UncompressedOrZlib
+PresentationContext84  = LensometryMeasurementsStorage\UncompressedOrZlib
+PresentationContext85  = MacularGridThicknessAndVolumeReportStorage\UncompressedOrZlib
+PresentationContext86  = MammographyCADSRStorage\UncompressedOrZlib
+PresentationContext87  = MRSpectroscopyStorage\UncompressedOrZlib
+PresentationContext88  = OphthalmicAxialMeasurementsStorage\UncompressedOrZlib
+PresentationContext89  = OphthalmicVisualFieldStaticPerimetryMeasurementsStorage\UncompressedOrZlib
+PresentationContext90  = ProcedureLogStorage\UncompressedOrZlib
+PresentationContext91  = PseudoColorSoftcopyPresentationStateStorage\UncompressedOrZlib
+PresentationContext92  = RawDataStorage\UncompressedOrZlib
+PresentationContext93  = RealWorldValueMappingStorage\UncompressedOrZlib
+PresentationContext94  = RespiratoryWaveformStorage\UncompressedOrZlib
+PresentationContext95  = RTBeamsDeliveryInstructionStorage\UncompressedOrZlib
+PresentationContext96  = RTBeamsTreatmentRecordStorage\UncompressedOrZlib
+PresentationContext97  = RTBrachyTreatmentRecordStorage\UncompressedOrZlib
+PresentationContext98  = RTDoseStorage\UncompressedOrZlib
+PresentationContext99  = RTIonBeamsTreatmentRecordStorage\UncompressedOrZlib
+PresentationContext100 = RTIonPlanStorage\UncompressedOrZlib
+PresentationContext101 = RTPlanStorage\UncompressedOrZlib
+PresentationContext102 = RTStructureSetStorage\UncompressedOrZlib
+PresentationContext103 = RTTreatmentSummaryRecordStorage\UncompressedOrZlib
+PresentationContext104 = SegmentationStorage\UncompressedOrZlib
+PresentationContext105 = SpatialFiducialsStorage\UncompressedOrZlib
+PresentationContext106 = SpatialRegistrationStorage\UncompressedOrZlib
+PresentationContext107 = SpectaclePrescriptionReportStorage\UncompressedOrZlib
+PresentationContext108 = StereometricRelationshipStorage\UncompressedOrZlib
+PresentationContext109 = SubjectiveRefractionMeasurementsStorage\UncompressedOrZlib
+PresentationContext110 = SurfaceScanMeshStorage\UncompressedOrZlib
+PresentationContext111 = SurfaceScanPointCloudStorage\UncompressedOrZlib
+PresentationContext112 = SurfaceSegmentationStorage\UncompressedOrZlib
+PresentationContext113 = TwelveLeadECGWaveformStorage\UncompressedOrZlib
+PresentationContext114 = VisualAcuityMeasurementsStorage\UncompressedOrZlib
+PresentationContext115 = XAXRFGrayscaleSoftcopyPresentationStateStorage\UncompressedOrZlib
+PresentationContext116 = XRayRadiationDoseSRStorage\UncompressedOrZlib
+# retired
+PresentationContext117 = RETIRED_StandaloneCurveStorage\UncompressedOrZlib
+PresentationContext118 = RETIRED_StandaloneModalityLUTStorage\UncompressedOrZlib
+PresentationContext119 = RETIRED_StandaloneOverlayStorage\UncompressedOrZlib
+PresentationContext120 = RETIRED_StandalonePETCurveStorage\UncompressedOrZlib
+PresentationContext121 = RETIRED_StandaloneVOILUTStorage\UncompressedOrZlib
+PresentationContext122 = RETIRED_StoredPrintStorage\UncompressedOrZlib
+# draft
+PresentationContext123 = DRAFT_RTBeamsDeliveryInstructionStorage\UncompressedOrZlib
+PresentationContext124 = DRAFT_SRAudioStorage\UncompressedOrZlib
+PresentationContext125 = DRAFT_SRComprehensiveStorage\UncompressedOrZlib
+PresentationContext126 = DRAFT_SRDetailStorage\UncompressedOrZlib
+PresentationContext127 = DRAFT_SRTextStorage\UncompressedOrZlib
+PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib
+#
+# the following SOP classes are missing in the above list:
+#
+# - AcquisitionContextSRStorage
+# - AdvancedBlendingPresentationStateStorage
+# - BreastProjectionXRayImageStorageForPresentation
+# - BreastProjectionXRayImageStorageForProcessing
+# - ColorPaletteStorage
+# - CompositingPlanarMPRVolumetricPresentationStateStorage
+# - ContentAssessmentResultsStorage
+# - CTDefinedProcedureProtocolStorage
+# - CTPerformedProcedureProtocolStorage
+# - ExtensibleSRStorage
+# - GrayscalePlanarMPRVolumetricPresentationStateStorage
+# - HangingProtocolStorage
+# - LegacyConvertedEnhancedCTImageStorage
+# - LegacyConvertedEnhancedMRImageStorage
+# - LegacyConvertedEnhancedPETImageStorage
+# - MultipleVolumeRenderingVolumetricPresentationStateStorage
+# - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
+# - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage
+# - ParametricMapStorage
+# - PatientRadiationDoseSRStorage
+# - RadiopharmaceuticalRadiationDoseSRStorage
+# - RTBrachyApplicationSetupDeliveryInstructionStorage
+# - SegmentedVolumeRenderingVolumetricPresentationStateStorage
+# - SimplifiedAdultEchoSRStorage
+# - TractographyResultsStorage
+# - VolumeRenderingVolumetricPresentationStateStorage
+# - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage
+# - WideFieldOphthalmicPhotography3DCoordinatesImageStorage
+#
+# - DICOS_2DAITStorage
+# - DICOS_3DAITStorage
+# - DICOS_CTImageStorage
+# - DICOS_DigitalXRayImageStorageForPresentation
+# - DICOS_DigitalXRayImageStorageForProcessing
+# - DICOS_QuadrupoleResonanceStorage
+# - DICOS_ThreatDetectionReportStorage
+#
+# - DICONDE_EddyCurrentImageStorage
+# - DICONDE_EddyCurrentMultiframeImageStorage
+
+# ----------------------------------------------------------------------------
+
+[AllDICOMStorageSCP]
+#
+# Same as "GenericStorageSCP" but limited to non-retired and non-draft SOP Classes.
+# This allows for accepting (almost) all DICOM Storage SOP Classes that are currently
+# defined in the standard (an exception is made for some very new DICOM objects because
+# of the limitation of 128 Presentation Contexts for SCPs, see DCMTK Feature # 540).
+#
+PresentationContext1   = VerificationSOPClass\Uncompressed
+#
+# DICOM images
+#
+PresentationContext2   = BreastProjectionXRayImageStorageForPresentation\AnyTransferSyntax
+PresentationContext3   = BreastProjectionXRayImageStorageForProcessing\AnyTransferSyntax
+PresentationContext4   = BreastTomosynthesisImageStorage\AnyTransferSyntax
+PresentationContext5   = ComputedRadiographyImageStorage\AnyTransferSyntax
+PresentationContext6   = CornealTopographyMapStorage\AnyTransferSyntax
+PresentationContext7   = CTImageStorage\AnyTransferSyntax
+PresentationContext8   = DigitalIntraOralXRayImageStorageForPresentation\AnyTransferSyntax
+PresentationContext9   = DigitalIntraOralXRayImageStorageForProcessing\AnyTransferSyntax
+PresentationContext10  = DigitalMammographyXRayImageStorageForPresentation\AnyTransferSyntax
+PresentationContext11  = DigitalMammographyXRayImageStorageForProcessing\AnyTransferSyntax
+PresentationContext12  = DigitalXRayImageStorageForPresentation\AnyTransferSyntax
+PresentationContext13  = DigitalXRayImageStorageForProcessing\AnyTransferSyntax
+PresentationContext14  = EnhancedCTImageStorage\AnyTransferSyntax
+PresentationContext15  = EnhancedMRColorImageStorage\AnyTransferSyntax
+PresentationContext16  = EnhancedMRImageStorage\AnyTransferSyntax
+PresentationContext17  = EnhancedPETImageStorage\AnyTransferSyntax
+PresentationContext18  = EnhancedUSVolumeStorage\AnyTransferSyntax
+PresentationContext19  = EnhancedXAImageStorage\AnyTransferSyntax
+PresentationContext20  = EnhancedXRFImageStorage\AnyTransferSyntax
+PresentationContext21  = IntravascularOpticalCoherenceTomographyImageStorageForPresentation\AnyTransferSyntax
+PresentationContext22  = IntravascularOpticalCoherenceTomographyImageStorageForProcessing\AnyTransferSyntax
+PresentationContext23  = LegacyConvertedEnhancedCTImageStorage\AnyTransferSyntax
+PresentationContext24  = LegacyConvertedEnhancedMRImageStorage\AnyTransferSyntax
+PresentationContext25  = LegacyConvertedEnhancedPETImageStorage\AnyTransferSyntax
+PresentationContext26  = MRImageStorage\AnyTransferSyntax
+PresentationContext27  = MultiframeGrayscaleByteSecondaryCaptureImageStorage\AnyTransferSyntax
+PresentationContext28  = MultiframeGrayscaleWordSecondaryCaptureImageStorage\AnyTransferSyntax
+PresentationContext29  = MultiframeSingleBitSecondaryCaptureImageStorage\AnyTransferSyntax
+PresentationContext30  = MultiframeTrueColorSecondaryCaptureImageStorage\AnyTransferSyntax
+PresentationContext31  = NuclearMedicineImageStorage\AnyTransferSyntax
+PresentationContext32  = OphthalmicPhotography16BitImageStorage\AnyTransferSyntax
+PresentationContext33  = OphthalmicPhotography8BitImageStorage\AnyTransferSyntax
+PresentationContext34  = OphthalmicThicknessMapStorage\AnyTransferSyntax
+PresentationContext35  = OphthalmicTomographyImageStorage\AnyTransferSyntax
+PresentationContext36  = ParametricMapStorage\AnyTransferSyntax
+PresentationContext37  = PositronEmissionTomographyImageStorage\AnyTransferSyntax
+PresentationContext38  = RTImageStorage\AnyTransferSyntax
+PresentationContext39  = SecondaryCaptureImageStorage\AnyTransferSyntax
+PresentationContext40  = UltrasoundImageStorage\AnyTransferSyntax
+PresentationContext41  = UltrasoundMultiframeImageStorage\AnyTransferSyntax
+PresentationContext42  = VideoEndoscopicImageStorage\AnyTransferSyntax
+PresentationContext43  = VideoMicroscopicImageStorage\AnyTransferSyntax
+PresentationContext44  = VideoPhotographicImageStorage\AnyTransferSyntax
+PresentationContext45  = VLEndoscopicImageStorage\AnyTransferSyntax
+PresentationContext46  = VLMicroscopicImageStorage\AnyTransferSyntax
+PresentationContext47  = VLPhotographicImageStorage\AnyTransferSyntax
+PresentationContext48  = VLSlideCoordinatesMicroscopicImageStorage\AnyTransferSyntax
+PresentationContext49  = VLWholeSlideMicroscopyImageStorage\AnyTransferSyntax
+PresentationContext50  = WideFieldOphthalmicPhotographyStereographicProjectionImageStorage\AnyTransferSyntax
+PresentationContext51  = WideFieldOphthalmicPhotography3DCoordinatesImageStorage\AnyTransferSyntax
+PresentationContext52  = XRay3DAngiographicImageStorage\AnyTransferSyntax
+PresentationContext53  = XRay3DCraniofacialImageStorage\AnyTransferSyntax
+PresentationContext54  = XRayAngiographicImageStorage\AnyTransferSyntax
+PresentationContext55  = XRayRadiofluoroscopicImageStorage\AnyTransferSyntax
+#
+# all other DICOM objects
+#
+PresentationContext56  = AcquisitionContextSRStorage\UncompressedOrZlib
+PresentationContext57  = AmbulatoryECGWaveformStorage\UncompressedOrZlib
+PresentationContext58  = ArterialPulseWaveformStorage\UncompressedOrZlib
+PresentationContext59  = AutorefractionMeasurementsStorage\UncompressedOrZlib
+PresentationContext60  = BasicStructuredDisplayStorage\UncompressedOrZlib
+PresentationContext61  = BasicTextSRStorage\UncompressedOrZlib
+PresentationContext62  = BasicVoiceAudioWaveformStorage\UncompressedOrZlib
+PresentationContext63  = BlendingSoftcopyPresentationStateStorage\UncompressedOrZlib
+PresentationContext64  = CardiacElectrophysiologyWaveformStorage\UncompressedOrZlib
+PresentationContext65  = ChestCADSRStorage\UncompressedOrZlib
+PresentationContext66  = ColonCADSRStorage\UncompressedOrZlib
+PresentationContext67  = ColorSoftcopyPresentationStateStorage\UncompressedOrZlib
+PresentationContext68  = CompositingPlanarMPRVolumetricPresentationStateStorage\UncompressedOrZlib
+PresentationContext69  = Comprehensive3DSRStorage\UncompressedOrZlib
+PresentationContext70  = ComprehensiveSRStorage\UncompressedOrZlib
+PresentationContext71  = ContentAssessmentResultsStorage\UncompressedOrZlib
+PresentationContext72  = CTDefinedProcedureProtocolStorage\UncompressedOrZlib
+PresentationContext73  = CTPerformedProcedureProtocolStorage\UncompressedOrZlib
+PresentationContext74  = DeformableSpatialRegistrationStorage\UncompressedOrZlib
+PresentationContext75  = EncapsulatedCDAStorage\UncompressedOrZlib
+PresentationContext76  = EncapsulatedPDFStorage\UncompressedOrZlib
+PresentationContext77  = EnhancedSRStorage\UncompressedOrZlib
+PresentationContext78  = ExtensibleSRStorage\UncompressedOrZlib
+PresentationContext79  = GeneralAudioWaveformStorage\UncompressedOrZlib
+PresentationContext80  = GeneralECGWaveformStorage\UncompressedOrZlib
+PresentationContext81  = GenericImplantTemplateStorage\UncompressedOrZlib
+PresentationContext82  = GrayscalePlanarMPRVolumetricPresentationStateStorage\UncompressedOrZlib
+PresentationContext83  = GrayscaleSoftcopyPresentationStateStorage\UncompressedOrZlib
+PresentationContext84  = HangingProtocolStorage\UncompressedOrZlib
+PresentationContext85  = HemodynamicWaveformStorage\UncompressedOrZlib
+PresentationContext86  = ImplantAssemblyTemplateStorage\UncompressedOrZlib
+PresentationContext87  = ImplantationPlanSRDocumentStorage\UncompressedOrZlib
+PresentationContext88  = ImplantTemplateGroupStorage\UncompressedOrZlib
+PresentationContext89  = IntraocularLensCalculationsStorage\UncompressedOrZlib
+PresentationContext90  = KeratometryMeasurementsStorage\UncompressedOrZlib
+PresentationContext91  = KeyObjectSelectionDocumentStorage\UncompressedOrZlib
+PresentationContext92  = LensometryMeasurementsStorage\UncompressedOrZlib
+PresentationContext93  = MacularGridThicknessAndVolumeReportStorage\UncompressedOrZlib
+PresentationContext94  = MammographyCADSRStorage\UncompressedOrZlib
+PresentationContext95  = MRSpectroscopyStorage\UncompressedOrZlib
+PresentationContext96  = OphthalmicAxialMeasurementsStorage\UncompressedOrZlib
+PresentationContext97  = OphthalmicVisualFieldStaticPerimetryMeasurementsStorage\UncompressedOrZlib
+PresentationContext98  = ProcedureLogStorage\UncompressedOrZlib
+PresentationContext99  = PseudoColorSoftcopyPresentationStateStorage\UncompressedOrZlib
+PresentationContext100 = RadiopharmaceuticalRadiationDoseSRStorage\UncompressedOrZlib
+PresentationContext101 = RawDataStorage\UncompressedOrZlib
+PresentationContext102 = RealWorldValueMappingStorage\UncompressedOrZlib
+PresentationContext103 = RespiratoryWaveformStorage\UncompressedOrZlib
+PresentationContext104 = RTBeamsDeliveryInstructionStorage\UncompressedOrZlib
+PresentationContext105 = RTBeamsTreatmentRecordStorage\UncompressedOrZlib
+PresentationContext106 = RTBrachyApplicationSetupDeliveryInstructionStorage\UncompressedOrZlib
+PresentationContext107 = RTBrachyTreatmentRecordStorage\UncompressedOrZlib
+PresentationContext108 = RTDoseStorage\UncompressedOrZlib
+PresentationContext109 = RTIonBeamsTreatmentRecordStorage\UncompressedOrZlib
+PresentationContext110 = RTIonPlanStorage\UncompressedOrZlib
+PresentationContext111 = RTPlanStorage\UncompressedOrZlib
+PresentationContext112 = RTStructureSetStorage\UncompressedOrZlib
+PresentationContext113 = RTTreatmentSummaryRecordStorage\UncompressedOrZlib
+PresentationContext114 = SegmentationStorage\UncompressedOrZlib
+PresentationContext115 = SimplifiedAdultEchoSRStorage\UncompressedOrZlib
+PresentationContext116 = SpatialFiducialsStorage\UncompressedOrZlib
+PresentationContext117 = SpatialRegistrationStorage\UncompressedOrZlib
+PresentationContext118 = SpectaclePrescriptionReportStorage\UncompressedOrZlib
+PresentationContext119 = StereometricRelationshipStorage\UncompressedOrZlib
+PresentationContext120 = SubjectiveRefractionMeasurementsStorage\UncompressedOrZlib
+PresentationContext121 = SurfaceScanMeshStorage\UncompressedOrZlib
+PresentationContext122 = SurfaceScanPointCloudStorage\UncompressedOrZlib
+PresentationContext123 = SurfaceSegmentationStorage\UncompressedOrZlib
+PresentationContext124 = TractographyResultsStorage\UncompressedOrZlib
+PresentationContext125 = TwelveLeadECGWaveformStorage\UncompressedOrZlib
+PresentationContext126 = VisualAcuityMeasurementsStorage\UncompressedOrZlib
+PresentationContext127 = XAXRFGrayscaleSoftcopyPresentationStateStorage\UncompressedOrZlib
+PresentationContext128 = XRayRadiationDoseSRStorage\UncompressedOrZlib
+#
+# the following SOP classes are missing in the above list:
+#
+# - AdvancedBlendingPresentationStateStorage
+# - ColorPaletteStorage
+# - MultipleVolumeRenderingVolumetricPresentationStateStorage
+# - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
+# - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage
+# - PatientRadiationDoseSRStorage
+# - SegmentedVolumeRenderingVolumetricPresentationStateStorage
+# - VolumeRenderingVolumetricPresentationStateStorage
+#
+# - RETIRED_HardcopyColorImageStorage
+# - RETIRED_HardcopyGrayscaleImageStorage
+# - RETIRED_NuclearMedicineImageStorage
+# - RETIRED_UltrasoundImageStorage
+# - RETIRED_UltrasoundMultiframeImageStorage
+# - RETIRED_VLImageStorage
+# - RETIRED_VLMultiFrameImageStorage
+# - RETIRED_XRayAngiographicBiPlaneImageStorage
+#
+# - RETIRED_StandaloneCurveStorage
+# - RETIRED_StandaloneModalityLUTStorage
+# - RETIRED_StandaloneOverlayStorage
+# - RETIRED_StandalonePETCurveStorage
+# - RETIRED_StandaloneVOILUTStorage
+# - RETIRED_StoredPrintStorage
+#
+# - DRAFT_RTBeamsDeliveryInstructionStorage
+# - DRAFT_SRAudioStorage
+# - DRAFT_SRComprehensiveStorage
+# - DRAFT_SRDetailStorage
+# - DRAFT_SRTextStorage
+# - DRAFT_WaveformStorage
+#
+# - DICOS_2DAITStorage
+# - DICOS_3DAITStorage
+# - DICOS_CTImageStorage
+# - DICOS_DigitalXRayImageStorageForPresentation
+# - DICOS_DigitalXRayImageStorageForProcessing
+# - DICOS_QuadrupoleResonanceStorage
+# - DICOS_ThreatDetectionReportStorage
+#
+# - DICONDE_EddyCurrentImageStorage
+# - DICONDE_EddyCurrentMultiframeImageStorage
+
+[StorageSCUCompressedAndUncompressed]
+#
+# For non-image SOP classes, we only support uncompressed transmission.
+# For image SOP classes, we support JPEG lossy, JPEG lossless and uncompressed.
+# For Ultrasound, we additionally support RLE.
+# The retired and standalone SOP classes are not supported with this profile.
+#
+PresentationContext1   = ComputedRadiographyImageStorage\JPEGBaseline
+PresentationContext2   = ComputedRadiographyImageStorage\JPEGLossless
+PresentationContext3   = ComputedRadiographyImageStorage\Uncompressed
+PresentationContext4   = CTImageStorage\JPEGBaseline
+PresentationContext5   = CTImageStorage\JPEGLossless
+PresentationContext6   = CTImageStorage\Uncompressed
+PresentationContext7   = DigitalIntraOralXRayImageStorageForPresentation\JPEGBaseline
+PresentationContext8   = DigitalIntraOralXRayImageStorageForPresentation\JPEGLossless
+PresentationContext9   = DigitalIntraOralXRayImageStorageForPresentation\Uncompressed
+PresentationContext10  = DigitalIntraOralXRayImageStorageForProcessing\JPEGBaseline
+PresentationContext11  = DigitalIntraOralXRayImageStorageForProcessing\JPEGLossless
+PresentationContext12  = DigitalIntraOralXRayImageStorageForProcessing\Uncompressed
+PresentationContext13  = DigitalMammographyXRayImageStorageForPresentation\JPEGBaseline
+PresentationContext14  = DigitalMammographyXRayImageStorageForPresentation\JPEGLossless
+PresentationContext15  = DigitalMammographyXRayImageStorageForPresentation\Uncompressed
+PresentationContext16  = DigitalMammographyXRayImageStorageForProcessing\JPEGBaseline
+PresentationContext17  = DigitalMammographyXRayImageStorageForProcessing\JPEGLossless
+PresentationContext18  = DigitalMammographyXRayImageStorageForProcessing\Uncompressed
+PresentationContext19  = DigitalXRayImageStorageForPresentation\JPEGBaseline
+PresentationContext20  = DigitalXRayImageStorageForPresentation\JPEGLossless
+PresentationContext21  = DigitalXRayImageStorageForPresentation\Uncompressed
+PresentationContext22  = DigitalXRayImageStorageForProcessing\JPEGBaseline
+PresentationContext23  = DigitalXRayImageStorageForProcessing\JPEGLossless
+PresentationContext24  = DigitalXRayImageStorageForProcessing\Uncompressed
+PresentationContext25  = EnhancedCTImageStorage\JPEGBaseline
+PresentationContext26  = EnhancedCTImageStorage\JPEGLossless
+PresentationContext27  = EnhancedCTImageStorage\Uncompressed
+PresentationContext28  = EnhancedMRImageStorage\JPEGBaseline
+PresentationContext29  = EnhancedMRImageStorage\JPEGLossless
+PresentationContext30  = EnhancedMRImageStorage\Uncompressed
+PresentationContext31  = EnhancedXAImageStorage\JPEGBaseline
+PresentationContext32  = EnhancedXAImageStorage\JPEGLossless
+PresentationContext33  = EnhancedXAImageStorage\Uncompressed
+PresentationContext34  = EnhancedXRFImageStorage\JPEGBaseline
+PresentationContext35  = EnhancedXRFImageStorage\JPEGLossless
+PresentationContext36  = EnhancedXRFImageStorage\Uncompressed
+PresentationContext37  = MRImageStorage\JPEGBaseline
+PresentationContext38  = MRImageStorage\JPEGLossless
+PresentationContext39  = MRImageStorage\Uncompressed
+PresentationContext40  = MultiframeGrayscaleByteSecondaryCaptureImageStorage\JPEGBaseline
+PresentationContext41  = MultiframeGrayscaleByteSecondaryCaptureImageStorage\JPEGLossless
+PresentationContext42  = MultiframeGrayscaleByteSecondaryCaptureImageStorage\Uncompressed
+PresentationContext43  = MultiframeGrayscaleWordSecondaryCaptureImageStorage\JPEGBaseline
+PresentationContext44  = MultiframeGrayscaleWordSecondaryCaptureImageStorage\JPEGLossless
+PresentationContext45  = MultiframeGrayscaleWordSecondaryCaptureImageStorage\Uncompressed
+PresentationContext46  = MultiframeSingleBitSecondaryCaptureImageStorage\JPEGBaseline
+PresentationContext47  = MultiframeSingleBitSecondaryCaptureImageStorage\JPEGLossless
+PresentationContext48  = MultiframeSingleBitSecondaryCaptureImageStorage\Uncompressed
+PresentationContext49  = MultiframeTrueColorSecondaryCaptureImageStorage\JPEGBaseline
+PresentationContext50  = MultiframeTrueColorSecondaryCaptureImageStorage\JPEGLossless
+PresentationContext51  = MultiframeTrueColorSecondaryCaptureImageStorage\Uncompressed
+PresentationContext52  = NuclearMedicineImageStorage\JPEGBaseline
+PresentationContext53  = NuclearMedicineImageStorage\JPEGLossless
+PresentationContext54  = NuclearMedicineImageStorage\Uncompressed
+PresentationContext55  = OphthalmicPhotography16BitImageStorage\JPEGBaseline
+PresentationContext56  = OphthalmicPhotography16BitImageStorage\JPEGLossless
+PresentationContext57  = OphthalmicPhotography16BitImageStorage\Uncompressed
+PresentationContext58  = OphthalmicPhotography8BitImageStorage\JPEGBaseline
+PresentationContext59  = OphthalmicPhotography8BitImageStorage\JPEGLossless
+PresentationContext60  = OphthalmicPhotography8BitImageStorage\Uncompressed
+PresentationContext61  = PositronEmissionTomographyImageStorage\JPEGBaseline
+PresentationContext62  = PositronEmissionTomographyImageStorage\JPEGLossless
+PresentationContext63  = PositronEmissionTomographyImageStorage\Uncompressed
+PresentationContext64  = RTImageStorage\JPEGBaseline
+PresentationContext65  = RTImageStorage\JPEGLossless
+PresentationContext66  = RTImageStorage\Uncompressed
+PresentationContext67  = SecondaryCaptureImageStorage\JPEGBaseline
+PresentationContext68  = SecondaryCaptureImageStorage\JPEGLossless
+PresentationContext69  = SecondaryCaptureImageStorage\Uncompressed
+PresentationContext70  = UltrasoundImageStorage\JPEGBaseline
+PresentationContext71  = UltrasoundImageStorage\JPEGLossless
+PresentationContext72  = UltrasoundImageStorage\RLE
+PresentationContext73  = UltrasoundImageStorage\Uncompressed
+PresentationContext74  = UltrasoundMultiframeImageStorage\JPEGBaseline
+PresentationContext75  = UltrasoundMultiframeImageStorage\JPEGLossless
+PresentationContext76  = UltrasoundMultiframeImageStorage\RLE
+PresentationContext77  = UltrasoundMultiframeImageStorage\Uncompressed
+PresentationContext78  = VLEndoscopicImageStorage\JPEGBaseline
+PresentationContext79  = VLEndoscopicImageStorage\JPEGLossless
+PresentationContext80  = VLEndoscopicImageStorage\Uncompressed
+PresentationContext81  = VLMicroscopicImageStorage\JPEGBaseline
+PresentationContext82  = VLMicroscopicImageStorage\JPEGLossless
+PresentationContext83  = VLMicroscopicImageStorage\Uncompressed
+PresentationContext84  = VLPhotographicImageStorage\JPEGBaseline
+PresentationContext85  = VLPhotographicImageStorage\JPEGLossless
+PresentationContext86  = VLPhotographicImageStorage\Uncompressed
+PresentationContext87  = VLSlideCoordinatesMicroscopicImageStorage\JPEGBaseline
+PresentationContext88  = VLSlideCoordinatesMicroscopicImageStorage\JPEGLossless
+PresentationContext89  = VLSlideCoordinatesMicroscopicImageStorage\Uncompressed
+PresentationContext90  = XRayAngiographicImageStorage\JPEGBaseline
+PresentationContext91  = XRayAngiographicImageStorage\JPEGLossless
+PresentationContext92  = XRayAngiographicImageStorage\Uncompressed
+PresentationContext93  = XRayRadiofluoroscopicImageStorage\JPEGBaseline
+PresentationContext94  = XRayRadiofluoroscopicImageStorage\JPEGLossless
+PresentationContext95  = XRayRadiofluoroscopicImageStorage\Uncompressed
+#
+# the following presentation contexts are for non-image SOP classes
+#
+PresentationContext96  = AmbulatoryECGWaveformStorage\Uncompressed
+PresentationContext97  = BasicTextSRStorage\Uncompressed
+PresentationContext98  = BasicVoiceAudioWaveformStorage\Uncompressed
+PresentationContext99  = CardiacElectrophysiologyWaveformStorage\Uncompressed
+PresentationContext100 = ChestCADSRStorage\Uncompressed
+PresentationContext101 = ColonCADSRStorage\Uncompressed
+PresentationContext102 = ColorSoftcopyPresentationStateStorage\Uncompressed
+PresentationContext103 = ComprehensiveSRStorage\Uncompressed
+PresentationContext104 = EncapsulatedPDFStorage\Uncompressed
+PresentationContext105 = EnhancedSRStorage\Uncompressed
+PresentationContext106 = GeneralECGWaveformStorage\Uncompressed
+PresentationContext107 = GrayscaleSoftcopyPresentationStateStorage\Uncompressed
+PresentationContext108 = HemodynamicWaveformStorage\Uncompressed
+PresentationContext109 = KeyObjectSelectionDocumentStorage\Uncompressed
+PresentationContext110 = MammographyCADSRStorage\Uncompressed
+PresentationContext111 = MRSpectroscopyStorage\Uncompressed
+PresentationContext112 = ProcedureLogStorage\Uncompressed
+PresentationContext113 = PseudoColorSoftcopyPresentationStateStorage\Uncompressed
+PresentationContext114 = RawDataStorage\Uncompressed
+PresentationContext115 = RTBeamsTreatmentRecordStorage\Uncompressed
+PresentationContext116 = RTBrachyTreatmentRecordStorage\Uncompressed
+PresentationContext117 = RTDoseStorage\Uncompressed
+PresentationContext118 = RTPlanStorage\Uncompressed
+PresentationContext119 = RTStructureSetStorage\Uncompressed
+PresentationContext120 = RTTreatmentSummaryRecordStorage\Uncompressed
+PresentationContext121 = SpatialFiducialsStorage\Uncompressed
+PresentationContext122 = SpatialRegistrationStorage\Uncompressed
+PresentationContext123 = StereometricRelationshipStorage\Uncompressed
+PresentationContext124 = TwelveLeadECGWaveformStorage\Uncompressed
+PresentationContext125 = XRayRadiationDoseSRStorage\Uncompressed
+#
+# the new video objects are only negotiated with MPEG2 transfer syntax
+#
+PresentationContext126 = VideoEndoscopicImageStorage\MPEG2
+PresentationContext127 = VideoMicroscopicImageStorage\MPEG2
+PresentationContext128 = VideoPhotographicImageStorage\MPEG2
+#
+# the following SOP classes are missing in the above list:
+#
+# - AcquisitionContextSRStorage
+# - AdvancedBlendingPresentationStateStorage
+# - ArterialPulseWaveformStorage
+# - AutorefractionMeasurementsStorage
+# - BasicStructuredDisplayStorage
+# - BlendingSoftcopyPresentationStateStorage
+# - BreastProjectionXRayImageStorageForPresentation
+# - BreastProjectionXRayImageStorageForProcessing
+# - BreastTomosynthesisImageStorage
+# - CompositingPlanarMPRVolumetricPresentationStateStorage
+# - Comprehensive3DSRStorage
+# - ContentAssessmentResultsStorage
+# - CornealTopographyMapStorage
+# - CTDefinedProcedureProtocolStorage
+# - CTPerformedProcedureProtocolStorage
+# - DeformableSpatialRegistrationStorage
+# - EncapsulatedCDAStorage
+# - EnhancedMRColorImageStorage
+# - EnhancedPETImageStorage
+# - EnhancedUSVolumeStorage
+# - ExtensibleSRStorage
+# - GeneralAudioWaveformStorage
+# - GenericImplantTemplateStorage
+# - GrayscalePlanarMPRVolumetricPresentationStateStorage
+# - ImplantAssemblyTemplateStorage
+# - ImplantationPlanSRDocumentStorage
+# - ImplantTemplateGroupStorage
+# - IntraocularLensCalculationsStorage
+# - IntravascularOpticalCoherenceTomographyImageStorageForPresentation
+# - IntravascularOpticalCoherenceTomographyImageStorageForProcessing
+# - KeratometryMeasurementsStorage
+# - LegacyConvertedEnhancedCTImageStorage
+# - LegacyConvertedEnhancedMRImageStorage
+# - LegacyConvertedEnhancedPETImageStorage
+# - LensometryMeasurementsStorage
+# - MacularGridThicknessAndVolumeReportStorage
+# - MultipleVolumeRenderingVolumetricPresentationStateStorage
+# - OphthalmicAxialMeasurementsStorage
+# - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
+# - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage
+# - OphthalmicThicknessMapStorage
+# - OphthalmicTomographyImageStorage
+# - OphthalmicVisualFieldStaticPerimetryMeasurementsStorage
+# - ParametricMapStorage
+# - PatientRadiationDoseSRStorage
+# - RadiopharmaceuticalRadiationDoseSRStorage
+# - RealWorldValueMappingStorage
+# - RespiratoryWaveformStorage
+# - RTBeamsDeliveryInstructionStorage
+# - RTBrachyApplicationSetupDeliveryInstructionStorage
+# - RTIonBeamsTreatmentRecordStorage
+# - RTIonPlanStorage
+# - SegmentationStorage
+# - SegmentedVolumeRenderingVolumetricPresentationStateStorage
+# - SimplifiedAdultEchoSRStorage
+# - SpectaclePrescriptionReportStorage
+# - SubjectiveRefractionMeasurementsStorage
+# - SurfaceScanMeshStorage
+# - SurfaceScanPointCloudStorage
+# - SurfaceSegmentationStorage
+# - TractographyResultsStorage
+# - VisualAcuityMeasurementsStorage
+# - VLWholeSlideMicroscopyImageStorage
+# - VolumeRenderingVolumetricPresentationStateStorage
+# - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage
+# - WideFieldOphthalmicPhotography3DCoordinatesImageStorage
+# - XAXRFGrayscaleSoftcopyPresentationStateStorage
+# - XRay3DAngiographicImageStorage
+# - XRay3DCraniofacialImageStorage
+#
+# - RETIRED_StandaloneCurveStorage
+# - RETIRED_StandaloneModalityLUTStorage
+# - RETIRED_StandaloneOverlayStorage
+# - RETIRED_StandalonePETCurveStorage
+# - RETIRED_StandaloneVOILUTStorage
+# - RETIRED_StoredPrintStorage
+#
+# - DRAFT_RTBeamsDeliveryInstructionStorage
+# - DRAFT_SRAudioStorage
+# - DRAFT_SRComprehensiveStorage
+# - DRAFT_SRDetailStorage
+# - DRAFT_SRTextStorage
+# - DRAFT_WaveformStorage
+#
+# - DICOS_2DAITStorage
+# - DICOS_3DAITStorage
+# - DICOS_CTImageStorage
+# - DICOS_DigitalXRayImageStorageForPresentation
+# - DICOS_DigitalXRayImageStorageForProcessing
+# - DICOS_QuadrupoleResonanceStorage
+# - DICOS_ThreatDetectionReportStorage
+#
+# - DICONDE_EddyCurrentImageStorage
+# - DICONDE_EddyCurrentMultiframeImageStorage
+
+# ============================================================================
+[[SCPSCURoleSelection]]
+# ============================================================================
+
+[GenericBothRoles]
+Role1   = BreastTomosynthesisImageStorage\BOTH
+Role2   = ComputedRadiographyImageStorage\BOTH
+Role3   = CornealTopographyMapStorage\BOTH
+Role4   = CTImageStorage\BOTH
+Role5   = DigitalIntraOralXRayImageStorageForPresentation\BOTH
+Role6   = DigitalIntraOralXRayImageStorageForProcessing\BOTH
+Role7   = DigitalMammographyXRayImageStorageForPresentation\BOTH
+Role8   = DigitalMammographyXRayImageStorageForProcessing\BOTH
+Role9   = DigitalXRayImageStorageForPresentation\BOTH
+Role10  = DigitalXRayImageStorageForProcessing\BOTH
+Role11  = EnhancedCTImageStorage\BOTH
+Role12  = EnhancedMRColorImageStorage\BOTH
+Role13  = EnhancedMRImageStorage\BOTH
+Role14  = EnhancedPETImageStorage\BOTH
+Role15  = EnhancedUSVolumeStorage\BOTH
+Role16  = EnhancedXAImageStorage\BOTH
+Role17  = EnhancedXRFImageStorage\BOTH
+Role18  = IntravascularOpticalCoherenceTomographyImageStorageForPresentation\BOTH
+Role19  = IntravascularOpticalCoherenceTomographyImageStorageForProcessing\BOTH
+Role20  = MRImageStorage\BOTH
+Role21  = MultiframeGrayscaleByteSecondaryCaptureImageStorage\BOTH
+Role22  = MultiframeGrayscaleWordSecondaryCaptureImageStorage\BOTH
+Role23  = MultiframeSingleBitSecondaryCaptureImageStorage\BOTH
+Role24  = MultiframeTrueColorSecondaryCaptureImageStorage\BOTH
+Role25  = NuclearMedicineImageStorage\BOTH
+Role26  = OphthalmicPhotography16BitImageStorage\BOTH
+Role27  = OphthalmicPhotography8BitImageStorage\BOTH
+Role28  = OphthalmicThicknessMapStorage\BOTH
+Role29  = OphthalmicTomographyImageStorage\BOTH
+Role30  = PositronEmissionTomographyImageStorage\BOTH
+Role31  = RTImageStorage\BOTH
+Role32  = SecondaryCaptureImageStorage\BOTH
+Role33  = UltrasoundImageStorage\BOTH
+Role34  = UltrasoundMultiframeImageStorage\BOTH
+Role35  = VideoEndoscopicImageStorage\BOTH
+Role36  = VideoMicroscopicImageStorage\BOTH
+Role37  = VideoPhotographicImageStorage\BOTH
+Role38  = VLEndoscopicImageStorage\BOTH
+Role39  = VLMicroscopicImageStorage\BOTH
+Role40  = VLPhotographicImageStorage\BOTH
+Role41  = VLSlideCoordinatesMicroscopicImageStorage\BOTH
+Role42  = VLWholeSlideMicroscopyImageStorage\BOTH
+Role43  = XRay3DAngiographicImageStorage\BOTH
+Role44  = XRay3DCraniofacialImageStorage\BOTH
+Role45  = XRayAngiographicImageStorage\BOTH
+Role46  = XRayRadiofluoroscopicImageStorage\BOTH
+# retired
+Role47  = RETIRED_HardcopyColorImageStorage\BOTH
+Role48  = RETIRED_HardcopyGrayscaleImageStorage\BOTH
+Role49  = RETIRED_NuclearMedicineImageStorage\BOTH
+Role50  = RETIRED_UltrasoundImageStorage\BOTH
+Role51  = RETIRED_UltrasoundMultiframeImageStorage\BOTH
+Role52  = RETIRED_VLImageStorage\BOTH
+Role53  = RETIRED_VLMultiFrameImageStorage\BOTH
+Role54  = RETIRED_XRayAngiographicBiPlaneImageStorage\BOTH
+#
+# the following presentation contexts are for non-image SOP classes
+#
+Role55  = AmbulatoryECGWaveformStorage\BOTH
+Role56  = ArterialPulseWaveformStorage\BOTH
+Role57  = AutorefractionMeasurementsStorage\BOTH
+Role58  = BasicStructuredDisplayStorage\BOTH
+Role59  = BasicTextSRStorage\BOTH
+Role60  = BasicVoiceAudioWaveformStorage\BOTH
+Role61  = BlendingSoftcopyPresentationStateStorage\BOTH
+Role62  = CardiacElectrophysiologyWaveformStorage\BOTH
+Role63  = ChestCADSRStorage\BOTH
+Role64  = ColonCADSRStorage\BOTH
+Role65  = ColorSoftcopyPresentationStateStorage\BOTH
+Role66  = Comprehensive3DSRStorage\BOTH
+Role67  = ComprehensiveSRStorage\BOTH
+Role68  = DeformableSpatialRegistrationStorage\BOTH
+Role69  = EncapsulatedCDAStorage\BOTH
+Role70  = EncapsulatedPDFStorage\BOTH
+Role71  = EnhancedSRStorage\BOTH
+Role72  = GeneralAudioWaveformStorage\BOTH
+Role73  = GeneralECGWaveformStorage\BOTH
+Role74  = GenericImplantTemplateStorage\BOTH
+Role75  = GrayscaleSoftcopyPresentationStateStorage\BOTH
+Role76  = HemodynamicWaveformStorage\BOTH
+Role77  = ImplantAssemblyTemplateStorage\BOTH
+Role78  = ImplantationPlanSRDocumentStorage\BOTH
+Role79  = ImplantTemplateGroupStorage\BOTH
+Role80  = IntraocularLensCalculationsStorage\BOTH
+Role81  = KeratometryMeasurementsStorage\BOTH
+Role82  = KeyObjectSelectionDocumentStorage\BOTH
+Role83  = LensometryMeasurementsStorage\BOTH
+Role84  = MacularGridThicknessAndVolumeReportStorage\BOTH
+Role85  = MammographyCADSRStorage\BOTH
+Role86  = MRSpectroscopyStorage\BOTH
+Role87  = OphthalmicAxialMeasurementsStorage\BOTH
+Role88  = OphthalmicVisualFieldStaticPerimetryMeasurementsStorage\BOTH
+Role89  = ProcedureLogStorage\BOTH
+Role90  = PseudoColorSoftcopyPresentationStateStorage\BOTH
+Role91  = RawDataStorage\BOTH
+Role92  = RealWorldValueMappingStorage\BOTH
+Role93  = RespiratoryWaveformStorage\BOTH
+Role94  = RTBeamsDeliveryInstructionStorage\BOTH
+Role95  = RTBeamsTreatmentRecordStorage\BOTH
+Role96  = RTBrachyTreatmentRecordStorage\BOTH
+Role97  = RTDoseStorage\BOTH
+Role98  = RTIonBeamsTreatmentRecordStorage\BOTH
+Role99  = RTIonPlanStorage\BOTH
+Role100 = RTPlanStorage\BOTH
+Role101 = RTStructureSetStorage\BOTH
+Role102 = RTTreatmentSummaryRecordStorage\BOTH
+Role103 = SegmentationStorage\BOTH
+Role104 = SpatialFiducialsStorage\BOTH
+Role105 = SpatialRegistrationStorage\BOTH
+Role106 = SpectaclePrescriptionReportStorage\BOTH
+Role107 = StereometricRelationshipStorage\BOTH
+Role108 = SubjectiveRefractionMeasurementsStorage\BOTH
+Role109 = SurfaceScanMeshStorage\BOTH
+Role110 = SurfaceScanPointCloudStorage\BOTH
+Role111 = SurfaceSegmentationStorage\BOTH
+Role112 = TwelveLeadECGWaveformStorage\BOTH
+Role113 = VisualAcuityMeasurementsStorage\BOTH
+Role114 = XAXRFGrayscaleSoftcopyPresentationStateStorage\BOTH
+Role115 = XRayRadiationDoseSRStorage\BOTH
+# retired
+Role116 = RETIRED_StandaloneCurveStorage\BOTH
+Role117 = RETIRED_StandaloneModalityLUTStorage\BOTH
+Role118 = RETIRED_StandaloneOverlayStorage\BOTH
+Role119 = RETIRED_StandalonePETCurveStorage\BOTH
+Role120 = RETIRED_StandaloneVOILUTStorage\BOTH
+Role121 = RETIRED_StoredPrintStorage\BOTH
+# draft
+Role122 = DRAFT_RTBeamsDeliveryInstructionStorage\BOTH
+Role123 = DRAFT_SRAudioStorage\BOTH
+Role124 = DRAFT_SRComprehensiveStorage\BOTH
+Role125 = DRAFT_SRDetailStorage\BOTH
+Role126 = DRAFT_SRTextStorage\BOTH
+Role127 = DRAFT_WaveformStorage\BOTH
+#
+# the following SOP classes are missing in the above list:
+#
+# - AcquisitionContextSRStorage
+# - AdvancedBlendingPresentationStateStorage
+# - BreastProjectionXRayImageStorageForPresentation
+# - BreastProjectionXRayImageStorageForProcessing
+# - ColorPaletteStorage
+# - CompositingPlanarMPRVolumetricPresentationStateStorage
+# - ContentAssessmentResultsStorage
+# - CTDefinedProcedureProtocolStorage
+# - CTPerformedProcedureProtocolStorage
+# - ExtensibleSRStorage
+# - GrayscalePlanarMPRVolumetricPresentationStateStorage
+# - HangingProtocolStorage
+# - LegacyConvertedEnhancedCTImageStorage
+# - LegacyConvertedEnhancedMRImageStorage
+# - LegacyConvertedEnhancedPETImageStorage
+# - MultipleVolumeRenderingVolumetricPresentationStateStorage
+# - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
+# - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage
+# - ParametricMapStorage
+# - PatientRadiationDoseSRStorage
+# - RadiopharmaceuticalRadiationDoseSRStorage
+# - RTBrachyApplicationSetupDeliveryInstructionStorage
+# - SegmentedVolumeRenderingVolumetricPresentationStateStorage
+# - SimplifiedAdultEchoSRStorage
+# - TractographyResultsStorage
+# - VolumeRenderingVolumetricPresentationStateStorage
+# - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage
+# - WideFieldOphthalmicPhotography3DCoordinatesImageStorage
+#
+# - DICOS_2DAITStorage
+# - DICOS_3DAITStorage
+# - DICOS_CTImageStorage
+# - DICOS_DigitalXRayImageStorageForPresentation
+# - DICOS_DigitalXRayImageStorageForProcessing
+# - DICOS_QuadrupoleResonanceStorage
+# - DICOS_ThreatDetectionReportStorage
+#
+# - DICONDE_EddyCurrentImageStorage
+# - DICONDE_EddyCurrentMultiframeImageStorage
+
+[AllBothRoles]
+Role1   = BreastProjectionXRayImageStorageForPresentation\BOTH
+Role2   = BreastProjectionXRayImageStorageForProcessing\BOTH
+Role3   = BreastTomosynthesisImageStorage\BOTH
+Role4   = ComputedRadiographyImageStorage\BOTH
+Role5   = CornealTopographyMapStorage\BOTH
+Role6   = CTImageStorage\BOTH
+Role7   = DigitalIntraOralXRayImageStorageForPresentation\BOTH
+Role8   = DigitalIntraOralXRayImageStorageForProcessing\BOTH
+Role9   = DigitalMammographyXRayImageStorageForPresentation\BOTH
+Role10  = DigitalMammographyXRayImageStorageForProcessing\BOTH
+Role11  = DigitalXRayImageStorageForPresentation\BOTH
+Role12  = DigitalXRayImageStorageForProcessing\BOTH
+Role13  = EnhancedCTImageStorage\BOTH
+Role14  = EnhancedMRColorImageStorage\BOTH
+Role15  = EnhancedMRImageStorage\BOTH
+Role16  = EnhancedPETImageStorage\BOTH
+Role17  = EnhancedUSVolumeStorage\BOTH
+Role18  = EnhancedXAImageStorage\BOTH
+Role19  = EnhancedXRFImageStorage\BOTH
+Role20  = IntravascularOpticalCoherenceTomographyImageStorageForPresentation\BOTH
+Role21  = IntravascularOpticalCoherenceTomographyImageStorageForProcessing\BOTH
+Role22  = LegacyConvertedEnhancedCTImageStorage\BOTH
+Role23  = LegacyConvertedEnhancedMRImageStorage\BOTH
+Role24  = LegacyConvertedEnhancedPETImageStorage\BOTH
+Role25  = MRImageStorage\BOTH
+Role26  = MultiframeGrayscaleByteSecondaryCaptureImageStorage\BOTH
+Role27  = MultiframeGrayscaleWordSecondaryCaptureImageStorage\BOTH
+Role28  = MultiframeSingleBitSecondaryCaptureImageStorage\BOTH
+Role29  = MultiframeTrueColorSecondaryCaptureImageStorage\BOTH
+Role30  = NuclearMedicineImageStorage\BOTH
+Role31  = OphthalmicPhotography16BitImageStorage\BOTH
+Role32  = OphthalmicPhotography8BitImageStorage\BOTH
+Role33  = OphthalmicThicknessMapStorage\BOTH
+Role34  = OphthalmicTomographyImageStorage\BOTH
+Role35  = ParametricMapStorage\BOTH
+Role36  = PositronEmissionTomographyImageStorage\BOTH
+Role37  = RTImageStorage\BOTH
+Role38  = SecondaryCaptureImageStorage\BOTH
+Role39  = UltrasoundImageStorage\BOTH
+Role40  = UltrasoundMultiframeImageStorage\BOTH
+Role41  = VideoEndoscopicImageStorage\BOTH
+Role42  = VideoMicroscopicImageStorage\BOTH
+Role43  = VideoPhotographicImageStorage\BOTH
+Role44  = VLEndoscopicImageStorage\BOTH
+Role45  = VLMicroscopicImageStorage\BOTH
+Role46  = VLPhotographicImageStorage\BOTH
+Role47  = VLSlideCoordinatesMicroscopicImageStorage\BOTH
+Role48  = VLWholeSlideMicroscopyImageStorage\BOTH
+Role49  = WideFieldOphthalmicPhotographyStereographicProjectionImageStorage\BOTH
+Role50  = WideFieldOphthalmicPhotography3DCoordinatesImageStorage\BOTH
+Role51  = XRay3DAngiographicImageStorage\BOTH
+Role52  = XRay3DCraniofacialImageStorage\BOTH
+Role53  = XRayAngiographicImageStorage\BOTH
+Role54  = XRayRadiofluoroscopicImageStorage\BOTH
+#
+# all other DICOM objects
+#
+Role55  = AcquisitionContextSRStorage\BOTH
+Role56  = AmbulatoryECGWaveformStorage\BOTH
+Role57  = ArterialPulseWaveformStorage\BOTH
+Role58  = AutorefractionMeasurementsStorage\BOTH
+Role59  = BasicStructuredDisplayStorage\BOTH
+Role60  = BasicTextSRStorage\BOTH
+Role61  = BasicVoiceAudioWaveformStorage\BOTH
+Role62  = BlendingSoftcopyPresentationStateStorage\BOTH
+Role63  = CardiacElectrophysiologyWaveformStorage\BOTH
+Role64  = ChestCADSRStorage\BOTH
+Role65  = ColonCADSRStorage\BOTH
+Role66  = ColorSoftcopyPresentationStateStorage\BOTH
+Role67  = CompositingPlanarMPRVolumetricPresentationStateStorage\BOTH
+Role68  = Comprehensive3DSRStorage\BOTH
+Role69  = ComprehensiveSRStorage\BOTH
+Role70  = ContentAssessmentResultsStorage\BOTH
+Role71  = CTDefinedProcedureProtocolStorage\BOTH
+Role72  = CTPerformedProcedureProtocolStorage\BOTH
+Role73  = DeformableSpatialRegistrationStorage\BOTH
+Role74  = EncapsulatedCDAStorage\BOTH
+Role75  = EncapsulatedPDFStorage\BOTH
+Role76  = EnhancedSRStorage\BOTH
+Role77  = ExtensibleSRStorage\BOTH
+Role78  = GeneralAudioWaveformStorage\BOTH
+Role79  = GeneralECGWaveformStorage\BOTH
+Role80  = GenericImplantTemplateStorage\BOTH
+Role81  = GrayscalePlanarMPRVolumetricPresentationStateStorage\BOTH
+Role82  = GrayscaleSoftcopyPresentationStateStorage\BOTH
+Role83  = HangingProtocolStorage\BOTH
+Role84  = HemodynamicWaveformStorage\BOTH
+Role85  = ImplantAssemblyTemplateStorage\BOTH
+Role86  = ImplantationPlanSRDocumentStorage\BOTH
+Role87  = ImplantTemplateGroupStorage\BOTH
+Role88  = IntraocularLensCalculationsStorage\BOTH
+Role89  = KeratometryMeasurementsStorage\BOTH
+Role90  = KeyObjectSelectionDocumentStorage\BOTH
+Role91  = LensometryMeasurementsStorage\BOTH
+Role92  = MacularGridThicknessAndVolumeReportStorage\BOTH
+Role93  = MammographyCADSRStorage\BOTH
+Role94  = MRSpectroscopyStorage\BOTH
+Role95  = OphthalmicAxialMeasurementsStorage\BOTH
+Role96  = OphthalmicVisualFieldStaticPerimetryMeasurementsStorage\BOTH
+Role97  = ProcedureLogStorage\BOTH
+Role98  = PseudoColorSoftcopyPresentationStateStorage\BOTH
+Role99  = RadiopharmaceuticalRadiationDoseSRStorage\BOTH
+Role100 = RawDataStorage\BOTH
+Role101 = RealWorldValueMappingStorage\BOTH
+Role102 = RespiratoryWaveformStorage\BOTH
+Role103 = RTBeamsDeliveryInstructionStorage\BOTH
+Role104 = RTBeamsTreatmentRecordStorage\BOTH
+Role105 = RTBrachyApplicationSetupDeliveryInstructionStorage\BOTH
+Role106 = RTBrachyTreatmentRecordStorage\BOTH
+Role107 = RTDoseStorage\BOTH
+Role108 = RTIonBeamsTreatmentRecordStorage\BOTH
+Role109 = RTIonPlanStorage\BOTH
+Role110 = RTPlanStorage\BOTH
+Role111 = RTStructureSetStorage\BOTH
+Role112 = RTTreatmentSummaryRecordStorage\BOTH
+Role113 = SegmentationStorage\BOTH
+Role114 = SimplifiedAdultEchoSRStorage\BOTH
+Role115 = SpatialFiducialsStorage\BOTH
+Role116 = SpatialRegistrationStorage\BOTH
+Role117 = SpectaclePrescriptionReportStorage\BOTH
+Role118 = StereometricRelationshipStorage\BOTH
+Role119 = SubjectiveRefractionMeasurementsStorage\BOTH
+Role120 = SurfaceScanMeshStorage\BOTH
+Role121 = SurfaceScanPointCloudStorage\BOTH
+Role122 = SurfaceSegmentationStorage\BOTH
+Role123 = TractographyResultsStorage\BOTH
+Role124 = TwelveLeadECGWaveformStorage\BOTH
+Role125 = VisualAcuityMeasurementsStorage\BOTH
+Role126 = XAXRFGrayscaleSoftcopyPresentationStateStorage\BOTH
+Role127 = XRayRadiationDoseSRStorage\BOTH
+#
+# the following SOP classes are missing in the above list:
+#
+# - AdvancedBlendingPresentationStateStorage
+# - ColorPaletteStorage
+# - MultipleVolumeRenderingVolumetricPresentationStateStorage
+# - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
+# - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage
+# - PatientRadiationDoseSRStorage
+# - SegmentedVolumeRenderingVolumetricPresentationStateStorage
+# - VolumeRenderingVolumetricPresentationStateStorage
+#
+# - RETIRED_HardcopyColorImageStorage
+# - RETIRED_HardcopyGrayscaleImageStorage
+# - RETIRED_NuclearMedicineImageStorage
+# - RETIRED_UltrasoundImageStorage
+# - RETIRED_UltrasoundMultiframeImageStorage
+# - RETIRED_VLImageStorage
+# - RETIRED_VLMultiFrameImageStorage
+# - RETIRED_XRayAngiographicBiPlaneImageStorage
+#
+# - RETIRED_StandaloneCurveStorage
+# - RETIRED_StandaloneModalityLUTStorage
+# - RETIRED_StandaloneOverlayStorage
+# - RETIRED_StandalonePETCurveStorage
+# - RETIRED_StandaloneVOILUTStorage
+# - RETIRED_StoredPrintStorage
+#
+# - DRAFT_RTBeamsDeliveryInstructionStorage
+# - DRAFT_SRAudioStorage
+# - DRAFT_SRComprehensiveStorage
+# - DRAFT_SRDetailStorage
+# - DRAFT_SRTextStorage
+# - DRAFT_WaveformStorage
+#
+# - DICOS_2DAITStorage
+# - DICOS_3DAITStorage
+# - DICOS_CTImageStorage
+# - DICOS_DigitalXRayImageStorageForPresentation
+# - DICOS_DigitalXRayImageStorageForProcessing
+# - DICOS_QuadrupoleResonanceStorage
+# - DICOS_ThreatDetectionReportStorage
+#
+# - DICONDE_EddyCurrentImageStorage
+# - DICONDE_EddyCurrentMultiframeImageStorage
+
+# ============================================================================
+[[Profiles]]
+# ============================================================================
+
+[IncomingDefault]
+PresentationContexts = GenericStorageSCP
+SCPSCURoleSelection  = GenericBothRoles
+
+[IncomingAllDICOM]
+PresentationContexts = AllDICOMStorageSCP
+SCPSCURoleSelection  = AllBothRoles
+
+[OutgoingDefault]
+PresentationContexts = StorageSCUCompressedAndUncompressed
diff --git a/dcmqrdb/include/CMakeLists.txt b/dcmqrdb/include/CMakeLists.txt
index 1013680..af4e300 100644
--- a/dcmqrdb/include/CMakeLists.txt
+++ b/dcmqrdb/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmqrdb DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmqrdb DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbm.h b/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbm.h
index 84a883b..256a692 100644
--- a/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbm.h
+++ b/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbm.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2011, OFFIS e.V.
+ *  Copyright (C) 1993-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -24,6 +24,7 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 #include "dcmtk/dcmnet/dimse.h"
+#include "dcmtk/dcmnet/dcasccfg.h"
 #include "dcmtk/dcmqrdb/qrdefine.h"
 
 class DcmQueryRetrieveDatabaseHandle;
@@ -49,6 +50,7 @@ public:
     DcmQueryRetrieveMoveContext(
       DcmQueryRetrieveDatabaseHandle& handle,
       const DcmQueryRetrieveOptions& options,
+      const DcmAssociationConfiguration& associationConfiguration,
       const DcmQueryRetrieveConfig *cfg,
       DIC_US priorstatus,
       T_ASC_Association *assoc,
@@ -56,6 +58,7 @@ public:
       T_DIMSE_Priority pr)
     : dbHandle(handle)
     , options_(options)
+    , associationConfiguration_(associationConfiguration)
     , priorStatus(priorstatus)
     , origAssoc(assoc)
     , subAssoc(NULL)
@@ -129,6 +132,9 @@ private:
     /// reference to Q/R service options
     const DcmQueryRetrieveOptions& options_;
 
+    /// reference to association configuration
+    const DcmAssociationConfiguration& associationConfiguration_;
+
     /// prior DIMSE status
     DIC_US  priorStatus;
 
diff --git a/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h b/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h
index ec0433c..20b86be 100644
--- a/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h
+++ b/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h
@@ -40,7 +40,7 @@ class DcmQueryRetrieveConfig;
 
 #define DBINDEXFILE  "index.dat"
 #define DBMAGIC      "QRDB"
-#define DBVERSION    4
+#define DBVERSION    5
 #define DBHEADERSIZE 6
 
 #if DBVERSION > 0xFF
diff --git a/dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h b/dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h
index e9a019a..1614ac5 100644
--- a/dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h
+++ b/dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h
@@ -308,43 +308,38 @@ struct DCMTK_DCMQRDB_EXPORT ImagesofStudyArray
 #define RECORDIDX_OtherPatientIDs                 5
 #define RECORDIDX_OtherPatientNames               6
 #define RECORDIDX_EthnicGroup                     7
-#define RECORDIDX_NumberofPatientRelatedStudies   8
-#define RECORDIDX_NumberofPatientRelatedSeries    9
-#define RECORDIDX_NumberofPatientRelatedInstances 10
-#define RECORDIDX_StudyDate                      11
-#define RECORDIDX_StudyTime                      12
-#define RECORDIDX_StudyID                        13
-#define RECORDIDX_StudyDescription               14
-#define RECORDIDX_NameOfPhysiciansReadingStudy   15
-#define RECORDIDX_AccessionNumber                16
-#define RECORDIDX_ReferringPhysicianName         17
-#define RECORDIDX_ProcedureDescription           18
-#define RECORDIDX_AttendingPhysiciansName        19
-#define RECORDIDX_StudyInstanceUID               20
-#define RECORDIDX_OtherStudyNumbers              21
-#define RECORDIDX_AdmittingDiagnosesDescription  22
-#define RECORDIDX_PatientAge                     23
-#define RECORDIDX_PatientSize                    24
-#define RECORDIDX_PatientWeight                  25
-#define RECORDIDX_Occupation                     26
-#define RECORDIDX_NumberofStudyRelatedSeries     27
-#define RECORDIDX_NumberofStudyRelatedInstances  28
-#define RECORDIDX_SeriesNumber                   29
-#define RECORDIDX_SeriesInstanceUID              30
-#define RECORDIDX_Modality                       31
-#define RECORDIDX_ImageNumber                    32
-#define RECORDIDX_SOPInstanceUID                 33
-#define RECORDIDX_SeriesDate                     34
-#define RECORDIDX_SeriesTime                     35
-#define RECORDIDX_SeriesDescription              36
-#define RECORDIDX_ProtocolName                   37
-#define RECORDIDX_OperatorsName                  38
-#define RECORDIDX_PerformingPhysicianName        39
-#define RECORDIDX_PresentationLabel              40
-#define RECORDIDX_IssuerOfPatientID              41
-#define RECORDIDX_SpecificCharacterSet           42
-
-#define NBPARAMETERS                             43
+#define RECORDIDX_StudyDate                       8
+#define RECORDIDX_StudyTime                       9
+#define RECORDIDX_StudyID                        10
+#define RECORDIDX_StudyDescription               11
+#define RECORDIDX_NameOfPhysiciansReadingStudy   12
+#define RECORDIDX_AccessionNumber                13
+#define RECORDIDX_ReferringPhysicianName         14
+#define RECORDIDX_ProcedureDescription           15
+#define RECORDIDX_AttendingPhysiciansName        16
+#define RECORDIDX_StudyInstanceUID               17
+#define RECORDIDX_OtherStudyNumbers              18
+#define RECORDIDX_AdmittingDiagnosesDescription  19
+#define RECORDIDX_PatientAge                     20
+#define RECORDIDX_PatientSize                    21
+#define RECORDIDX_PatientWeight                  22
+#define RECORDIDX_Occupation                     23
+#define RECORDIDX_SeriesNumber                   24
+#define RECORDIDX_SeriesInstanceUID              25
+#define RECORDIDX_Modality                       26
+#define RECORDIDX_ImageNumber                    27
+#define RECORDIDX_SOPInstanceUID                 28
+#define RECORDIDX_SeriesDate                     29
+#define RECORDIDX_SeriesTime                     30
+#define RECORDIDX_SeriesDescription              31
+#define RECORDIDX_ProtocolName                   32
+#define RECORDIDX_OperatorsName                  33
+#define RECORDIDX_PerformingPhysicianName        34
+#define RECORDIDX_PresentationLabel              35
+#define RECORDIDX_IssuerOfPatientID              36
+#define RECORDIDX_SpecificCharacterSet           37
+
+#define NBPARAMETERS                             38
 
 /* ENSURE THAT DBVERSION IS INCREMENTED WHENEVER ONE OF THESE STRUCTS IS MODIFIED */
 
@@ -372,9 +367,6 @@ struct DCMTK_DCMQRDB_EXPORT IdxRecord
     char    OtherPatientIDs                 [LO_MAX_LENGTH+1] ;
     char    OtherPatientNames               [PN_MAX_LENGTH+1] ;
     char    EthnicGroup                     [SH_MAX_LENGTH+1] ;
-    char    NumberofPatientRelatedStudies   [IS_MAX_LENGTH+1] ;
-    char    NumberofPatientRelatedSeries    [IS_MAX_LENGTH+1] ;
-    char    NumberofPatientRelatedInstances [IS_MAX_LENGTH+1] ;
 
     char    StudyDate                       [DA_MAX_LENGTH+1] ;
     char    StudyTime                       [TM_MAX_LENGTH+1] ;
@@ -393,8 +385,6 @@ struct DCMTK_DCMQRDB_EXPORT IdxRecord
     char    PatientSize                     [DS_MAX_LENGTH+1] ;
     char    PatientWeight                   [DS_MAX_LENGTH+1] ;
     char    Occupation                      [SH_MAX_LENGTH+1] ;
-    char    NumberofStudyRelatedSeries      [IS_MAX_LENGTH+1] ;
-    char    NumberofStudyRelatedInstances   [IS_MAX_LENGTH+1] ;
 
     char    SeriesNumber                    [IS_MAX_LENGTH+1] ;
     char    SeriesInstanceUID               [UI_MAX_LENGTH+1] ;
diff --git a/dcmqrdb/include/dcmtk/dcmqrdb/dcmqropt.h b/dcmqrdb/include/dcmtk/dcmqrdb/dcmqropt.h
index 19b03aa..bc83777 100644
--- a/dcmqrdb/include/dcmtk/dcmqrdb/dcmqropt.h
+++ b/dcmqrdb/include/dcmtk/dcmqrdb/dcmqropt.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2012, OFFIS e.V.
+ *  Copyright (C) 1993-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -160,6 +160,14 @@ public:
   /// timeout for ACSE operations
   int acse_timeout_;
 
+  // association configuration file name
+  OFString associationConfigFile;
+
+  /// profile name for incoming association configuration
+  OFString incomingProfile;
+
+  /// profile name for outgoing association configuration
+  OFString outgoingProfile;
 };
 
 
diff --git a/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrsrv.h b/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrsrv.h
index 5f3ae88..3c4a909 100644
--- a/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrsrv.h
+++ b/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrsrv.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2011, OFFIS e.V.
+ *  Copyright (C) 1993-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,6 +26,7 @@
 #include "dcmtk/ofstd/oftypes.h"
 #include "dcmtk/dcmnet/assoc.h"
 #include "dcmtk/dcmnet/dimse.h"
+#include "dcmtk/dcmnet/dcasccfg.h"
 #include "dcmtk/dcmqrdb/dcmqrptb.h"
 
 class DcmQueryRetrieveConfig;
@@ -64,7 +65,8 @@ public:
   DcmQueryRetrieveSCP(
     const DcmQueryRetrieveConfig& config,
     const DcmQueryRetrieveOptions& options,
-    const DcmQueryRetrieveDatabaseHandleFactory& factory);
+    const DcmQueryRetrieveDatabaseHandleFactory& factory,
+    const DcmAssociationConfiguration& associationConfiguration);
 
   /// destructor
   virtual ~DcmQueryRetrieveSCP() { }
@@ -164,6 +166,9 @@ private:
 
   /// SCP configuration options
   const DcmQueryRetrieveOptions& options_;
+
+  /// Association configuration profiles read from configuration file
+  const DcmAssociationConfiguration& associationConfiguration_;
 };
 
 #endif
diff --git a/dcmqrdb/libsrc/Makefile.dep b/dcmqrdb/libsrc/Makefile.dep
index e10df3e..15bcfb1 100644
--- a/dcmqrdb/libsrc/Makefile.dep
+++ b/dcmqrdb/libsrc/Makefile.dep
@@ -30,7 +30,10 @@ dcmqrcbf.o: dcmqrcbf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -46,15 +49,16 @@ dcmqrcbf.o: dcmqrcbf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -108,7 +112,10 @@ dcmqrcbg.o: dcmqrcbg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -124,15 +131,16 @@ dcmqrcbg.o: dcmqrcbg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -186,7 +194,10 @@ dcmqrcbm.o: dcmqrcbm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -202,15 +213,16 @@ dcmqrcbm.o: dcmqrcbm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -222,6 +234,14 @@ dcmqrcbm.o: dcmqrcbm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dcasccfg.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccftsmp.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfuidh.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfpcmp.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfrsmp.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfenmp.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfprmp.h \
  ../include/dcmtk/dcmqrdb/qrdefine.h ../include/dcmtk/dcmqrdb/dcmqrcnf.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../include/dcmtk/dcmqrdb/dcmqropt.h \
@@ -264,7 +284,10 @@ dcmqrcbs.o: dcmqrcbs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -280,15 +303,16 @@ dcmqrcbs.o: dcmqrcbs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -329,6 +353,7 @@ dcmqrcnf.o: dcmqrcnf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
@@ -340,7 +365,9 @@ dcmqrcnf.o: dcmqrcnf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -354,10 +381,7 @@ dcmqrcnf.o: dcmqrcnf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/dcmqrdb/qrdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h
+ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcmqrdbi.o: dcmqrdbi.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
@@ -372,6 +396,7 @@ dcmqrdbi.o: dcmqrdbi.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmqrdb/dcmqrdbs.h ../include/dcmtk/dcmqrdb/qrdefine.h \
  ../include/dcmtk/dcmqrdb/dcmqrdbi.h ../include/dcmtk/dcmqrdb/dcmqrdba.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
@@ -395,7 +420,9 @@ dcmqrdbi.o: dcmqrdbi.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -416,6 +443,7 @@ dcmqrdbi.o: dcmqrdbi.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -431,13 +459,10 @@ dcmqrdbi.o: dcmqrdbi.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmqrdb/dcmqrcnf.h ../include/dcmtk/dcmqrdb/dcmqropt.h \
  ../include/dcmtk/dcmqrdb/dcmqridx.h \
  ../../ofstd/include/dcmtk/ofstd/ofoption.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/ofalign.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../../dcmnet/include/dcmtk/dcmnet/diutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
@@ -463,6 +488,7 @@ dcmqrdbs.o: dcmqrdbs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -475,7 +501,9 @@ dcmqrdbs.o: dcmqrdbs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -523,7 +551,10 @@ dcmqropt.o: dcmqropt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -541,10 +572,10 @@ dcmqropt.o: dcmqropt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -560,6 +591,7 @@ dcmqropt.o: dcmqropt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmqrdb/dcmqrcnf.h ../include/dcmtk/dcmqrdb/qrdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
@@ -602,7 +634,10 @@ dcmqrptb.o: dcmqrptb.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -618,15 +653,16 @@ dcmqrptb.o: dcmqrptb.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmqrdb/qrdefine.h ../include/dcmtk/dcmqrdb/dcmqropt.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
@@ -672,7 +708,10 @@ dcmqrsrv.o: dcmqrsrv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -688,15 +727,16 @@ dcmqrsrv.o: dcmqrsrv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -708,6 +748,14 @@ dcmqrsrv.o: dcmqrsrv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dcasccfg.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccftsmp.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfuidh.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfpcmp.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfrsmp.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfenmp.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dccfprmp.h \
  ../include/dcmtk/dcmqrdb/dcmqrptb.h ../include/dcmtk/dcmqrdb/qrdefine.h \
  ../include/dcmtk/dcmqrdb/dcmqropt.h ../include/dcmtk/dcmqrdb/dcmqrcnf.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
@@ -749,7 +797,10 @@ dcmqrtis.o: dcmqrtis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -765,9 +816,9 @@ dcmqrtis.o: dcmqrtis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
@@ -775,6 +826,7 @@ dcmqrtis.o: dcmqrtis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
diff --git a/dcmqrdb/libsrc/dcmqrcbg.cc b/dcmqrdb/libsrc/dcmqrcbg.cc
index bafc40c..f5a20be 100644
--- a/dcmqrdb/libsrc/dcmqrcbg.cc
+++ b/dcmqrdb/libsrc/dcmqrcbg.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2010, OFFIS e.V.
+ *  Copyright (C) 1993-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -140,7 +140,7 @@ void DcmQueryRetrieveGetContext::callbackHandler(
 
 void DcmQueryRetrieveGetContext::addFailedUIDInstance(const char *sopInstance)
 {
-    int len;
+    size_t len;
 
     if (failedUIDs == NULL) {
         if ((failedUIDs = (char*)malloc(DIC_UI_LEN+1)) == NULL) {
@@ -179,9 +179,8 @@ OFCondition DcmQueryRetrieveGetContext::performGetSubOp(DIC_UI sopClass, DIC_UI
     lockfd = open(fname, O_RDONLY , 0666);
 #endif
     if (lockfd < 0) {
-        char buf[256];
         /* due to quota system the file could have been deleted */
-        DCMQRDB_ERROR("Get SCP: storeSCU: [file: " << fname << "]: " << OFStandard::strerror(errno, buf, sizeof(buf)));
+        DCMQRDB_ERROR("Get SCP: storeSCU: [file: " << fname << "]: " << OFStandard::getLastSystemErrorCode().message());
         nFailed++;
         addFailedUIDInstance(sopInstance);
         return EC_Normal;
diff --git a/dcmqrdb/libsrc/dcmqrcbm.cc b/dcmqrdb/libsrc/dcmqrcbm.cc
index 773e4be..eb96c05 100644
--- a/dcmqrdb/libsrc/dcmqrcbm.cc
+++ b/dcmqrdb/libsrc/dcmqrcbm.cc
@@ -20,6 +20,7 @@
  */
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
 #include "dcmtk/dcmqrdb/dcmqrcbm.h"
 
 #include "dcmtk/dcmqrdb/dcmqrcnf.h"
@@ -164,7 +165,7 @@ void DcmQueryRetrieveMoveContext::callbackHandler(
 
 void DcmQueryRetrieveMoveContext::addFailedUIDInstance(const char *sopInstance)
 {
-    int len;
+    size_t len;
 
     if (failedUIDs == NULL) {
         if ((failedUIDs = (char*)malloc(DIC_UI_LEN+1)) == NULL) {
@@ -203,10 +204,9 @@ OFCondition DcmQueryRetrieveMoveContext::performMoveSubOp(DIC_UI sopClass, DIC_U
     lockfd = open(fname, O_RDONLY , 0666);
 #endif
     if (lockfd < 0) {
-        char buf[256];
         /* due to quota system the file could have been deleted */
         DCMQRDB_ERROR("Move SCP: storeSCU: [file: " << fname << "]: "
-            << OFStandard::strerror(errno, buf, sizeof(buf)));
+            << OFStandard::getLastSystemErrorCode().message());
         nFailed++;
         addFailedUIDInstance(sopInstance);
         return EC_Normal;
@@ -287,7 +287,6 @@ OFCondition DcmQueryRetrieveMoveContext::buildSubAssociation(T_DIMSE_C_MoveRQ *r
     DIC_NODENAME dstHostName;
     DIC_NODENAME dstHostNamePlusPort;
     int dstPortNumber;
-    DIC_NODENAME localHostName;
     T_ASC_Parameters *params;
     OFString temp_str;
 
@@ -317,13 +316,16 @@ OFCondition DcmQueryRetrieveMoveContext::buildSubAssociation(T_DIMSE_C_MoveRQ *r
         }
     }
     if (cond.good()) {
-        gethostname(localHostName, sizeof(localHostName) - 1);
         sprintf(dstHostNamePlusPort, "%s:%d", dstHostName, dstPortNumber);
-        ASC_setPresentationAddresses(params, localHostName,
+        ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(),
             dstHostNamePlusPort);
         ASC_setAPTitles(params, ourAETitle.c_str(), dstAETitle,NULL);
 
-        cond = addAllStoragePresentationContexts(params);
+        if (options_.outgoingProfile.empty()) {
+            cond = addAllStoragePresentationContexts(params);
+        } else {
+            cond = associationConfiguration_.setAssociationParameters(options_.outgoingProfile.c_str(), *params);
+        }
         if (cond.bad()) {
             DCMQRDB_ERROR(DimseCondition::dump(temp_str, cond));
         }
@@ -645,6 +647,16 @@ OFCondition DcmQueryRetrieveMoveContext::addAllStoragePresentationContexts(T_ASC
         transferSyntaxes[0] = UID_MPEG4StereoHighProfileLevel4_2TransferSyntax;
         numTransferSyntaxes = 1;
         break;
+      case EXS_HEVCMainProfileLevel5_1:
+        /* we only propose HEVC/H.265 Main Profile/L5.1 since we don't want to decompress */
+        transferSyntaxes[0] = UID_HEVCMainProfileLevel5_1TransferSyntax;
+        numTransferSyntaxes = 1;
+        break;
+      case EXS_HEVCMain10ProfileLevel5_1:
+        /* we only propose HEVC/H.265 Main 10 Profile/L5.1 since we don't want to decompress */
+        transferSyntaxes[0] = UID_HEVCMain10ProfileLevel5_1TransferSyntax;
+        numTransferSyntaxes = 1;
+        break;
       case EXS_RLELossless:
         /* we prefer RLE Lossless */
         transferSyntaxes[0] = UID_RLELosslessTransferSyntax;
diff --git a/dcmqrdb/libsrc/dcmqrcbs.cc b/dcmqrdb/libsrc/dcmqrcbs.cc
index 5d883e1..a621bf3 100644
--- a/dcmqrdb/libsrc/dcmqrcbs.cc
+++ b/dcmqrdb/libsrc/dcmqrcbs.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2010, OFFIS e.V.
+ *  Copyright (C) 1993-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -109,6 +109,9 @@ void DcmQueryRetrieveStoreContext::writeToFile(
     {
       DCMQRDB_ERROR("storescp: Cannot write image file: " << fname);
       rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources;
+
+      // delete incomplete file
+      OFStandard::deleteFile(fname);
     }
 }
 
diff --git a/dcmqrdb/libsrc/dcmqrdbi.cc b/dcmqrdb/libsrc/dcmqrdbi.cc
index 072aaa6..1a64a82 100644
--- a/dcmqrdb/libsrc/dcmqrdbi.cc
+++ b/dcmqrdb/libsrc/dcmqrdbi.cc
@@ -60,9 +60,6 @@ END_EXTERN_C
  ****           The tag value
  ****           The level of this tag (from patient to image)
  ****           The Key Type (only UNIQUE_KEY values is used)
- ****           The key matching type, specifying which type of
- ****                   matching should be performed. The OTHER_CLASS
- ****                   value specifies that only strict comparison is applied.
  ****
  **** This table and the IndexRecord structure should contain at least
  **** all Unique and Required keys.
@@ -74,13 +71,10 @@ static const DB_FindAttr TbFindAttr [] = {
         DB_FindAttr( DCM_PatientName,                           PATIENT_LEVEL,  REQUIRED_KEY ),
         DB_FindAttr( DCM_PatientID,                             PATIENT_LEVEL,  UNIQUE_KEY   ),
         DB_FindAttr( DCM_PatientBirthTime,                      PATIENT_LEVEL,  OPTIONAL_KEY ),
-        DB_FindAttr( DCM_OtherPatientIDs,                       PATIENT_LEVEL,  OPTIONAL_KEY ),
+        DB_FindAttr( DCM_RETIRED_OtherPatientIDs,               PATIENT_LEVEL,  OPTIONAL_KEY ),
         DB_FindAttr( DCM_OtherPatientNames,                     PATIENT_LEVEL,  OPTIONAL_KEY ),
         DB_FindAttr( DCM_EthnicGroup,                           PATIENT_LEVEL,  OPTIONAL_KEY ),
         DB_FindAttr( DCM_PatientComments,                       PATIENT_LEVEL,  OPTIONAL_KEY ),
-        DB_FindAttr( DCM_NumberOfPatientRelatedStudies,         PATIENT_LEVEL,  OPTIONAL_KEY ),
-        DB_FindAttr( DCM_NumberOfPatientRelatedSeries,          PATIENT_LEVEL,  OPTIONAL_KEY ),
-        DB_FindAttr( DCM_NumberOfPatientRelatedInstances,       PATIENT_LEVEL,  OPTIONAL_KEY ),
         DB_FindAttr( DCM_IssuerOfPatientID,                     PATIENT_LEVEL,  OPTIONAL_KEY ),
         DB_FindAttr( DCM_StudyDate,                             STUDY_LEVEL,    REQUIRED_KEY ),
         DB_FindAttr( DCM_StudyTime,                             STUDY_LEVEL,    REQUIRED_KEY ),
@@ -97,8 +91,6 @@ static const DB_FindAttr TbFindAttr [] = {
         DB_FindAttr( DCM_PatientWeight,                         STUDY_LEVEL,    OPTIONAL_KEY ),
         DB_FindAttr( DCM_Occupation,                            STUDY_LEVEL,    OPTIONAL_KEY ),
         DB_FindAttr( DCM_AdditionalPatientHistory,              STUDY_LEVEL,    OPTIONAL_KEY ),
-        DB_FindAttr( DCM_NumberOfStudyRelatedSeries,            STUDY_LEVEL,    OPTIONAL_KEY ),
-        DB_FindAttr( DCM_NumberOfStudyRelatedInstances,         STUDY_LEVEL,    OPTIONAL_KEY ),
         DB_FindAttr( DCM_SeriesNumber,                          SERIE_LEVEL,    REQUIRED_KEY ),
         DB_FindAttr( DCM_SeriesInstanceUID,                     SERIE_LEVEL,    UNIQUE_KEY   ),
         DB_FindAttr( DCM_Modality,                              SERIE_LEVEL,    OPTIONAL_KEY ),
@@ -212,7 +204,7 @@ static void DB_IdxInitRecord (IdxRecord *idx, int linksOnly)
         idx -> param[RECORDIDX_PatientBirthTime]. XTag = DCM_PatientBirthTime ;
         idx -> param[RECORDIDX_PatientBirthTime]. ValueLength = TM_MAX_LENGTH ;
         idx -> PatientBirthTime[0] = '\0' ;
-        idx -> param[RECORDIDX_OtherPatientIDs]. XTag = DCM_OtherPatientIDs ;
+        idx -> param[RECORDIDX_OtherPatientIDs]. XTag = DCM_RETIRED_OtherPatientIDs ;
         idx -> param[RECORDIDX_OtherPatientIDs]. ValueLength = LO_MAX_LENGTH ;
         idx -> OtherPatientIDs[0] = '\0' ;
         idx -> param[RECORDIDX_OtherPatientNames]. XTag = DCM_OtherPatientNames ;
@@ -221,15 +213,6 @@ static void DB_IdxInitRecord (IdxRecord *idx, int linksOnly)
         idx -> param[RECORDIDX_EthnicGroup]. XTag = DCM_EthnicGroup ;
         idx -> param[RECORDIDX_EthnicGroup]. ValueLength = SH_MAX_LENGTH ;
         idx -> EthnicGroup[0] = '\0' ;
-        idx -> param[RECORDIDX_NumberofPatientRelatedStudies]. XTag = DCM_NumberOfPatientRelatedStudies ;
-        idx -> param[RECORDIDX_NumberofPatientRelatedStudies]. ValueLength = IS_MAX_LENGTH ;
-        idx -> NumberofPatientRelatedStudies[0] = '\0' ;
-        idx -> param[RECORDIDX_NumberofPatientRelatedSeries]. XTag = DCM_NumberOfPatientRelatedSeries ;
-        idx -> param[RECORDIDX_NumberofPatientRelatedSeries]. ValueLength = IS_MAX_LENGTH ;
-        idx -> NumberofPatientRelatedSeries[0] = '\0' ;
-        idx -> param[RECORDIDX_NumberofPatientRelatedInstances]. XTag = DCM_NumberOfPatientRelatedInstances ;
-        idx -> param[RECORDIDX_NumberofPatientRelatedInstances]. ValueLength = IS_MAX_LENGTH ;
-        idx -> NumberofPatientRelatedInstances[0] = '\0' ;
         idx -> param[RECORDIDX_StudyDate]. XTag = DCM_StudyDate ;
         idx -> param[RECORDIDX_StudyDate]. ValueLength = DA_MAX_LENGTH ;
         idx -> StudyDate[0] = '\0' ;
@@ -278,12 +261,6 @@ static void DB_IdxInitRecord (IdxRecord *idx, int linksOnly)
         idx -> param[RECORDIDX_Occupation]. XTag = DCM_Occupation ;
         idx -> param[RECORDIDX_Occupation]. ValueLength = SH_MAX_LENGTH ;
         idx -> Occupation[0] = '\0' ;
-        idx -> param[RECORDIDX_NumberofStudyRelatedSeries]. XTag = DCM_NumberOfStudyRelatedSeries ;
-        idx -> param[RECORDIDX_NumberofStudyRelatedSeries]. ValueLength = IS_MAX_LENGTH ;
-        idx -> NumberofStudyRelatedSeries[0] = '\0' ;
-        idx -> param[RECORDIDX_NumberofStudyRelatedInstances]. XTag = DCM_NumberOfStudyRelatedInstances ;
-        idx -> param[RECORDIDX_NumberofStudyRelatedInstances]. ValueLength = IS_MAX_LENGTH ;
-        idx -> NumberofStudyRelatedInstances[0] = '\0' ;
         idx -> param[RECORDIDX_SeriesNumber]. XTag = DCM_SeriesNumber ;
         idx -> param[RECORDIDX_SeriesNumber]. ValueLength = IS_MAX_LENGTH ;
         idx -> SeriesNumber[0] = '\0' ;
@@ -335,9 +312,6 @@ static void DB_IdxInitRecord (IdxRecord *idx, int linksOnly)
     idx -> param[RECORDIDX_OtherPatientIDs]. PValueField = (char *)idx -> OtherPatientIDs ;
     idx -> param[RECORDIDX_OtherPatientNames]. PValueField = (char *)idx -> OtherPatientNames ;
     idx -> param[RECORDIDX_EthnicGroup]. PValueField = (char *)idx -> EthnicGroup ;
-    idx -> param[RECORDIDX_NumberofPatientRelatedStudies]. PValueField = (char *)idx -> NumberofPatientRelatedStudies ;
-    idx -> param[RECORDIDX_NumberofPatientRelatedSeries]. PValueField = (char *) idx -> NumberofPatientRelatedSeries ;
-    idx -> param[RECORDIDX_NumberofPatientRelatedInstances]. PValueField = (char *) idx -> NumberofPatientRelatedInstances ;
     idx -> param[RECORDIDX_StudyDate]. PValueField = (char *) idx -> StudyDate ;
     idx -> param[RECORDIDX_StudyTime]. PValueField = (char *) idx -> StudyTime ;
     idx -> param[RECORDIDX_StudyID]. PValueField = (char *) idx -> StudyID ;
@@ -354,8 +328,6 @@ static void DB_IdxInitRecord (IdxRecord *idx, int linksOnly)
     idx -> param[RECORDIDX_PatientSize]. PValueField = (char *) idx -> PatientSize ;
     idx -> param[RECORDIDX_PatientWeight]. PValueField = (char *) idx -> PatientWeight ;
     idx -> param[RECORDIDX_Occupation]. PValueField = (char *) idx -> Occupation ;
-    idx -> param[RECORDIDX_NumberofStudyRelatedSeries]. PValueField = (char *) idx -> NumberofStudyRelatedSeries ;
-    idx -> param[RECORDIDX_NumberofStudyRelatedInstances]. PValueField = (char *) idx -> NumberofStudyRelatedInstances ;
     idx -> param[RECORDIDX_SeriesNumber]. PValueField = (char *) idx -> SeriesNumber ;
     idx -> param[RECORDIDX_SeriesInstanceUID]. PValueField = (char *) idx -> SeriesInstanceUID ;
     idx -> param[RECORDIDX_Modality]. PValueField = (char *) idx -> Modality ;
@@ -387,7 +359,6 @@ static long DB_lseek(int fildes, long offset, int whence)
     long pos;
     long curpos;
     long endpos;
-    char buf[256];
 
     /*
     ** we should not be seeking to an offset < 0
@@ -399,27 +370,27 @@ static long DB_lseek(int fildes, long offset, int whence)
     /* get the current position */
     curpos = lseek(fildes, 0, SEEK_CUR);
     if (curpos < 0) {
-        DCMQRDB_ERROR("DB_lseek: cannot get current position: " << OFStandard::strerror(errno, buf, sizeof(buf)));
+        DCMQRDB_ERROR("DB_lseek: cannot get current position: " << OFStandard::getLastSystemErrorCode().message());
         return curpos;
     }
     /* get the end of file position */
     endpos = lseek(fildes, 0, SEEK_END);
     if (endpos < 0) {
-        DCMQRDB_ERROR("DB_lseek: cannot get end of file position: " << OFStandard::strerror(errno, buf, sizeof(buf)));
+        DCMQRDB_ERROR("DB_lseek: cannot get end of file position: " << OFStandard::getLastSystemErrorCode().message());
         return endpos;
     }
 
     /* return to current position */
     curpos = lseek(fildes, curpos, SEEK_SET);
     if (curpos < 0) {
-        DCMQRDB_ERROR("DB_lseek: cannot reset current position: " << OFStandard::strerror(errno, buf, sizeof(buf)));
+        DCMQRDB_ERROR("DB_lseek: cannot reset current position: " << OFStandard::getLastSystemErrorCode().message());
         return curpos;
     }
 
     /* do the requested seek */
     pos = lseek(fildes, offset, whence);
     if (pos < 0) {
-        DCMQRDB_ERROR("DB_lseek: cannot seek to " << offset << ": " << OFStandard::strerror(errno, buf, sizeof(buf)));
+        DCMQRDB_ERROR("DB_lseek: cannot seek to " << offset << ": " << OFStandard::getLastSystemErrorCode().message());
         return pos;
     }
 
@@ -1690,12 +1661,20 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::nextFindResponse (
 
         if (characterSetOptions.flags & DcmQueryRetrieveCharacterSetOptions::Override) {
             destinationCharacterSet = &characterSetOptions.characterSet;
-            if (characterSetOptions.flags & DcmQueryRetrieveCharacterSetOptions::Fallback)
+            if (
+                (characterSetOptions.flags & DcmQueryRetrieveCharacterSetOptions::Fallback) &&
+                characterSetOptions.characterSet != handle_->findRequestCharacterSet
+            ) {
                 fallbackCharacterSet = &handle_->findRequestCharacterSet;
+            }
         } else {
             destinationCharacterSet = &handle_->findRequestCharacterSet;
-            if (characterSetOptions.flags & DcmQueryRetrieveCharacterSetOptions::Fallback)
+            if (
+                (characterSetOptions.flags & DcmQueryRetrieveCharacterSetOptions::Fallback) &&
+                characterSetOptions.characterSet != handle_->findRequestCharacterSet
+            ) {
                 fallbackCharacterSet = &characterSetOptions.characterSet;
+            }
         }
 
         if (isConversionNecessary(specificCharacterSet, *destinationCharacterSet)) {
@@ -2373,10 +2352,9 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::deleteImageFile(char* imgFile)
 #endif
 
     if (unlink(imgFile) < 0) {
-        char buf[256];
         /* delete file */
         DCMQRDB_ERROR("DB ERROR: cannot delete image file: " << imgFile << OFendl
-            << "QR_EC_IndexDatabaseError: " << OFStandard::strerror(errno, buf, sizeof(buf)));
+            << "QR_EC_IndexDatabaseError: " << OFStandard::getLastSystemErrorCode().message());
     }
 
 #ifdef LOCK_IMAGE_FILES
@@ -2401,7 +2379,7 @@ int DcmQueryRetrieveIndexDatabaseHandle::deleteOldestStudy(StudyDescRecord *pStu
     int oldestStudy ;
     double OldestDate ;
     int s ;
-    int n ;
+    size_t n ;
     int idx = 0 ;
     IdxRecord idxRec ;
 
@@ -2451,7 +2429,8 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::deleteOldestImages(StudyDescRec
 
     ImagesofStudyArray *StudyArray ;
     IdxRecord idxRec ;
-    int nbimages = 0 , s = 0 , n ;
+    int nbimages = 0 , s = 0;
+    size_t n ;
     long DeletedSize ;
 
 #ifdef DEBUG
@@ -2570,8 +2549,9 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::checkupinStudyDesc(StudyDescRec
 #ifdef DEBUG
     DCMQRDB_DEBUG("checkupinStudyDesc: study already exists : " << s) ;
 #endif
-    if ( ( pStudyDesc[s]. StudySize + imageSize )
-         > handle_ -> maxBytesPerStudy ) {
+    if ( OFstatic_cast(size_t, pStudyDesc[s]. StudySize) + imageSize  >
+         OFstatic_cast(size_t, handle_ -> maxBytesPerStudy) )
+    {
         if ( imageSize > handle_ -> maxBytesPerStudy ) {
 #ifdef DEBUG
             DCMQRDB_DEBUG("checkupinStudyDesc: imageSize = " << imageSize << " too large");
@@ -2700,9 +2680,8 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::storeRequest (
     DcmFileFormat dcmff;
     if (dcmff.loadFile(imageFileName).bad())
     {
-      char buf[256];
       DCMQRDB_WARN("DB: Cannot open file: " << imageFileName << ": "
-          << OFStandard::strerror(errno, buf, sizeof(buf)));
+          << OFStandard::getLastSystemErrorCode().message());
       status->setStatus(STATUS_STORE_Error_CannotUnderstand);
       return (QR_EC_IndexDatabaseError) ;
     }
@@ -2726,7 +2705,7 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::storeRequest (
             /* found and non-empty */
             strncpy(se->PValueField, strPtr, (size_t)(se->ValueLength));
             /* important: do not change the ValueLength field before the string is copied! */
-            se->ValueLength = strlen(se->PValueField);
+            se->ValueLength = OFstatic_cast(int, strlen(se->PValueField));
         }
     }
 
@@ -2762,7 +2741,8 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::storeRequest (
                    (strcmp(SOPClassUID, UID_ImplantationPlanSRDocumentStorage) == 0) ||
                    (strcmp(SOPClassUID, UID_RadiopharmaceuticalRadiationDoseSRStorage) == 0) ||
                    (strcmp(SOPClassUID, UID_AcquisitionContextSRStorage) == 0) ||
-                   (strcmp(SOPClassUID, UID_SimplifiedAdultEchoSRStorage) == 0))
+                   (strcmp(SOPClassUID, UID_SimplifiedAdultEchoSRStorage) == 0) ||
+                   (strcmp(SOPClassUID, UID_PatientRadiationDoseSRStorage) == 0))
         {
             OFString string;
             OFString description = "unknown SR";
@@ -3124,8 +3104,7 @@ DcmQueryRetrieveIndexDatabaseHandle::DcmQueryRetrieveIndexDatabaseHandle(
         /* create index file if it does not already exist */
         FILE* f = fopen(handle_->indexFilename, "ab");
         if (f == NULL) {
-            char buf[256];
-            DCMQRDB_ERROR(handle_->indexFilename << ": " << OFStandard::strerror(errno, buf, sizeof(buf)));
+            DCMQRDB_ERROR(handle_->indexFilename << ": " << OFStandard::getLastSystemErrorCode().message());
             result = QR_EC_IndexDatabaseError;
             return;
         }
@@ -3178,12 +3157,11 @@ DcmQueryRetrieveIndexDatabaseHandle::DcmQueryRetrieveIndexDatabaseHandle(
             {
                 // write magic word and version number to the buffer
                 // then write it to the file
-                char header[DBHEADERSIZE];
+                char header[DBHEADERSIZE + 1];
                 sprintf( header, DBMAGIC "%.2X", DBVERSION );
                 if ( write( handle_ -> pidx, header, DBHEADERSIZE ) != DBHEADERSIZE )
                 {
-                    char buf[256];
-                    DCMQRDB_ERROR(handle_->indexFilename << ": " << OFStandard::strerror(errno, buf, sizeof(buf)));
+                    DCMQRDB_ERROR(handle_->indexFilename << ": " << OFStandard::getLastSystemErrorCode().message());
                     DB_unlock();
                     result = QR_EC_IndexDatabaseError;
                     return;
diff --git a/dcmqrdb/libsrc/dcmqropt.cc b/dcmqrdb/libsrc/dcmqropt.cc
index ed1945c..355ad6c 100644
--- a/dcmqrdb/libsrc/dcmqropt.cc
+++ b/dcmqrdb/libsrc/dcmqropt.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2012, OFFIS e.V.
+ *  Copyright (C) 1993-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -71,6 +71,9 @@ DcmQueryRetrieveOptions::DcmQueryRetrieveOptions()
 , blockMode_(DIMSE_BLOCKING)
 , dimse_timeout_(0)
 , acse_timeout_(30)
+, associationConfigFile()
+, incomingProfile()
+, outgoingProfile()
 {
 }
 
diff --git a/dcmqrdb/libsrc/dcmqrsrv.cc b/dcmqrdb/libsrc/dcmqrsrv.cc
index dbf557d..a32aae8 100644
--- a/dcmqrdb/libsrc/dcmqrsrv.cc
+++ b/dcmqrdb/libsrc/dcmqrsrv.cc
@@ -99,13 +99,15 @@ static void storeCallback(
 DcmQueryRetrieveSCP::DcmQueryRetrieveSCP(
   const DcmQueryRetrieveConfig& config,
   const DcmQueryRetrieveOptions& options,
-  const DcmQueryRetrieveDatabaseHandleFactory& factory)
+  const DcmQueryRetrieveDatabaseHandleFactory& factory,
+  const DcmAssociationConfiguration& associationConfiguration)
 : config_(&config)
 , processtable_()
 , dbCheckFindIdentifier_(OFFalse)
 , dbCheckMoveIdentifier_(OFFalse)
 , factory_(factory)
 , options_(options)
+, associationConfiguration_(associationConfiguration)
 {
 }
 
@@ -313,7 +315,7 @@ OFCondition DcmQueryRetrieveSCP::moveSCP(T_ASC_Association * assoc, T_DIMSE_C_Mo
         T_ASC_PresentationContextID presID, DcmQueryRetrieveDatabaseHandle& dbHandle)
 {
     OFCondition cond = EC_Normal;
-    DcmQueryRetrieveMoveContext context(dbHandle, options_, config_, STATUS_Pending, assoc, request->MessageID, request->Priority);
+    DcmQueryRetrieveMoveContext context(dbHandle, options_, associationConfiguration_, config_, STATUS_Pending, assoc, request->MessageID, request->Priority);
 
     DIC_AE aeTitle;
     aeTitle[0] = '\0';
@@ -421,7 +423,7 @@ OFCondition DcmQueryRetrieveSCP::storeSCP(T_ASC_Association * assoc, T_DIMSE_C_S
       if (strcmp(imageFileName, NULL_DEVICE_NAME) != 0) // don't try to delete /dev/null
       {
         DCMQRDB_INFO("Store SCP: Deleting Image File: %s" << imageFileName);
-        unlink(imageFileName);
+        OFStandard::deleteFile(imageFileName);
       }
       dbHandle.pruneInvalidRecords();
     }
@@ -701,6 +703,22 @@ OFCondition DcmQueryRetrieveSCP::negotiateAssociation(T_ASC_Association * assoc)
         transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax;
         numTransferSyntaxes = 4;
         break;
+      case EXS_HEVCMainProfileLevel5_1:
+        /* we prefer HEVC/H.265 Main Profile/L5.1 */
+        transferSyntaxes[0] = UID_HEVCMainProfileLevel5_1TransferSyntax;
+        transferSyntaxes[1] = UID_LittleEndianExplicitTransferSyntax;
+        transferSyntaxes[2] = UID_BigEndianExplicitTransferSyntax;
+        transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax;
+        numTransferSyntaxes = 4;
+        break;
+      case EXS_HEVCMain10ProfileLevel5_1:
+        /* we prefer HEVC/H.265 Main 10 Profile/L5.1 */
+        transferSyntaxes[0] = UID_HEVCMain10ProfileLevel5_1TransferSyntax;
+        transferSyntaxes[1] = UID_LittleEndianExplicitTransferSyntax;
+        transferSyntaxes[2] = UID_BigEndianExplicitTransferSyntax;
+        transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax;
+        numTransferSyntaxes = 4;
+        break;
       case EXS_RLELossless:
         /* we prefer RLE Lossless */
         transferSyntaxes[0] = UID_RLELosslessTransferSyntax;
@@ -804,66 +822,74 @@ OFCondition DcmQueryRetrieveSCP::negotiateAssociation(T_ASC_Association * assoc)
         }
     }
 
-    /*  accept any of the non-storage syntaxes */
-    cond = ASC_acceptContextsWithPreferredTransferSyntaxes(
-    assoc->params,
-    (const char**)selectedNonStorageSyntaxes, numberOfSelectedNonStorageSyntaxes,
-    (const char**)transferSyntaxes, numTransferSyntaxes);
-    if (cond.bad()) {
-        DCMQRDB_ERROR("Cannot accept presentation contexts: " << DimseCondition::dump(temp_str, cond));
-    }
-
-    /*  accept any of the storage syntaxes */
-    if (options_.disableGetSupport_)
+    if (options_.incomingProfile.empty())
     {
-      /* accept storage syntaxes with default role only */
-      cond = ASC_acceptContextsWithPreferredTransferSyntaxes(
-        assoc->params,
-        dcmAllStorageSOPClassUIDs, numberOfDcmAllStorageSOPClassUIDs,
-        (const char**)transferSyntaxes, numTransferSyntaxes);
-      if (cond.bad()) {
-        DCMQRDB_ERROR("Cannot accept presentation contexts: " << DimseCondition::dump(temp_str, cond));
-      }
-    } else {
-      /* accept storage syntaxes with proposed role */
-      T_ASC_PresentationContext pc;
-      T_ASC_SC_ROLE role;
-      int npc = ASC_countPresentationContexts(assoc->params);
-      for (i = 0; i < npc; i++)
+      /*  accept any of the storage syntaxes */
+      if (options_.disableGetSupport_)
       {
-        ASC_getPresentationContext(assoc->params, i, &pc);
-        if (dcmIsaStorageSOPClassUID(pc.abstractSyntax))
+        /* accept storage syntaxes with default role only */
+        cond = ASC_acceptContextsWithPreferredTransferSyntaxes(
+          assoc->params,
+          dcmAllStorageSOPClassUIDs, numberOfDcmAllStorageSOPClassUIDs,
+          (const char**)transferSyntaxes, numTransferSyntaxes);
+        if (cond.bad()) {
+          DCMQRDB_ERROR("Cannot accept presentation contexts: " << DimseCondition::dump(temp_str, cond));
+        }
+      } else {
+        /* accept storage syntaxes with proposed role */
+        T_ASC_PresentationContext pc;
+        T_ASC_SC_ROLE role;
+        int npc = ASC_countPresentationContexts(assoc->params);
+        for (i = 0; i < npc; i++)
         {
-          /*
-          ** We are prepared to accept whatever role he proposes.
-          ** Normally we can be the SCP of the Storage Service Class.
-          ** When processing the C-GET operation we can be the SCU of the Storage Service Class.
-          */
-          role = pc.proposedRole;
-
-          /*
-          ** Accept in the order "least wanted" to "most wanted" transfer
-          ** syntax.  Accepting a transfer syntax will override previously
-          ** accepted transfer syntaxes.
-          */
-          for (int k = numTransferSyntaxes - 1; k >= 0; k--)
+          ASC_getPresentationContext(assoc->params, i, &pc);
+          if (dcmIsaStorageSOPClassUID(pc.abstractSyntax))
           {
-            for (int j = 0; j < (int)pc.transferSyntaxCount; j++)
+            /*
+            ** We are prepared to accept whatever role he proposes.
+            ** Normally we can be the SCP of the Storage Service Class.
+            ** When processing the C-GET operation we can be the SCU of the Storage Service Class.
+            */
+            role = pc.proposedRole;
+
+            /*
+            ** Accept in the order "least wanted" to "most wanted" transfer
+            ** syntax.  Accepting a transfer syntax will override previously
+            ** accepted transfer syntaxes.
+            */
+            for (int k = numTransferSyntaxes - 1; k >= 0; k--)
             {
-              /* if the transfer syntax was proposed then we can accept it
-               * appears in our supported list of transfer syntaxes
-               */
-              if (strcmp(pc.proposedTransferSyntaxes[j], transferSyntaxes[k]) == 0)
+              for (int j = 0; j < (int)pc.transferSyntaxCount; j++)
               {
-                cond = ASC_acceptPresentationContext(
-                    assoc->params, pc.presentationContextID, transferSyntaxes[k], role);
-                if (cond.bad()) return cond;
+                /* if the transfer syntax was proposed then we can accept it
+                 * appears in our supported list of transfer syntaxes
+                 */
+                if (strcmp(pc.proposedTransferSyntaxes[j], transferSyntaxes[k]) == 0)
+                {
+                  cond = ASC_acceptPresentationContext(
+                      assoc->params, pc.presentationContextID, transferSyntaxes[k], role);
+                  if (cond.bad()) return cond;
+                }
               }
             }
           }
-        }
-      } /* for */
-    } /* else */
+        } /* for */
+      } /* else */
+    }
+    else
+    {
+      cond = associationConfiguration_.evaluateAssociationParameters(options_.incomingProfile.c_str(), *assoc);
+      if (cond.bad()) return cond;
+    }
+
+    /*  accept any of the non-storage syntaxes */
+    cond = ASC_acceptContextsWithPreferredTransferSyntaxes(
+    assoc->params,
+    (const char**)selectedNonStorageSyntaxes, numberOfSelectedNonStorageSyntaxes,
+    (const char**)transferSyntaxes, numTransferSyntaxes);
+    if (cond.bad()) {
+        DCMQRDB_ERROR("Cannot accept presentation contexts: " << DimseCondition::dump(temp_str, cond));
+    }
 
     /*
      * check if we have negotiated the private "shutdown" SOP Class
@@ -1065,9 +1091,8 @@ OFCondition DcmQueryRetrieveSCP::waitForAssociation(T_ASC_Network * theNet)
             pid = (int)(fork());
             if (pid < 0)
             {
-                char errBuf[256];
                 DCMQRDB_ERROR("Cannot create association sub-process: "
-                   << OFStandard::strerror(errno, errBuf, sizeof(errBuf)));
+                   << OFStandard::getLastSystemErrorCode().message());
                 cond = refuseAssociation(&assoc, CTN_CannotFork);
                 go_cleanup = OFTrue;
             }
diff --git a/dcmqrdb/libsrc/dcmqrtis.cc b/dcmqrdb/libsrc/dcmqrtis.cc
index 72a818a..a3c3bfc 100644
--- a/dcmqrdb/libsrc/dcmqrtis.cc
+++ b/dcmqrdb/libsrc/dcmqrtis.cc
@@ -20,6 +20,7 @@
  */
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
 #include "dcmtk/dcmqrdb/dcmqrtis.h"
 
 #include "dcmtk/dcmnet/diutil.h"
@@ -608,7 +609,6 @@ OFBool DcmQueryRetrieveTelnetInitiator::TI_attachAssociation()
     const char *peer;
     DIC_NODENAME presentationAddress;
     T_ASC_Parameters *params;
-    DIC_NODENAME localHost;
     DIC_AE currentAETitle;
     OFString temp_str;
 
@@ -629,14 +629,13 @@ OFBool DcmQueryRetrieveTelnetInitiator::TI_attachAssociation()
     }
     ASC_setAPTitles(params, currentAETitle, currentPeerTitle, NULL);
 
-    gethostname(localHost, sizeof(localHost) - 1);
     if (!config.peerForAETitle(currentPeerTitle, &peer, &port)) {
         DCMQRDB_ERROR("Help, AE title (" << currentPeerTitle << ") no longer in config");
         ASC_destroyAssociationParameters(&params);
         return OFFalse;
     }
     sprintf(presentationAddress, "%s:%d", peer, port);
-    ASC_setPresentationAddresses(params, localHost, presentationAddress);
+    ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), presentationAddress);
 
     cond = addPresentationContexts(params);
     if (cond.bad()) {
diff --git a/dcmrt/CMakeLists.txt b/dcmrt/CMakeLists.txt
index a0642e0..1f38738 100644
--- a/dcmrt/CMakeLists.txt
+++ b/dcmrt/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmrt)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmrt_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${ZLIB_INCDIR})
+INCLUDE_DIRECTORIES("${dcmrt_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" ${ZLIB_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc apps tests include)
diff --git a/dcmrt/apps/Makefile.dep b/dcmrt/apps/Makefile.dep
index f8b1785..179618e 100644
--- a/dcmrt/apps/Makefile.dep
+++ b/dcmrt/apps/Makefile.dep
@@ -17,6 +17,7 @@ drtdump.o: drtdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmrt/drtdose.h ../include/dcmtk/dcmrt/drttypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -29,7 +30,9 @@ drtdump.o: drtdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -69,8 +72,6 @@ drtdump.o: drtdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -129,6 +130,7 @@ drtdump.o: drtdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtdcs.h ../include/dcmtk/dcmrt/seq/drtdss.h \
  ../include/dcmtk/dcmrt/seq/drtdspcs.h \
  ../include/dcmtk/dcmrt/seq/drteas.h ../include/dcmtk/dcmrt/seq/drtfes.h \
+ ../include/dcmtk/dcmrt/seq/drtgms.h ../include/dcmtk/dcmrt/seq/drtgmcs.h \
  ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
diff --git a/dcmrt/apps/Makefile.in b/dcmrt/apps/Makefile.in
index 3e2e39b..eee9bb4 100644
--- a/dcmrt/apps/Makefile.in
+++ b/dcmrt/apps/Makefile.in
@@ -21,7 +21,7 @@ LOCALINCLUDES = -I$(dcmdatadir)/include -I$(oflogdir)/include -I$(ofstddir)/incl
 LIBDIRS = -L$(top_srcdir)/libsrc -L$(dcmimgledir)/libsrc -L$(dcmdatadir)/libsrc \
 	-L$(oflogdir)/libsrc -L$(ofstddir)/libsrc
 LOCALLIBS = -ldcmrt -ldcmimgle -ldcmdata -loflog -lofstd \
-	$(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS)
+	$(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
 objs = drtdump.o
 progs = drtdump
@@ -30,7 +30,7 @@ progs = drtdump
 all: $(progs)
 
 drtdump: drtdump.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 
 install: install-bin
diff --git a/dcmrt/docs/drtdump.man b/dcmrt/docs/drtdump.man
index 2da55fc..5d1c230 100644
--- a/dcmrt/docs/drtdump.man
+++ b/dcmrt/docs/drtdump.man
@@ -6,13 +6,13 @@
 \page drtdump drtdump: Dump DICOM RT file and data set
 \endif
 
-\section synopsis SYNOPSIS
+\section drtdump_synopsis SYNOPSIS
 
 \verbatim
 drtdump [options] drtfile-in...
 \endverbatim
 
-\section description DESCRIPTION
+\section drtdump_description DESCRIPTION
 
 The \b drtdump utility dumps the contents of a DICOM Radiation Therapy (RT)
 object (file format or raw data set) to stdout in textual form.  The output
@@ -27,15 +27,15 @@ whenever possible (using the \b dcmconv utility).  It is also possible to use
 the \e -f and <em>-t[ieb]</em> options to force \b drtdump to read a dataset
 with a particular transfer syntax.
 
-\section parameters PARAMETERS
+\section drtdump_parameters PARAMETERS
 
 \verbatim
 drtfile-in  DICOM RT input filename to be dumped
 \endverbatim
 
-\section options OPTIONS
+\section drtdump_options OPTIONS
 
-\subsection general_options general options
+\subsection drtdump_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -63,7 +63,7 @@ drtfile-in  DICOM RT input filename to be dumped
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection drtdump_input_options input options
 \verbatim
 input file format:
 
@@ -94,7 +94,7 @@ input transfer syntax:
          read with implicit VR little endian TS
 \endverbatim
 
-\subsection output_options output options
+\subsection drtdump_output_options output options
 \verbatim
 printing:
 
@@ -102,9 +102,9 @@ printing:
          print header with filename for each input file
 \endverbatim
 
-\section notes NOTES
+\section drtdump_notes NOTES
 
-\subsection dicom_conformance DICOM Conformance
+\subsection drtdump_dicom_conformance DICOM Conformance
 
 The \b drtdump utility supports the following SOP Classes:
 
@@ -118,7 +118,7 @@ RTIonPlanStorage                 1.2.840.10008.5.1.4.1.1.481.8
 RTIonBeamsTreatmentRecordStorage 1.2.840.10008.5.1.4.1.1.481.9
 \endverbatim
 
-\section logging LOGGING
+\section drtdump_logging 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
@@ -137,7 +137,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section drtdump_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -159,7 +159,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section drtdump_environment ENVIRONMENT
 
 The \b drtdump utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -175,11 +175,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section drtdump_see_also SEE ALSO
 
 <b>dcmconv</b>(1), <b>dcmdump</b>(1)
 
-\section copyright COPYRIGHT
+\section drtdump_copyright COPYRIGHT
 
 Copyright (C) 2010-2014 by OFFIS e.V. and ICSMED AG, Escherweg 2, 26121
 Oldenburg, Germany.
diff --git a/dcmrt/include/CMakeLists.txt b/dcmrt/include/CMakeLists.txt
index 8a1b6b7..1fe1b84 100644
--- a/dcmrt/include/CMakeLists.txt
+++ b/dcmrt/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmrt DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmrt DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmrt/include/dcmtk/dcmrt/drtdose.h b/dcmrt/include/dcmtk/dcmrt/drtdose.h
index 9f82188..01d03fd 100644
--- a/dcmrt/include/dcmtk/dcmrt/drtdose.h
+++ b/dcmrt/include/dcmtk/dcmrt/drtdose.h
@@ -1,13 +1,13 @@
 /*
  *
  *  Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
- *  Copyright (C) 2013-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class DRTDoseIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2016-11-23 14:23:36
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
@@ -32,6 +32,7 @@
 #include "dcmtk/dcmrt/seq/drtdss.h"    // for DigitalSignaturesSequence
 #include "dcmtk/dcmrt/seq/drteas.h"    // for EncryptedAttributesSequence
 #include "dcmtk/dcmrt/seq/drtfes.h"    // for FrameExtractionSequence
+#include "dcmtk/dcmrt/seq/drtgms.h"    // for GeneticModificationsSequence
 #include "dcmtk/dcmrt/seq/drtgpis.h"   // for GroupOfPatientsIdentificationSequence
 #include "dcmtk/dcmrt/seq/drthsdrs.h"  // for HL7StructuredDocumentReferenceSequence
 #include "dcmtk/dcmrt/seq/drtiis.h"    // for IconImageSequence
@@ -2090,6 +2091,18 @@ class DCMTK_DCMRT_EXPORT DRTDoseIOD
     const DRTFrameExtractionSequence &getFrameExtractionSequence() const
         { return FrameExtractionSequence; }
 
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return reference to sequence element
+     */
+    DRTGeneticModificationsSequence &getGeneticModificationsSequence()
+        { return GeneticModificationsSequence; }
+
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return const reference to sequence element
+     */
+    const DRTGeneticModificationsSequence &getGeneticModificationsSequence() const
+        { return GeneticModificationsSequence; }
+
     /** get GroupOfPatientsIdentificationSequence (0010,0027)
      *  @return reference to sequence element
      */
@@ -4103,6 +4116,8 @@ class DCMTK_DCMRT_EXPORT DRTDoseIOD
     DcmUnlimitedText StrainAdditionalInformation;
     /// StrainStockSequence (0010,0216) vr=SQ, vm=1, type=3
     DRTStrainStockSequence StrainStockSequence;
+    /// GeneticModificationsSequence (0010,0221) vr=SQ, vm=1, type=3
+    DRTGeneticModificationsSequence GeneticModificationsSequence;
     /// ResponsiblePerson (0010,2297) vr=PN, vm=1, type=2C
     DcmPersonName ResponsiblePerson;
     /// ResponsiblePersonRole (0010,2298) vr=CS, vm=1, type=1C
diff --git a/dcmrt/include/dcmtk/dcmrt/drtimage.h b/dcmrt/include/dcmtk/dcmrt/drtimage.h
index e92f5e4..4d200b4 100644
--- a/dcmrt/include/dcmtk/dcmrt/drtimage.h
+++ b/dcmrt/include/dcmtk/dcmrt/drtimage.h
@@ -1,13 +1,13 @@
 /*
  *
  *  Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
- *  Copyright (C) 2013-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class DRTImageIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2016-11-23 14:23:36
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
@@ -36,6 +36,7 @@
 #include "dcmtk/dcmrt/seq/drtes.h"     // for ExposureSequence
 #include "dcmtk/dcmrt/seq/drtfms.h"    // for FluenceMapSequence
 #include "dcmtk/dcmrt/seq/drtfes.h"    // for FrameExtractionSequence
+#include "dcmtk/dcmrt/seq/drtgms.h"    // for GeneticModificationsSequence
 #include "dcmtk/dcmrt/seq/drtgpis.h"   // for GroupOfPatientsIdentificationSequence
 #include "dcmtk/dcmrt/seq/drthsdrs.h"  // for HL7StructuredDocumentReferenceSequence
 #include "dcmtk/dcmrt/seq/drtiis.h"    // for IconImageSequence
@@ -2588,6 +2589,18 @@ class DCMTK_DCMRT_EXPORT DRTImageIOD
     const DRTFrameExtractionSequence &getFrameExtractionSequence() const
         { return FrameExtractionSequence; }
 
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return reference to sequence element
+     */
+    DRTGeneticModificationsSequence &getGeneticModificationsSequence()
+        { return GeneticModificationsSequence; }
+
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return const reference to sequence element
+     */
+    const DRTGeneticModificationsSequence &getGeneticModificationsSequence() const
+        { return GeneticModificationsSequence; }
+
     /** get GroupOfPatientsIdentificationSequence (0010,0027)
      *  @return reference to sequence element
      */
@@ -4806,6 +4819,8 @@ class DCMTK_DCMRT_EXPORT DRTImageIOD
     DcmUnlimitedText StrainAdditionalInformation;
     /// StrainStockSequence (0010,0216) vr=SQ, vm=1, type=3
     DRTStrainStockSequence StrainStockSequence;
+    /// GeneticModificationsSequence (0010,0221) vr=SQ, vm=1, type=3
+    DRTGeneticModificationsSequence GeneticModificationsSequence;
     /// ResponsiblePerson (0010,2297) vr=PN, vm=1, type=2C
     DcmPersonName ResponsiblePerson;
     /// ResponsiblePersonRole (0010,2298) vr=CS, vm=1, type=1C
diff --git a/dcmrt/include/dcmtk/dcmrt/drtionpl.h b/dcmrt/include/dcmtk/dcmrt/drtionpl.h
index 86a1e4b..09c3ad8 100644
--- a/dcmrt/include/dcmtk/dcmrt/drtionpl.h
+++ b/dcmrt/include/dcmtk/dcmrt/drtionpl.h
@@ -1,13 +1,13 @@
 /*
  *
  *  Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
- *  Copyright (C) 2013-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class DRTIonPlanIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2016-11-23 14:23:36
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
@@ -32,6 +32,7 @@
 #include "dcmtk/dcmrt/seq/drtdrs.h"    // for DoseReferenceSequence
 #include "dcmtk/dcmrt/seq/drteas.h"    // for EncryptedAttributesSequence
 #include "dcmtk/dcmrt/seq/drtfgs.h"    // for FractionGroupSequence
+#include "dcmtk/dcmrt/seq/drtgms.h"    // for GeneticModificationsSequence
 #include "dcmtk/dcmrt/seq/drtgpis.h"   // for GroupOfPatientsIdentificationSequence
 #include "dcmtk/dcmrt/seq/drthsdrs.h"  // for HL7StructuredDocumentReferenceSequence
 #include "dcmtk/dcmrt/seq/drtibs.h"    // for IonBeamSequence
@@ -1389,6 +1390,18 @@ class DCMTK_DCMRT_EXPORT DRTIonPlanIOD
     const DRTFractionGroupSequence &getFractionGroupSequence() const
         { return FractionGroupSequence; }
 
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return reference to sequence element
+     */
+    DRTGeneticModificationsSequence &getGeneticModificationsSequence()
+        { return GeneticModificationsSequence; }
+
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return const reference to sequence element
+     */
+    const DRTGeneticModificationsSequence &getGeneticModificationsSequence() const
+        { return GeneticModificationsSequence; }
+
     /** get GroupOfPatientsIdentificationSequence (0010,0027)
      *  @return reference to sequence element
      */
@@ -2907,6 +2920,8 @@ class DCMTK_DCMRT_EXPORT DRTIonPlanIOD
     DcmUnlimitedText StrainAdditionalInformation;
     /// StrainStockSequence (0010,0216) vr=SQ, vm=1, type=3
     DRTStrainStockSequence StrainStockSequence;
+    /// GeneticModificationsSequence (0010,0221) vr=SQ, vm=1, type=3
+    DRTGeneticModificationsSequence GeneticModificationsSequence;
     /// ResponsiblePerson (0010,2297) vr=PN, vm=1, type=2C
     DcmPersonName ResponsiblePerson;
     /// ResponsiblePersonRole (0010,2298) vr=CS, vm=1, type=1C
diff --git a/dcmrt/include/dcmtk/dcmrt/drtiontr.h b/dcmrt/include/dcmtk/dcmrt/drtiontr.h
index 2d912f7..d9ca8b8 100644
--- a/dcmrt/include/dcmtk/dcmrt/drtiontr.h
+++ b/dcmrt/include/dcmtk/dcmrt/drtiontr.h
@@ -1,13 +1,13 @@
 /*
  *
  *  Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
- *  Copyright (C) 2013-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class DRTIonBeamsTreatmentRecordIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2016-11-23 14:23:36
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
@@ -32,6 +32,7 @@
 #include "dcmtk/dcmrt/seq/drtdss.h"    // for DigitalSignaturesSequence
 #include "dcmtk/dcmrt/seq/drteas.h"    // for EncryptedAttributesSequence
 #include "dcmtk/dcmrt/seq/drtfgss.h"   // for FractionGroupSummarySequence
+#include "dcmtk/dcmrt/seq/drtgms.h"    // for GeneticModificationsSequence
 #include "dcmtk/dcmrt/seq/drtgpis.h"   // for GroupOfPatientsIdentificationSequence
 #include "dcmtk/dcmrt/seq/drthsdrs.h"  // for HL7StructuredDocumentReferenceSequence
 #include "dcmtk/dcmrt/seq/drtians.h"   // for IssuerOfAccessionNumberSequence
@@ -1333,6 +1334,18 @@ class DCMTK_DCMRT_EXPORT DRTIonBeamsTreatmentRecordIOD
     const DRTFractionGroupSummarySequence &getFractionGroupSummarySequence() const
         { return FractionGroupSummarySequence; }
 
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return reference to sequence element
+     */
+    DRTGeneticModificationsSequence &getGeneticModificationsSequence()
+        { return GeneticModificationsSequence; }
+
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return const reference to sequence element
+     */
+    const DRTGeneticModificationsSequence &getGeneticModificationsSequence() const
+        { return GeneticModificationsSequence; }
+
     /** get GroupOfPatientsIdentificationSequence (0010,0027)
      *  @return reference to sequence element
      */
@@ -2819,6 +2832,8 @@ class DCMTK_DCMRT_EXPORT DRTIonBeamsTreatmentRecordIOD
     DcmUnlimitedText StrainAdditionalInformation;
     /// StrainStockSequence (0010,0216) vr=SQ, vm=1, type=3
     DRTStrainStockSequence StrainStockSequence;
+    /// GeneticModificationsSequence (0010,0221) vr=SQ, vm=1, type=3
+    DRTGeneticModificationsSequence GeneticModificationsSequence;
     /// ResponsiblePerson (0010,2297) vr=PN, vm=1, type=2C
     DcmPersonName ResponsiblePerson;
     /// ResponsiblePersonRole (0010,2298) vr=CS, vm=1, type=1C
diff --git a/dcmrt/include/dcmtk/dcmrt/drtplan.h b/dcmrt/include/dcmtk/dcmrt/drtplan.h
index 241b286..eb15743 100644
--- a/dcmrt/include/dcmtk/dcmrt/drtplan.h
+++ b/dcmrt/include/dcmtk/dcmrt/drtplan.h
@@ -1,13 +1,13 @@
 /*
  *
  *  Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
- *  Copyright (C) 2013-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class DRTPlanIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2016-11-23 14:23:36
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
@@ -34,6 +34,7 @@
 #include "dcmtk/dcmrt/seq/drtdrs.h"    // for DoseReferenceSequence
 #include "dcmtk/dcmrt/seq/drteas.h"    // for EncryptedAttributesSequence
 #include "dcmtk/dcmrt/seq/drtfgs.h"    // for FractionGroupSequence
+#include "dcmtk/dcmrt/seq/drtgms.h"    // for GeneticModificationsSequence
 #include "dcmtk/dcmrt/seq/drtgpis.h"   // for GroupOfPatientsIdentificationSequence
 #include "dcmtk/dcmrt/seq/drthsdrs.h"  // for HL7StructuredDocumentReferenceSequence
 #include "dcmtk/dcmrt/seq/drtians.h"   // for IssuerOfAccessionNumberSequence
@@ -1446,6 +1447,18 @@ class DCMTK_DCMRT_EXPORT DRTPlanIOD
     const DRTFractionGroupSequence &getFractionGroupSequence() const
         { return FractionGroupSequence; }
 
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return reference to sequence element
+     */
+    DRTGeneticModificationsSequence &getGeneticModificationsSequence()
+        { return GeneticModificationsSequence; }
+
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return const reference to sequence element
+     */
+    const DRTGeneticModificationsSequence &getGeneticModificationsSequence() const
+        { return GeneticModificationsSequence; }
+
     /** get GroupOfPatientsIdentificationSequence (0010,0027)
      *  @return reference to sequence element
      */
@@ -2990,6 +3003,8 @@ class DCMTK_DCMRT_EXPORT DRTPlanIOD
     DcmUnlimitedText StrainAdditionalInformation;
     /// StrainStockSequence (0010,0216) vr=SQ, vm=1, type=3
     DRTStrainStockSequence StrainStockSequence;
+    /// GeneticModificationsSequence (0010,0221) vr=SQ, vm=1, type=3
+    DRTGeneticModificationsSequence GeneticModificationsSequence;
     /// ResponsiblePerson (0010,2297) vr=PN, vm=1, type=2C
     DcmPersonName ResponsiblePerson;
     /// ResponsiblePersonRole (0010,2298) vr=CS, vm=1, type=1C
diff --git a/dcmrt/include/dcmtk/dcmrt/drtstrct.h b/dcmrt/include/dcmtk/dcmrt/drtstrct.h
index 7b2d9cf..051f034 100644
--- a/dcmrt/include/dcmtk/dcmrt/drtstrct.h
+++ b/dcmrt/include/dcmtk/dcmrt/drtstrct.h
@@ -1,13 +1,13 @@
 /*
  *
  *  Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
- *  Copyright (C) 2013-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class DRTStructureSetIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2016-11-23 14:23:36
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
@@ -30,6 +30,7 @@
 #include "dcmtk/dcmrt/seq/drtdcs.h"    // for DerivationCodeSequence
 #include "dcmtk/dcmrt/seq/drtdss.h"    // for DigitalSignaturesSequence
 #include "dcmtk/dcmrt/seq/drteas.h"    // for EncryptedAttributesSequence
+#include "dcmtk/dcmrt/seq/drtgms.h"    // for GeneticModificationsSequence
 #include "dcmtk/dcmrt/seq/drtgpis.h"   // for GroupOfPatientsIdentificationSequence
 #include "dcmtk/dcmrt/seq/drthsdrs.h"  // for HL7StructuredDocumentReferenceSequence
 #include "dcmtk/dcmrt/seq/drtians.h"   // for IssuerOfAccessionNumberSequence
@@ -1288,6 +1289,18 @@ class DCMTK_DCMRT_EXPORT DRTStructureSetIOD
     const DRTEncryptedAttributesSequence &getEncryptedAttributesSequence() const
         { return EncryptedAttributesSequence; }
 
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return reference to sequence element
+     */
+    DRTGeneticModificationsSequence &getGeneticModificationsSequence()
+        { return GeneticModificationsSequence; }
+
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return const reference to sequence element
+     */
+    const DRTGeneticModificationsSequence &getGeneticModificationsSequence() const
+        { return GeneticModificationsSequence; }
+
     /** get GroupOfPatientsIdentificationSequence (0010,0027)
      *  @return reference to sequence element
      */
@@ -2752,6 +2765,8 @@ class DCMTK_DCMRT_EXPORT DRTStructureSetIOD
     DcmUnlimitedText StrainAdditionalInformation;
     /// StrainStockSequence (0010,0216) vr=SQ, vm=1, type=3
     DRTStrainStockSequence StrainStockSequence;
+    /// GeneticModificationsSequence (0010,0221) vr=SQ, vm=1, type=3
+    DRTGeneticModificationsSequence GeneticModificationsSequence;
     /// ResponsiblePerson (0010,2297) vr=PN, vm=1, type=2C
     DcmPersonName ResponsiblePerson;
     /// ResponsiblePersonRole (0010,2298) vr=CS, vm=1, type=1C
diff --git a/dcmrt/include/dcmtk/dcmrt/drttreat.h b/dcmrt/include/dcmtk/dcmrt/drttreat.h
index e79c49c..fa62eff 100644
--- a/dcmrt/include/dcmtk/dcmrt/drttreat.h
+++ b/dcmrt/include/dcmtk/dcmrt/drttreat.h
@@ -1,13 +1,13 @@
 /*
  *
  *  Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
- *  Copyright (C) 2013-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class DRTTreatmentSummaryRecordIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2016-11-23 14:23:36
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
@@ -31,6 +31,7 @@
 #include "dcmtk/dcmrt/seq/drtdss.h"    // for DigitalSignaturesSequence
 #include "dcmtk/dcmrt/seq/drteas.h"    // for EncryptedAttributesSequence
 #include "dcmtk/dcmrt/seq/drtfgss.h"   // for FractionGroupSummarySequence
+#include "dcmtk/dcmrt/seq/drtgms.h"    // for GeneticModificationsSequence
 #include "dcmtk/dcmrt/seq/drtgpis.h"   // for GroupOfPatientsIdentificationSequence
 #include "dcmtk/dcmrt/seq/drthsdrs.h"  // for HL7StructuredDocumentReferenceSequence
 #include "dcmtk/dcmrt/seq/drtians.h"   // for IssuerOfAccessionNumberSequence
@@ -1249,6 +1250,18 @@ class DCMTK_DCMRT_EXPORT DRTTreatmentSummaryRecordIOD
     const DRTFractionGroupSummarySequence &getFractionGroupSummarySequence() const
         { return FractionGroupSummarySequence; }
 
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return reference to sequence element
+     */
+    DRTGeneticModificationsSequence &getGeneticModificationsSequence()
+        { return GeneticModificationsSequence; }
+
+    /** get GeneticModificationsSequence (0010,0221)
+     *  @return const reference to sequence element
+     */
+    const DRTGeneticModificationsSequence &getGeneticModificationsSequence() const
+        { return GeneticModificationsSequence; }
+
     /** get GroupOfPatientsIdentificationSequence (0010,0027)
      *  @return reference to sequence element
      */
@@ -2666,6 +2679,8 @@ class DCMTK_DCMRT_EXPORT DRTTreatmentSummaryRecordIOD
     DcmUnlimitedText StrainAdditionalInformation;
     /// StrainStockSequence (0010,0216) vr=SQ, vm=1, type=3
     DRTStrainStockSequence StrainStockSequence;
+    /// GeneticModificationsSequence (0010,0221) vr=SQ, vm=1, type=3
+    DRTGeneticModificationsSequence GeneticModificationsSequence;
     /// ResponsiblePerson (0010,2297) vr=PN, vm=1, type=2C
     DcmPersonName ResponsiblePerson;
     /// ResponsiblePersonRole (0010,2298) vr=CS, vm=1, type=1C
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtaadcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtaadcs.h
index 1e99053..5730739 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtaadcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtaadcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTAssigningAgencyOrDepartmentCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtadcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtadcs.h
index 137644b..da4ef0a 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtadcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtadcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTAdmittingDiagnosesCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtads.h b/dcmrt/include/dcmtk/dcmrt/seq/drtads.h
index dea2491..1df0fdb 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtads.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtads.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTAdditionalDrugSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtafs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtafs.h
index 2283c18..2756304 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtafs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtafs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTAssigningFacilitySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtags.h b/dcmrt/include/dcmtk/dcmrt/seq/drtags.h
index 7e5a7a8..340e218 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtags.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtags.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTApplicatorGeometrySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtajcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtajcs.h
index 88f5ab8..e5153fa 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtajcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtajcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTAssigningJurisdictionCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtas1.h b/dcmrt/include/dcmtk/dcmrt/seq/drtas1.h
index efebd9e..aa39af8 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtas1.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtas1.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTApplicatorSequenceInRTBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtas5.h b/dcmrt/include/dcmtk/dcmrt/seq/drtas5.h
index 4957ece..de8aa11 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtas5.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtas5.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTApplicatorSequenceInRTImageModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtas6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtas6.h
index b3ea5bb..e18874f 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtas6.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtas6.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTApplicatorSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtas7.h b/dcmrt/include/dcmtk/dcmrt/seq/drtas7.h
index 6c077e2..86945b6 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtas7.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtas7.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTApplicatorSequenceInRTIonBeamsSessionRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtass.h b/dcmrt/include/dcmtk/dcmrt/seq/drtass.h
index 6814c04..0402e3d 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtass.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtass.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTApplicationSetupSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbads.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbads.h
index ad8d7a2..33dd65f 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbads.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbads.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBrachyAccessoryDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbas.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbas.h
index 494983d..2b87051 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbas.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbas.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTContrastBolusAgentSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbcps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbcps.h
index 013e0ea..fc80741 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbcps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbcps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBrachyControlPointSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbl2.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbl2.h
index 9be375f..67722cb 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbl2.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbl2.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBlockSequenceInRTBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbl5.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbl5.h
index 26ac3b0..77d2291 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbl5.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbl5.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBlockSequenceInRTImageModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbldls.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbldls.h
index f85dd84..f160642 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbldls.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbldls.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBeamLimitingDeviceLeafPairsSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbldps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbldps.h
index cf32f7e..b3d2c57 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbldps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbldps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBeamLimitingDevicePositionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtblds1.h b/dcmrt/include/dcmtk/dcmrt/seq/drtblds1.h
index 055b0cc..3d4399e 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtblds1.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtblds1.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBeamLimitingDeviceSequenceInRTBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtblds5.h b/dcmrt/include/dcmtk/dcmrt/seq/drtblds5.h
index 1c83a27..e8276f2 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtblds5.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtblds5.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBeamLimitingDeviceSequenceInRTImageModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtblds6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtblds6.h
index 95eaaab..8a0103d 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtblds6.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtblds6.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBeamLimitingDeviceSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbldts.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbldts.h
index 95b71d2..2bb583f 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbldts.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbldts.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBeamLimitingDeviceToleranceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbrcss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbrcss.h
index 1bd508d..8da47e7 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbrcss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbrcss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBreedRegistryCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbrdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbrdrs.h
index 63b9f1c..4870008 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbrdrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbrdrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBrachyReferencedDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbrs.h
index 4a43dd2..a026a1f 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBreedRegistrationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbs.h
index 12ad743..f9cf9e7 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBeamSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbss.h
index 3baa2a3..c4889b6 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBlockSlabSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtbvcps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtbvcps.h
index 9f158a8..25c72d6 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtbvcps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtbvcps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTBeamDoseVerificationControlPointSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcbars.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcbars.h
index 5f62b92..2359a29 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcbars.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcbars.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTContrastBolusAdministrationRouteSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtccs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtccs.h
index 21f74fe..91b3902 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtccs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtccs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTConceptCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcctus.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcctus.h
index df6672e..432bfbb 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcctus.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcctus.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTConsentForClinicalTrialUseSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcdrs.h
index f66260a..321ac5b 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcdrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcdrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTCalculatedDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtces.h b/dcmrt/include/dcmtk/dcmrt/seq/drtces.h
index 24a0d79..4a8fa1d 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtces.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtces.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTContributingEquipmentSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcgis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcgis.h
index 50bae9e..b990615 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcgis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcgis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTContextGroupIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtchs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtchs.h
index 8e1c679..da30f97 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtchs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtchs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTChannelSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcims.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcims.h
index 89240eb..75c15c8 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcims.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcims.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTContentItemModifierSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcis.h
index 407a4d9..5773afc 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTContourImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcncs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcncs.h
index a43cf3f..009cbd4 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcncs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcncs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTConceptNameCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcos.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcos.h
index 37a1150..70da3d9 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcos.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcos.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTCompensatorSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcpas.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcpas.h
index a6d98d2..7476892 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcpas.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcpas.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTCorrectedParameterSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcpis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcpis.h
index 19ed79e..b7e29cb 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcpis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcpis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTConsultingPhysicianIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcps.h
index 5ec1825..b42fe86 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTControlPointSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcs.h
index 4a8c3ac..d9c1e2b 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTContourSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcsas.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcsas.h
index 7e06430..5876bd4 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcsas.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcsas.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTConversionSourceAttributesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcshs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcshs.h
index 3be5955..7d3f0e1 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcshs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcshs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTChannelShieldSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcsis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcsis.h
index 0932365..65183fb 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcsis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcsis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTCodingSchemeIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtcss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtcss.h
index 79c0d22..695e6e6 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtcss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtcss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTChannelSourceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdcs.h
index 7280e61..ff28d21 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtdcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTDerivationCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdddps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdddps.h
index e687b54..6c48c5e 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtdddps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdddps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTDeliveredDepthDoseParametersSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtddps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtddps.h
index f5a3642..07cdb69 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtddps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtddps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTDepthDoseParametersSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdias.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdias.h
index 3c41a37..b1a90d9 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtdias.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdias.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTDeidentificationActionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdimcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdimcs.h
index a41917e..5117210 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtdimcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdimcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTDeidentificationMethodCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdimrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdimrs.h
index 36c3959..9de2e9c 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtdimrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdimrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTDICOMMediaRetrievalSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdirs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdirs.h
index 6a56023..acae865 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtdirs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdirs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTDICOMRetrievalSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdrs.h
index 13f3d6b..627f2c8 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtdrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtds.h
index e43afa7..657d130 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdspcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdspcs.h
index 58f7315..448522e 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtdspcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdspcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTDigitalSignaturePurposeCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdss.h
index 3e93b87..a5c2e09 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtdss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTDigitalSignaturesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdvhs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdvhs.h
index 3440e89..ff8ddde 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtdvhs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdvhs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTDVHSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtdvrrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtdvrrs.h
index 5d4cd2b..405ce42 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtdvrrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtdvrrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTDVHReferencedROISequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drteas.h b/dcmrt/include/dcmtk/dcmrt/seq/drteas.h
index dde50fe..c7535b4 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drteas.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drteas.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTEncryptedAttributesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtecs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtecs.h
index f867aa5..c97d638 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtecs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtecs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTEquivalentCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtes.h b/dcmrt/include/dcmtk/dcmrt/seq/drtes.h
index 7f58875..7a2da65 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtes.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtes.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTExposureSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtfds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtfds.h
index 3a5f6fb..f47ae14 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtfds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtfds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTFixationDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtfes.h b/dcmrt/include/dcmtk/dcmrt/seq/drtfes.h
index 1dedff0..4e88eea 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtfes.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtfes.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTFrameExtractionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtfgs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtfgs.h
index 70ac269..9359140 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtfgs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtfgs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTFractionGroupSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtfgss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtfgss.h
index 44ae5bb..a67a14e 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtfgss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtfgss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTFractionGroupSummarySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtfms.h b/dcmrt/include/dcmtk/dcmrt/seq/drtfms.h
index 8d7987e..de4520a 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtfms.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtfms.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTFluenceMapSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtfsss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtfsss.h
index 3cd3b87..c9b05ad 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtfsss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtfsss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTFractionStatusSummarySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtgas.h b/dcmrt/include/dcmtk/dcmrt/seq/drtgas.h
index f367de1..0b60378 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtgas.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtgas.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTGeneralAccessorySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpics.h b/dcmrt/include/dcmtk/dcmrt/seq/drtgmcs.h
similarity index 97%
copy from dcmrt/include/dcmtk/dcmrt/seq/drtpics.h
copy to dcmrt/include/dcmtk/dcmrt/seq/drtgmcs.h
index dc2e435..663c85b 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtpics.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtgmcs.h
@@ -4,16 +4,16 @@
  *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
- *  Header file for class DRTPersonIdentificationCodeSequence
+ *  Header file for class DRTGeneticModificationsCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
 
-#ifndef DRTPICS_H
-#define DRTPICS_H
+#ifndef DRTGMCS_H
+#define DRTGMCS_H
 
 #include "dcmtk/config/osconfig.h"     // make sure OS specific configuration is included first
 
@@ -22,9 +22,9 @@
 #include "dcmtk/dcmrt/seq/drtecs.h"    // for EquivalentCodeSequence
 
 
-/** Interface class for PersonIdentificationCodeSequence (0040,1101)
+/** Interface class for GeneticModificationsCodeSequence (0010,0229)
  */
-class DCMTK_DCMRT_EXPORT DRTPersonIdentificationCodeSequence
+class DCMTK_DCMRT_EXPORT DRTGeneticModificationsCodeSequence
   : protected DRTTypes
 {
 
@@ -363,22 +363,22 @@ class DCMTK_DCMRT_EXPORT DRTPersonIdentificationCodeSequence
     /** (default) constructor
      *  @param emptyDefaultSequence internal flag used to mark the empty default sequence
      */
-    DRTPersonIdentificationCodeSequence(const OFBool emptyDefaultSequence = OFFalse);
+    DRTGeneticModificationsCodeSequence(const OFBool emptyDefaultSequence = OFFalse);
 
     /** copy constructor
      *  @param copy sequence object to be copied
      */
-    DRTPersonIdentificationCodeSequence(const DRTPersonIdentificationCodeSequence &copy);
+    DRTGeneticModificationsCodeSequence(const DRTGeneticModificationsCodeSequence &copy);
 
     /** destructor
      */
-    virtual ~DRTPersonIdentificationCodeSequence();
+    virtual ~DRTGeneticModificationsCodeSequence();
 
     /** assigment operator
      *  @param copy sequence object to be copied
      *  @return reference to this object
      */
-    DRTPersonIdentificationCodeSequence &operator=(const DRTPersonIdentificationCodeSequence &copy);
+    DRTGeneticModificationsCodeSequence &operator=(const DRTGeneticModificationsCodeSequence &copy);
 
   // --- general methods ---
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtgms.h
similarity index 82%
copy from dcmrt/include/dcmtk/dcmrt/seq/drtsss.h
copy to dcmrt/include/dcmtk/dcmrt/seq/drtgms.h
index 8250406..0657e46 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtsss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtgms.h
@@ -4,27 +4,27 @@
  *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
- *  Header file for class DRTStrainStockSequence
+ *  Header file for class DRTGeneticModificationsSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
 
-#ifndef DRTSSS_H
-#define DRTSSS_H
+#ifndef DRTGMS_H
+#define DRTGMS_H
 
 #include "dcmtk/config/osconfig.h"     // make sure OS specific configuration is included first
 
 #include "dcmtk/ofstd/oflist.h"        // for standard list class
 #include "dcmtk/dcmrt/drttypes.h"      // module-specific helper class
-#include "dcmtk/dcmrt/seq/drtssrcs.h"  // for StrainSourceRegistryCodeSequence
+#include "dcmtk/dcmrt/seq/drtgmcs.h"   // for GeneticModificationsCodeSequence
 
 
-/** Interface class for StrainStockSequence (0010,0216)
+/** Interface class for GeneticModificationsSequence (0010,0221)
  */
-class DCMTK_DCMRT_EXPORT DRTStrainStockSequence
+class DCMTK_DCMRT_EXPORT DRTGeneticModificationsSequence
   : protected DRTTypes
 {
 
@@ -92,61 +92,61 @@ class DCMTK_DCMRT_EXPORT DRTStrainStockSequence
 
       // --- get DICOM attribute values ---
 
-        /** get StrainSource (0010,0217)
+        /** get GeneticModificationsDescription (0010,0222)
          *  @param  value  reference to variable in which the value should be stored
          *  @param  pos    index of the value to get (0..vm-1), -1 for all components
          *  @return status, EC_Normal if successful, an error code otherwise
          */
-        OFCondition getStrainSource(OFString &value, const signed long pos = 0) const;
+        OFCondition getGeneticModificationsDescription(OFString &value, const signed long pos = 0) const;
 
-        /** get StrainStockNumber (0010,0214)
+        /** get GeneticModificationsNomenclature (0010,0223)
          *  @param  value  reference to variable in which the value should be stored
          *  @param  pos    index of the value to get (0..vm-1), -1 for all components
          *  @return status, EC_Normal if successful, an error code otherwise
          */
-        OFCondition getStrainStockNumber(OFString &value, const signed long pos = 0) const;
+        OFCondition getGeneticModificationsNomenclature(OFString &value, const signed long pos = 0) const;
 
       // --- get DICOM sequence attributes ---
 
-        /** get StrainSourceRegistryCodeSequence (0010,0215)
+        /** get GeneticModificationsCodeSequence (0010,0229)
          *  @return reference to sequence element
          */
-        DRTStrainSourceRegistryCodeSequence &getStrainSourceRegistryCodeSequence()
-            { return StrainSourceRegistryCodeSequence; }
+        DRTGeneticModificationsCodeSequence &getGeneticModificationsCodeSequence()
+            { return GeneticModificationsCodeSequence; }
 
-        /** get StrainSourceRegistryCodeSequence (0010,0215)
+        /** get GeneticModificationsCodeSequence (0010,0229)
          *  @return const reference to sequence element
          */
-        const DRTStrainSourceRegistryCodeSequence &getStrainSourceRegistryCodeSequence() const
-            { return StrainSourceRegistryCodeSequence; }
+        const DRTGeneticModificationsCodeSequence &getGeneticModificationsCodeSequence() const
+            { return GeneticModificationsCodeSequence; }
 
       // --- set DICOM attribute values ---
 
-        /** set StrainSource (0010,0217)
+        /** set GeneticModificationsDescription (0010,0222)
          *  @param  value  value to be set (single value only) or "" for no value
-         *  @param  check  check 'value' for conformance with VR (LO) and VM (1) if enabled
+         *  @param  check  check 'value' for conformance with VR (UC) and VM (1) if enabled
          *  @return status, EC_Normal if successful, an error code otherwise
          */
-        OFCondition setStrainSource(const OFString &value, const OFBool check = OFTrue);
+        OFCondition setGeneticModificationsDescription(const OFString &value, const OFBool check = OFTrue);
 
-        /** set StrainStockNumber (0010,0214)
+        /** set GeneticModificationsNomenclature (0010,0223)
          *  @param  value  value to be set (single value only) or "" for no value
          *  @param  check  check 'value' for conformance with VR (LO) and VM (1) if enabled
          *  @return status, EC_Normal if successful, an error code otherwise
          */
-        OFCondition setStrainStockNumber(const OFString &value, const OFBool check = OFTrue);
+        OFCondition setGeneticModificationsNomenclature(const OFString &value, const OFBool check = OFTrue);
 
       private:
 
         /// internal flag used to mark the empty default item
         /*const*/ OFBool EmptyDefaultItem;
 
-        /// StrainSource (0010,0217) vr=LO, vm=1, type=1
-        DcmLongString StrainSource;
-        /// StrainSourceRegistryCodeSequence (0010,0215) vr=SQ, vm=1, type=1
-        DRTStrainSourceRegistryCodeSequence StrainSourceRegistryCodeSequence;
-        /// StrainStockNumber (0010,0214) vr=LO, vm=1, type=1
-        DcmLongString StrainStockNumber;
+        /// GeneticModificationsCodeSequence (0010,0229) vr=SQ, vm=1, type=3
+        DRTGeneticModificationsCodeSequence GeneticModificationsCodeSequence;
+        /// GeneticModificationsDescription (0010,0222) vr=UC, vm=1, type=1
+        DcmUnlimitedCharacters GeneticModificationsDescription;
+        /// GeneticModificationsNomenclature (0010,0223) vr=LO, vm=1, type=1
+        DcmLongString GeneticModificationsNomenclature;
 
     };
 
@@ -155,22 +155,22 @@ class DCMTK_DCMRT_EXPORT DRTStrainStockSequence
     /** (default) constructor
      *  @param emptyDefaultSequence internal flag used to mark the empty default sequence
      */
-    DRTStrainStockSequence(const OFBool emptyDefaultSequence = OFFalse);
+    DRTGeneticModificationsSequence(const OFBool emptyDefaultSequence = OFFalse);
 
     /** copy constructor
      *  @param copy sequence object to be copied
      */
-    DRTStrainStockSequence(const DRTStrainStockSequence &copy);
+    DRTGeneticModificationsSequence(const DRTGeneticModificationsSequence &copy);
 
     /** destructor
      */
-    virtual ~DRTStrainStockSequence();
+    virtual ~DRTGeneticModificationsSequence();
 
     /** assigment operator
      *  @param copy sequence object to be copied
      *  @return reference to this object
      */
-    DRTStrainStockSequence &operator=(const DRTStrainStockSequence &copy);
+    DRTGeneticModificationsSequence &operator=(const DRTGeneticModificationsSequence &copy);
 
   // --- general methods ---
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtgpis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtgpis.h
index 4f5a7a5..b65e3d5 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtgpis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtgpis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTGroupOfPatientsIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drthsdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drthsdrs.h
index 32dee63..fd9e949 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drthsdrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drthsdrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTHL7StructuredDocumentReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtiais.h b/dcmrt/include/dcmtk/dcmrt/seq/drtiais.h
index d20b640..92b809c 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtiais.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtiais.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIssuerOfAdmissionIDSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtians.h b/dcmrt/include/dcmtk/dcmrt/seq/drtians.h
index a603cb4..d296703 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtians.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtians.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIssuerOfAccessionNumberSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtiblds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtiblds.h
index edb16f5..ee8dbe3 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtiblds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtiblds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIonBeamLimitingDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtibls.h b/dcmrt/include/dcmtk/dcmrt/seq/drtibls.h
index ee649bc..de3b8e1 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtibls.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtibls.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIonBlockSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtibs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtibs.h
index ae50776..33eaa96 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtibs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtibs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIonBeamSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drticpds.h b/dcmrt/include/dcmtk/dcmrt/seq/drticpds.h
index 7158e6d..379b2a0 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drticpds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drticpds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIonControlPointDeliverySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drticps.h b/dcmrt/include/dcmtk/dcmrt/seq/drticps.h
index a94405b..d912f1d 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drticps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drticps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIonControlPointSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtics.h b/dcmrt/include/dcmtk/dcmrt/seq/drtics.h
index 5433227..f17504f 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtics.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtics.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTInstitutionCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtiis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtiis.h
index 9999b54..5c53fb0 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtiis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtiis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIconImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtipiqs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtipiqs.h
index 3debc5b..0cd47b5 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtipiqs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtipiqs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIssuerOfPatientIDQualifiersSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtircs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtircs.h
index b21673c..6ed5287 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtircs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtircs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIonRangeCompensatorSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtiseis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtiseis.h
index 472b5b9..a48bb9d 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtiseis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtiseis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIssuerOfServiceEpisodeIDSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtitts.h b/dcmrt/include/dcmtk/dcmrt/seq/drtitts.h
index 1f48a7d..e5ba49e 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtitts.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtitts.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIonToleranceTableSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtiwps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtiwps.h
index 2852b40..99e5b42 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtiwps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtiwps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIonWedgePositionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtiws.h b/dcmrt/include/dcmtk/dcmrt/seq/drtiws.h
index 03d2147..8fef365 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtiws.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtiws.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTIonWedgeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtlsds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtlsds.h
index a4755a3..4a13c95 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtlsds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtlsds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTLateralSpreadingDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtlsds6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtlsds6.h
index 8ea25e3..a48743c 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtlsds6.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtlsds6.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTLateralSpreadingDeviceSettingsSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtlsds7.h b/dcmrt/include/dcmtk/dcmrt/seq/drtlsds7.h
index 9473fa9..7f16cd3 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtlsds7.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtlsds7.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTLateralSpreadingDeviceSettingsSequenceInRTIonBeamsSessionRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmacds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmacds.h
index c161a77..407ca30 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtmacds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmacds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTMultiplexedAudioChannelsDescriptionCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmas.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmas.h
index 87c9b6d..eed5c45 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtmas.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmas.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTModifiedAttributesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmdrs.h
index 471ff25..8e257a1 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtmdrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmdrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTMeasuredDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmls.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmls.h
index c8ae0e2..dd7c576 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtmls.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmls.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTModalityLUTSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmps.h
index bfaffbe..77f33ea 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtmps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTMACParametersSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmris.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmris.h
index 53d319a..11153ed 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtmris.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmris.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTMappingResourceIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmss.h
index 609cb9f..9c81bad 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtmss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTMotionSynchronizationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtmucs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtmucs.h
index f5d1ec8..0854ce6 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtmucs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtmucs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTMeasurementUnitsCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtoas.h b/dcmrt/include/dcmtk/dcmrt/seq/drtoas.h
index 8db022d..b1cc006 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtoas.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtoas.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTOriginalAttributesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtois.h b/dcmrt/include/dcmtk/dcmrt/seq/drtois.h
index 91798e3..3e79169 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtois.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtois.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTOperatorIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtopis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtopis.h
index f81ef78..8ff2c07 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtopis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtopis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTOtherPatientIDsSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtos.h b/dcmrt/include/dcmtk/dcmrt/seq/drtos.h
index ade82ca..c0f7445 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtos.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtos.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTOverrideSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpbcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpbcs.h
index 467edf9..9817abd 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtpbcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpbcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPatientBreedCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpcs.h
index d0cf955..5763aef 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtpcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTProcedureCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpcxs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpcxs.h
index 3e09700..407b7a4 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtpcxs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpcxs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTProtocolContextSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpdecs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpdecs.h
index 20f7eca..1413f5b 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtpdecs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpdecs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPrivateDataElementCharacteristicsSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpdeds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpdeds.h
index feec7e2..daa4601 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtpdeds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpdeds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPrivateDataElementDefinitionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpfms.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpfms.h
index 3ae34ac..3e8fb44 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtpfms.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpfms.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPrimaryFluenceModeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpics.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpics.h
index dc2e435..ebdd8a0 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtpics.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpics.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPersonIdentificationCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtporcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtporcs.h
index 99bf93f..16054a2 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtporcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtporcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPurposeOfReferenceCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtporis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtporis.h
index 0a9538a..083fbe0 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtporis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtporis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPhysiciansOfRecordIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtppcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtppcs.h
index 608c6c9..77c55ed 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtppcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtppcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPerformedProtocolCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtprsis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtprsis.h
index dec6f76..e3b7d71 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtprsis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtprsis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPhysiciansReadingStudyIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpscs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpscs.h
index 851a1c7..99d75c5 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtpscs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpscs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPatientSpeciesCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpsics.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpsics.h
index b00ca2a..507ae17 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtpsics.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpsics.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPatientSizeCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpss.h
index 5ac9215..341f9ac 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtpss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPatientSetupSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpsss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpsss.h
index 99dc0eb..6f99bce 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtpsss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpsss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPredecessorStructureSetSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtpvis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtpvis.h
index df4f349..94aa557 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtpvis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtpvis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTPlannedVerificationImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtqds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtqds.h
index 7b70201..35f6592 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtqds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtqds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTQuantityDefinitionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtras.h b/dcmrt/include/dcmtk/dcmrt/seq/drtras.h
index 5493783..d5bbf38 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtras.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtras.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRequestAttributesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbas2.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbas2.h
index 9fd3b97..7297a1e 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbas2.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbas2.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedBrachyApplicationSetupSequenceInRTDoseModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbas8.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbas8.h
index b308933..c35a98a 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbas8.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbas8.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedBrachyApplicationSetupSequenceInRTFractionSchemeModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbls.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbls.h
index 0f32569..4a53ca4 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbls.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbls.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRecordedBlockSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbos1.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbos1.h
index b0f5126..b39ca92 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbos1.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbos1.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedBolusSequenceInRTBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbos6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbos6.h
index 503cafe..0dd1cbe 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbos6.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbos6.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedBolusSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbos7.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbos7.h
index 473e266..994b658 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbos7.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbos7.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedBolusSequenceInRTIonBeamsSessionRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbs2.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbs2.h
index 3205866..a159153 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbs2.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbs2.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedBeamSequenceInRTDoseModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbs4.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbs4.h
index df87233..ad64ed6 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbs4.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbs4.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedBeamSequenceInRTGeneralTreatmentRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrbs8.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrbs8.h
index 71e7e92..a802d12 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrbs8.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrbs8.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedBeamSequenceInRTFractionSchemeModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrcdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrcdrs.h
index bb2ac94..09afccd 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrcdrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrcdrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedCalculatedDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrcos.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrcos.h
index 86b87ab..c974a8f 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrcos.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrcos.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRecordedCompensatorSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrcps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrcps.h
index d67eadf..7d7bc06 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrcps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrcps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedControlPointSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrcs.h
index 83b1c11..3d215c4 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTROIContourSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrdros.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrdros.h
index 9a2cc74..98654cd 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrdros.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrdros.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRTDoseROISequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs1.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs1.h
index f87dc9a..1647e0f 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs1.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs1.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedDoseReferenceSequenceInRTBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs6.h
index 8603236..113ca63 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs6.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs6.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedDoseReferenceSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs8.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs8.h
index 4f3a84d..a8ede3c 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs8.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrdrs8.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedDoseReferenceSequenceInRTFractionSchemeModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrds.h
index caed2f5..e619563 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedDoseSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrecs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrecs.h
index 60121f6..387aa4f 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrecs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrecs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTROIElementalCompositionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrfgs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrfgs.h
index 32b1907..f4c0739 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrfgs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrfgs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedFractionGroupSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrfors.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrfors.h
index a8df8af..f61f659 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrfors.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrfors.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedFrameOfReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrics.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrics.h
index 72036cb..0c15cbb 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrics.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrics.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRTROIIdentificationCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrims.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrims.h
index 95a68c7..77d2179 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrims.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrims.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtris.h b/dcmrt/include/dcmtk/dcmrt/seq/drtris.h
index 957eb21..9d28f48 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtris.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtris.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedInstanceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrlsds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrlsds.h
index 693e309..a44350d 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrlsds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrlsds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRecordedLateralSpreadingDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrmdrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrmdrs.h
index 32787fe..cb614eb 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrmdrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrmdrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedMeasuredDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrms.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrms.h
index 8fcb39b..9a314fa 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrms.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrms.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRangeModulatorSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrmss6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrmss6.h
index ecb611c..eb8d992 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrmss6.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrmss6.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRangeModulatorSettingsSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrmss7.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrmss7.h
index 4b1dd10..a62e63e 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrmss7.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrmss7.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRangeModulatorSettingsSequenceInRTIonBeamsSessionRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrpcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrpcs.h
index 2f8a67c..f80fb25 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrpcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrpcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRequestedProcedureCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrpis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrpis.h
index c8e6a26..593e2f2 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrpis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrpis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferringPhysicianIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrppcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrppcs.h
index f9e45bc..b5b9876 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrppcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrppcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReasonForPerformedProcedureCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrpphs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrpphs.h
index a289878..d9f205e 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrpphs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrpphs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedPatientPhotoSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrpps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrpps.h
index 10197f9..002c619 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrpps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrpps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTROIPhysicalPropertiesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrppss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrppss.h
index 37ce7b1..ba9ae3a 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrppss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrppss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedPerformedProcedureStepSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrps.h
index 50c1c89..4fc0167 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedPatientSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrris1.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrris1.h
index bd374cb..15b48bc 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrris1.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrris1.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedReferenceImageSequenceInRTBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrris6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrris6.h
index 443b4e9..5ebaa96 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrris6.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrris6.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedReferenceImageSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrris9.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrris9.h
index 5dabc53..8e2aee1 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrris9.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrris9.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedReferenceImageSequenceInRTBrachyApplicationSetupsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrms.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrms.h
index ad71039..84a97d2 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrms.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrms.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRecordedRangeModulatorSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrros.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrros.h
index 6acf019..272d3c4 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrros.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrros.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRTROIObservationsSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrpcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrpcs.h
index 1b134f6..612bf5d 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrpcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrpcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReasonForRequestedProcedureCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrros.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrros.h
index 97640b5..895ba6b 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrros.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrros.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRelatedRTROIObservationsSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrs.h
index 62e96fa..dc0cfe0 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRTRelatedROISequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrshs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrshs.h
index b825541..841a01c 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrshs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrshs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRecordedRangeShifterSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps.h
index 9d22304..b263d26 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedRTPlanSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps3.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps3.h
index f85cb7f..e56ea2e 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps3.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps3.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedRTPlanSequenceInRTGeneralPlanModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps4.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps4.h
index bb1bd8e..3795222 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps4.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps4.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedRTPlanSequenceInRTGeneralTreatmentRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps5.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps5.h
index 10c9a0f..35a12d2 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps5.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrrtps5.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedRTPlanSequenceInRTImageModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrscs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrscs.h
index 4d9e402..a69bece 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrscs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrscs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRequestingServiceCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsers.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsers.h
index 7058f34..fe21f18 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsers.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsers.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedSeriesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrses.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrses.h
index 40d57a2..9171f91 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrses.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrses.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRTReferencedSeriesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrshs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrshs.h
index d5393fe..6ed2d25 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrshs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrshs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRangeShifterSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrshs6.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrshs6.h
index 5325aad..def130d 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrshs6.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrshs6.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRangeShifterSettingsSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrshs7.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrshs7.h
index f42c735..afbaaef 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrshs7.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrshs7.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsis.h
index 4dd3f2c..f43ed0b 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedSetupImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsns.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsns.h
index 8a15b8a..0ac5ec4 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsns.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsns.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRecordedSnoutSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsos.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsos.h
index a8ea6db..968b10e 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsos.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsos.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedSOPSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsrs.h
index 663bc9c..6799eb1 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedSpatialRegistrationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrss.h
index 521323a..de7708f 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedStudySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsss.h
index 55ab3a0..11ee42f 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedStructureSetSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrsts.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrsts.h
index 60119e1..134913e 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrsts.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrsts.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRTReferencedStudySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs2.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs2.h
index 441371d..df48681 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs2.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs2.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedTreatmentRecordSequenceInRTDoseModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs4.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs4.h
index cdef8bd..0bf315e 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs4.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrtrs4.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedTreatmentRecordSequenceInRTGeneralTreatmentRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrvis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrvis.h
index 2c54b3e..bcc59a1 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrvis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrvis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTReferencedVerificationImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrws.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrws.h
index 180c388..d7af877 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrws.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrws.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRecordedWedgeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtrwvms.h b/dcmrt/include/dcmtk/dcmrt/seq/drtrwvms.h
index 0a164c8..c6a900c 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtrwvms.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtrwvms.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTRealWorldValueMappingSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtscris.h b/dcmrt/include/dcmtk/dcmrt/seq/drtscris.h
index a1d9870..da3c551 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtscris.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtscris.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTStudiesContainingOtherReferencedInstancesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtscs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtscs.h
index 914b27a..c4f50df 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtscs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtscs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTStrainCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsdcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsdcs.h
index 77bfdac..793e35a 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtsdcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsdcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTSeriesDescriptionCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsds.h
index 031af00..61f17eb 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtsds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTSetupDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtshds.h b/dcmrt/include/dcmtk/dcmrt/seq/drtshds.h
index 01c6df2..8b87da3 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtshds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtshds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTShieldingDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsins.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsins.h
index 01dd96f..d3f5a57 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtsins.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsins.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTSourceInstanceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsis.h
index c99c72f..a1b206a 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtsis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTSourceImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsns.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsns.h
index 380d78b..65e74c8 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtsns.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsns.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTSnoutSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtspccs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtspccs.h
index 704f98f..43dcf85 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtspccs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtspccs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTSegmentedPropertyCategoryCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtspcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtspcs.h
index bbb3879..9a49cf2 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtspcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtspcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTScheduledProtocolCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtspgis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtspgis.h
index d70af51..5093486 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtspgis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtspgis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTSourcePatientGroupIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsptcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsptcs.h
index 95667d4..4883ffa 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtsptcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsptcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTSegmentedPropertyTypeModifierCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtss.h
index 1fa19cc..8c250f7 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTSourceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtssrcs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtssrcs.h
index 37ed044..f74c1d2 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtssrcs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtssrcs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTStrainSourceRegistryCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtssrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtssrs.h
index b19598b..b14783d 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtssrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtssrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTStructureSetROISequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtsss.h b/dcmrt/include/dcmtk/dcmrt/seq/drtsss.h
index 8250406..504d771 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtsss.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtsss.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTStrainStockSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drttms0.h b/dcmrt/include/dcmtk/dcmrt/seq/drttms0.h
index c8cf934..8ef7c0a 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drttms0.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drttms0.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTTreatmentMachineSequenceInRTTreatmentMachineRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drttms9.h b/dcmrt/include/dcmtk/dcmrt/seq/drttms9.h
index ce59b0f..69df49d 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drttms9.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drttms9.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTTreatmentMachineSequenceInRTBrachyApplicationSetupsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drttscds.h b/dcmrt/include/dcmtk/dcmrt/seq/drttscds.h
index 8ba54a4..a0d6ef9 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drttscds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drttscds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTTreatmentSummaryCalculatedDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drttsibs.h b/dcmrt/include/dcmtk/dcmrt/seq/drttsibs.h
index db9ac7b..999d2e3 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drttsibs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drttsibs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTTreatmentSessionIonBeamSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drttsmds.h b/dcmrt/include/dcmtk/dcmrt/seq/drttsmds.h
index e338875..d7e21cf 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drttsmds.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drttsmds.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTTreatmentSummaryMeasuredDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drttts.h b/dcmrt/include/dcmtk/dcmrt/seq/drttts.h
index 272c3df..24ae0d1 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drttts.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drttts.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTToleranceTableSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtudis.h b/dcmrt/include/dcmtk/dcmrt/seq/drtudis.h
index 990dc1a..bb8c07b 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtudis.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtudis.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTUDISequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtvls.h b/dcmrt/include/dcmtk/dcmrt/seq/drtvls.h
index 6ff4cd3..d556478 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtvls.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtvls.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTVOILUTSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtwps.h b/dcmrt/include/dcmtk/dcmrt/seq/drtwps.h
index 14bdd16..fc0d7c5 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtwps.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtwps.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTWedgePositionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtwrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtwrs.h
index 65fb483..da8d3c4 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtwrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtwrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTWADORetrievalSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtwrsrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtwrsrs.h
index babd6c9..b3d3b54 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtwrsrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtwrsrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTWADORSRetrievalSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtws.h b/dcmrt/include/dcmtk/dcmrt/seq/drtws.h
index e912914..15b80c5 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtws.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtws.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTWedgeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/include/dcmtk/dcmrt/seq/drtxrs.h b/dcmrt/include/dcmtk/dcmrt/seq/drtxrs.h
index 8bc7cc3..1c0e9e3 100644
--- a/dcmrt/include/dcmtk/dcmrt/seq/drtxrs.h
+++ b/dcmrt/include/dcmtk/dcmrt/seq/drtxrs.h
@@ -6,8 +6,8 @@
  *
  *  Header file for class DRTXDSRetrievalSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/CMakeLists.txt b/dcmrt/libsrc/CMakeLists.txt
index ab28356..93f5c8d 100644
--- a/dcmrt/libsrc/CMakeLists.txt
+++ b/dcmrt/libsrc/CMakeLists.txt
@@ -1,4 +1,4 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmrt drtdose drtimage drtplan drtstrct drttreat drtionpl drtiontr drmdose drmimage drmplan drmstrct drttypes drtaadcs drtadcs drtads drtafs drtags drtajcs drtas1 drtas5 drtas6 drtas7 drtass drtbads drtbas drtbcps drtbl2 drtbl5 drtbldls drtbldps drtblds1 drtblds5 drtblds6 drtbldts drtbrcss drtbrdrs drtbrs drtbs drtbss drtbvcps drtcbars drtccs drtcctus drtcdrs drtces drtcgis drtchs drtcims drtcis drtcncs drtcos drtcpas drtcpis drtcps drtcsas drtcs drtcshs drtcsis drtcss  [...]
+DCMTK_ADD_LIBRARY(dcmrt drtdose drtimage drtplan drtstrct drttreat drtionpl drtiontr drmdose drmimage drmplan drmstrct drttypes drtaadcs drtadcs drtads drtafs drtags drtajcs drtas1 drtas5 drtas6 drtas7 drtass drtbads drtbas drtbcps drtbl2 drtbl5 drtbldls drtbldps drtblds1 drtblds5 drtblds6 drtbldts drtbrcss drtbrdrs drtbrs drtbs drtbss drtbvcps drtcbars drtccs drtcctus drtcdrs drtces drtcgis drtchs drtcims drtcis drtcncs drtcos drtcpas drtcpis drtcps drtcsas drtcs drtcshs drtcsis drtcss  [...]
 
 DCMTK_TARGET_LINK_MODULES(dcmrt ofstd oflog dcmdata dcmimgle)
diff --git a/dcmrt/libsrc/Makefile.dep b/dcmrt/libsrc/Makefile.dep
index ccb5d23..3164bd6 100644
--- a/dcmrt/libsrc/Makefile.dep
+++ b/dcmrt/libsrc/Makefile.dep
@@ -20,7 +20,10 @@ drmdose.o: drmdose.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -38,9 +41,9 @@ drmdose.o: drmdose.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -70,8 +73,6 @@ drmdose.o: drmdose.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -130,6 +131,7 @@ drmdose.o: drmdose.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtdcs.h ../include/dcmtk/dcmrt/seq/drtdss.h \
  ../include/dcmtk/dcmrt/seq/drtdspcs.h \
  ../include/dcmtk/dcmrt/seq/drteas.h ../include/dcmtk/dcmrt/seq/drtfes.h \
+ ../include/dcmtk/dcmrt/seq/drtgms.h ../include/dcmtk/dcmrt/seq/drtgmcs.h \
  ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
@@ -216,7 +218,10 @@ drmimage.o: drmimage.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -234,9 +239,9 @@ drmimage.o: drmimage.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -266,8 +271,6 @@ drmimage.o: drmimage.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -331,7 +334,9 @@ drmimage.o: drmimage.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtblds5.h \
  ../include/dcmtk/dcmrt/seq/drtbl5.h ../include/dcmtk/dcmrt/seq/drtgas.h \
  ../include/dcmtk/dcmrt/seq/drtpfms.h ../include/dcmtk/dcmrt/seq/drtfms.h \
- ../include/dcmtk/dcmrt/seq/drtfes.h ../include/dcmtk/dcmrt/seq/drtgpis.h \
+ ../include/dcmtk/dcmrt/seq/drtfes.h ../include/dcmtk/dcmrt/seq/drtgms.h \
+ ../include/dcmtk/dcmrt/seq/drtgmcs.h \
+ ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
  ../include/dcmtk/dcmrt/seq/drtafs.h ../include/dcmtk/dcmrt/seq/drtajcs.h \
@@ -424,7 +429,10 @@ drmplan.o: drmplan.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -442,9 +450,9 @@ drmplan.o: drmplan.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -474,8 +482,6 @@ drmplan.o: drmplan.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -552,6 +558,7 @@ drmplan.o: drmplan.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtbvcps.h \
  ../include/dcmtk/dcmrt/seq/drtrbas8.h \
  ../include/dcmtk/dcmrt/seq/drtrdrs8.h \
+ ../include/dcmtk/dcmrt/seq/drtgms.h ../include/dcmtk/dcmrt/seq/drtgmcs.h \
  ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
@@ -630,7 +637,10 @@ drmstrct.o: drmstrct.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -648,9 +658,9 @@ drmstrct.o: drmstrct.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -680,8 +690,6 @@ drmstrct.o: drmstrct.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -737,7 +745,9 @@ drmstrct.o: drmstrct.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtdimcs.h \
  ../include/dcmtk/dcmrt/seq/drtdcs.h ../include/dcmtk/dcmrt/seq/drtdss.h \
  ../include/dcmtk/dcmrt/seq/drtdspcs.h \
- ../include/dcmtk/dcmrt/seq/drteas.h ../include/dcmtk/dcmrt/seq/drtgpis.h \
+ ../include/dcmtk/dcmrt/seq/drteas.h ../include/dcmtk/dcmrt/seq/drtgms.h \
+ ../include/dcmtk/dcmrt/seq/drtgmcs.h \
+ ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
  ../include/dcmtk/dcmrt/seq/drtafs.h ../include/dcmtk/dcmrt/seq/drtajcs.h \
@@ -823,7 +833,10 @@ drtaadcs.o: drtaadcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -840,9 +853,9 @@ drtaadcs.o: drtaadcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -872,8 +885,6 @@ drtaadcs.o: drtaadcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -939,7 +950,10 @@ drtadcs.o: drtadcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -956,9 +970,9 @@ drtadcs.o: drtadcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -988,8 +1002,6 @@ drtadcs.o: drtadcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1055,7 +1067,10 @@ drtads.o: drtads.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1072,9 +1087,9 @@ drtads.o: drtads.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -1104,8 +1119,6 @@ drtads.o: drtads.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1171,7 +1184,10 @@ drtafs.o: drtafs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1188,9 +1204,9 @@ drtafs.o: drtafs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -1220,8 +1236,6 @@ drtafs.o: drtafs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1286,7 +1300,10 @@ drtags.o: drtags.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1303,9 +1320,9 @@ drtags.o: drtags.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -1335,8 +1352,6 @@ drtags.o: drtags.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1401,7 +1416,10 @@ drtajcs.o: drtajcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1418,9 +1436,9 @@ drtajcs.o: drtajcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -1450,8 +1468,6 @@ drtajcs.o: drtajcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1517,7 +1533,10 @@ drtas1.o: drtas1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1534,9 +1553,9 @@ drtas1.o: drtas1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -1566,8 +1585,6 @@ drtas1.o: drtas1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1633,7 +1650,10 @@ drtas5.o: drtas5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1650,9 +1670,9 @@ drtas5.o: drtas5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -1682,8 +1702,6 @@ drtas5.o: drtas5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1749,7 +1767,10 @@ drtas6.o: drtas6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1766,9 +1787,9 @@ drtas6.o: drtas6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -1798,8 +1819,6 @@ drtas6.o: drtas6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1864,7 +1883,10 @@ drtas7.o: drtas7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1881,9 +1903,9 @@ drtas7.o: drtas7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -1913,8 +1935,6 @@ drtas7.o: drtas7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -1979,7 +1999,10 @@ drtass.o: drtass.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1996,9 +2019,9 @@ drtass.o: drtass.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -2028,8 +2051,6 @@ drtass.o: drtass.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2099,7 +2120,10 @@ drtbads.o: drtbads.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2116,9 +2140,9 @@ drtbads.o: drtbads.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -2148,8 +2172,6 @@ drtbads.o: drtbads.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2214,7 +2236,10 @@ drtbas.o: drtbas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2231,9 +2256,9 @@ drtbas.o: drtbas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -2263,8 +2288,6 @@ drtbas.o: drtbas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2330,7 +2353,10 @@ drtbcps.o: drtbcps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2347,9 +2373,9 @@ drtbcps.o: drtbcps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -2379,8 +2405,6 @@ drtbcps.o: drtbcps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2446,7 +2470,10 @@ drtbl2.o: drtbl2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2463,9 +2490,9 @@ drtbl2.o: drtbl2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -2495,8 +2522,6 @@ drtbl2.o: drtbl2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2561,7 +2586,10 @@ drtbl5.o: drtbl5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2578,9 +2606,9 @@ drtbl5.o: drtbl5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -2610,8 +2638,6 @@ drtbl5.o: drtbl5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2676,7 +2702,10 @@ drtbldls.o: drtbldls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2693,9 +2722,9 @@ drtbldls.o: drtbldls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -2725,8 +2754,6 @@ drtbldls.o: drtbldls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2791,7 +2818,10 @@ drtbldps.o: drtbldps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2808,9 +2838,9 @@ drtbldps.o: drtbldps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -2840,8 +2870,6 @@ drtbldps.o: drtbldps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -2906,7 +2934,10 @@ drtblds1.o: drtblds1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2923,9 +2954,9 @@ drtblds1.o: drtblds1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -2955,8 +2986,6 @@ drtblds1.o: drtblds1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -3021,7 +3050,10 @@ drtblds5.o: drtblds5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3038,9 +3070,9 @@ drtblds5.o: drtblds5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -3070,8 +3102,6 @@ drtblds5.o: drtblds5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -3136,7 +3166,10 @@ drtblds6.o: drtblds6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3153,9 +3186,9 @@ drtblds6.o: drtblds6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -3185,8 +3218,6 @@ drtblds6.o: drtblds6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -3251,7 +3282,10 @@ drtbldts.o: drtbldts.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3268,9 +3302,9 @@ drtbldts.o: drtbldts.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -3300,8 +3334,6 @@ drtbldts.o: drtbldts.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -3366,7 +3398,10 @@ drtbrcss.o: drtbrcss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3383,9 +3418,9 @@ drtbrcss.o: drtbrcss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -3415,8 +3450,6 @@ drtbrcss.o: drtbrcss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -3482,7 +3515,10 @@ drtbrdrs.o: drtbrdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3499,9 +3535,9 @@ drtbrdrs.o: drtbrdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -3531,8 +3567,6 @@ drtbrdrs.o: drtbrdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -3597,7 +3631,10 @@ drtbrs.o: drtbrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3614,9 +3651,9 @@ drtbrs.o: drtbrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -3646,8 +3683,6 @@ drtbrs.o: drtbrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -3714,7 +3749,10 @@ drtbs.o: drtbs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3731,9 +3769,9 @@ drtbs.o: drtbs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -3763,8 +3801,6 @@ drtbs.o: drtbs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -3840,7 +3876,10 @@ drtbss.o: drtbss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3857,9 +3896,9 @@ drtbss.o: drtbss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -3889,8 +3928,6 @@ drtbss.o: drtbss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -3955,7 +3992,10 @@ drtbvcps.o: drtbvcps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3972,9 +4012,9 @@ drtbvcps.o: drtbvcps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -4004,8 +4044,6 @@ drtbvcps.o: drtbvcps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4070,7 +4108,10 @@ drtcbars.o: drtcbars.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4087,9 +4128,9 @@ drtcbars.o: drtcbars.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -4119,8 +4160,6 @@ drtcbars.o: drtcbars.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4186,7 +4225,10 @@ drtccs.o: drtccs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4203,9 +4245,9 @@ drtccs.o: drtccs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -4235,8 +4277,6 @@ drtccs.o: drtccs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4302,7 +4342,10 @@ drtcctus.o: drtcctus.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4319,9 +4362,9 @@ drtcctus.o: drtcctus.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -4351,8 +4394,6 @@ drtcctus.o: drtcctus.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4417,7 +4458,10 @@ drtcdrs.o: drtcdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4434,9 +4478,9 @@ drtcdrs.o: drtcdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -4466,8 +4510,6 @@ drtcdrs.o: drtcdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4532,7 +4574,10 @@ drtces.o: drtces.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4549,9 +4594,9 @@ drtces.o: drtces.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -4581,8 +4626,6 @@ drtces.o: drtces.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4650,7 +4693,10 @@ drtcgis.o: drtcgis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4667,9 +4713,9 @@ drtcgis.o: drtcgis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -4699,8 +4745,6 @@ drtcgis.o: drtcgis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4765,7 +4809,10 @@ drtchs.o: drtchs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4782,9 +4829,9 @@ drtchs.o: drtchs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -4814,8 +4861,6 @@ drtchs.o: drtchs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -4883,7 +4928,10 @@ drtcims.o: drtcims.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4900,9 +4948,9 @@ drtcims.o: drtcims.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -4932,8 +4980,6 @@ drtcims.o: drtcims.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -5002,7 +5048,10 @@ drtcis.o: drtcis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -5019,9 +5068,9 @@ drtcis.o: drtcis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -5051,8 +5100,6 @@ drtcis.o: drtcis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -5117,7 +5164,10 @@ drtcncs.o: drtcncs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -5134,9 +5184,9 @@ drtcncs.o: drtcncs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -5166,8 +5216,6 @@ drtcncs.o: drtcncs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -5233,9 +5281,12 @@ drtcos.o: drtcos.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
- ../../oflog/include/dcmtk/oflog/layout.h \
- ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
  ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
  ../../oflog/include/dcmtk/oflog/spi/filter.h \
@@ -5250,9 +5301,9 @@ drtcos.o: drtcos.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -5282,8 +5333,6 @@ drtcos.o: drtcos.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -5348,7 +5397,10 @@ drtcpas.o: drtcpas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -5365,9 +5417,9 @@ drtcpas.o: drtcpas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -5397,8 +5449,6 @@ drtcpas.o: drtcpas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -5463,7 +5513,10 @@ drtcpis.o: drtcpis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -5480,9 +5533,9 @@ drtcpis.o: drtcpis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -5512,8 +5565,6 @@ drtcpis.o: drtcpis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -5580,7 +5631,10 @@ drtcps.o: drtcps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -5597,9 +5651,9 @@ drtcps.o: drtcps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -5629,8 +5683,6 @@ drtcps.o: drtcps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -5698,7 +5750,10 @@ drtcs.o: drtcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -5715,9 +5770,9 @@ drtcs.o: drtcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -5747,8 +5802,6 @@ drtcs.o: drtcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -5814,7 +5867,10 @@ drtcsas.o: drtcsas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -5831,9 +5887,9 @@ drtcsas.o: drtcsas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -5863,8 +5919,6 @@ drtcsas.o: drtcsas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -5929,7 +5983,10 @@ drtcshs.o: drtcshs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -5946,9 +6003,9 @@ drtcshs.o: drtcshs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -5978,8 +6035,6 @@ drtcshs.o: drtcshs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -6044,7 +6099,10 @@ drtcsis.o: drtcsis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -6061,9 +6119,9 @@ drtcsis.o: drtcsis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -6093,8 +6151,6 @@ drtcsis.o: drtcsis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -6159,7 +6215,10 @@ drtcss.o: drtcss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -6176,9 +6235,9 @@ drtcss.o: drtcss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -6208,8 +6267,6 @@ drtcss.o: drtcss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -6275,7 +6332,10 @@ drtdcs.o: drtdcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -6292,9 +6352,9 @@ drtdcs.o: drtdcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -6324,8 +6384,6 @@ drtdcs.o: drtdcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -6391,7 +6449,10 @@ drtdddps.o: drtdddps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -6408,9 +6469,9 @@ drtdddps.o: drtdddps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -6440,8 +6501,6 @@ drtdddps.o: drtdddps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -6506,7 +6565,10 @@ drtddps.o: drtddps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -6523,9 +6585,9 @@ drtddps.o: drtddps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -6555,8 +6617,6 @@ drtddps.o: drtddps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -6621,7 +6681,10 @@ drtdias.o: drtdias.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -6638,9 +6701,9 @@ drtdias.o: drtdias.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -6670,8 +6733,6 @@ drtdias.o: drtdias.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -6736,7 +6797,10 @@ drtdimcs.o: drtdimcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -6753,9 +6817,9 @@ drtdimcs.o: drtdimcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -6785,8 +6849,6 @@ drtdimcs.o: drtdimcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -6852,7 +6914,10 @@ drtdimrs.o: drtdimrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -6869,9 +6934,9 @@ drtdimrs.o: drtdimrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -6901,8 +6966,6 @@ drtdimrs.o: drtdimrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -6967,7 +7030,10 @@ drtdirs.o: drtdirs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -6984,9 +7050,9 @@ drtdirs.o: drtdirs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -7016,8 +7082,6 @@ drtdirs.o: drtdirs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -7080,7 +7144,10 @@ drtdose.o: drtdose.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -7098,9 +7165,9 @@ drtdose.o: drtdose.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -7130,8 +7197,6 @@ drtdose.o: drtdose.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -7190,6 +7255,7 @@ drtdose.o: drtdose.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtdcs.h ../include/dcmtk/dcmrt/seq/drtdss.h \
  ../include/dcmtk/dcmrt/seq/drtdspcs.h \
  ../include/dcmtk/dcmrt/seq/drteas.h ../include/dcmtk/dcmrt/seq/drtfes.h \
+ ../include/dcmtk/dcmrt/seq/drtgms.h ../include/dcmtk/dcmrt/seq/drtgmcs.h \
  ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
@@ -7276,7 +7342,10 @@ drtdrs.o: drtdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -7293,9 +7362,9 @@ drtdrs.o: drtdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -7325,8 +7394,6 @@ drtdrs.o: drtdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -7391,7 +7458,10 @@ drtds.o: drtds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -7408,9 +7478,9 @@ drtds.o: drtds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -7440,8 +7510,6 @@ drtds.o: drtds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -7507,7 +7575,10 @@ drtdspcs.o: drtdspcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -7524,9 +7595,9 @@ drtdspcs.o: drtdspcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -7556,8 +7627,6 @@ drtdspcs.o: drtdspcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -7623,7 +7692,10 @@ drtdss.o: drtdss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -7640,9 +7712,9 @@ drtdss.o: drtdss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -7672,8 +7744,6 @@ drtdss.o: drtdss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -7740,7 +7810,10 @@ drtdvhs.o: drtdvhs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -7757,9 +7830,9 @@ drtdvhs.o: drtdvhs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -7789,8 +7862,6 @@ drtdvhs.o: drtdvhs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -7856,7 +7927,10 @@ drtdvrrs.o: drtdvrrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -7873,9 +7947,9 @@ drtdvrrs.o: drtdvrrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -7905,8 +7979,6 @@ drtdvrrs.o: drtdvrrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -7971,7 +8043,10 @@ drteas.o: drteas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -7988,9 +8063,9 @@ drteas.o: drteas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -8020,8 +8095,6 @@ drteas.o: drteas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -8086,7 +8159,10 @@ drtecs.o: drtecs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -8103,9 +8179,9 @@ drtecs.o: drtecs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -8135,8 +8211,6 @@ drtecs.o: drtecs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -8201,7 +8275,10 @@ drtes.o: drtes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -8218,9 +8295,9 @@ drtes.o: drtes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -8250,8 +8327,6 @@ drtes.o: drtes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -8320,7 +8395,10 @@ drtfds.o: drtfds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -8337,9 +8415,9 @@ drtfds.o: drtfds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -8369,8 +8447,6 @@ drtfds.o: drtfds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -8435,7 +8511,10 @@ drtfes.o: drtfes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -8452,9 +8531,9 @@ drtfes.o: drtfes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -8484,8 +8563,6 @@ drtfes.o: drtfes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -8550,7 +8627,10 @@ drtfgs.o: drtfgs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -8567,9 +8647,9 @@ drtfgs.o: drtfgs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -8599,8 +8679,6 @@ drtfgs.o: drtfgs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -8670,7 +8748,10 @@ drtfgss.o: drtfgss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -8687,9 +8768,9 @@ drtfgss.o: drtfgss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -8719,8 +8800,6 @@ drtfgss.o: drtfgss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -8786,7 +8865,10 @@ drtfms.o: drtfms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -8803,9 +8885,9 @@ drtfms.o: drtfms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -8835,8 +8917,6 @@ drtfms.o: drtfms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -8901,7 +8981,10 @@ drtfsss.o: drtfsss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -8918,9 +9001,9 @@ drtfsss.o: drtfsss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -8950,8 +9033,6 @@ drtfsss.o: drtfsss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -9016,7 +9097,10 @@ drtgas.o: drtgas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -9033,9 +9117,9 @@ drtgas.o: drtgas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -9065,8 +9149,6 @@ drtgas.o: drtgas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -9108,8 +9190,8 @@ drtgas.o: drtgas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h
-drtgpis.o: drtgpis.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmrt/seq/drtgpis.h \
+drtgmcs.o: drtgmcs.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmrt/seq/drtgmcs.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -9131,7 +9213,10 @@ drtgpis.o: drtgpis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -9148,9 +9233,9 @@ drtgpis.o: drtgpis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -9180,8 +9265,6 @@ drtgpis.o: drtgpis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -9223,12 +9306,9 @@ drtgpis.o: drtgpis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
- ../include/dcmtk/dcmrt/seq/drtipiqs.h \
- ../include/dcmtk/dcmrt/seq/drtaadcs.h \
- ../include/dcmtk/dcmrt/seq/drtecs.h ../include/dcmtk/dcmrt/seq/drtafs.h \
- ../include/dcmtk/dcmrt/seq/drtajcs.h
-drthsdrs.o: drthsdrs.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmrt/seq/drthsdrs.h \
+ ../include/dcmtk/dcmrt/seq/drtecs.h
+drtgms.o: drtgms.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmrt/seq/drtgms.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -9250,7 +9330,10 @@ drthsdrs.o: drthsdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -9267,9 +9350,9 @@ drthsdrs.o: drthsdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -9299,8 +9382,6 @@ drthsdrs.o: drthsdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -9341,9 +9422,10 @@ drthsdrs.o: drthsdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
- ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h
-drtiais.o: drtiais.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmrt/seq/drtiais.h \
+ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
+ ../include/dcmtk/dcmrt/seq/drtgmcs.h ../include/dcmtk/dcmrt/seq/drtecs.h
+drtgpis.o: drtgpis.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -9365,7 +9447,10 @@ drtiais.o: drtiais.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -9382,9 +9467,9 @@ drtiais.o: drtiais.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -9414,8 +9499,6 @@ drtiais.o: drtiais.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -9456,9 +9539,13 @@ drtiais.o: drtiais.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
- ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h
-drtians.o: drtians.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmrt/seq/drtians.h \
+ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
+ ../include/dcmtk/dcmrt/seq/drtipiqs.h \
+ ../include/dcmtk/dcmrt/seq/drtaadcs.h \
+ ../include/dcmtk/dcmrt/seq/drtecs.h ../include/dcmtk/dcmrt/seq/drtafs.h \
+ ../include/dcmtk/dcmrt/seq/drtajcs.h
+drthsdrs.o: drthsdrs.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmrt/seq/drthsdrs.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -9480,7 +9567,10 @@ drtians.o: drtians.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -9497,9 +9587,9 @@ drtians.o: drtians.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -9529,8 +9619,6 @@ drtians.o: drtians.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -9572,8 +9660,8 @@ drtians.o: drtians.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h
-drtiblds.o: drtiblds.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmrt/seq/drtiblds.h \
+drtiais.o: drtiais.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmrt/seq/drtiais.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -9595,7 +9683,10 @@ drtiblds.o: drtiblds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -9612,9 +9703,125 @@ drtiblds.o: drtiblds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpixseq.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdate.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
+ ../../ofstd/include/dcmtk/ofstd/oftime.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrst.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvruc.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrut.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrobow.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpixel.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrpobw.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcovlay.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrat.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrss.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrfl.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
+ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h
+drtians.o: drtians.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmrt/seq/drtians.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../include/dcmtk/dcmrt/drttypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -9644,8 +9851,122 @@ drtiblds.o: drtiblds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpixseq.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdate.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
+ ../../ofstd/include/dcmtk/ofstd/oftime.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrst.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvruc.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrut.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrobow.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpixel.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrpobw.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcovlay.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrat.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrss.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrfl.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
+ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h
+drtiblds.o: drtiblds.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmrt/seq/drtiblds.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../include/dcmtk/dcmrt/drttypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -9710,7 +10031,10 @@ drtibls.o: drtibls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -9727,9 +10051,9 @@ drtibls.o: drtibls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -9759,8 +10083,6 @@ drtibls.o: drtibls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -9826,7 +10148,10 @@ drtibs.o: drtibs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -9843,9 +10168,9 @@ drtibs.o: drtibs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -9875,8 +10200,6 @@ drtibs.o: drtibs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -9959,7 +10282,10 @@ drticpds.o: drticpds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -9976,9 +10302,9 @@ drticpds.o: drticpds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -10008,8 +10334,6 @@ drticpds.o: drticpds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -10082,7 +10406,10 @@ drticps.o: drticps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -10099,9 +10426,9 @@ drticps.o: drticps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -10131,8 +10458,6 @@ drticps.o: drticps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -10203,7 +10528,10 @@ drtics.o: drtics.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -10220,9 +10548,9 @@ drtics.o: drtics.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -10252,8 +10580,6 @@ drtics.o: drtics.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -10319,7 +10645,10 @@ drtiis.o: drtiis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -10336,9 +10665,9 @@ drtiis.o: drtiis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -10368,8 +10697,6 @@ drtiis.o: drtiis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -10432,7 +10759,10 @@ drtimage.o: drtimage.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -10450,9 +10780,9 @@ drtimage.o: drtimage.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -10482,8 +10812,6 @@ drtimage.o: drtimage.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -10547,7 +10875,9 @@ drtimage.o: drtimage.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtblds5.h \
  ../include/dcmtk/dcmrt/seq/drtbl5.h ../include/dcmtk/dcmrt/seq/drtgas.h \
  ../include/dcmtk/dcmrt/seq/drtpfms.h ../include/dcmtk/dcmrt/seq/drtfms.h \
- ../include/dcmtk/dcmrt/seq/drtfes.h ../include/dcmtk/dcmrt/seq/drtgpis.h \
+ ../include/dcmtk/dcmrt/seq/drtfes.h ../include/dcmtk/dcmrt/seq/drtgms.h \
+ ../include/dcmtk/dcmrt/seq/drtgmcs.h \
+ ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
  ../include/dcmtk/dcmrt/seq/drtafs.h ../include/dcmtk/dcmrt/seq/drtajcs.h \
@@ -10622,7 +10952,10 @@ drtionpl.o: drtionpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -10640,9 +10973,9 @@ drtionpl.o: drtionpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -10672,8 +11005,6 @@ drtionpl.o: drtionpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -10734,7 +11065,9 @@ drtionpl.o: drtionpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtbvcps.h \
  ../include/dcmtk/dcmrt/seq/drtrbas8.h \
  ../include/dcmtk/dcmrt/seq/drtrdrs8.h \
- ../include/dcmtk/dcmrt/seq/drtrds.h ../include/dcmtk/dcmrt/seq/drtgpis.h \
+ ../include/dcmtk/dcmrt/seq/drtrds.h ../include/dcmtk/dcmrt/seq/drtgms.h \
+ ../include/dcmtk/dcmrt/seq/drtgmcs.h \
+ ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
  ../include/dcmtk/dcmrt/seq/drtafs.h ../include/dcmtk/dcmrt/seq/drtajcs.h \
@@ -10826,7 +11159,10 @@ drtiontr.o: drtiontr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -10844,9 +11180,9 @@ drtiontr.o: drtiontr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -10876,8 +11212,6 @@ drtiontr.o: drtiontr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -10935,7 +11269,8 @@ drtiontr.o: drtiontr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtdcs.h ../include/dcmtk/dcmrt/seq/drtdss.h \
  ../include/dcmtk/dcmrt/seq/drtdspcs.h \
  ../include/dcmtk/dcmrt/seq/drteas.h ../include/dcmtk/dcmrt/seq/drtfgss.h \
- ../include/dcmtk/dcmrt/seq/drtfsss.h \
+ ../include/dcmtk/dcmrt/seq/drtfsss.h ../include/dcmtk/dcmrt/seq/drtgms.h \
+ ../include/dcmtk/dcmrt/seq/drtgmcs.h \
  ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
@@ -11038,7 +11373,10 @@ drtipiqs.o: drtipiqs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -11055,9 +11393,9 @@ drtipiqs.o: drtipiqs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -11087,8 +11425,6 @@ drtipiqs.o: drtipiqs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -11156,7 +11492,10 @@ drtircs.o: drtircs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -11173,9 +11512,9 @@ drtircs.o: drtircs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -11205,8 +11544,6 @@ drtircs.o: drtircs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -11271,7 +11608,10 @@ drtiseis.o: drtiseis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -11288,9 +11628,9 @@ drtiseis.o: drtiseis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -11320,8 +11660,6 @@ drtiseis.o: drtiseis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -11386,7 +11724,10 @@ drtitts.o: drtitts.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -11403,9 +11744,9 @@ drtitts.o: drtitts.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -11435,8 +11776,6 @@ drtitts.o: drtitts.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -11502,7 +11841,10 @@ drtiwps.o: drtiwps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -11519,9 +11861,9 @@ drtiwps.o: drtiwps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -11551,8 +11893,6 @@ drtiwps.o: drtiwps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -11617,7 +11957,10 @@ drtiws.o: drtiws.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -11634,9 +11977,9 @@ drtiws.o: drtiws.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -11666,8 +12009,6 @@ drtiws.o: drtiws.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -11732,7 +12073,10 @@ drtlsds.o: drtlsds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -11749,9 +12093,9 @@ drtlsds.o: drtlsds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -11781,8 +12125,6 @@ drtlsds.o: drtlsds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -11847,7 +12189,10 @@ drtlsds6.o: drtlsds6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -11864,9 +12209,9 @@ drtlsds6.o: drtlsds6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -11896,8 +12241,6 @@ drtlsds6.o: drtlsds6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -11962,7 +12305,10 @@ drtlsds7.o: drtlsds7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -11979,9 +12325,9 @@ drtlsds7.o: drtlsds7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -12011,8 +12357,6 @@ drtlsds7.o: drtlsds7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -12077,7 +12421,10 @@ drtmacds.o: drtmacds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -12094,9 +12441,9 @@ drtmacds.o: drtmacds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -12126,8 +12473,6 @@ drtmacds.o: drtmacds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -12193,7 +12538,10 @@ drtmas.o: drtmas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -12210,9 +12558,9 @@ drtmas.o: drtmas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -12242,8 +12590,6 @@ drtmas.o: drtmas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -12308,7 +12654,10 @@ drtmdrs.o: drtmdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -12325,9 +12674,9 @@ drtmdrs.o: drtmdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -12357,8 +12706,6 @@ drtmdrs.o: drtmdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -12423,7 +12770,10 @@ drtmls.o: drtmls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -12440,9 +12790,9 @@ drtmls.o: drtmls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -12472,8 +12822,6 @@ drtmls.o: drtmls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -12538,7 +12886,10 @@ drtmps.o: drtmps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -12555,9 +12906,9 @@ drtmps.o: drtmps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -12587,8 +12938,6 @@ drtmps.o: drtmps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -12653,7 +13002,10 @@ drtmris.o: drtmris.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -12670,9 +13022,9 @@ drtmris.o: drtmris.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -12702,8 +13054,6 @@ drtmris.o: drtmris.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -12768,7 +13118,10 @@ drtmss.o: drtmss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -12785,9 +13138,9 @@ drtmss.o: drtmss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -12817,8 +13170,6 @@ drtmss.o: drtmss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -12883,7 +13234,10 @@ drtmucs.o: drtmucs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -12900,9 +13254,9 @@ drtmucs.o: drtmucs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -12932,8 +13286,6 @@ drtmucs.o: drtmucs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -12999,7 +13351,10 @@ drtoas.o: drtoas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -13016,9 +13371,9 @@ drtoas.o: drtoas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -13048,8 +13403,6 @@ drtoas.o: drtoas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -13115,7 +13468,10 @@ drtois.o: drtois.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -13132,9 +13488,9 @@ drtois.o: drtois.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -13164,8 +13520,6 @@ drtois.o: drtois.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -13232,7 +13586,10 @@ drtopis.o: drtopis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -13249,9 +13606,9 @@ drtopis.o: drtopis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -13281,8 +13638,6 @@ drtopis.o: drtopis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -13351,7 +13706,10 @@ drtos.o: drtos.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -13368,9 +13726,9 @@ drtos.o: drtos.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -13400,8 +13758,6 @@ drtos.o: drtos.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -13468,7 +13824,10 @@ drtpbcs.o: drtpbcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -13485,9 +13844,9 @@ drtpbcs.o: drtpbcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -13517,8 +13876,6 @@ drtpbcs.o: drtpbcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -13584,7 +13941,10 @@ drtpcs.o: drtpcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -13601,9 +13961,9 @@ drtpcs.o: drtpcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -13633,8 +13993,6 @@ drtpcs.o: drtpcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -13700,7 +14058,10 @@ drtpcxs.o: drtpcxs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -13717,9 +14078,9 @@ drtpcxs.o: drtpcxs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -13749,8 +14110,6 @@ drtpcxs.o: drtpcxs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -13820,7 +14179,10 @@ drtpdecs.o: drtpdecs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -13837,9 +14199,9 @@ drtpdecs.o: drtpdecs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -13869,8 +14231,6 @@ drtpdecs.o: drtpdecs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -13937,7 +14297,10 @@ drtpdeds.o: drtpdeds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -13954,9 +14317,9 @@ drtpdeds.o: drtpdeds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -13986,8 +14349,6 @@ drtpdeds.o: drtpdeds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -14052,7 +14413,10 @@ drtpfms.o: drtpfms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -14069,9 +14433,9 @@ drtpfms.o: drtpfms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -14101,8 +14465,6 @@ drtpfms.o: drtpfms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -14167,7 +14529,10 @@ drtpics.o: drtpics.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -14184,9 +14549,9 @@ drtpics.o: drtpics.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -14216,8 +14581,6 @@ drtpics.o: drtpics.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -14281,7 +14644,10 @@ drtplan.o: drtplan.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -14299,9 +14665,9 @@ drtplan.o: drtplan.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -14331,8 +14697,6 @@ drtplan.o: drtplan.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -14409,6 +14773,7 @@ drtplan.o: drtplan.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtbvcps.h \
  ../include/dcmtk/dcmrt/seq/drtrbas8.h \
  ../include/dcmtk/dcmrt/seq/drtrdrs8.h \
+ ../include/dcmtk/dcmrt/seq/drtgms.h ../include/dcmtk/dcmrt/seq/drtgmcs.h \
  ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
@@ -14488,7 +14853,10 @@ drtporcs.o: drtporcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -14505,9 +14873,9 @@ drtporcs.o: drtporcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -14537,8 +14905,6 @@ drtporcs.o: drtporcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -14604,7 +14970,10 @@ drtporis.o: drtporis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -14621,9 +14990,9 @@ drtporis.o: drtporis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -14653,8 +15022,6 @@ drtporis.o: drtporis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -14721,7 +15088,10 @@ drtppcs.o: drtppcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -14738,9 +15108,9 @@ drtppcs.o: drtppcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -14770,8 +15140,6 @@ drtppcs.o: drtppcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -14841,7 +15209,10 @@ drtprsis.o: drtprsis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -14858,9 +15229,9 @@ drtprsis.o: drtprsis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -14890,8 +15261,6 @@ drtprsis.o: drtprsis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -14958,7 +15327,10 @@ drtpscs.o: drtpscs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -14975,9 +15347,9 @@ drtpscs.o: drtpscs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -15007,8 +15379,6 @@ drtpscs.o: drtpscs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -15074,7 +15444,10 @@ drtpsics.o: drtpsics.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -15091,9 +15464,9 @@ drtpsics.o: drtpsics.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -15123,8 +15496,6 @@ drtpsics.o: drtpsics.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -15190,7 +15561,10 @@ drtpss.o: drtpss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -15207,9 +15581,9 @@ drtpss.o: drtpss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -15239,8 +15613,6 @@ drtpss.o: drtpss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -15308,7 +15680,10 @@ drtpsss.o: drtpsss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -15325,9 +15700,9 @@ drtpsss.o: drtpsss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -15357,8 +15732,6 @@ drtpsss.o: drtpsss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -15423,7 +15796,10 @@ drtpvis.o: drtpvis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -15440,9 +15816,9 @@ drtpvis.o: drtpvis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -15472,8 +15848,6 @@ drtpvis.o: drtpvis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -15538,7 +15912,10 @@ drtqds.o: drtqds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -15555,9 +15932,9 @@ drtqds.o: drtqds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -15587,8 +15964,6 @@ drtqds.o: drtqds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -15657,7 +16032,10 @@ drtras.o: drtras.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -15674,9 +16052,9 @@ drtras.o: drtras.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -15706,8 +16084,6 @@ drtras.o: drtras.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -15782,7 +16158,10 @@ drtrbas2.o: drtrbas2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -15799,9 +16178,9 @@ drtrbas2.o: drtrbas2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -15831,8 +16210,6 @@ drtrbas2.o: drtrbas2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -15897,7 +16274,10 @@ drtrbas8.o: drtrbas8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -15914,9 +16294,9 @@ drtrbas8.o: drtrbas8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -15946,8 +16326,6 @@ drtrbas8.o: drtrbas8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -16012,7 +16390,10 @@ drtrbls.o: drtrbls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -16029,9 +16410,9 @@ drtrbls.o: drtrbls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -16061,8 +16442,6 @@ drtrbls.o: drtrbls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -16127,7 +16506,10 @@ drtrbos1.o: drtrbos1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -16144,9 +16526,9 @@ drtrbos1.o: drtrbos1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -16176,8 +16558,6 @@ drtrbos1.o: drtrbos1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -16242,7 +16622,10 @@ drtrbos6.o: drtrbos6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -16259,9 +16642,9 @@ drtrbos6.o: drtrbos6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -16291,8 +16674,6 @@ drtrbos6.o: drtrbos6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -16357,7 +16738,10 @@ drtrbos7.o: drtrbos7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -16374,9 +16758,9 @@ drtrbos7.o: drtrbos7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -16406,8 +16790,6 @@ drtrbos7.o: drtrbos7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -16472,7 +16854,10 @@ drtrbs2.o: drtrbs2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -16489,9 +16874,9 @@ drtrbs2.o: drtrbs2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -16521,8 +16906,6 @@ drtrbs2.o: drtrbs2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -16588,7 +16971,10 @@ drtrbs4.o: drtrbs4.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -16605,9 +16991,9 @@ drtrbs4.o: drtrbs4.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -16637,8 +17023,6 @@ drtrbs4.o: drtrbs4.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -16704,7 +17088,10 @@ drtrbs8.o: drtrbs8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -16721,9 +17108,9 @@ drtrbs8.o: drtrbs8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -16753,8 +17140,6 @@ drtrbs8.o: drtrbs8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -16820,7 +17205,10 @@ drtrcdrs.o: drtrcdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -16837,9 +17225,9 @@ drtrcdrs.o: drtrcdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -16869,8 +17257,6 @@ drtrcdrs.o: drtrcdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -16935,7 +17321,10 @@ drtrcos.o: drtrcos.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -16952,9 +17341,9 @@ drtrcos.o: drtrcos.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -16984,8 +17373,6 @@ drtrcos.o: drtrcos.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -17050,7 +17437,10 @@ drtrcps.o: drtrcps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -17067,9 +17457,9 @@ drtrcps.o: drtrcps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -17099,8 +17489,6 @@ drtrcps.o: drtrcps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -17165,7 +17553,10 @@ drtrcs.o: drtrcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -17182,9 +17573,9 @@ drtrcs.o: drtrcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -17214,8 +17605,6 @@ drtrcs.o: drtrcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -17281,7 +17670,10 @@ drtrdros.o: drtrdros.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -17298,9 +17690,9 @@ drtrdros.o: drtrdros.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -17330,8 +17722,6 @@ drtrdros.o: drtrdros.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -17396,7 +17786,10 @@ drtrdrs1.o: drtrdrs1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -17413,9 +17806,9 @@ drtrdrs1.o: drtrdrs1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -17445,8 +17838,6 @@ drtrdrs1.o: drtrdrs1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -17511,7 +17902,10 @@ drtrdrs6.o: drtrdrs6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -17528,9 +17922,9 @@ drtrdrs6.o: drtrdrs6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -17560,8 +17954,6 @@ drtrdrs6.o: drtrdrs6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -17626,7 +18018,10 @@ drtrdrs8.o: drtrdrs8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -17643,9 +18038,9 @@ drtrdrs8.o: drtrdrs8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -17675,8 +18070,6 @@ drtrdrs8.o: drtrdrs8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -17741,7 +18134,10 @@ drtrds.o: drtrds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -17758,9 +18154,9 @@ drtrds.o: drtrds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -17790,8 +18186,6 @@ drtrds.o: drtrds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -17856,7 +18250,10 @@ drtrecs.o: drtrecs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -17873,9 +18270,9 @@ drtrecs.o: drtrecs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -17905,8 +18302,6 @@ drtrecs.o: drtrecs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -17971,7 +18366,10 @@ drtrfgs.o: drtrfgs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -17988,9 +18386,9 @@ drtrfgs.o: drtrfgs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -18020,8 +18418,6 @@ drtrfgs.o: drtrfgs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -18089,7 +18485,10 @@ drtrfors.o: drtrfors.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -18106,9 +18505,9 @@ drtrfors.o: drtrfors.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -18138,8 +18537,6 @@ drtrfors.o: drtrfors.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -18206,7 +18603,10 @@ drtrics.o: drtrics.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -18223,9 +18623,9 @@ drtrics.o: drtrics.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -18255,8 +18655,6 @@ drtrics.o: drtrics.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -18323,7 +18721,10 @@ drtrims.o: drtrims.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -18340,9 +18741,9 @@ drtrims.o: drtrims.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -18372,8 +18773,6 @@ drtrims.o: drtrims.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -18440,7 +18839,10 @@ drtris.o: drtris.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -18457,9 +18859,9 @@ drtris.o: drtris.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -18489,8 +18891,6 @@ drtris.o: drtris.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -18557,7 +18957,10 @@ drtrlsds.o: drtrlsds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -18574,9 +18977,9 @@ drtrlsds.o: drtrlsds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -18606,8 +19009,6 @@ drtrlsds.o: drtrlsds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -18672,7 +19073,10 @@ drtrmdrs.o: drtrmdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -18689,9 +19093,9 @@ drtrmdrs.o: drtrmdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -18721,8 +19125,6 @@ drtrmdrs.o: drtrmdrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -18787,7 +19189,10 @@ drtrms.o: drtrms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -18804,9 +19209,9 @@ drtrms.o: drtrms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -18836,8 +19241,6 @@ drtrms.o: drtrms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -18902,7 +19305,10 @@ drtrmss6.o: drtrmss6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -18919,9 +19325,9 @@ drtrmss6.o: drtrmss6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -18951,8 +19357,6 @@ drtrmss6.o: drtrmss6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -19017,7 +19421,10 @@ drtrmss7.o: drtrmss7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -19034,9 +19441,9 @@ drtrmss7.o: drtrmss7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -19066,8 +19473,6 @@ drtrmss7.o: drtrmss7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -19132,7 +19537,10 @@ drtrpcs.o: drtrpcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -19149,9 +19557,9 @@ drtrpcs.o: drtrpcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -19181,8 +19589,6 @@ drtrpcs.o: drtrpcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -19248,7 +19654,10 @@ drtrpis.o: drtrpis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -19265,9 +19674,9 @@ drtrpis.o: drtrpis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -19297,8 +19706,6 @@ drtrpis.o: drtrpis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -19365,7 +19772,10 @@ drtrppcs.o: drtrppcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -19382,9 +19792,9 @@ drtrppcs.o: drtrppcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -19414,8 +19824,6 @@ drtrppcs.o: drtrppcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -19481,7 +19889,10 @@ drtrpphs.o: drtrpphs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -19498,9 +19909,9 @@ drtrpphs.o: drtrpphs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -19530,8 +19941,6 @@ drtrpphs.o: drtrpphs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -19601,7 +20010,10 @@ drtrpps.o: drtrpps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -19618,9 +20030,9 @@ drtrpps.o: drtrpps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -19650,8 +20062,6 @@ drtrpps.o: drtrpps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -19717,7 +20127,10 @@ drtrppss.o: drtrppss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -19734,9 +20147,9 @@ drtrppss.o: drtrppss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -19766,8 +20179,6 @@ drtrppss.o: drtrppss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -19832,7 +20243,10 @@ drtrps.o: drtrps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -19849,9 +20263,9 @@ drtrps.o: drtrps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -19881,8 +20295,6 @@ drtrps.o: drtrps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -19947,7 +20359,10 @@ drtrris1.o: drtrris1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -19964,9 +20379,9 @@ drtrris1.o: drtrris1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -19996,8 +20411,6 @@ drtrris1.o: drtrris1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -20062,7 +20475,10 @@ drtrris6.o: drtrris6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -20079,9 +20495,9 @@ drtrris6.o: drtrris6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -20111,8 +20527,6 @@ drtrris6.o: drtrris6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -20177,7 +20591,10 @@ drtrris9.o: drtrris9.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -20194,9 +20611,9 @@ drtrris9.o: drtrris9.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -20226,8 +20643,6 @@ drtrris9.o: drtrris9.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -20292,7 +20707,10 @@ drtrrms.o: drtrrms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -20309,9 +20727,9 @@ drtrrms.o: drtrrms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -20341,8 +20759,6 @@ drtrrms.o: drtrrms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -20407,7 +20823,10 @@ drtrros.o: drtrros.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -20424,9 +20843,9 @@ drtrros.o: drtrros.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -20456,8 +20875,6 @@ drtrros.o: drtrros.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -20529,7 +20946,10 @@ drtrrpcs.o: drtrrpcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -20546,9 +20966,9 @@ drtrrpcs.o: drtrrpcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -20578,8 +20998,6 @@ drtrrpcs.o: drtrrpcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -20645,7 +21063,10 @@ drtrrros.o: drtrrros.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -20662,9 +21083,9 @@ drtrrros.o: drtrrros.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -20694,8 +21115,6 @@ drtrrros.o: drtrrros.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -20760,7 +21179,10 @@ drtrrs.o: drtrrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -20777,9 +21199,9 @@ drtrrs.o: drtrrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -20809,8 +21231,6 @@ drtrrs.o: drtrrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -20875,7 +21295,10 @@ drtrrshs.o: drtrrshs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -20892,9 +21315,9 @@ drtrrshs.o: drtrrshs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -20924,8 +21347,6 @@ drtrrshs.o: drtrrshs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -20990,7 +21411,10 @@ drtrrtps.o: drtrrtps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -21007,9 +21431,9 @@ drtrrtps.o: drtrrtps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -21039,8 +21463,6 @@ drtrrtps.o: drtrrtps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -21109,7 +21531,10 @@ drtrrtps3.o: drtrrtps3.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -21126,9 +21551,9 @@ drtrrtps3.o: drtrrtps3.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -21158,8 +21583,6 @@ drtrrtps3.o: drtrrtps3.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -21224,7 +21647,10 @@ drtrrtps4.o: drtrrtps4.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -21241,9 +21667,9 @@ drtrrtps4.o: drtrrtps4.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -21273,8 +21699,6 @@ drtrrtps4.o: drtrrtps4.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -21339,7 +21763,10 @@ drtrrtps5.o: drtrrtps5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -21356,9 +21783,9 @@ drtrrtps5.o: drtrrtps5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -21388,8 +21815,6 @@ drtrrtps5.o: drtrrtps5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -21454,7 +21879,10 @@ drtrscs.o: drtrscs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -21471,9 +21899,9 @@ drtrscs.o: drtrscs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -21503,8 +21931,6 @@ drtrscs.o: drtrscs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -21570,7 +21996,10 @@ drtrsers.o: drtrsers.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -21587,9 +22016,9 @@ drtrsers.o: drtrsers.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -21619,8 +22048,6 @@ drtrsers.o: drtrsers.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -21688,7 +22115,10 @@ drtrses.o: drtrses.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -21705,9 +22135,9 @@ drtrses.o: drtrses.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -21737,8 +22167,6 @@ drtrses.o: drtrses.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -21804,7 +22232,10 @@ drtrshs.o: drtrshs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -21821,9 +22252,9 @@ drtrshs.o: drtrshs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -21853,8 +22284,6 @@ drtrshs.o: drtrshs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -21919,7 +22348,10 @@ drtrshs6.o: drtrshs6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -21936,9 +22368,9 @@ drtrshs6.o: drtrshs6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -21968,8 +22400,6 @@ drtrshs6.o: drtrshs6.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -22034,7 +22464,10 @@ drtrshs7.o: drtrshs7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -22051,9 +22484,9 @@ drtrshs7.o: drtrshs7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -22083,8 +22516,6 @@ drtrshs7.o: drtrshs7.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -22149,7 +22580,10 @@ drtrsis.o: drtrsis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -22166,9 +22600,9 @@ drtrsis.o: drtrsis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -22198,8 +22632,6 @@ drtrsis.o: drtrsis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -22264,7 +22696,10 @@ drtrsns.o: drtrsns.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -22281,9 +22716,9 @@ drtrsns.o: drtrsns.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -22313,8 +22748,6 @@ drtrsns.o: drtrsns.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -22379,7 +22812,10 @@ drtrsos.o: drtrsos.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -22396,9 +22832,9 @@ drtrsos.o: drtrsos.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -22428,8 +22864,6 @@ drtrsos.o: drtrsos.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -22494,7 +22928,10 @@ drtrsrs.o: drtrsrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -22511,9 +22948,9 @@ drtrsrs.o: drtrsrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -22543,8 +22980,6 @@ drtrsrs.o: drtrsrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -22609,7 +23044,10 @@ drtrss.o: drtrss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -22626,9 +23064,9 @@ drtrss.o: drtrss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -22658,8 +23096,6 @@ drtrss.o: drtrss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -22724,7 +23160,10 @@ drtrsss.o: drtrsss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -22741,9 +23180,9 @@ drtrsss.o: drtrsss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -22773,8 +23212,6 @@ drtrsss.o: drtrsss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -22839,7 +23276,10 @@ drtrsts.o: drtrsts.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -22856,9 +23296,9 @@ drtrsts.o: drtrsts.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -22888,8 +23328,6 @@ drtrsts.o: drtrsts.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -22955,7 +23393,10 @@ drtrtrs2.o: drtrtrs2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -22972,9 +23413,9 @@ drtrtrs2.o: drtrtrs2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -23004,8 +23445,6 @@ drtrtrs2.o: drtrtrs2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -23072,7 +23511,10 @@ drtrtrs4.o: drtrtrs4.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -23089,9 +23531,9 @@ drtrtrs4.o: drtrtrs4.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -23121,8 +23563,6 @@ drtrtrs4.o: drtrtrs4.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -23187,7 +23627,10 @@ drtrvis.o: drtrvis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -23204,9 +23647,9 @@ drtrvis.o: drtrvis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -23236,8 +23679,6 @@ drtrvis.o: drtrvis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -23302,7 +23743,10 @@ drtrws.o: drtrws.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -23319,9 +23763,9 @@ drtrws.o: drtrws.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -23351,8 +23795,6 @@ drtrws.o: drtrws.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -23417,7 +23859,10 @@ drtrwvms.o: drtrwvms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -23434,9 +23879,9 @@ drtrwvms.o: drtrwvms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -23466,8 +23911,6 @@ drtrwvms.o: drtrwvms.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -23536,7 +23979,10 @@ drtscris.o: drtscris.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -23553,9 +23999,9 @@ drtscris.o: drtscris.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -23585,8 +24031,6 @@ drtscris.o: drtscris.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -23655,7 +24099,10 @@ drtscs.o: drtscs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -23672,9 +24119,9 @@ drtscs.o: drtscs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -23704,8 +24151,6 @@ drtscs.o: drtscs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -23771,7 +24216,10 @@ drtsdcs.o: drtsdcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -23788,9 +24236,9 @@ drtsdcs.o: drtsdcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -23820,8 +24268,6 @@ drtsdcs.o: drtsdcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -23887,7 +24333,10 @@ drtsds.o: drtsds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -23904,9 +24353,9 @@ drtsds.o: drtsds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -23936,8 +24385,6 @@ drtsds.o: drtsds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -24002,7 +24449,10 @@ drtshds.o: drtshds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -24019,9 +24469,9 @@ drtshds.o: drtshds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -24051,8 +24501,6 @@ drtshds.o: drtshds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -24117,7 +24565,10 @@ drtsins.o: drtsins.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -24134,9 +24585,9 @@ drtsins.o: drtsins.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -24166,8 +24617,6 @@ drtsins.o: drtsins.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -24234,7 +24683,10 @@ drtsis.o: drtsis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -24251,9 +24703,9 @@ drtsis.o: drtsis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -24283,8 +24735,6 @@ drtsis.o: drtsis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -24351,7 +24801,10 @@ drtsns.o: drtsns.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -24368,9 +24821,9 @@ drtsns.o: drtsns.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -24400,8 +24853,6 @@ drtsns.o: drtsns.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -24466,7 +24917,10 @@ drtspccs.o: drtspccs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -24483,9 +24937,9 @@ drtspccs.o: drtspccs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -24515,8 +24969,6 @@ drtspccs.o: drtspccs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -24582,7 +25034,10 @@ drtspcs.o: drtspcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -24599,9 +25054,9 @@ drtspcs.o: drtspcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -24631,8 +25086,6 @@ drtspcs.o: drtspcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -24702,7 +25155,10 @@ drtspgis.o: drtspgis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -24719,9 +25175,9 @@ drtspgis.o: drtspgis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -24751,8 +25207,6 @@ drtspgis.o: drtspgis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -24821,7 +25275,10 @@ drtsptcs.o: drtsptcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -24838,9 +25295,9 @@ drtsptcs.o: drtsptcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -24870,8 +25327,6 @@ drtsptcs.o: drtsptcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -24937,7 +25392,10 @@ drtss.o: drtss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -24954,9 +25412,9 @@ drtss.o: drtss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -24986,8 +25444,6 @@ drtss.o: drtss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -25052,7 +25508,10 @@ drtssrcs.o: drtssrcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -25069,9 +25528,9 @@ drtssrcs.o: drtssrcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -25101,8 +25560,6 @@ drtssrcs.o: drtssrcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -25168,7 +25625,10 @@ drtssrs.o: drtssrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -25185,9 +25645,9 @@ drtssrs.o: drtssrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -25217,8 +25677,6 @@ drtssrs.o: drtssrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -25284,7 +25742,10 @@ drtsss.o: drtsss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -25301,9 +25762,9 @@ drtsss.o: drtsss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -25333,8 +25794,6 @@ drtsss.o: drtsss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -25399,7 +25858,10 @@ drtstrct.o: drtstrct.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -25417,9 +25879,9 @@ drtstrct.o: drtstrct.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -25449,8 +25911,6 @@ drtstrct.o: drtstrct.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -25506,7 +25966,9 @@ drtstrct.o: drtstrct.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtdimcs.h \
  ../include/dcmtk/dcmrt/seq/drtdcs.h ../include/dcmtk/dcmrt/seq/drtdss.h \
  ../include/dcmtk/dcmrt/seq/drtdspcs.h \
- ../include/dcmtk/dcmrt/seq/drteas.h ../include/dcmtk/dcmrt/seq/drtgpis.h \
+ ../include/dcmtk/dcmrt/seq/drteas.h ../include/dcmtk/dcmrt/seq/drtgms.h \
+ ../include/dcmtk/dcmrt/seq/drtgmcs.h \
+ ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
  ../include/dcmtk/dcmrt/seq/drtafs.h ../include/dcmtk/dcmrt/seq/drtajcs.h \
@@ -25592,7 +26054,10 @@ drttms0.o: drttms0.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -25609,9 +26074,9 @@ drttms0.o: drttms0.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -25641,8 +26106,6 @@ drttms0.o: drttms0.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -25707,7 +26170,10 @@ drttms9.o: drttms9.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -25724,9 +26190,9 @@ drttms9.o: drttms9.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -25756,8 +26222,6 @@ drttms9.o: drttms9.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -25820,7 +26284,10 @@ drttreat.o: drttreat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -25838,9 +26305,9 @@ drttreat.o: drttreat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -25870,8 +26337,6 @@ drttreat.o: drttreat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -25928,7 +26393,8 @@ drttreat.o: drttreat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtdcs.h ../include/dcmtk/dcmrt/seq/drtdss.h \
  ../include/dcmtk/dcmrt/seq/drtdspcs.h \
  ../include/dcmtk/dcmrt/seq/drteas.h ../include/dcmtk/dcmrt/seq/drtfgss.h \
- ../include/dcmtk/dcmrt/seq/drtfsss.h \
+ ../include/dcmtk/dcmrt/seq/drtfsss.h ../include/dcmtk/dcmrt/seq/drtgms.h \
+ ../include/dcmtk/dcmrt/seq/drtgmcs.h \
  ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
@@ -26005,7 +26471,10 @@ drttscds.o: drttscds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -26022,9 +26491,9 @@ drttscds.o: drttscds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -26054,8 +26523,6 @@ drttscds.o: drttscds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -26120,7 +26587,10 @@ drttsibs.o: drttsibs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -26137,9 +26607,9 @@ drttsibs.o: drttsibs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -26169,8 +26639,6 @@ drttsibs.o: drttsibs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -26258,7 +26726,10 @@ drttsmds.o: drttsmds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -26275,9 +26746,9 @@ drttsmds.o: drttsmds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -26307,8 +26778,6 @@ drttsmds.o: drttsmds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -26373,7 +26842,10 @@ drttts.o: drttts.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -26390,9 +26862,9 @@ drttts.o: drttts.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -26422,8 +26894,6 @@ drttts.o: drttts.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -26487,7 +26957,10 @@ drttypes.o: drttypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -26505,9 +26978,9 @@ drttypes.o: drttypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -26537,8 +27010,6 @@ drttypes.o: drttypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -26603,7 +27074,10 @@ drtudis.o: drtudis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -26620,9 +27094,9 @@ drtudis.o: drtudis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -26652,8 +27126,6 @@ drtudis.o: drtudis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -26718,7 +27190,10 @@ drtvls.o: drtvls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -26735,9 +27210,9 @@ drtvls.o: drtvls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -26767,8 +27242,6 @@ drtvls.o: drtvls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -26833,7 +27306,10 @@ drtwps.o: drtwps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -26850,9 +27326,9 @@ drtwps.o: drtwps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -26882,8 +27358,6 @@ drtwps.o: drtwps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -26948,7 +27422,10 @@ drtwrs.o: drtwrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -26965,9 +27442,9 @@ drtwrs.o: drtwrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -26997,8 +27474,6 @@ drtwrs.o: drtwrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -27063,7 +27538,10 @@ drtwrsrs.o: drtwrsrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -27080,9 +27558,9 @@ drtwrsrs.o: drtwrsrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -27112,8 +27590,6 @@ drtwrsrs.o: drtwrsrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -27178,7 +27654,10 @@ drtws.o: drtws.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -27195,9 +27674,9 @@ drtws.o: drtws.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -27227,8 +27706,6 @@ drtws.o: drtws.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -27293,7 +27770,10 @@ drtxrs.o: drtxrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -27310,9 +27790,9 @@ drtxrs.o: drtxrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -27342,8 +27822,6 @@ drtxrs.o: drtxrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
diff --git a/dcmrt/libsrc/Makefile.in b/dcmrt/libsrc/Makefile.in
index 56cf836..1268ef7 100644
--- a/dcmrt/libsrc/Makefile.in
+++ b/dcmrt/libsrc/Makefile.in
@@ -31,18 +31,18 @@ objs = drtdose.o drtimage.o drtplan.o drtstrct.o drttreat.o drtionpl.o drtiontr.
 	drtcims.o drtcis.o drtcncs.o drtcos.o drtcpas.o drtcpis.o drtcps.o \
 	drtcsas.o drtcs.o drtcshs.o drtcsis.o drtcss.o drtdcs.o drtdddps.o \
 	drtddps.o drtdias.o drtdimcs.o drtdimrs.o drtdirs.o drtdrs.o drtds.o \
-	drtdspcs.o drtdss.o  drtdvhs.o drtdvrrs.o drteas.o drtecs.o drtes.o \
-	drtfds.o drtfes.o drtfgs.o  drtfgss.o drtfms.o drtfsss.o drtgas.o \
-	drtgpis.o drthsdrs.o drtiais.o drtians.o  drtiblds.o drtibls.o drtibs.o \
-	drticpds.o drticps.o drtics.o drtiis.o  drtipiqs.o drtircs.o drtiseis.o \
-	drtitts.o drtiwps.o drtiws.o drtlsds6.o  drtlsds7.o drtlsds.o drtmacds.o \
-	drtmas.o drtmdrs.o drtmls.o drtmps.o drtmris.o  drtmss.o drtmucs.o \
-	drtoas.o drtois.o drtopis.o drtos.o drtpbcs.o drtpcs.o  drtpcxs.o \
-	drtpdecs.o drtpdeds.o drtpfms.o drtpics.o drtporcs.o drtporis.o \
+	drtdspcs.o drtdss.o drtdvhs.o drtdvrrs.o drteas.o drtecs.o drtes.o \
+	drtfds.o drtfes.o drtfgs.o drtfgss.o drtfms.o drtfsss.o drtgas.o \
+	drtgmcs.o drtgms.o drtgpis.o drthsdrs.o drtiais.o drtians.o drtiblds.o \
+	drtibls.o drtibs.o drticpds.o drticps.o drtics.o drtiis.o drtipiqs.o \
+	drtircs.o drtiseis.o drtitts.o drtiwps.o drtiws.o drtlsds6.o drtlsds7.o \
+	drtlsds.o drtmacds.o drtmas.o drtmdrs.o drtmls.o drtmps.o drtmris.o \
+	drtmss.o drtmucs.o drtoas.o drtois.o drtopis.o drtos.o drtpbcs.o drtpcs.o \
+	drtpcxs.o drtpdecs.o drtpdeds.o drtpfms.o drtpics.o drtporcs.o drtporis.o \
 	drtppcs.o drtprsis.o drtpscs.o drtpsics.o drtpss.o drtpsss.o drtpvis.o \
 	drtqds.o drtras.o drtrbas2.o drtrbas8.o drtrbls.o drtrbos1.o drtrbos6.o \
 	drtrbos7.o drtrbs2.o drtrbs4.o drtrbs8.o drtrcdrs.o drtrcos.o drtrcps.o \
-	drtrcs.o  drtrdros.o drtrdrs1.o drtrdrs6.o drtrdrs8.o drtrds.o drtrecs.o \
+	drtrcs.o drtrdros.o drtrdrs1.o drtrdrs6.o drtrdrs8.o drtrds.o drtrecs.o \
 	drtrfgs.o drtrfors.o drtrics.o drtrims.o drtris.o drtrlsds.o drtrmdrs.o \
 	drtrms.o drtrmss6.o drtrmss7.o drtrpcs.o drtrpis.o drtrppcs.o drtrpphs.o \
 	drtrpps.o drtrppss.o drtrps.o drtrris1.o drtrris6.o drtrris9.o drtrrms.o \
diff --git a/dcmrt/libsrc/drtaadcs.cc b/dcmrt/libsrc/drtaadcs.cc
index f3bb584..16684b6 100644
--- a/dcmrt/libsrc/drtaadcs.cc
+++ b/dcmrt/libsrc/drtaadcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTAssigningAgencyOrDepartmentCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtadcs.cc b/dcmrt/libsrc/drtadcs.cc
index 219c58b..51c68a0 100644
--- a/dcmrt/libsrc/drtadcs.cc
+++ b/dcmrt/libsrc/drtadcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTAdmittingDiagnosesCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtads.cc b/dcmrt/libsrc/drtads.cc
index bf61797..68b183c 100644
--- a/dcmrt/libsrc/drtads.cc
+++ b/dcmrt/libsrc/drtads.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTAdditionalDrugSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtafs.cc b/dcmrt/libsrc/drtafs.cc
index 62f097a..be70b9f 100644
--- a/dcmrt/libsrc/drtafs.cc
+++ b/dcmrt/libsrc/drtafs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTAssigningFacilitySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtags.cc b/dcmrt/libsrc/drtags.cc
index 433089e..19a01f7 100644
--- a/dcmrt/libsrc/drtags.cc
+++ b/dcmrt/libsrc/drtags.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTApplicatorGeometrySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtajcs.cc b/dcmrt/libsrc/drtajcs.cc
index 2081efb..920763d 100644
--- a/dcmrt/libsrc/drtajcs.cc
+++ b/dcmrt/libsrc/drtajcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTAssigningJurisdictionCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtas1.cc b/dcmrt/libsrc/drtas1.cc
index 2aa8fec..a6ed0c5 100644
--- a/dcmrt/libsrc/drtas1.cc
+++ b/dcmrt/libsrc/drtas1.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTApplicatorSequenceInRTBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtas5.cc b/dcmrt/libsrc/drtas5.cc
index 9735968..9033eab 100644
--- a/dcmrt/libsrc/drtas5.cc
+++ b/dcmrt/libsrc/drtas5.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTApplicatorSequenceInRTImageModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtas6.cc b/dcmrt/libsrc/drtas6.cc
index aa84ae0..6eac70b 100644
--- a/dcmrt/libsrc/drtas6.cc
+++ b/dcmrt/libsrc/drtas6.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTApplicatorSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtas7.cc b/dcmrt/libsrc/drtas7.cc
index e2ede8f..492b968 100644
--- a/dcmrt/libsrc/drtas7.cc
+++ b/dcmrt/libsrc/drtas7.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTApplicatorSequenceInRTIonBeamsSessionRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtass.cc b/dcmrt/libsrc/drtass.cc
index 493ed38..2e65a96 100644
--- a/dcmrt/libsrc/drtass.cc
+++ b/dcmrt/libsrc/drtass.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTApplicationSetupSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbads.cc b/dcmrt/libsrc/drtbads.cc
index 2e8f893..22cc9c3 100644
--- a/dcmrt/libsrc/drtbads.cc
+++ b/dcmrt/libsrc/drtbads.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBrachyAccessoryDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbas.cc b/dcmrt/libsrc/drtbas.cc
index 9a4b7f9..b0d6eef 100644
--- a/dcmrt/libsrc/drtbas.cc
+++ b/dcmrt/libsrc/drtbas.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTContrastBolusAgentSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbcps.cc b/dcmrt/libsrc/drtbcps.cc
index cfb8587..5f4eb8f 100644
--- a/dcmrt/libsrc/drtbcps.cc
+++ b/dcmrt/libsrc/drtbcps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBrachyControlPointSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbl2.cc b/dcmrt/libsrc/drtbl2.cc
index 2a0827a..ef603bd 100644
--- a/dcmrt/libsrc/drtbl2.cc
+++ b/dcmrt/libsrc/drtbl2.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBlockSequenceInRTBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbl5.cc b/dcmrt/libsrc/drtbl5.cc
index 49ea79e..7c3bd78 100644
--- a/dcmrt/libsrc/drtbl5.cc
+++ b/dcmrt/libsrc/drtbl5.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBlockSequenceInRTImageModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbldls.cc b/dcmrt/libsrc/drtbldls.cc
index de92e87..3225854 100644
--- a/dcmrt/libsrc/drtbldls.cc
+++ b/dcmrt/libsrc/drtbldls.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBeamLimitingDeviceLeafPairsSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbldps.cc b/dcmrt/libsrc/drtbldps.cc
index 033fb9e..19f41a3 100644
--- a/dcmrt/libsrc/drtbldps.cc
+++ b/dcmrt/libsrc/drtbldps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBeamLimitingDevicePositionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtblds1.cc b/dcmrt/libsrc/drtblds1.cc
index 2321be3..4a0ecce 100644
--- a/dcmrt/libsrc/drtblds1.cc
+++ b/dcmrt/libsrc/drtblds1.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBeamLimitingDeviceSequenceInRTBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtblds5.cc b/dcmrt/libsrc/drtblds5.cc
index 2c00892..31bb684 100644
--- a/dcmrt/libsrc/drtblds5.cc
+++ b/dcmrt/libsrc/drtblds5.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBeamLimitingDeviceSequenceInRTImageModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtblds6.cc b/dcmrt/libsrc/drtblds6.cc
index c85c630..12a375f 100644
--- a/dcmrt/libsrc/drtblds6.cc
+++ b/dcmrt/libsrc/drtblds6.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBeamLimitingDeviceSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbldts.cc b/dcmrt/libsrc/drtbldts.cc
index d51fafe..4410394 100644
--- a/dcmrt/libsrc/drtbldts.cc
+++ b/dcmrt/libsrc/drtbldts.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBeamLimitingDeviceToleranceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbrcss.cc b/dcmrt/libsrc/drtbrcss.cc
index 62260ea..a52a4aa 100644
--- a/dcmrt/libsrc/drtbrcss.cc
+++ b/dcmrt/libsrc/drtbrcss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBreedRegistryCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbrdrs.cc b/dcmrt/libsrc/drtbrdrs.cc
index 453dc1b..c252cd4 100644
--- a/dcmrt/libsrc/drtbrdrs.cc
+++ b/dcmrt/libsrc/drtbrdrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBrachyReferencedDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbrs.cc b/dcmrt/libsrc/drtbrs.cc
index 6f9ddd5..d4b2a2b 100644
--- a/dcmrt/libsrc/drtbrs.cc
+++ b/dcmrt/libsrc/drtbrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBreedRegistrationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbs.cc b/dcmrt/libsrc/drtbs.cc
index 92c81dc..9d3a040 100644
--- a/dcmrt/libsrc/drtbs.cc
+++ b/dcmrt/libsrc/drtbs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBeamSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbss.cc b/dcmrt/libsrc/drtbss.cc
index 2851f37..8cc439e 100644
--- a/dcmrt/libsrc/drtbss.cc
+++ b/dcmrt/libsrc/drtbss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBlockSlabSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtbvcps.cc b/dcmrt/libsrc/drtbvcps.cc
index 7fc18c1..2b66d22 100644
--- a/dcmrt/libsrc/drtbvcps.cc
+++ b/dcmrt/libsrc/drtbvcps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTBeamDoseVerificationControlPointSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcbars.cc b/dcmrt/libsrc/drtcbars.cc
index 911e630..6167fb1 100644
--- a/dcmrt/libsrc/drtcbars.cc
+++ b/dcmrt/libsrc/drtcbars.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTContrastBolusAdministrationRouteSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtccs.cc b/dcmrt/libsrc/drtccs.cc
index 545c6f8..f39d553 100644
--- a/dcmrt/libsrc/drtccs.cc
+++ b/dcmrt/libsrc/drtccs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTConceptCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcctus.cc b/dcmrt/libsrc/drtcctus.cc
index bc56cdc..a18f1bf 100644
--- a/dcmrt/libsrc/drtcctus.cc
+++ b/dcmrt/libsrc/drtcctus.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTConsentForClinicalTrialUseSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcdrs.cc b/dcmrt/libsrc/drtcdrs.cc
index d12447d..10348ca 100644
--- a/dcmrt/libsrc/drtcdrs.cc
+++ b/dcmrt/libsrc/drtcdrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTCalculatedDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtces.cc b/dcmrt/libsrc/drtces.cc
index 55a0f78..ac1cbb6 100644
--- a/dcmrt/libsrc/drtces.cc
+++ b/dcmrt/libsrc/drtces.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTContributingEquipmentSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcgis.cc b/dcmrt/libsrc/drtcgis.cc
index 48259b1..9d0f53b 100644
--- a/dcmrt/libsrc/drtcgis.cc
+++ b/dcmrt/libsrc/drtcgis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTContextGroupIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtchs.cc b/dcmrt/libsrc/drtchs.cc
index cc4524c..43a1be0 100644
--- a/dcmrt/libsrc/drtchs.cc
+++ b/dcmrt/libsrc/drtchs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTChannelSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcims.cc b/dcmrt/libsrc/drtcims.cc
index c3306a6..1590dd5 100644
--- a/dcmrt/libsrc/drtcims.cc
+++ b/dcmrt/libsrc/drtcims.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTContentItemModifierSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcis.cc b/dcmrt/libsrc/drtcis.cc
index 07f482e..60dd32a 100644
--- a/dcmrt/libsrc/drtcis.cc
+++ b/dcmrt/libsrc/drtcis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTContourImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcncs.cc b/dcmrt/libsrc/drtcncs.cc
index 7bc5014..94128f1 100644
--- a/dcmrt/libsrc/drtcncs.cc
+++ b/dcmrt/libsrc/drtcncs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTConceptNameCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcos.cc b/dcmrt/libsrc/drtcos.cc
index faa96fc..732c80a 100644
--- a/dcmrt/libsrc/drtcos.cc
+++ b/dcmrt/libsrc/drtcos.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTCompensatorSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcpas.cc b/dcmrt/libsrc/drtcpas.cc
index 99f7292..741f1fb 100644
--- a/dcmrt/libsrc/drtcpas.cc
+++ b/dcmrt/libsrc/drtcpas.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTCorrectedParameterSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcpis.cc b/dcmrt/libsrc/drtcpis.cc
index c6914ff..e714547 100644
--- a/dcmrt/libsrc/drtcpis.cc
+++ b/dcmrt/libsrc/drtcpis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTConsultingPhysicianIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcps.cc b/dcmrt/libsrc/drtcps.cc
index 241aac6..e9c5349 100644
--- a/dcmrt/libsrc/drtcps.cc
+++ b/dcmrt/libsrc/drtcps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTControlPointSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcs.cc b/dcmrt/libsrc/drtcs.cc
index e373b25..c818ce6 100644
--- a/dcmrt/libsrc/drtcs.cc
+++ b/dcmrt/libsrc/drtcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTContourSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcsas.cc b/dcmrt/libsrc/drtcsas.cc
index 0a6278e..11864a3 100644
--- a/dcmrt/libsrc/drtcsas.cc
+++ b/dcmrt/libsrc/drtcsas.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTConversionSourceAttributesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcshs.cc b/dcmrt/libsrc/drtcshs.cc
index 1a740da..5ab6ba2 100644
--- a/dcmrt/libsrc/drtcshs.cc
+++ b/dcmrt/libsrc/drtcshs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTChannelShieldSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcsis.cc b/dcmrt/libsrc/drtcsis.cc
index 8a0c89b..40bf8f4 100644
--- a/dcmrt/libsrc/drtcsis.cc
+++ b/dcmrt/libsrc/drtcsis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTCodingSchemeIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtcss.cc b/dcmrt/libsrc/drtcss.cc
index bf751dc..be2ebd8 100644
--- a/dcmrt/libsrc/drtcss.cc
+++ b/dcmrt/libsrc/drtcss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTChannelSourceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtdcs.cc b/dcmrt/libsrc/drtdcs.cc
index 19ec8f8..17a2dbf 100644
--- a/dcmrt/libsrc/drtdcs.cc
+++ b/dcmrt/libsrc/drtdcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTDerivationCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtdddps.cc b/dcmrt/libsrc/drtdddps.cc
index e83e45b..4ad8965 100644
--- a/dcmrt/libsrc/drtdddps.cc
+++ b/dcmrt/libsrc/drtdddps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTDeliveredDepthDoseParametersSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtddps.cc b/dcmrt/libsrc/drtddps.cc
index c6c14cd..92b3bb1 100644
--- a/dcmrt/libsrc/drtddps.cc
+++ b/dcmrt/libsrc/drtddps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTDepthDoseParametersSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtdias.cc b/dcmrt/libsrc/drtdias.cc
index 2bf0975..a474ac8 100644
--- a/dcmrt/libsrc/drtdias.cc
+++ b/dcmrt/libsrc/drtdias.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTDeidentificationActionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtdimcs.cc b/dcmrt/libsrc/drtdimcs.cc
index 34e3c04..1b924b8 100644
--- a/dcmrt/libsrc/drtdimcs.cc
+++ b/dcmrt/libsrc/drtdimcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTDeidentificationMethodCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtdimrs.cc b/dcmrt/libsrc/drtdimrs.cc
index fde7162..b85ed7d 100644
--- a/dcmrt/libsrc/drtdimrs.cc
+++ b/dcmrt/libsrc/drtdimrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTDICOMMediaRetrievalSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtdirs.cc b/dcmrt/libsrc/drtdirs.cc
index 9e75110..b7cd79c 100644
--- a/dcmrt/libsrc/drtdirs.cc
+++ b/dcmrt/libsrc/drtdirs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTDICOMRetrievalSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtdose.cc b/dcmrt/libsrc/drtdose.cc
index 64e76b3..c29c115 100644
--- a/dcmrt/libsrc/drtdose.cc
+++ b/dcmrt/libsrc/drtdose.cc
@@ -6,8 +6,9 @@
  *
  *  Source file for class DRTDoseIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
+ *  Last modified on 2017-06-15 by Riesmeier
  *
  */
 
@@ -31,7 +32,7 @@ DRTDoseIOD::DRTDoseIOD()
     QualityControlSubject(DCM_QualityControlSubject),
     ReferencedPatientSequence(),
     PatientBirthTime(DCM_PatientBirthTime),
-    OtherPatientIDs(DCM_OtherPatientIDs),
+    OtherPatientIDs(DCM_RETIRED_OtherPatientIDs),
     OtherPatientIDsSequence(),
     OtherPatientNames(DCM_OtherPatientNames),
     EthnicGroup(DCM_EthnicGroup),
@@ -46,6 +47,7 @@ DRTDoseIOD::DRTDoseIOD()
     StrainCodeSequence(),
     StrainAdditionalInformation(DCM_StrainAdditionalInformation),
     StrainStockSequence(),
+    GeneticModificationsSequence(),
     ResponsiblePerson(DCM_ResponsiblePerson),
     ResponsiblePersonRole(DCM_ResponsiblePersonRole),
     ResponsibleOrganization(DCM_ResponsibleOrganization),
@@ -311,6 +313,7 @@ DRTDoseIOD::DRTDoseIOD(const DRTDoseIOD &copy)
     StrainCodeSequence(copy.StrainCodeSequence),
     StrainAdditionalInformation(copy.StrainAdditionalInformation),
     StrainStockSequence(copy.StrainStockSequence),
+    GeneticModificationsSequence(copy.GeneticModificationsSequence),
     ResponsiblePerson(copy.ResponsiblePerson),
     ResponsiblePersonRole(copy.ResponsiblePersonRole),
     ResponsibleOrganization(copy.ResponsibleOrganization),
@@ -582,6 +585,7 @@ DRTDoseIOD &DRTDoseIOD::operator=(const DRTDoseIOD &copy)
         StrainCodeSequence = copy.StrainCodeSequence;
         StrainAdditionalInformation = copy.StrainAdditionalInformation;
         StrainStockSequence = copy.StrainStockSequence;
+        GeneticModificationsSequence = copy.GeneticModificationsSequence;
         ResponsiblePerson = copy.ResponsiblePerson;
         ResponsiblePersonRole = copy.ResponsiblePersonRole;
         ResponsibleOrganization = copy.ResponsibleOrganization;
@@ -848,6 +852,7 @@ void DRTDoseIOD::clear()
     StrainCodeSequence.clear();
     StrainAdditionalInformation.clear();
     StrainStockSequence.clear();
+    GeneticModificationsSequence.clear();
     ResponsiblePerson.clear();
     ResponsiblePersonRole.clear();
     ResponsibleOrganization.clear();
@@ -1396,6 +1401,7 @@ OFCondition DRTDoseIOD::readPatientData(DcmItem &dataset)
     StrainCodeSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, StrainAdditionalInformation, "1", "3", "PatientModule");
     StrainStockSequence.read(dataset, "1-n", "3", "PatientModule");
+    GeneticModificationsSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePerson, "1", "2C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePersonRole, "1", "1C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsibleOrganization, "1", "2C", "PatientModule");
@@ -1567,6 +1573,7 @@ OFCondition DRTDoseIOD::write(DcmItem &dataset)
         if (result.good()) result = StrainCodeSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmUnlimitedText(StrainAdditionalInformation), "1", "3", "PatientModule");
         if (result.good()) result = StrainStockSequence.write(dataset, "1-n" ,"3", "PatientModule");
+        if (result.good()) result = GeneticModificationsSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmPersonName(ResponsiblePerson), "1", "2C", "PatientModule");
         addElementToDataset(result, dataset, new DcmCodeString(ResponsiblePersonRole), "1", "1C", "PatientModule");
         addElementToDataset(result, dataset, new DcmLongString(ResponsibleOrganization), "1", "2C", "PatientModule");
diff --git a/dcmrt/libsrc/drtdrs.cc b/dcmrt/libsrc/drtdrs.cc
index f2788da..dc11e75 100644
--- a/dcmrt/libsrc/drtdrs.cc
+++ b/dcmrt/libsrc/drtdrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtds.cc b/dcmrt/libsrc/drtds.cc
index 42392af..0b76ad6 100644
--- a/dcmrt/libsrc/drtds.cc
+++ b/dcmrt/libsrc/drtds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtdspcs.cc b/dcmrt/libsrc/drtdspcs.cc
index b48baf6..a5cd3a9 100644
--- a/dcmrt/libsrc/drtdspcs.cc
+++ b/dcmrt/libsrc/drtdspcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTDigitalSignaturePurposeCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtdss.cc b/dcmrt/libsrc/drtdss.cc
index 9e67c62..d9a64eb 100644
--- a/dcmrt/libsrc/drtdss.cc
+++ b/dcmrt/libsrc/drtdss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTDigitalSignaturesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtdvhs.cc b/dcmrt/libsrc/drtdvhs.cc
index 933ef2d..1498eee 100644
--- a/dcmrt/libsrc/drtdvhs.cc
+++ b/dcmrt/libsrc/drtdvhs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTDVHSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtdvrrs.cc b/dcmrt/libsrc/drtdvrrs.cc
index 933f6a1..9f09950 100644
--- a/dcmrt/libsrc/drtdvrrs.cc
+++ b/dcmrt/libsrc/drtdvrrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTDVHReferencedROISequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drteas.cc b/dcmrt/libsrc/drteas.cc
index f21e814..a87abfe 100644
--- a/dcmrt/libsrc/drteas.cc
+++ b/dcmrt/libsrc/drteas.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTEncryptedAttributesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtecs.cc b/dcmrt/libsrc/drtecs.cc
index 8a509db..530a87c 100644
--- a/dcmrt/libsrc/drtecs.cc
+++ b/dcmrt/libsrc/drtecs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTEquivalentCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtes.cc b/dcmrt/libsrc/drtes.cc
index 5bcc618..168d534 100644
--- a/dcmrt/libsrc/drtes.cc
+++ b/dcmrt/libsrc/drtes.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTExposureSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtfds.cc b/dcmrt/libsrc/drtfds.cc
index 739b0db..fcb7245 100644
--- a/dcmrt/libsrc/drtfds.cc
+++ b/dcmrt/libsrc/drtfds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTFixationDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtfes.cc b/dcmrt/libsrc/drtfes.cc
index 2bf715e..22c9efc 100644
--- a/dcmrt/libsrc/drtfes.cc
+++ b/dcmrt/libsrc/drtfes.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTFrameExtractionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtfgs.cc b/dcmrt/libsrc/drtfgs.cc
index 5d5f35a..5294e46 100644
--- a/dcmrt/libsrc/drtfgs.cc
+++ b/dcmrt/libsrc/drtfgs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTFractionGroupSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtfgss.cc b/dcmrt/libsrc/drtfgss.cc
index 4735565..563b6f6 100644
--- a/dcmrt/libsrc/drtfgss.cc
+++ b/dcmrt/libsrc/drtfgss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTFractionGroupSummarySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtfms.cc b/dcmrt/libsrc/drtfms.cc
index 56b3660..88cbf35 100644
--- a/dcmrt/libsrc/drtfms.cc
+++ b/dcmrt/libsrc/drtfms.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTFluenceMapSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtfsss.cc b/dcmrt/libsrc/drtfsss.cc
index 79f9d82..fc8d26d 100644
--- a/dcmrt/libsrc/drtfsss.cc
+++ b/dcmrt/libsrc/drtfsss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTFractionStatusSummarySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtgas.cc b/dcmrt/libsrc/drtgas.cc
index e54dbeb..84fd9d7 100644
--- a/dcmrt/libsrc/drtgas.cc
+++ b/dcmrt/libsrc/drtgas.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTGeneralAccessorySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtpics.cc b/dcmrt/libsrc/drtgmcs.cc
similarity index 78%
copy from dcmrt/libsrc/drtpics.cc
copy to dcmrt/libsrc/drtgmcs.cc
index 18c9066..6e81ca2 100644
--- a/dcmrt/libsrc/drtpics.cc
+++ b/dcmrt/libsrc/drtgmcs.cc
@@ -4,22 +4,22 @@
  *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
- *  Source file for class DRTPersonIdentificationCodeSequence
+ *  Source file for class DRTGeneticModificationsCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
 
 #include "dcmtk/config/osconfig.h"     // make sure OS specific configuration is included first
 
-#include "dcmtk/dcmrt/seq/drtpics.h"
+#include "dcmtk/dcmrt/seq/drtgmcs.h"
 
 
 // --- item class ---
 
-DRTPersonIdentificationCodeSequence::Item::Item(const OFBool emptyDefaultItem)
+DRTGeneticModificationsCodeSequence::Item::Item(const OFBool emptyDefaultItem)
   : EmptyDefaultItem(emptyDefaultItem),
     CodeMeaning(DCM_CodeMeaning),
     CodeValue(DCM_CodeValue),
@@ -41,7 +41,7 @@ DRTPersonIdentificationCodeSequence::Item::Item(const OFBool emptyDefaultItem)
 }
 
 
-DRTPersonIdentificationCodeSequence::Item::Item(const Item &copy)
+DRTGeneticModificationsCodeSequence::Item::Item(const Item &copy)
   : EmptyDefaultItem(copy.EmptyDefaultItem),
     CodeMeaning(copy.CodeMeaning),
     CodeValue(copy.CodeValue),
@@ -63,12 +63,12 @@ DRTPersonIdentificationCodeSequence::Item::Item(const Item &copy)
 }
 
 
-DRTPersonIdentificationCodeSequence::Item::~Item()
+DRTGeneticModificationsCodeSequence::Item::~Item()
 {
 }
 
 
-DRTPersonIdentificationCodeSequence::Item &DRTPersonIdentificationCodeSequence::Item::operator=(const Item &copy)
+DRTGeneticModificationsCodeSequence::Item &DRTGeneticModificationsCodeSequence::Item::operator=(const Item &copy)
 {
     if (this != &copy)
     {
@@ -94,7 +94,7 @@ DRTPersonIdentificationCodeSequence::Item &DRTPersonIdentificationCodeSequence::
 }
 
 
-void DRTPersonIdentificationCodeSequence::Item::clear()
+void DRTGeneticModificationsCodeSequence::Item::clear()
 {
     if (!EmptyDefaultItem)
     {
@@ -119,7 +119,7 @@ void DRTPersonIdentificationCodeSequence::Item::clear()
 }
 
 
-OFBool DRTPersonIdentificationCodeSequence::Item::isEmpty()
+OFBool DRTGeneticModificationsCodeSequence::Item::isEmpty()
 {
     return CodeValue.isEmpty() &&
            CodingSchemeDesignator.isEmpty() &&
@@ -140,69 +140,69 @@ OFBool DRTPersonIdentificationCodeSequence::Item::isEmpty()
 }
 
 
-OFBool DRTPersonIdentificationCodeSequence::Item::isValid() const
+OFBool DRTGeneticModificationsCodeSequence::Item::isValid() const
 {
     return !EmptyDefaultItem;
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::read(DcmItem &item)
+OFCondition DRTGeneticModificationsCodeSequence::Item::read(DcmItem &item)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
     {
         /* re-initialize object */
         clear();
-        getAndCheckElementFromDataset(item, CodeValue, "1", "1C", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, CodingSchemeDesignator, "1", "1C", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, CodingSchemeVersion, "1", "1C", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, CodeMeaning, "1", "1", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, LongCodeValue, "1", "1C", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, URNCodeValue, "1", "1C", "PersonIdentificationCodeSequence");
-        EquivalentCodeSequence.read(item, "1-n", "3", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, ContextIdentifier, "1", "3", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, ContextUID, "1", "3", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, MappingResource, "1", "1C", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, MappingResourceUID, "1", "3", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, MappingResourceName, "1", "3", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, ContextGroupVersion, "1", "1C", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, ContextGroupExtensionFlag, "1", "3", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, ContextGroupLocalVersion, "1", "1C", "PersonIdentificationCodeSequence");
-        getAndCheckElementFromDataset(item, ContextGroupExtensionCreatorUID, "1", "1C", "PersonIdentificationCodeSequence");
+        getAndCheckElementFromDataset(item, CodeValue, "1", "1C", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, CodingSchemeDesignator, "1", "1C", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, CodingSchemeVersion, "1", "1C", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, CodeMeaning, "1", "1", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, LongCodeValue, "1", "1C", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, URNCodeValue, "1", "1C", "GeneticModificationsCodeSequence");
+        EquivalentCodeSequence.read(item, "1-n", "3", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, ContextIdentifier, "1", "3", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, ContextUID, "1", "3", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, MappingResource, "1", "1C", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, MappingResourceUID, "1", "3", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, MappingResourceName, "1", "3", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, ContextGroupVersion, "1", "1C", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, ContextGroupExtensionFlag, "1", "3", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, ContextGroupLocalVersion, "1", "1C", "GeneticModificationsCodeSequence");
+        getAndCheckElementFromDataset(item, ContextGroupExtensionCreatorUID, "1", "1C", "GeneticModificationsCodeSequence");
         result = EC_Normal;
     }
     return result;
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::write(DcmItem &item)
+OFCondition DRTGeneticModificationsCodeSequence::Item::write(DcmItem &item)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
     {
         result = EC_Normal;
-        addElementToDataset(result, item, new DcmShortString(CodeValue), "1", "1C", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmShortString(CodingSchemeDesignator), "1", "1C", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmShortString(CodingSchemeVersion), "1", "1C", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmLongString(CodeMeaning), "1", "1", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmUnlimitedCharacters(LongCodeValue), "1", "1C", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmUniversalResourceIdentifierOrLocator(URNCodeValue), "1", "1C", "PersonIdentificationCodeSequence");
-        if (result.good()) result = EquivalentCodeSequence.write(item, "1-n", "3", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmCodeString(ContextIdentifier), "1", "3", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmUniqueIdentifier(ContextUID), "1", "3", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmCodeString(MappingResource), "1", "1C", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmUniqueIdentifier(MappingResourceUID), "1", "3", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmLongString(MappingResourceName), "1", "3", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmDateTime(ContextGroupVersion), "1", "1C", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmCodeString(ContextGroupExtensionFlag), "1", "3", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmDateTime(ContextGroupLocalVersion), "1", "1C", "PersonIdentificationCodeSequence");
-        addElementToDataset(result, item, new DcmUniqueIdentifier(ContextGroupExtensionCreatorUID), "1", "1C", "PersonIdentificationCodeSequence");
+        addElementToDataset(result, item, new DcmShortString(CodeValue), "1", "1C", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmShortString(CodingSchemeDesignator), "1", "1C", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmShortString(CodingSchemeVersion), "1", "1C", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmLongString(CodeMeaning), "1", "1", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmUnlimitedCharacters(LongCodeValue), "1", "1C", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmUniversalResourceIdentifierOrLocator(URNCodeValue), "1", "1C", "GeneticModificationsCodeSequence");
+        if (result.good()) result = EquivalentCodeSequence.write(item, "1-n", "3", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmCodeString(ContextIdentifier), "1", "3", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmUniqueIdentifier(ContextUID), "1", "3", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmCodeString(MappingResource), "1", "1C", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmUniqueIdentifier(MappingResourceUID), "1", "3", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmLongString(MappingResourceName), "1", "3", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmDateTime(ContextGroupVersion), "1", "1C", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmCodeString(ContextGroupExtensionFlag), "1", "3", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmDateTime(ContextGroupLocalVersion), "1", "1C", "GeneticModificationsCodeSequence");
+        addElementToDataset(result, item, new DcmUniqueIdentifier(ContextGroupExtensionCreatorUID), "1", "1C", "GeneticModificationsCodeSequence");
     }
     return result;
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getCodeMeaning(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getCodeMeaning(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -211,7 +211,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getCodeMeaning(OFString &
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getCodeValue(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getCodeValue(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -220,7 +220,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getCodeValue(OFString &va
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getCodingSchemeDesignator(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getCodingSchemeDesignator(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -229,7 +229,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getCodingSchemeDesignator
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getCodingSchemeVersion(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getCodingSchemeVersion(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -238,7 +238,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getCodingSchemeVersion(OF
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getContextGroupExtensionCreatorUID(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getContextGroupExtensionCreatorUID(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -247,7 +247,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getContextGroupExtensionC
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getContextGroupExtensionFlag(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getContextGroupExtensionFlag(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -256,7 +256,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getContextGroupExtensionF
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getContextGroupLocalVersion(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getContextGroupLocalVersion(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -265,7 +265,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getContextGroupLocalVersi
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getContextGroupVersion(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getContextGroupVersion(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -274,7 +274,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getContextGroupVersion(OF
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getContextIdentifier(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getContextIdentifier(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -283,7 +283,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getContextIdentifier(OFSt
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getContextUID(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getContextUID(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -292,7 +292,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getContextUID(OFString &v
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getLongCodeValue(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getLongCodeValue(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -301,7 +301,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getLongCodeValue(OFString
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getMappingResource(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getMappingResource(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -310,7 +310,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getMappingResource(OFStri
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getMappingResourceName(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getMappingResourceName(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -319,7 +319,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getMappingResourceName(OF
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getMappingResourceUID(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getMappingResourceUID(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -328,7 +328,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getMappingResourceUID(OFS
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::getURNCodeValue(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsCodeSequence::Item::getURNCodeValue(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
@@ -337,7 +337,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::getURNCodeValue(OFString
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setCodeMeaning(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setCodeMeaning(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -350,7 +350,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setCodeMeaning(const OFSt
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setCodeValue(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setCodeValue(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -363,7 +363,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setCodeValue(const OFStri
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setCodingSchemeDesignator(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setCodingSchemeDesignator(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -376,7 +376,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setCodingSchemeDesignator
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setCodingSchemeVersion(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setCodingSchemeVersion(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -389,7 +389,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setCodingSchemeVersion(co
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setContextGroupExtensionCreatorUID(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setContextGroupExtensionCreatorUID(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -402,7 +402,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setContextGroupExtensionC
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setContextGroupExtensionFlag(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setContextGroupExtensionFlag(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -415,7 +415,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setContextGroupExtensionF
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setContextGroupLocalVersion(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setContextGroupLocalVersion(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -428,7 +428,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setContextGroupLocalVersi
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setContextGroupVersion(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setContextGroupVersion(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -441,7 +441,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setContextGroupVersion(co
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setContextIdentifier(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setContextIdentifier(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -454,7 +454,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setContextIdentifier(cons
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setContextUID(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setContextUID(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -467,7 +467,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setContextUID(const OFStr
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setLongCodeValue(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setLongCodeValue(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -480,7 +480,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setLongCodeValue(const OF
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setMappingResource(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setMappingResource(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -493,7 +493,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setMappingResource(const
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setMappingResourceName(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setMappingResourceName(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -506,7 +506,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setMappingResourceName(co
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setMappingResourceUID(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setMappingResourceUID(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -519,7 +519,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setMappingResourceUID(con
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::Item::setURNCodeValue(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsCodeSequence::Item::setURNCodeValue(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
@@ -534,7 +534,7 @@ OFCondition DRTPersonIdentificationCodeSequence::Item::setURNCodeValue(const OFS
 
 // --- sequence class ---
 
-DRTPersonIdentificationCodeSequence::DRTPersonIdentificationCodeSequence(const OFBool emptyDefaultSequence)
+DRTGeneticModificationsCodeSequence::DRTGeneticModificationsCodeSequence(const OFBool emptyDefaultSequence)
   : EmptyDefaultSequence(emptyDefaultSequence),
     SequenceOfItems(),
     CurrentItem(),
@@ -544,7 +544,7 @@ DRTPersonIdentificationCodeSequence::DRTPersonIdentificationCodeSequence(const O
 }
 
 
-DRTPersonIdentificationCodeSequence::DRTPersonIdentificationCodeSequence(const DRTPersonIdentificationCodeSequence &copy)
+DRTGeneticModificationsCodeSequence::DRTGeneticModificationsCodeSequence(const DRTGeneticModificationsCodeSequence &copy)
   : EmptyDefaultSequence(copy.EmptyDefaultSequence),
     SequenceOfItems(),
     CurrentItem(),
@@ -570,7 +570,7 @@ DRTPersonIdentificationCodeSequence::DRTPersonIdentificationCodeSequence(const D
 }
 
 
-DRTPersonIdentificationCodeSequence &DRTPersonIdentificationCodeSequence::operator=(const DRTPersonIdentificationCodeSequence &copy)
+DRTGeneticModificationsCodeSequence &DRTGeneticModificationsCodeSequence::operator=(const DRTGeneticModificationsCodeSequence &copy)
 {
     if (this != &copy)
     {
@@ -598,13 +598,13 @@ DRTPersonIdentificationCodeSequence &DRTPersonIdentificationCodeSequence::operat
 }
 
 
-DRTPersonIdentificationCodeSequence::~DRTPersonIdentificationCodeSequence()
+DRTGeneticModificationsCodeSequence::~DRTGeneticModificationsCodeSequence()
 {
     clear();
 }
 
 
-void DRTPersonIdentificationCodeSequence::clear()
+void DRTGeneticModificationsCodeSequence::clear()
 {
     if (!EmptyDefaultSequence)
     {
@@ -623,25 +623,25 @@ void DRTPersonIdentificationCodeSequence::clear()
 }
 
 
-OFBool DRTPersonIdentificationCodeSequence::isEmpty()
+OFBool DRTGeneticModificationsCodeSequence::isEmpty()
 {
     return SequenceOfItems.empty();
 }
 
 
-OFBool DRTPersonIdentificationCodeSequence::isValid() const
+OFBool DRTGeneticModificationsCodeSequence::isValid() const
 {
     return !EmptyDefaultSequence;
 }
 
 
-size_t DRTPersonIdentificationCodeSequence::getNumberOfItems() const
+size_t DRTGeneticModificationsCodeSequence::getNumberOfItems() const
 {
     return SequenceOfItems.size();
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::gotoFirstItem()
+OFCondition DRTGeneticModificationsCodeSequence::gotoFirstItem()
 {
     OFCondition result = EC_IllegalCall;
     if (!SequenceOfItems.empty())
@@ -653,7 +653,7 @@ OFCondition DRTPersonIdentificationCodeSequence::gotoFirstItem()
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::gotoNextItem()
+OFCondition DRTGeneticModificationsCodeSequence::gotoNextItem()
 {
     OFCondition result = EC_IllegalCall;
     if (CurrentItem != SequenceOfItems.end())
@@ -665,7 +665,7 @@ OFCondition DRTPersonIdentificationCodeSequence::gotoNextItem()
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::gotoItem(const size_t num, OFListIterator(Item *) &iterator)
+OFCondition DRTGeneticModificationsCodeSequence::gotoItem(const size_t num, OFListIterator(Item *) &iterator)
 {
     OFCondition result = EC_IllegalCall;
     if (!SequenceOfItems.empty())
@@ -685,7 +685,7 @@ OFCondition DRTPersonIdentificationCodeSequence::gotoItem(const size_t num, OFLi
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::gotoItem(const size_t num, OFListConstIterator(Item *) &iterator) const
+OFCondition DRTGeneticModificationsCodeSequence::gotoItem(const size_t num, OFListConstIterator(Item *) &iterator) const
 {
     OFCondition result = EC_IllegalCall;
     if (!SequenceOfItems.empty())
@@ -705,13 +705,13 @@ OFCondition DRTPersonIdentificationCodeSequence::gotoItem(const size_t num, OFLi
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::gotoItem(const size_t num)
+OFCondition DRTGeneticModificationsCodeSequence::gotoItem(const size_t num)
 {
     return gotoItem(num, CurrentItem);
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::getCurrentItem(Item *&item) const
+OFCondition DRTGeneticModificationsCodeSequence::getCurrentItem(Item *&item) const
 {
     OFCondition result = EC_IllegalCall;
     if (CurrentItem != SequenceOfItems.end())
@@ -723,7 +723,7 @@ OFCondition DRTPersonIdentificationCodeSequence::getCurrentItem(Item *&item) con
 }
 
 
-DRTPersonIdentificationCodeSequence::Item &DRTPersonIdentificationCodeSequence::getCurrentItem()
+DRTGeneticModificationsCodeSequence::Item &DRTGeneticModificationsCodeSequence::getCurrentItem()
 {
     if (CurrentItem != SequenceOfItems.end())
         return **CurrentItem;
@@ -732,7 +732,7 @@ DRTPersonIdentificationCodeSequence::Item &DRTPersonIdentificationCodeSequence::
 }
 
 
-const DRTPersonIdentificationCodeSequence::Item &DRTPersonIdentificationCodeSequence::getCurrentItem() const
+const DRTGeneticModificationsCodeSequence::Item &DRTGeneticModificationsCodeSequence::getCurrentItem() const
 {
     if (CurrentItem != SequenceOfItems.end())
         return **CurrentItem;
@@ -741,7 +741,7 @@ const DRTPersonIdentificationCodeSequence::Item &DRTPersonIdentificationCodeSequ
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::getItem(const size_t num, Item *&item)
+OFCondition DRTGeneticModificationsCodeSequence::getItem(const size_t num, Item *&item)
 {
     OFListIterator(Item *) iterator;
     OFCondition result = gotoItem(num, iterator);
@@ -751,7 +751,7 @@ OFCondition DRTPersonIdentificationCodeSequence::getItem(const size_t num, Item
 }
 
 
-DRTPersonIdentificationCodeSequence::Item &DRTPersonIdentificationCodeSequence::getItem(const size_t num)
+DRTGeneticModificationsCodeSequence::Item &DRTGeneticModificationsCodeSequence::getItem(const size_t num)
 {
     OFListIterator(Item *) iterator;
     if (gotoItem(num, iterator).good())
@@ -761,7 +761,7 @@ DRTPersonIdentificationCodeSequence::Item &DRTPersonIdentificationCodeSequence::
 }
 
 
-const DRTPersonIdentificationCodeSequence::Item &DRTPersonIdentificationCodeSequence::getItem(const size_t num) const
+const DRTGeneticModificationsCodeSequence::Item &DRTGeneticModificationsCodeSequence::getItem(const size_t num) const
 {
     OFListConstIterator(Item *) iterator;
     if (gotoItem(num, iterator).good())
@@ -771,19 +771,19 @@ const DRTPersonIdentificationCodeSequence::Item &DRTPersonIdentificationCodeSequ
 }
 
 
-DRTPersonIdentificationCodeSequence::Item &DRTPersonIdentificationCodeSequence::operator[](const size_t num)
+DRTGeneticModificationsCodeSequence::Item &DRTGeneticModificationsCodeSequence::operator[](const size_t num)
 {
     return getItem(num);
 }
 
 
-const DRTPersonIdentificationCodeSequence::Item &DRTPersonIdentificationCodeSequence::operator[](const size_t num) const
+const DRTGeneticModificationsCodeSequence::Item &DRTGeneticModificationsCodeSequence::operator[](const size_t num) const
 {
     return getItem(num);
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::addItem(Item *&item)
+OFCondition DRTGeneticModificationsCodeSequence::addItem(Item *&item)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultSequence)
@@ -800,7 +800,7 @@ OFCondition DRTPersonIdentificationCodeSequence::addItem(Item *&item)
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::insertItem(const size_t pos, Item *&item)
+OFCondition DRTGeneticModificationsCodeSequence::insertItem(const size_t pos, Item *&item)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultSequence)
@@ -823,7 +823,7 @@ OFCondition DRTPersonIdentificationCodeSequence::insertItem(const size_t pos, It
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::removeItem(const size_t pos)
+OFCondition DRTGeneticModificationsCodeSequence::removeItem(const size_t pos)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultSequence)
@@ -841,7 +841,7 @@ OFCondition DRTPersonIdentificationCodeSequence::removeItem(const size_t pos)
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::read(DcmItem &dataset,
+OFCondition DRTGeneticModificationsCodeSequence::read(DcmItem &dataset,
                                                       const OFString &card,
                                                       const OFString &type,
                                                       const char *moduleName)
@@ -853,7 +853,7 @@ OFCondition DRTPersonIdentificationCodeSequence::read(DcmItem &dataset,
         clear();
         /* retrieve sequence element from dataset */
         DcmSequenceOfItems *sequence;
-        result = dataset.findAndGetSequence(DCM_PersonIdentificationCodeSequence, sequence);
+        result = dataset.findAndGetSequence(DCM_GeneticModificationsCodeSequence, sequence);
         if (sequence != NULL)
         {
             if (checkElementValue(*sequence, card, type, result, moduleName))
@@ -883,7 +883,7 @@ OFCondition DRTPersonIdentificationCodeSequence::read(DcmItem &dataset,
                 }
             }
         } else {
-            DcmSequenceOfItems element(DCM_PersonIdentificationCodeSequence);
+            DcmSequenceOfItems element(DCM_GeneticModificationsCodeSequence);
             checkElementValue(element, card, type, result, moduleName);
         }
     }
@@ -891,7 +891,7 @@ OFCondition DRTPersonIdentificationCodeSequence::read(DcmItem &dataset,
 }
 
 
-OFCondition DRTPersonIdentificationCodeSequence::write(DcmItem &dataset,
+OFCondition DRTGeneticModificationsCodeSequence::write(DcmItem &dataset,
                                                        const OFString &card,
                                                        const OFString &type,
                                                        const char *moduleName)
@@ -900,7 +900,7 @@ OFCondition DRTPersonIdentificationCodeSequence::write(DcmItem &dataset,
     if (!EmptyDefaultSequence)
     {
         result = EC_MemoryExhausted;
-        DcmSequenceOfItems *sequence = new DcmSequenceOfItems(DCM_PersonIdentificationCodeSequence);
+        DcmSequenceOfItems *sequence = new DcmSequenceOfItems(DCM_GeneticModificationsCodeSequence);
         if (sequence != NULL)
         {
             result = EC_Normal;
diff --git a/dcmrt/libsrc/drtrrshs.cc b/dcmrt/libsrc/drtgms.cc
similarity index 66%
copy from dcmrt/libsrc/drtrrshs.cc
copy to dcmrt/libsrc/drtgms.cc
index 5d7880d..f8ab36b 100644
--- a/dcmrt/libsrc/drtrrshs.cc
+++ b/dcmrt/libsrc/drtgms.cc
@@ -4,183 +4,152 @@
  *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
- *  Source file for class DRTRecordedRangeShifterSequence
+ *  Source file for class DRTGeneticModificationsSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
 
 #include "dcmtk/config/osconfig.h"     // make sure OS specific configuration is included first
 
-#include "dcmtk/dcmrt/seq/drtrrshs.h"
+#include "dcmtk/dcmrt/seq/drtgms.h"
 
 
 // --- item class ---
 
-DRTRecordedRangeShifterSequence::Item::Item(const OFBool emptyDefaultItem)
+DRTGeneticModificationsSequence::Item::Item(const OFBool emptyDefaultItem)
   : EmptyDefaultItem(emptyDefaultItem),
-    AccessoryCode(DCM_AccessoryCode),
-    RangeShifterID(DCM_RangeShifterID),
-    ReferencedRangeShifterNumber(DCM_ReferencedRangeShifterNumber)
+    GeneticModificationsCodeSequence(emptyDefaultItem /*emptyDefaultSequence*/),
+    GeneticModificationsDescription(DCM_GeneticModificationsDescription),
+    GeneticModificationsNomenclature(DCM_GeneticModificationsNomenclature)
 {
 }
 
 
-DRTRecordedRangeShifterSequence::Item::Item(const Item &copy)
+DRTGeneticModificationsSequence::Item::Item(const Item &copy)
   : EmptyDefaultItem(copy.EmptyDefaultItem),
-    AccessoryCode(copy.AccessoryCode),
-    RangeShifterID(copy.RangeShifterID),
-    ReferencedRangeShifterNumber(copy.ReferencedRangeShifterNumber)
+    GeneticModificationsCodeSequence(copy.GeneticModificationsCodeSequence),
+    GeneticModificationsDescription(copy.GeneticModificationsDescription),
+    GeneticModificationsNomenclature(copy.GeneticModificationsNomenclature)
 {
 }
 
 
-DRTRecordedRangeShifterSequence::Item::~Item()
+DRTGeneticModificationsSequence::Item::~Item()
 {
 }
 
 
-DRTRecordedRangeShifterSequence::Item &DRTRecordedRangeShifterSequence::Item::operator=(const Item &copy)
+DRTGeneticModificationsSequence::Item &DRTGeneticModificationsSequence::Item::operator=(const Item &copy)
 {
     if (this != &copy)
     {
         EmptyDefaultItem = copy.EmptyDefaultItem;
-        AccessoryCode = copy.AccessoryCode;
-        RangeShifterID = copy.RangeShifterID;
-        ReferencedRangeShifterNumber = copy.ReferencedRangeShifterNumber;
+        GeneticModificationsCodeSequence = copy.GeneticModificationsCodeSequence;
+        GeneticModificationsDescription = copy.GeneticModificationsDescription;
+        GeneticModificationsNomenclature = copy.GeneticModificationsNomenclature;
     }
     return *this;
 }
 
 
-void DRTRecordedRangeShifterSequence::Item::clear()
+void DRTGeneticModificationsSequence::Item::clear()
 {
     if (!EmptyDefaultItem)
     {
         /* clear all DICOM attributes */
-        ReferencedRangeShifterNumber.clear();
-        RangeShifterID.clear();
-        AccessoryCode.clear();
+        GeneticModificationsDescription.clear();
+        GeneticModificationsNomenclature.clear();
+        GeneticModificationsCodeSequence.clear();
     }
 }
 
 
-OFBool DRTRecordedRangeShifterSequence::Item::isEmpty()
+OFBool DRTGeneticModificationsSequence::Item::isEmpty()
 {
-    return ReferencedRangeShifterNumber.isEmpty() &&
-           RangeShifterID.isEmpty() &&
-           AccessoryCode.isEmpty();
+    return GeneticModificationsDescription.isEmpty() &&
+           GeneticModificationsNomenclature.isEmpty() &&
+           GeneticModificationsCodeSequence.isEmpty();
 }
 
 
-OFBool DRTRecordedRangeShifterSequence::Item::isValid() const
+OFBool DRTGeneticModificationsSequence::Item::isValid() const
 {
     return !EmptyDefaultItem;
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::Item::read(DcmItem &item)
+OFCondition DRTGeneticModificationsSequence::Item::read(DcmItem &item)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
     {
         /* re-initialize object */
         clear();
-        getAndCheckElementFromDataset(item, ReferencedRangeShifterNumber, "1", "1", "RecordedRangeShifterSequence");
-        getAndCheckElementFromDataset(item, RangeShifterID, "1", "1", "RecordedRangeShifterSequence");
-        getAndCheckElementFromDataset(item, AccessoryCode, "1", "3", "RecordedRangeShifterSequence");
+        getAndCheckElementFromDataset(item, GeneticModificationsDescription, "1", "1", "GeneticModificationsSequence");
+        getAndCheckElementFromDataset(item, GeneticModificationsNomenclature, "1", "1", "GeneticModificationsSequence");
+        GeneticModificationsCodeSequence.read(item, "1-n", "3", "GeneticModificationsSequence");
         result = EC_Normal;
     }
     return result;
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::Item::write(DcmItem &item)
+OFCondition DRTGeneticModificationsSequence::Item::write(DcmItem &item)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
     {
         result = EC_Normal;
-        addElementToDataset(result, item, new DcmIntegerString(ReferencedRangeShifterNumber), "1", "1", "RecordedRangeShifterSequence");
-        addElementToDataset(result, item, new DcmShortString(RangeShifterID), "1", "1", "RecordedRangeShifterSequence");
-        addElementToDataset(result, item, new DcmLongString(AccessoryCode), "1", "3", "RecordedRangeShifterSequence");
+        addElementToDataset(result, item, new DcmUnlimitedCharacters(GeneticModificationsDescription), "1", "1", "GeneticModificationsSequence");
+        addElementToDataset(result, item, new DcmLongString(GeneticModificationsNomenclature), "1", "1", "GeneticModificationsSequence");
+        if (result.good()) result = GeneticModificationsCodeSequence.write(item, "1-n", "3", "GeneticModificationsSequence");
     }
     return result;
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::Item::getAccessoryCode(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsSequence::Item::getGeneticModificationsDescription(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
     else
-        return getStringValueFromElement(AccessoryCode, value, pos);
+        return getStringValueFromElement(GeneticModificationsDescription, value, pos);
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::Item::getRangeShifterID(OFString &value, const signed long pos) const
+OFCondition DRTGeneticModificationsSequence::Item::getGeneticModificationsNomenclature(OFString &value, const signed long pos) const
 {
     if (EmptyDefaultItem)
         return EC_IllegalCall;
     else
-        return getStringValueFromElement(RangeShifterID, value, pos);
+        return getStringValueFromElement(GeneticModificationsNomenclature, value, pos);
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::Item::getReferencedRangeShifterNumber(OFString &value, const signed long pos) const
-{
-    if (EmptyDefaultItem)
-        return EC_IllegalCall;
-    else
-        return getStringValueFromElement(ReferencedRangeShifterNumber, value, pos);
-}
-
-
-OFCondition DRTRecordedRangeShifterSequence::Item::getReferencedRangeShifterNumber(Sint32 &value, const unsigned long pos) const
-{
-    if (EmptyDefaultItem)
-        return EC_IllegalCall;
-    else
-        return OFconst_cast(DcmIntegerString &, ReferencedRangeShifterNumber).getSint32(value, pos);
-}
-
-
-OFCondition DRTRecordedRangeShifterSequence::Item::setAccessoryCode(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsSequence::Item::setGeneticModificationsDescription(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
     {
-        result = (check) ? DcmLongString::checkStringValue(value, "1") : EC_Normal;
+        result = (check) ? DcmUnlimitedCharacters::checkStringValue(value, "1") : EC_Normal;
         if (result.good())
-            result = AccessoryCode.putOFStringArray(value);
+            result = GeneticModificationsDescription.putOFStringArray(value);
     }
     return result;
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::Item::setRangeShifterID(const OFString &value, const OFBool check)
+OFCondition DRTGeneticModificationsSequence::Item::setGeneticModificationsNomenclature(const OFString &value, const OFBool check)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultItem)
     {
-        result = (check) ? DcmShortString::checkStringValue(value, "1") : EC_Normal;
-        if (result.good())
-            result = RangeShifterID.putOFStringArray(value);
-    }
-    return result;
-}
-
-
-OFCondition DRTRecordedRangeShifterSequence::Item::setReferencedRangeShifterNumber(const OFString &value, const OFBool check)
-{
-    OFCondition result = EC_IllegalCall;
-    if (!EmptyDefaultItem)
-    {
-        result = (check) ? DcmIntegerString::checkStringValue(value, "1") : EC_Normal;
+        result = (check) ? DcmLongString::checkStringValue(value, "1") : EC_Normal;
         if (result.good())
-            result = ReferencedRangeShifterNumber.putOFStringArray(value);
+            result = GeneticModificationsNomenclature.putOFStringArray(value);
     }
     return result;
 }
@@ -188,7 +157,7 @@ OFCondition DRTRecordedRangeShifterSequence::Item::setReferencedRangeShifterNumb
 
 // --- sequence class ---
 
-DRTRecordedRangeShifterSequence::DRTRecordedRangeShifterSequence(const OFBool emptyDefaultSequence)
+DRTGeneticModificationsSequence::DRTGeneticModificationsSequence(const OFBool emptyDefaultSequence)
   : EmptyDefaultSequence(emptyDefaultSequence),
     SequenceOfItems(),
     CurrentItem(),
@@ -198,7 +167,7 @@ DRTRecordedRangeShifterSequence::DRTRecordedRangeShifterSequence(const OFBool em
 }
 
 
-DRTRecordedRangeShifterSequence::DRTRecordedRangeShifterSequence(const DRTRecordedRangeShifterSequence &copy)
+DRTGeneticModificationsSequence::DRTGeneticModificationsSequence(const DRTGeneticModificationsSequence &copy)
   : EmptyDefaultSequence(copy.EmptyDefaultSequence),
     SequenceOfItems(),
     CurrentItem(),
@@ -224,7 +193,7 @@ DRTRecordedRangeShifterSequence::DRTRecordedRangeShifterSequence(const DRTRecord
 }
 
 
-DRTRecordedRangeShifterSequence &DRTRecordedRangeShifterSequence::operator=(const DRTRecordedRangeShifterSequence &copy)
+DRTGeneticModificationsSequence &DRTGeneticModificationsSequence::operator=(const DRTGeneticModificationsSequence &copy)
 {
     if (this != &copy)
     {
@@ -252,13 +221,13 @@ DRTRecordedRangeShifterSequence &DRTRecordedRangeShifterSequence::operator=(cons
 }
 
 
-DRTRecordedRangeShifterSequence::~DRTRecordedRangeShifterSequence()
+DRTGeneticModificationsSequence::~DRTGeneticModificationsSequence()
 {
     clear();
 }
 
 
-void DRTRecordedRangeShifterSequence::clear()
+void DRTGeneticModificationsSequence::clear()
 {
     if (!EmptyDefaultSequence)
     {
@@ -277,25 +246,25 @@ void DRTRecordedRangeShifterSequence::clear()
 }
 
 
-OFBool DRTRecordedRangeShifterSequence::isEmpty()
+OFBool DRTGeneticModificationsSequence::isEmpty()
 {
     return SequenceOfItems.empty();
 }
 
 
-OFBool DRTRecordedRangeShifterSequence::isValid() const
+OFBool DRTGeneticModificationsSequence::isValid() const
 {
     return !EmptyDefaultSequence;
 }
 
 
-size_t DRTRecordedRangeShifterSequence::getNumberOfItems() const
+size_t DRTGeneticModificationsSequence::getNumberOfItems() const
 {
     return SequenceOfItems.size();
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::gotoFirstItem()
+OFCondition DRTGeneticModificationsSequence::gotoFirstItem()
 {
     OFCondition result = EC_IllegalCall;
     if (!SequenceOfItems.empty())
@@ -307,7 +276,7 @@ OFCondition DRTRecordedRangeShifterSequence::gotoFirstItem()
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::gotoNextItem()
+OFCondition DRTGeneticModificationsSequence::gotoNextItem()
 {
     OFCondition result = EC_IllegalCall;
     if (CurrentItem != SequenceOfItems.end())
@@ -319,7 +288,7 @@ OFCondition DRTRecordedRangeShifterSequence::gotoNextItem()
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::gotoItem(const size_t num, OFListIterator(Item *) &iterator)
+OFCondition DRTGeneticModificationsSequence::gotoItem(const size_t num, OFListIterator(Item *) &iterator)
 {
     OFCondition result = EC_IllegalCall;
     if (!SequenceOfItems.empty())
@@ -339,7 +308,7 @@ OFCondition DRTRecordedRangeShifterSequence::gotoItem(const size_t num, OFListIt
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::gotoItem(const size_t num, OFListConstIterator(Item *) &iterator) const
+OFCondition DRTGeneticModificationsSequence::gotoItem(const size_t num, OFListConstIterator(Item *) &iterator) const
 {
     OFCondition result = EC_IllegalCall;
     if (!SequenceOfItems.empty())
@@ -359,13 +328,13 @@ OFCondition DRTRecordedRangeShifterSequence::gotoItem(const size_t num, OFListCo
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::gotoItem(const size_t num)
+OFCondition DRTGeneticModificationsSequence::gotoItem(const size_t num)
 {
     return gotoItem(num, CurrentItem);
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::getCurrentItem(Item *&item) const
+OFCondition DRTGeneticModificationsSequence::getCurrentItem(Item *&item) const
 {
     OFCondition result = EC_IllegalCall;
     if (CurrentItem != SequenceOfItems.end())
@@ -377,7 +346,7 @@ OFCondition DRTRecordedRangeShifterSequence::getCurrentItem(Item *&item) const
 }
 
 
-DRTRecordedRangeShifterSequence::Item &DRTRecordedRangeShifterSequence::getCurrentItem()
+DRTGeneticModificationsSequence::Item &DRTGeneticModificationsSequence::getCurrentItem()
 {
     if (CurrentItem != SequenceOfItems.end())
         return **CurrentItem;
@@ -386,7 +355,7 @@ DRTRecordedRangeShifterSequence::Item &DRTRecordedRangeShifterSequence::getCurre
 }
 
 
-const DRTRecordedRangeShifterSequence::Item &DRTRecordedRangeShifterSequence::getCurrentItem() const
+const DRTGeneticModificationsSequence::Item &DRTGeneticModificationsSequence::getCurrentItem() const
 {
     if (CurrentItem != SequenceOfItems.end())
         return **CurrentItem;
@@ -395,7 +364,7 @@ const DRTRecordedRangeShifterSequence::Item &DRTRecordedRangeShifterSequence::ge
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::getItem(const size_t num, Item *&item)
+OFCondition DRTGeneticModificationsSequence::getItem(const size_t num, Item *&item)
 {
     OFListIterator(Item *) iterator;
     OFCondition result = gotoItem(num, iterator);
@@ -405,7 +374,7 @@ OFCondition DRTRecordedRangeShifterSequence::getItem(const size_t num, Item *&it
 }
 
 
-DRTRecordedRangeShifterSequence::Item &DRTRecordedRangeShifterSequence::getItem(const size_t num)
+DRTGeneticModificationsSequence::Item &DRTGeneticModificationsSequence::getItem(const size_t num)
 {
     OFListIterator(Item *) iterator;
     if (gotoItem(num, iterator).good())
@@ -415,7 +384,7 @@ DRTRecordedRangeShifterSequence::Item &DRTRecordedRangeShifterSequence::getItem(
 }
 
 
-const DRTRecordedRangeShifterSequence::Item &DRTRecordedRangeShifterSequence::getItem(const size_t num) const
+const DRTGeneticModificationsSequence::Item &DRTGeneticModificationsSequence::getItem(const size_t num) const
 {
     OFListConstIterator(Item *) iterator;
     if (gotoItem(num, iterator).good())
@@ -425,19 +394,19 @@ const DRTRecordedRangeShifterSequence::Item &DRTRecordedRangeShifterSequence::ge
 }
 
 
-DRTRecordedRangeShifterSequence::Item &DRTRecordedRangeShifterSequence::operator[](const size_t num)
+DRTGeneticModificationsSequence::Item &DRTGeneticModificationsSequence::operator[](const size_t num)
 {
     return getItem(num);
 }
 
 
-const DRTRecordedRangeShifterSequence::Item &DRTRecordedRangeShifterSequence::operator[](const size_t num) const
+const DRTGeneticModificationsSequence::Item &DRTGeneticModificationsSequence::operator[](const size_t num) const
 {
     return getItem(num);
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::addItem(Item *&item)
+OFCondition DRTGeneticModificationsSequence::addItem(Item *&item)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultSequence)
@@ -454,7 +423,7 @@ OFCondition DRTRecordedRangeShifterSequence::addItem(Item *&item)
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::insertItem(const size_t pos, Item *&item)
+OFCondition DRTGeneticModificationsSequence::insertItem(const size_t pos, Item *&item)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultSequence)
@@ -477,7 +446,7 @@ OFCondition DRTRecordedRangeShifterSequence::insertItem(const size_t pos, Item *
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::removeItem(const size_t pos)
+OFCondition DRTGeneticModificationsSequence::removeItem(const size_t pos)
 {
     OFCondition result = EC_IllegalCall;
     if (!EmptyDefaultSequence)
@@ -495,7 +464,7 @@ OFCondition DRTRecordedRangeShifterSequence::removeItem(const size_t pos)
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::read(DcmItem &dataset,
+OFCondition DRTGeneticModificationsSequence::read(DcmItem &dataset,
                                                   const OFString &card,
                                                   const OFString &type,
                                                   const char *moduleName)
@@ -507,7 +476,7 @@ OFCondition DRTRecordedRangeShifterSequence::read(DcmItem &dataset,
         clear();
         /* retrieve sequence element from dataset */
         DcmSequenceOfItems *sequence;
-        result = dataset.findAndGetSequence(DCM_RecordedRangeShifterSequence, sequence);
+        result = dataset.findAndGetSequence(DCM_GeneticModificationsSequence, sequence);
         if (sequence != NULL)
         {
             if (checkElementValue(*sequence, card, type, result, moduleName))
@@ -537,7 +506,7 @@ OFCondition DRTRecordedRangeShifterSequence::read(DcmItem &dataset,
                 }
             }
         } else {
-            DcmSequenceOfItems element(DCM_RecordedRangeShifterSequence);
+            DcmSequenceOfItems element(DCM_GeneticModificationsSequence);
             checkElementValue(element, card, type, result, moduleName);
         }
     }
@@ -545,7 +514,7 @@ OFCondition DRTRecordedRangeShifterSequence::read(DcmItem &dataset,
 }
 
 
-OFCondition DRTRecordedRangeShifterSequence::write(DcmItem &dataset,
+OFCondition DRTGeneticModificationsSequence::write(DcmItem &dataset,
                                                    const OFString &card,
                                                    const OFString &type,
                                                    const char *moduleName)
@@ -554,7 +523,7 @@ OFCondition DRTRecordedRangeShifterSequence::write(DcmItem &dataset,
     if (!EmptyDefaultSequence)
     {
         result = EC_MemoryExhausted;
-        DcmSequenceOfItems *sequence = new DcmSequenceOfItems(DCM_RecordedRangeShifterSequence);
+        DcmSequenceOfItems *sequence = new DcmSequenceOfItems(DCM_GeneticModificationsSequence);
         if (sequence != NULL)
         {
             result = EC_Normal;
diff --git a/dcmrt/libsrc/drtgpis.cc b/dcmrt/libsrc/drtgpis.cc
index dd7164d..2773490 100644
--- a/dcmrt/libsrc/drtgpis.cc
+++ b/dcmrt/libsrc/drtgpis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTGroupOfPatientsIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drthsdrs.cc b/dcmrt/libsrc/drthsdrs.cc
index 1c47369..6606ca4 100644
--- a/dcmrt/libsrc/drthsdrs.cc
+++ b/dcmrt/libsrc/drthsdrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTHL7StructuredDocumentReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtiais.cc b/dcmrt/libsrc/drtiais.cc
index f5b2a1b..4b071c5 100644
--- a/dcmrt/libsrc/drtiais.cc
+++ b/dcmrt/libsrc/drtiais.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIssuerOfAdmissionIDSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtians.cc b/dcmrt/libsrc/drtians.cc
index 6cdc545..d2bde19 100644
--- a/dcmrt/libsrc/drtians.cc
+++ b/dcmrt/libsrc/drtians.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIssuerOfAccessionNumberSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtiblds.cc b/dcmrt/libsrc/drtiblds.cc
index 02b432b..4880209 100644
--- a/dcmrt/libsrc/drtiblds.cc
+++ b/dcmrt/libsrc/drtiblds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIonBeamLimitingDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtibls.cc b/dcmrt/libsrc/drtibls.cc
index 260b4e5..3ed8c01 100644
--- a/dcmrt/libsrc/drtibls.cc
+++ b/dcmrt/libsrc/drtibls.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIonBlockSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtibs.cc b/dcmrt/libsrc/drtibs.cc
index 69779fa..69a9f29 100644
--- a/dcmrt/libsrc/drtibs.cc
+++ b/dcmrt/libsrc/drtibs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIonBeamSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drticpds.cc b/dcmrt/libsrc/drticpds.cc
index cc5bac3..a8978d6 100644
--- a/dcmrt/libsrc/drticpds.cc
+++ b/dcmrt/libsrc/drticpds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIonControlPointDeliverySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drticps.cc b/dcmrt/libsrc/drticps.cc
index 16c61cb..9e17930 100644
--- a/dcmrt/libsrc/drticps.cc
+++ b/dcmrt/libsrc/drticps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIonControlPointSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtics.cc b/dcmrt/libsrc/drtics.cc
index 70003ec..ec87560 100644
--- a/dcmrt/libsrc/drtics.cc
+++ b/dcmrt/libsrc/drtics.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTInstitutionCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtiis.cc b/dcmrt/libsrc/drtiis.cc
index b6821d8..535a5ba 100644
--- a/dcmrt/libsrc/drtiis.cc
+++ b/dcmrt/libsrc/drtiis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIconImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtimage.cc b/dcmrt/libsrc/drtimage.cc
index 1451213..f9ad54d 100644
--- a/dcmrt/libsrc/drtimage.cc
+++ b/dcmrt/libsrc/drtimage.cc
@@ -6,8 +6,9 @@
  *
  *  Source file for class DRTImageIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
+ *  Last modified on 2017-06-15 by Riesmeier
  *
  */
 
@@ -31,7 +32,7 @@ DRTImageIOD::DRTImageIOD()
     QualityControlSubject(DCM_QualityControlSubject),
     ReferencedPatientSequence(),
     PatientBirthTime(DCM_PatientBirthTime),
-    OtherPatientIDs(DCM_OtherPatientIDs),
+    OtherPatientIDs(DCM_RETIRED_OtherPatientIDs),
     OtherPatientIDsSequence(),
     OtherPatientNames(DCM_OtherPatientNames),
     EthnicGroup(DCM_EthnicGroup),
@@ -46,6 +47,7 @@ DRTImageIOD::DRTImageIOD()
     StrainCodeSequence(),
     StrainAdditionalInformation(DCM_StrainAdditionalInformation),
     StrainStockSequence(),
+    GeneticModificationsSequence(),
     ResponsiblePerson(DCM_ResponsiblePerson),
     ResponsiblePersonRole(DCM_ResponsiblePersonRole),
     ResponsibleOrganization(DCM_ResponsibleOrganization),
@@ -346,6 +348,7 @@ DRTImageIOD::DRTImageIOD(const DRTImageIOD &copy)
     StrainCodeSequence(copy.StrainCodeSequence),
     StrainAdditionalInformation(copy.StrainAdditionalInformation),
     StrainStockSequence(copy.StrainStockSequence),
+    GeneticModificationsSequence(copy.GeneticModificationsSequence),
     ResponsiblePerson(copy.ResponsiblePerson),
     ResponsiblePersonRole(copy.ResponsiblePersonRole),
     ResponsibleOrganization(copy.ResponsibleOrganization),
@@ -652,6 +655,7 @@ DRTImageIOD &DRTImageIOD::operator=(const DRTImageIOD &copy)
         StrainCodeSequence = copy.StrainCodeSequence;
         StrainAdditionalInformation = copy.StrainAdditionalInformation;
         StrainStockSequence = copy.StrainStockSequence;
+        GeneticModificationsSequence = copy.GeneticModificationsSequence;
         ResponsiblePerson = copy.ResponsiblePerson;
         ResponsiblePersonRole = copy.ResponsiblePersonRole;
         ResponsibleOrganization = copy.ResponsibleOrganization;
@@ -953,6 +957,7 @@ void DRTImageIOD::clear()
     StrainCodeSequence.clear();
     StrainAdditionalInformation.clear();
     StrainStockSequence.clear();
+    GeneticModificationsSequence.clear();
     ResponsiblePerson.clear();
     ResponsiblePersonRole.clear();
     ResponsibleOrganization.clear();
@@ -1543,6 +1548,7 @@ OFCondition DRTImageIOD::readPatientData(DcmItem &dataset)
     StrainCodeSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, StrainAdditionalInformation, "1", "3", "PatientModule");
     StrainStockSequence.read(dataset, "1-n", "3", "PatientModule");
+    GeneticModificationsSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePerson, "1", "2C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePersonRole, "1", "1C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsibleOrganization, "1", "2C", "PatientModule");
@@ -1714,6 +1720,7 @@ OFCondition DRTImageIOD::write(DcmItem &dataset)
         if (result.good()) result = StrainCodeSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmUnlimitedText(StrainAdditionalInformation), "1", "3", "PatientModule");
         if (result.good()) result = StrainStockSequence.write(dataset, "1-n" ,"3", "PatientModule");
+        if (result.good()) result = GeneticModificationsSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmPersonName(ResponsiblePerson), "1", "2C", "PatientModule");
         addElementToDataset(result, dataset, new DcmCodeString(ResponsiblePersonRole), "1", "1C", "PatientModule");
         addElementToDataset(result, dataset, new DcmLongString(ResponsibleOrganization), "1", "2C", "PatientModule");
diff --git a/dcmrt/libsrc/drtionpl.cc b/dcmrt/libsrc/drtionpl.cc
index 3ba2f77..ee456dc 100644
--- a/dcmrt/libsrc/drtionpl.cc
+++ b/dcmrt/libsrc/drtionpl.cc
@@ -6,8 +6,9 @@
  *
  *  Source file for class DRTIonPlanIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
+ *  Last modified on 2017-06-15 by Riesmeier
  *
  */
 
@@ -31,7 +32,7 @@ DRTIonPlanIOD::DRTIonPlanIOD()
     QualityControlSubject(DCM_QualityControlSubject),
     ReferencedPatientSequence(),
     PatientBirthTime(DCM_PatientBirthTime),
-    OtherPatientIDs(DCM_OtherPatientIDs),
+    OtherPatientIDs(DCM_RETIRED_OtherPatientIDs),
     OtherPatientIDsSequence(),
     OtherPatientNames(DCM_OtherPatientNames),
     EthnicGroup(DCM_EthnicGroup),
@@ -46,6 +47,7 @@ DRTIonPlanIOD::DRTIonPlanIOD()
     StrainCodeSequence(),
     StrainAdditionalInformation(DCM_StrainAdditionalInformation),
     StrainStockSequence(),
+    GeneticModificationsSequence(),
     ResponsiblePerson(DCM_ResponsiblePerson),
     ResponsiblePersonRole(DCM_ResponsiblePersonRole),
     ResponsibleOrganization(DCM_ResponsibleOrganization),
@@ -241,6 +243,7 @@ DRTIonPlanIOD::DRTIonPlanIOD(const DRTIonPlanIOD &copy)
     StrainCodeSequence(copy.StrainCodeSequence),
     StrainAdditionalInformation(copy.StrainAdditionalInformation),
     StrainStockSequence(copy.StrainStockSequence),
+    GeneticModificationsSequence(copy.GeneticModificationsSequence),
     ResponsiblePerson(copy.ResponsiblePerson),
     ResponsiblePersonRole(copy.ResponsiblePersonRole),
     ResponsibleOrganization(copy.ResponsibleOrganization),
@@ -442,6 +445,7 @@ DRTIonPlanIOD &DRTIonPlanIOD::operator=(const DRTIonPlanIOD &copy)
         StrainCodeSequence = copy.StrainCodeSequence;
         StrainAdditionalInformation = copy.StrainAdditionalInformation;
         StrainStockSequence = copy.StrainStockSequence;
+        GeneticModificationsSequence = copy.GeneticModificationsSequence;
         ResponsiblePerson = copy.ResponsiblePerson;
         ResponsiblePersonRole = copy.ResponsiblePersonRole;
         ResponsibleOrganization = copy.ResponsibleOrganization;
@@ -638,6 +642,7 @@ void DRTIonPlanIOD::clear()
     StrainCodeSequence.clear();
     StrainAdditionalInformation.clear();
     StrainStockSequence.clear();
+    GeneticModificationsSequence.clear();
     ResponsiblePerson.clear();
     ResponsiblePersonRole.clear();
     ResponsibleOrganization.clear();
@@ -998,6 +1003,7 @@ OFCondition DRTIonPlanIOD::readPatientData(DcmItem &dataset)
     StrainCodeSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, StrainAdditionalInformation, "1", "3", "PatientModule");
     StrainStockSequence.read(dataset, "1-n", "3", "PatientModule");
+    GeneticModificationsSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePerson, "1", "2C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePersonRole, "1", "1C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsibleOrganization, "1", "2C", "PatientModule");
@@ -1169,6 +1175,7 @@ OFCondition DRTIonPlanIOD::write(DcmItem &dataset)
         if (result.good()) result = StrainCodeSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmUnlimitedText(StrainAdditionalInformation), "1", "3", "PatientModule");
         if (result.good()) result = StrainStockSequence.write(dataset, "1-n" ,"3", "PatientModule");
+        if (result.good()) result = GeneticModificationsSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmPersonName(ResponsiblePerson), "1", "2C", "PatientModule");
         addElementToDataset(result, dataset, new DcmCodeString(ResponsiblePersonRole), "1", "1C", "PatientModule");
         addElementToDataset(result, dataset, new DcmLongString(ResponsibleOrganization), "1", "2C", "PatientModule");
diff --git a/dcmrt/libsrc/drtiontr.cc b/dcmrt/libsrc/drtiontr.cc
index 138cc96..fd1a52a 100644
--- a/dcmrt/libsrc/drtiontr.cc
+++ b/dcmrt/libsrc/drtiontr.cc
@@ -6,8 +6,9 @@
  *
  *  Source file for class DRTIonBeamsTreatmentRecordIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
+ *  Last modified on 2017-06-15 by Riesmeier
  *
  */
 
@@ -31,7 +32,7 @@ DRTIonBeamsTreatmentRecordIOD::DRTIonBeamsTreatmentRecordIOD()
     QualityControlSubject(DCM_QualityControlSubject),
     ReferencedPatientSequence(),
     PatientBirthTime(DCM_PatientBirthTime),
-    OtherPatientIDs(DCM_OtherPatientIDs),
+    OtherPatientIDs(DCM_RETIRED_OtherPatientIDs),
     OtherPatientIDsSequence(),
     OtherPatientNames(DCM_OtherPatientNames),
     EthnicGroup(DCM_EthnicGroup),
@@ -46,6 +47,7 @@ DRTIonBeamsTreatmentRecordIOD::DRTIonBeamsTreatmentRecordIOD()
     StrainCodeSequence(),
     StrainAdditionalInformation(DCM_StrainAdditionalInformation),
     StrainStockSequence(),
+    GeneticModificationsSequence(),
     ResponsiblePerson(DCM_ResponsiblePerson),
     ResponsiblePersonRole(DCM_ResponsiblePersonRole),
     ResponsibleOrganization(DCM_ResponsibleOrganization),
@@ -235,6 +237,7 @@ DRTIonBeamsTreatmentRecordIOD::DRTIonBeamsTreatmentRecordIOD(const DRTIonBeamsTr
     StrainCodeSequence(copy.StrainCodeSequence),
     StrainAdditionalInformation(copy.StrainAdditionalInformation),
     StrainStockSequence(copy.StrainStockSequence),
+    GeneticModificationsSequence(copy.GeneticModificationsSequence),
     ResponsiblePerson(copy.ResponsiblePerson),
     ResponsiblePersonRole(copy.ResponsiblePersonRole),
     ResponsibleOrganization(copy.ResponsibleOrganization),
@@ -430,6 +433,7 @@ DRTIonBeamsTreatmentRecordIOD &DRTIonBeamsTreatmentRecordIOD::operator=(const DR
         StrainCodeSequence = copy.StrainCodeSequence;
         StrainAdditionalInformation = copy.StrainAdditionalInformation;
         StrainStockSequence = copy.StrainStockSequence;
+        GeneticModificationsSequence = copy.GeneticModificationsSequence;
         ResponsiblePerson = copy.ResponsiblePerson;
         ResponsiblePersonRole = copy.ResponsiblePersonRole;
         ResponsibleOrganization = copy.ResponsibleOrganization;
@@ -620,6 +624,7 @@ void DRTIonBeamsTreatmentRecordIOD::clear()
     StrainCodeSequence.clear();
     StrainAdditionalInformation.clear();
     StrainStockSequence.clear();
+    GeneticModificationsSequence.clear();
     ResponsiblePerson.clear();
     ResponsiblePersonRole.clear();
     ResponsibleOrganization.clear();
@@ -965,6 +970,7 @@ OFCondition DRTIonBeamsTreatmentRecordIOD::readPatientData(DcmItem &dataset)
     StrainCodeSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, StrainAdditionalInformation, "1", "3", "PatientModule");
     StrainStockSequence.read(dataset, "1-n", "3", "PatientModule");
+    GeneticModificationsSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePerson, "1", "2C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePersonRole, "1", "1C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsibleOrganization, "1", "2C", "PatientModule");
@@ -1136,6 +1142,7 @@ OFCondition DRTIonBeamsTreatmentRecordIOD::write(DcmItem &dataset)
         if (result.good()) result = StrainCodeSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmUnlimitedText(StrainAdditionalInformation), "1", "3", "PatientModule");
         if (result.good()) result = StrainStockSequence.write(dataset, "1-n" ,"3", "PatientModule");
+        if (result.good()) result = GeneticModificationsSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmPersonName(ResponsiblePerson), "1", "2C", "PatientModule");
         addElementToDataset(result, dataset, new DcmCodeString(ResponsiblePersonRole), "1", "1C", "PatientModule");
         addElementToDataset(result, dataset, new DcmLongString(ResponsibleOrganization), "1", "2C", "PatientModule");
diff --git a/dcmrt/libsrc/drtipiqs.cc b/dcmrt/libsrc/drtipiqs.cc
index a8f70b0..bb27b5f 100644
--- a/dcmrt/libsrc/drtipiqs.cc
+++ b/dcmrt/libsrc/drtipiqs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIssuerOfPatientIDQualifiersSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtircs.cc b/dcmrt/libsrc/drtircs.cc
index b8d7dbf..3e5d7c6 100644
--- a/dcmrt/libsrc/drtircs.cc
+++ b/dcmrt/libsrc/drtircs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIonRangeCompensatorSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtiseis.cc b/dcmrt/libsrc/drtiseis.cc
index 371e991..9374742 100644
--- a/dcmrt/libsrc/drtiseis.cc
+++ b/dcmrt/libsrc/drtiseis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIssuerOfServiceEpisodeIDSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtitts.cc b/dcmrt/libsrc/drtitts.cc
index ed232a7..9adca05 100644
--- a/dcmrt/libsrc/drtitts.cc
+++ b/dcmrt/libsrc/drtitts.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIonToleranceTableSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtiwps.cc b/dcmrt/libsrc/drtiwps.cc
index ae30e17..9dfc631 100644
--- a/dcmrt/libsrc/drtiwps.cc
+++ b/dcmrt/libsrc/drtiwps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIonWedgePositionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtiws.cc b/dcmrt/libsrc/drtiws.cc
index cc2af36..b0e16b9 100644
--- a/dcmrt/libsrc/drtiws.cc
+++ b/dcmrt/libsrc/drtiws.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTIonWedgeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtlsds.cc b/dcmrt/libsrc/drtlsds.cc
index 36bf35d..0d55d8c 100644
--- a/dcmrt/libsrc/drtlsds.cc
+++ b/dcmrt/libsrc/drtlsds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTLateralSpreadingDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtlsds6.cc b/dcmrt/libsrc/drtlsds6.cc
index 24019c5..071077e 100644
--- a/dcmrt/libsrc/drtlsds6.cc
+++ b/dcmrt/libsrc/drtlsds6.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTLateralSpreadingDeviceSettingsSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtlsds7.cc b/dcmrt/libsrc/drtlsds7.cc
index 845ceef..11d9f26 100644
--- a/dcmrt/libsrc/drtlsds7.cc
+++ b/dcmrt/libsrc/drtlsds7.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTLateralSpreadingDeviceSettingsSequenceInRTIonBeamsSessionRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtmacds.cc b/dcmrt/libsrc/drtmacds.cc
index 879117f..9bbd4f8 100644
--- a/dcmrt/libsrc/drtmacds.cc
+++ b/dcmrt/libsrc/drtmacds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTMultiplexedAudioChannelsDescriptionCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtmas.cc b/dcmrt/libsrc/drtmas.cc
index cff79f8..ea934ac 100644
--- a/dcmrt/libsrc/drtmas.cc
+++ b/dcmrt/libsrc/drtmas.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTModifiedAttributesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtmdrs.cc b/dcmrt/libsrc/drtmdrs.cc
index 14c54da..93aa8a5 100644
--- a/dcmrt/libsrc/drtmdrs.cc
+++ b/dcmrt/libsrc/drtmdrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTMeasuredDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtmls.cc b/dcmrt/libsrc/drtmls.cc
index c5c6047..c90d4d3 100644
--- a/dcmrt/libsrc/drtmls.cc
+++ b/dcmrt/libsrc/drtmls.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTModalityLUTSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtmps.cc b/dcmrt/libsrc/drtmps.cc
index aefaf15..a1cb4a0 100644
--- a/dcmrt/libsrc/drtmps.cc
+++ b/dcmrt/libsrc/drtmps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTMACParametersSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtmris.cc b/dcmrt/libsrc/drtmris.cc
index e12c40b..ebd9dcc 100644
--- a/dcmrt/libsrc/drtmris.cc
+++ b/dcmrt/libsrc/drtmris.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTMappingResourceIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtmss.cc b/dcmrt/libsrc/drtmss.cc
index 3e0bcd5..efb3537 100644
--- a/dcmrt/libsrc/drtmss.cc
+++ b/dcmrt/libsrc/drtmss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTMotionSynchronizationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtmucs.cc b/dcmrt/libsrc/drtmucs.cc
index 772158e..d8f109f 100644
--- a/dcmrt/libsrc/drtmucs.cc
+++ b/dcmrt/libsrc/drtmucs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTMeasurementUnitsCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtoas.cc b/dcmrt/libsrc/drtoas.cc
index 8faeeed..18ae0e4 100644
--- a/dcmrt/libsrc/drtoas.cc
+++ b/dcmrt/libsrc/drtoas.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTOriginalAttributesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtois.cc b/dcmrt/libsrc/drtois.cc
index 8a12fc4..8beabf0 100644
--- a/dcmrt/libsrc/drtois.cc
+++ b/dcmrt/libsrc/drtois.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTOperatorIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtopis.cc b/dcmrt/libsrc/drtopis.cc
index 2469939..d52bdd7 100644
--- a/dcmrt/libsrc/drtopis.cc
+++ b/dcmrt/libsrc/drtopis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTOtherPatientIDsSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtos.cc b/dcmrt/libsrc/drtos.cc
index 7220b37..658dbfc 100644
--- a/dcmrt/libsrc/drtos.cc
+++ b/dcmrt/libsrc/drtos.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTOverrideSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtpbcs.cc b/dcmrt/libsrc/drtpbcs.cc
index 97bb0e1..f8c086c 100644
--- a/dcmrt/libsrc/drtpbcs.cc
+++ b/dcmrt/libsrc/drtpbcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPatientBreedCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtpcs.cc b/dcmrt/libsrc/drtpcs.cc
index 964aa26..63b4589 100644
--- a/dcmrt/libsrc/drtpcs.cc
+++ b/dcmrt/libsrc/drtpcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTProcedureCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtpcxs.cc b/dcmrt/libsrc/drtpcxs.cc
index 3ae55f5..6ec52b3 100644
--- a/dcmrt/libsrc/drtpcxs.cc
+++ b/dcmrt/libsrc/drtpcxs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTProtocolContextSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtpdecs.cc b/dcmrt/libsrc/drtpdecs.cc
index a919aa9..14bda92 100644
--- a/dcmrt/libsrc/drtpdecs.cc
+++ b/dcmrt/libsrc/drtpdecs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPrivateDataElementCharacteristicsSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtpdeds.cc b/dcmrt/libsrc/drtpdeds.cc
index bad9daf..72a0058 100644
--- a/dcmrt/libsrc/drtpdeds.cc
+++ b/dcmrt/libsrc/drtpdeds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPrivateDataElementDefinitionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtpfms.cc b/dcmrt/libsrc/drtpfms.cc
index 62ae998..c5887aa 100644
--- a/dcmrt/libsrc/drtpfms.cc
+++ b/dcmrt/libsrc/drtpfms.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPrimaryFluenceModeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtpics.cc b/dcmrt/libsrc/drtpics.cc
index 18c9066..2bcf18d 100644
--- a/dcmrt/libsrc/drtpics.cc
+++ b/dcmrt/libsrc/drtpics.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPersonIdentificationCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtplan.cc b/dcmrt/libsrc/drtplan.cc
index bb0e199..2805292 100644
--- a/dcmrt/libsrc/drtplan.cc
+++ b/dcmrt/libsrc/drtplan.cc
@@ -6,8 +6,9 @@
  *
  *  Source file for class DRTPlanIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
+ *  Last modified on 2017-06-15 by Riesmeier
  *
  */
 
@@ -31,7 +32,7 @@ DRTPlanIOD::DRTPlanIOD()
     QualityControlSubject(DCM_QualityControlSubject),
     ReferencedPatientSequence(),
     PatientBirthTime(DCM_PatientBirthTime),
-    OtherPatientIDs(DCM_OtherPatientIDs),
+    OtherPatientIDs(DCM_RETIRED_OtherPatientIDs),
     OtherPatientIDsSequence(),
     OtherPatientNames(DCM_OtherPatientNames),
     EthnicGroup(DCM_EthnicGroup),
@@ -46,6 +47,7 @@ DRTPlanIOD::DRTPlanIOD()
     StrainCodeSequence(),
     StrainAdditionalInformation(DCM_StrainAdditionalInformation),
     StrainStockSequence(),
+    GeneticModificationsSequence(),
     ResponsiblePerson(DCM_ResponsiblePerson),
     ResponsiblePersonRole(DCM_ResponsiblePersonRole),
     ResponsibleOrganization(DCM_ResponsibleOrganization),
@@ -246,6 +248,7 @@ DRTPlanIOD::DRTPlanIOD(const DRTPlanIOD &copy)
     StrainCodeSequence(copy.StrainCodeSequence),
     StrainAdditionalInformation(copy.StrainAdditionalInformation),
     StrainStockSequence(copy.StrainStockSequence),
+    GeneticModificationsSequence(copy.GeneticModificationsSequence),
     ResponsiblePerson(copy.ResponsiblePerson),
     ResponsiblePersonRole(copy.ResponsiblePersonRole),
     ResponsibleOrganization(copy.ResponsibleOrganization),
@@ -452,6 +455,7 @@ DRTPlanIOD &DRTPlanIOD::operator=(const DRTPlanIOD &copy)
         StrainCodeSequence = copy.StrainCodeSequence;
         StrainAdditionalInformation = copy.StrainAdditionalInformation;
         StrainStockSequence = copy.StrainStockSequence;
+        GeneticModificationsSequence = copy.GeneticModificationsSequence;
         ResponsiblePerson = copy.ResponsiblePerson;
         ResponsiblePersonRole = copy.ResponsiblePersonRole;
         ResponsibleOrganization = copy.ResponsibleOrganization;
@@ -653,6 +657,7 @@ void DRTPlanIOD::clear()
     StrainCodeSequence.clear();
     StrainAdditionalInformation.clear();
     StrainStockSequence.clear();
+    GeneticModificationsSequence.clear();
     ResponsiblePerson.clear();
     ResponsiblePersonRole.clear();
     ResponsibleOrganization.clear();
@@ -1033,6 +1038,7 @@ OFCondition DRTPlanIOD::readPatientData(DcmItem &dataset)
     StrainCodeSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, StrainAdditionalInformation, "1", "3", "PatientModule");
     StrainStockSequence.read(dataset, "1-n", "3", "PatientModule");
+    GeneticModificationsSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePerson, "1", "2C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePersonRole, "1", "1C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsibleOrganization, "1", "2C", "PatientModule");
@@ -1204,6 +1210,7 @@ OFCondition DRTPlanIOD::write(DcmItem &dataset)
         if (result.good()) result = StrainCodeSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmUnlimitedText(StrainAdditionalInformation), "1", "3", "PatientModule");
         if (result.good()) result = StrainStockSequence.write(dataset, "1-n" ,"3", "PatientModule");
+        if (result.good()) result = GeneticModificationsSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmPersonName(ResponsiblePerson), "1", "2C", "PatientModule");
         addElementToDataset(result, dataset, new DcmCodeString(ResponsiblePersonRole), "1", "1C", "PatientModule");
         addElementToDataset(result, dataset, new DcmLongString(ResponsibleOrganization), "1", "2C", "PatientModule");
diff --git a/dcmrt/libsrc/drtporcs.cc b/dcmrt/libsrc/drtporcs.cc
index 78ec4b1..73f0c0f 100644
--- a/dcmrt/libsrc/drtporcs.cc
+++ b/dcmrt/libsrc/drtporcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPurposeOfReferenceCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtporis.cc b/dcmrt/libsrc/drtporis.cc
index a124117..42047f7 100644
--- a/dcmrt/libsrc/drtporis.cc
+++ b/dcmrt/libsrc/drtporis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPhysiciansOfRecordIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtppcs.cc b/dcmrt/libsrc/drtppcs.cc
index f22545c..dde2777 100644
--- a/dcmrt/libsrc/drtppcs.cc
+++ b/dcmrt/libsrc/drtppcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPerformedProtocolCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtprsis.cc b/dcmrt/libsrc/drtprsis.cc
index 8d806f3..8056373 100644
--- a/dcmrt/libsrc/drtprsis.cc
+++ b/dcmrt/libsrc/drtprsis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPhysiciansReadingStudyIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtpscs.cc b/dcmrt/libsrc/drtpscs.cc
index cc30e6b..4a086ed 100644
--- a/dcmrt/libsrc/drtpscs.cc
+++ b/dcmrt/libsrc/drtpscs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPatientSpeciesCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtpsics.cc b/dcmrt/libsrc/drtpsics.cc
index aa0b5dc..06898d4 100644
--- a/dcmrt/libsrc/drtpsics.cc
+++ b/dcmrt/libsrc/drtpsics.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPatientSizeCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtpss.cc b/dcmrt/libsrc/drtpss.cc
index 413b076..64d8d8a 100644
--- a/dcmrt/libsrc/drtpss.cc
+++ b/dcmrt/libsrc/drtpss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPatientSetupSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtpsss.cc b/dcmrt/libsrc/drtpsss.cc
index 8578dd9..bfd9e7d 100644
--- a/dcmrt/libsrc/drtpsss.cc
+++ b/dcmrt/libsrc/drtpsss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPredecessorStructureSetSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtpvis.cc b/dcmrt/libsrc/drtpvis.cc
index f85bd3c..70d4ac7 100644
--- a/dcmrt/libsrc/drtpvis.cc
+++ b/dcmrt/libsrc/drtpvis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTPlannedVerificationImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtqds.cc b/dcmrt/libsrc/drtqds.cc
index e23801c..9a66fa0 100644
--- a/dcmrt/libsrc/drtqds.cc
+++ b/dcmrt/libsrc/drtqds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTQuantityDefinitionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtras.cc b/dcmrt/libsrc/drtras.cc
index 6c2806d..24015e7 100644
--- a/dcmrt/libsrc/drtras.cc
+++ b/dcmrt/libsrc/drtras.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRequestAttributesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrbas2.cc b/dcmrt/libsrc/drtrbas2.cc
index e94d5fa..19eee35 100644
--- a/dcmrt/libsrc/drtrbas2.cc
+++ b/dcmrt/libsrc/drtrbas2.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedBrachyApplicationSetupSequenceInRTDoseModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrbas8.cc b/dcmrt/libsrc/drtrbas8.cc
index ecd7d1a..f0a73b5 100644
--- a/dcmrt/libsrc/drtrbas8.cc
+++ b/dcmrt/libsrc/drtrbas8.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedBrachyApplicationSetupSequenceInRTFractionSchemeModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrbls.cc b/dcmrt/libsrc/drtrbls.cc
index 89259ee..06fa2b1 100644
--- a/dcmrt/libsrc/drtrbls.cc
+++ b/dcmrt/libsrc/drtrbls.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRecordedBlockSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrbos1.cc b/dcmrt/libsrc/drtrbos1.cc
index 9155cf9..1142f41 100644
--- a/dcmrt/libsrc/drtrbos1.cc
+++ b/dcmrt/libsrc/drtrbos1.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedBolusSequenceInRTBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrbos6.cc b/dcmrt/libsrc/drtrbos6.cc
index defefe0..3bf5c17 100644
--- a/dcmrt/libsrc/drtrbos6.cc
+++ b/dcmrt/libsrc/drtrbos6.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedBolusSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrbos7.cc b/dcmrt/libsrc/drtrbos7.cc
index f4cbb74..b04b02b 100644
--- a/dcmrt/libsrc/drtrbos7.cc
+++ b/dcmrt/libsrc/drtrbos7.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedBolusSequenceInRTIonBeamsSessionRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrbs2.cc b/dcmrt/libsrc/drtrbs2.cc
index cb51a12..82d3de4 100644
--- a/dcmrt/libsrc/drtrbs2.cc
+++ b/dcmrt/libsrc/drtrbs2.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedBeamSequenceInRTDoseModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrbs4.cc b/dcmrt/libsrc/drtrbs4.cc
index 58204d4..5513b66 100644
--- a/dcmrt/libsrc/drtrbs4.cc
+++ b/dcmrt/libsrc/drtrbs4.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedBeamSequenceInRTGeneralTreatmentRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrbs8.cc b/dcmrt/libsrc/drtrbs8.cc
index d9419aa..ff3fc3c 100644
--- a/dcmrt/libsrc/drtrbs8.cc
+++ b/dcmrt/libsrc/drtrbs8.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedBeamSequenceInRTFractionSchemeModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrcdrs.cc b/dcmrt/libsrc/drtrcdrs.cc
index 15ae4b7..9adb494 100644
--- a/dcmrt/libsrc/drtrcdrs.cc
+++ b/dcmrt/libsrc/drtrcdrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedCalculatedDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrcos.cc b/dcmrt/libsrc/drtrcos.cc
index 338cb35..b0db12a 100644
--- a/dcmrt/libsrc/drtrcos.cc
+++ b/dcmrt/libsrc/drtrcos.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRecordedCompensatorSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrcps.cc b/dcmrt/libsrc/drtrcps.cc
index 5fd3b7c..5b4c61c 100644
--- a/dcmrt/libsrc/drtrcps.cc
+++ b/dcmrt/libsrc/drtrcps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedControlPointSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrcs.cc b/dcmrt/libsrc/drtrcs.cc
index ed3e8ee..951d15c 100644
--- a/dcmrt/libsrc/drtrcs.cc
+++ b/dcmrt/libsrc/drtrcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTROIContourSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrdros.cc b/dcmrt/libsrc/drtrdros.cc
index 5d1e794..d1fe75a 100644
--- a/dcmrt/libsrc/drtrdros.cc
+++ b/dcmrt/libsrc/drtrdros.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRTDoseROISequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrdrs1.cc b/dcmrt/libsrc/drtrdrs1.cc
index f4dd392..107fe7d 100644
--- a/dcmrt/libsrc/drtrdrs1.cc
+++ b/dcmrt/libsrc/drtrdrs1.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedDoseReferenceSequenceInRTBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrdrs6.cc b/dcmrt/libsrc/drtrdrs6.cc
index 6b0a827..42c4504 100644
--- a/dcmrt/libsrc/drtrdrs6.cc
+++ b/dcmrt/libsrc/drtrdrs6.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedDoseReferenceSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrdrs8.cc b/dcmrt/libsrc/drtrdrs8.cc
index acf0001..1aa96cf 100644
--- a/dcmrt/libsrc/drtrdrs8.cc
+++ b/dcmrt/libsrc/drtrdrs8.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedDoseReferenceSequenceInRTFractionSchemeModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrds.cc b/dcmrt/libsrc/drtrds.cc
index eab2439..882c2cf 100644
--- a/dcmrt/libsrc/drtrds.cc
+++ b/dcmrt/libsrc/drtrds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedDoseSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrecs.cc b/dcmrt/libsrc/drtrecs.cc
index ceae6fb..13f33fc 100644
--- a/dcmrt/libsrc/drtrecs.cc
+++ b/dcmrt/libsrc/drtrecs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTROIElementalCompositionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrfgs.cc b/dcmrt/libsrc/drtrfgs.cc
index 57959a6..433f50d 100644
--- a/dcmrt/libsrc/drtrfgs.cc
+++ b/dcmrt/libsrc/drtrfgs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedFractionGroupSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrfors.cc b/dcmrt/libsrc/drtrfors.cc
index 859edc4..a1f2995 100644
--- a/dcmrt/libsrc/drtrfors.cc
+++ b/dcmrt/libsrc/drtrfors.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedFrameOfReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrics.cc b/dcmrt/libsrc/drtrics.cc
index d325798..ae3dcc8 100644
--- a/dcmrt/libsrc/drtrics.cc
+++ b/dcmrt/libsrc/drtrics.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRTROIIdentificationCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrims.cc b/dcmrt/libsrc/drtrims.cc
index 4c43af9..2cfb7ec 100644
--- a/dcmrt/libsrc/drtrims.cc
+++ b/dcmrt/libsrc/drtrims.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtris.cc b/dcmrt/libsrc/drtris.cc
index b42fdd7..a0ce7ab 100644
--- a/dcmrt/libsrc/drtris.cc
+++ b/dcmrt/libsrc/drtris.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedInstanceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrlsds.cc b/dcmrt/libsrc/drtrlsds.cc
index c5111df..dfed5f8 100644
--- a/dcmrt/libsrc/drtrlsds.cc
+++ b/dcmrt/libsrc/drtrlsds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRecordedLateralSpreadingDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrmdrs.cc b/dcmrt/libsrc/drtrmdrs.cc
index bcd7a9e..c837afc 100644
--- a/dcmrt/libsrc/drtrmdrs.cc
+++ b/dcmrt/libsrc/drtrmdrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedMeasuredDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrms.cc b/dcmrt/libsrc/drtrms.cc
index 5cddda4..0a38214 100644
--- a/dcmrt/libsrc/drtrms.cc
+++ b/dcmrt/libsrc/drtrms.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRangeModulatorSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrmss6.cc b/dcmrt/libsrc/drtrmss6.cc
index bea2e30..06e71ac 100644
--- a/dcmrt/libsrc/drtrmss6.cc
+++ b/dcmrt/libsrc/drtrmss6.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRangeModulatorSettingsSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrmss7.cc b/dcmrt/libsrc/drtrmss7.cc
index 9f0d500..e0bd28c 100644
--- a/dcmrt/libsrc/drtrmss7.cc
+++ b/dcmrt/libsrc/drtrmss7.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRangeModulatorSettingsSequenceInRTIonBeamsSessionRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrpcs.cc b/dcmrt/libsrc/drtrpcs.cc
index 3a59a8d..d0ceff1 100644
--- a/dcmrt/libsrc/drtrpcs.cc
+++ b/dcmrt/libsrc/drtrpcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRequestedProcedureCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrpis.cc b/dcmrt/libsrc/drtrpis.cc
index 3369bfa..e9b85f8 100644
--- a/dcmrt/libsrc/drtrpis.cc
+++ b/dcmrt/libsrc/drtrpis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferringPhysicianIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrppcs.cc b/dcmrt/libsrc/drtrppcs.cc
index 11d2aff..bda94ca 100644
--- a/dcmrt/libsrc/drtrppcs.cc
+++ b/dcmrt/libsrc/drtrppcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReasonForPerformedProcedureCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrpphs.cc b/dcmrt/libsrc/drtrpphs.cc
index 7fcf754..dec3448 100644
--- a/dcmrt/libsrc/drtrpphs.cc
+++ b/dcmrt/libsrc/drtrpphs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedPatientPhotoSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrpps.cc b/dcmrt/libsrc/drtrpps.cc
index 86219b5..342fda1 100644
--- a/dcmrt/libsrc/drtrpps.cc
+++ b/dcmrt/libsrc/drtrpps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTROIPhysicalPropertiesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrppss.cc b/dcmrt/libsrc/drtrppss.cc
index 2f63d81..47e5227 100644
--- a/dcmrt/libsrc/drtrppss.cc
+++ b/dcmrt/libsrc/drtrppss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedPerformedProcedureStepSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrps.cc b/dcmrt/libsrc/drtrps.cc
index b5d807c..eb3bd06 100644
--- a/dcmrt/libsrc/drtrps.cc
+++ b/dcmrt/libsrc/drtrps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedPatientSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrris1.cc b/dcmrt/libsrc/drtrris1.cc
index 0747d4d..8eebd5d 100644
--- a/dcmrt/libsrc/drtrris1.cc
+++ b/dcmrt/libsrc/drtrris1.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedReferenceImageSequenceInRTBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrris6.cc b/dcmrt/libsrc/drtrris6.cc
index 5588adc..f5bc95d 100644
--- a/dcmrt/libsrc/drtrris6.cc
+++ b/dcmrt/libsrc/drtrris6.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedReferenceImageSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrris9.cc b/dcmrt/libsrc/drtrris9.cc
index 7e2ae51..5f33b18 100644
--- a/dcmrt/libsrc/drtrris9.cc
+++ b/dcmrt/libsrc/drtrris9.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedReferenceImageSequenceInRTBrachyApplicationSetupsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrrms.cc b/dcmrt/libsrc/drtrrms.cc
index ad6a01f..75e405b 100644
--- a/dcmrt/libsrc/drtrrms.cc
+++ b/dcmrt/libsrc/drtrrms.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRecordedRangeModulatorSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrros.cc b/dcmrt/libsrc/drtrros.cc
index f38c2a3..4310991 100644
--- a/dcmrt/libsrc/drtrros.cc
+++ b/dcmrt/libsrc/drtrros.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRTROIObservationsSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrrpcs.cc b/dcmrt/libsrc/drtrrpcs.cc
index 0b062bc..e763fd5 100644
--- a/dcmrt/libsrc/drtrrpcs.cc
+++ b/dcmrt/libsrc/drtrrpcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReasonForRequestedProcedureCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrrros.cc b/dcmrt/libsrc/drtrrros.cc
index 8451732..350c2de 100644
--- a/dcmrt/libsrc/drtrrros.cc
+++ b/dcmrt/libsrc/drtrrros.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRelatedRTROIObservationsSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrrs.cc b/dcmrt/libsrc/drtrrs.cc
index 1ec2b8d..f0d14eb 100644
--- a/dcmrt/libsrc/drtrrs.cc
+++ b/dcmrt/libsrc/drtrrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRTRelatedROISequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrrshs.cc b/dcmrt/libsrc/drtrrshs.cc
index 5d7880d..f412ce8 100644
--- a/dcmrt/libsrc/drtrrshs.cc
+++ b/dcmrt/libsrc/drtrrshs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRecordedRangeShifterSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrrtps.cc b/dcmrt/libsrc/drtrrtps.cc
index 614263e..cc71091 100644
--- a/dcmrt/libsrc/drtrrtps.cc
+++ b/dcmrt/libsrc/drtrrtps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedRTPlanSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrrtps3.cc b/dcmrt/libsrc/drtrrtps3.cc
index a148443..d46957f 100644
--- a/dcmrt/libsrc/drtrrtps3.cc
+++ b/dcmrt/libsrc/drtrrtps3.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedRTPlanSequenceInRTGeneralPlanModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrrtps4.cc b/dcmrt/libsrc/drtrrtps4.cc
index 14fdcd2..c3961c7 100644
--- a/dcmrt/libsrc/drtrrtps4.cc
+++ b/dcmrt/libsrc/drtrrtps4.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedRTPlanSequenceInRTGeneralTreatmentRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrrtps5.cc b/dcmrt/libsrc/drtrrtps5.cc
index e9d244e..1391f30 100644
--- a/dcmrt/libsrc/drtrrtps5.cc
+++ b/dcmrt/libsrc/drtrrtps5.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedRTPlanSequenceInRTImageModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrscs.cc b/dcmrt/libsrc/drtrscs.cc
index 30553c2..4ed6eb8 100644
--- a/dcmrt/libsrc/drtrscs.cc
+++ b/dcmrt/libsrc/drtrscs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRequestingServiceCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrsers.cc b/dcmrt/libsrc/drtrsers.cc
index f7f95f3..568b792 100644
--- a/dcmrt/libsrc/drtrsers.cc
+++ b/dcmrt/libsrc/drtrsers.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedSeriesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrses.cc b/dcmrt/libsrc/drtrses.cc
index 7ffe727..c841665 100644
--- a/dcmrt/libsrc/drtrses.cc
+++ b/dcmrt/libsrc/drtrses.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRTReferencedSeriesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrshs.cc b/dcmrt/libsrc/drtrshs.cc
index b3be62e..7e01683 100644
--- a/dcmrt/libsrc/drtrshs.cc
+++ b/dcmrt/libsrc/drtrshs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRangeShifterSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrshs6.cc b/dcmrt/libsrc/drtrshs6.cc
index 1cdb86d..9ddb328 100644
--- a/dcmrt/libsrc/drtrshs6.cc
+++ b/dcmrt/libsrc/drtrshs6.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRangeShifterSettingsSequenceInRTIonBeamsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrshs7.cc b/dcmrt/libsrc/drtrshs7.cc
index 1e25bca..ca8a67c 100644
--- a/dcmrt/libsrc/drtrshs7.cc
+++ b/dcmrt/libsrc/drtrshs7.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrsis.cc b/dcmrt/libsrc/drtrsis.cc
index dbf0544..cf8fae7 100644
--- a/dcmrt/libsrc/drtrsis.cc
+++ b/dcmrt/libsrc/drtrsis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedSetupImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrsns.cc b/dcmrt/libsrc/drtrsns.cc
index 12474be..5da0b0e 100644
--- a/dcmrt/libsrc/drtrsns.cc
+++ b/dcmrt/libsrc/drtrsns.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRecordedSnoutSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrsos.cc b/dcmrt/libsrc/drtrsos.cc
index 290392d..c2f2b58 100644
--- a/dcmrt/libsrc/drtrsos.cc
+++ b/dcmrt/libsrc/drtrsos.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedSOPSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrsrs.cc b/dcmrt/libsrc/drtrsrs.cc
index fb35505..7182408 100644
--- a/dcmrt/libsrc/drtrsrs.cc
+++ b/dcmrt/libsrc/drtrsrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedSpatialRegistrationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrss.cc b/dcmrt/libsrc/drtrss.cc
index b909002..ba95e60 100644
--- a/dcmrt/libsrc/drtrss.cc
+++ b/dcmrt/libsrc/drtrss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedStudySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrsss.cc b/dcmrt/libsrc/drtrsss.cc
index 4df2fee..79acec7 100644
--- a/dcmrt/libsrc/drtrsss.cc
+++ b/dcmrt/libsrc/drtrsss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedStructureSetSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrsts.cc b/dcmrt/libsrc/drtrsts.cc
index 9281405..15908de 100644
--- a/dcmrt/libsrc/drtrsts.cc
+++ b/dcmrt/libsrc/drtrsts.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRTReferencedStudySequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrtrs2.cc b/dcmrt/libsrc/drtrtrs2.cc
index c60d7f9..3eff92a 100644
--- a/dcmrt/libsrc/drtrtrs2.cc
+++ b/dcmrt/libsrc/drtrtrs2.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedTreatmentRecordSequenceInRTDoseModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrtrs4.cc b/dcmrt/libsrc/drtrtrs4.cc
index 3bf2504..5f4c584 100644
--- a/dcmrt/libsrc/drtrtrs4.cc
+++ b/dcmrt/libsrc/drtrtrs4.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedTreatmentRecordSequenceInRTGeneralTreatmentRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrvis.cc b/dcmrt/libsrc/drtrvis.cc
index 77d899a..d59a825 100644
--- a/dcmrt/libsrc/drtrvis.cc
+++ b/dcmrt/libsrc/drtrvis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTReferencedVerificationImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrws.cc b/dcmrt/libsrc/drtrws.cc
index c5c1043..11aaf2c 100644
--- a/dcmrt/libsrc/drtrws.cc
+++ b/dcmrt/libsrc/drtrws.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRecordedWedgeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtrwvms.cc b/dcmrt/libsrc/drtrwvms.cc
index 89b46e2..4f5b79e 100644
--- a/dcmrt/libsrc/drtrwvms.cc
+++ b/dcmrt/libsrc/drtrwvms.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTRealWorldValueMappingSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtscris.cc b/dcmrt/libsrc/drtscris.cc
index 0edf4b4..27d300a 100644
--- a/dcmrt/libsrc/drtscris.cc
+++ b/dcmrt/libsrc/drtscris.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTStudiesContainingOtherReferencedInstancesSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtscs.cc b/dcmrt/libsrc/drtscs.cc
index c91297c..65cacff 100644
--- a/dcmrt/libsrc/drtscs.cc
+++ b/dcmrt/libsrc/drtscs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTStrainCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtsdcs.cc b/dcmrt/libsrc/drtsdcs.cc
index 811f0b5..e237280 100644
--- a/dcmrt/libsrc/drtsdcs.cc
+++ b/dcmrt/libsrc/drtsdcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTSeriesDescriptionCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtsds.cc b/dcmrt/libsrc/drtsds.cc
index 718ec2d..f8cba77 100644
--- a/dcmrt/libsrc/drtsds.cc
+++ b/dcmrt/libsrc/drtsds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTSetupDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtshds.cc b/dcmrt/libsrc/drtshds.cc
index 909ae1b..143a77a 100644
--- a/dcmrt/libsrc/drtshds.cc
+++ b/dcmrt/libsrc/drtshds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTShieldingDeviceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtsins.cc b/dcmrt/libsrc/drtsins.cc
index bbbabf5..fb5e22e 100644
--- a/dcmrt/libsrc/drtsins.cc
+++ b/dcmrt/libsrc/drtsins.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTSourceInstanceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtsis.cc b/dcmrt/libsrc/drtsis.cc
index 5f1fad7..a6bc7a2 100644
--- a/dcmrt/libsrc/drtsis.cc
+++ b/dcmrt/libsrc/drtsis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTSourceImageSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtsns.cc b/dcmrt/libsrc/drtsns.cc
index 1586885..ea5d11a 100644
--- a/dcmrt/libsrc/drtsns.cc
+++ b/dcmrt/libsrc/drtsns.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTSnoutSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtspccs.cc b/dcmrt/libsrc/drtspccs.cc
index 6e9a9e0..da8fc56 100644
--- a/dcmrt/libsrc/drtspccs.cc
+++ b/dcmrt/libsrc/drtspccs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTSegmentedPropertyCategoryCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtspcs.cc b/dcmrt/libsrc/drtspcs.cc
index 0e16b73..4f3c2b7 100644
--- a/dcmrt/libsrc/drtspcs.cc
+++ b/dcmrt/libsrc/drtspcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTScheduledProtocolCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtspgis.cc b/dcmrt/libsrc/drtspgis.cc
index 5c7924b..49d4385 100644
--- a/dcmrt/libsrc/drtspgis.cc
+++ b/dcmrt/libsrc/drtspgis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTSourcePatientGroupIdentificationSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtsptcs.cc b/dcmrt/libsrc/drtsptcs.cc
index b0b49c7..1a3e504 100644
--- a/dcmrt/libsrc/drtsptcs.cc
+++ b/dcmrt/libsrc/drtsptcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTSegmentedPropertyTypeModifierCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtss.cc b/dcmrt/libsrc/drtss.cc
index 3fb57ac..be2af95 100644
--- a/dcmrt/libsrc/drtss.cc
+++ b/dcmrt/libsrc/drtss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTSourceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtssrcs.cc b/dcmrt/libsrc/drtssrcs.cc
index 5af054c..d6ce42a 100644
--- a/dcmrt/libsrc/drtssrcs.cc
+++ b/dcmrt/libsrc/drtssrcs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTStrainSourceRegistryCodeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtssrs.cc b/dcmrt/libsrc/drtssrs.cc
index 68f77e2..ab1ec31 100644
--- a/dcmrt/libsrc/drtssrs.cc
+++ b/dcmrt/libsrc/drtssrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTStructureSetROISequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtsss.cc b/dcmrt/libsrc/drtsss.cc
index b127777..fac0179 100644
--- a/dcmrt/libsrc/drtsss.cc
+++ b/dcmrt/libsrc/drtsss.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTStrainStockSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtstrct.cc b/dcmrt/libsrc/drtstrct.cc
index 233cc14..3da18a4 100644
--- a/dcmrt/libsrc/drtstrct.cc
+++ b/dcmrt/libsrc/drtstrct.cc
@@ -6,8 +6,9 @@
  *
  *  Source file for class DRTStructureSetIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
+ *  Last modified on 2017-06-15 by Riesmeier
  *
  */
 
@@ -31,7 +32,7 @@ DRTStructureSetIOD::DRTStructureSetIOD()
     QualityControlSubject(DCM_QualityControlSubject),
     ReferencedPatientSequence(),
     PatientBirthTime(DCM_PatientBirthTime),
-    OtherPatientIDs(DCM_OtherPatientIDs),
+    OtherPatientIDs(DCM_RETIRED_OtherPatientIDs),
     OtherPatientIDsSequence(),
     OtherPatientNames(DCM_OtherPatientNames),
     EthnicGroup(DCM_EthnicGroup),
@@ -46,6 +47,7 @@ DRTStructureSetIOD::DRTStructureSetIOD()
     StrainCodeSequence(),
     StrainAdditionalInformation(DCM_StrainAdditionalInformation),
     StrainStockSequence(),
+    GeneticModificationsSequence(),
     ResponsiblePerson(DCM_ResponsiblePerson),
     ResponsiblePersonRole(DCM_ResponsiblePersonRole),
     ResponsibleOrganization(DCM_ResponsibleOrganization),
@@ -232,6 +234,7 @@ DRTStructureSetIOD::DRTStructureSetIOD(const DRTStructureSetIOD &copy)
     StrainCodeSequence(copy.StrainCodeSequence),
     StrainAdditionalInformation(copy.StrainAdditionalInformation),
     StrainStockSequence(copy.StrainStockSequence),
+    GeneticModificationsSequence(copy.GeneticModificationsSequence),
     ResponsiblePerson(copy.ResponsiblePerson),
     ResponsiblePersonRole(copy.ResponsiblePersonRole),
     ResponsibleOrganization(copy.ResponsibleOrganization),
@@ -424,6 +427,7 @@ DRTStructureSetIOD &DRTStructureSetIOD::operator=(const DRTStructureSetIOD &copy
         StrainCodeSequence = copy.StrainCodeSequence;
         StrainAdditionalInformation = copy.StrainAdditionalInformation;
         StrainStockSequence = copy.StrainStockSequence;
+        GeneticModificationsSequence = copy.GeneticModificationsSequence;
         ResponsiblePerson = copy.ResponsiblePerson;
         ResponsiblePersonRole = copy.ResponsiblePersonRole;
         ResponsibleOrganization = copy.ResponsibleOrganization;
@@ -611,6 +615,7 @@ void DRTStructureSetIOD::clear()
     StrainCodeSequence.clear();
     StrainAdditionalInformation.clear();
     StrainStockSequence.clear();
+    GeneticModificationsSequence.clear();
     ResponsiblePerson.clear();
     ResponsiblePersonRole.clear();
     ResponsibleOrganization.clear();
@@ -939,6 +944,7 @@ OFCondition DRTStructureSetIOD::readPatientData(DcmItem &dataset)
     StrainCodeSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, StrainAdditionalInformation, "1", "3", "PatientModule");
     StrainStockSequence.read(dataset, "1-n", "3", "PatientModule");
+    GeneticModificationsSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePerson, "1", "2C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePersonRole, "1", "1C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsibleOrganization, "1", "2C", "PatientModule");
@@ -1110,6 +1116,7 @@ OFCondition DRTStructureSetIOD::write(DcmItem &dataset)
         if (result.good()) result = StrainCodeSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmUnlimitedText(StrainAdditionalInformation), "1", "3", "PatientModule");
         if (result.good()) result = StrainStockSequence.write(dataset, "1-n" ,"3", "PatientModule");
+        if (result.good()) result = GeneticModificationsSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmPersonName(ResponsiblePerson), "1", "2C", "PatientModule");
         addElementToDataset(result, dataset, new DcmCodeString(ResponsiblePersonRole), "1", "1C", "PatientModule");
         addElementToDataset(result, dataset, new DcmLongString(ResponsibleOrganization), "1", "2C", "PatientModule");
diff --git a/dcmrt/libsrc/drttms0.cc b/dcmrt/libsrc/drttms0.cc
index d6955bf..83d7281 100644
--- a/dcmrt/libsrc/drttms0.cc
+++ b/dcmrt/libsrc/drttms0.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTTreatmentMachineSequenceInRTTreatmentMachineRecordModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drttms9.cc b/dcmrt/libsrc/drttms9.cc
index 0e336eb..bfc00d1 100644
--- a/dcmrt/libsrc/drttms9.cc
+++ b/dcmrt/libsrc/drttms9.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTTreatmentMachineSequenceInRTBrachyApplicationSetupsModule
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drttreat.cc b/dcmrt/libsrc/drttreat.cc
index 6684827..356b232 100644
--- a/dcmrt/libsrc/drttreat.cc
+++ b/dcmrt/libsrc/drttreat.cc
@@ -6,8 +6,9 @@
  *
  *  Source file for class DRTTreatmentSummaryRecordIOD
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
+ *  Last modified on 2017-06-15 by Riesmeier
  *
  */
 
@@ -31,7 +32,7 @@ DRTTreatmentSummaryRecordIOD::DRTTreatmentSummaryRecordIOD()
     QualityControlSubject(DCM_QualityControlSubject),
     ReferencedPatientSequence(),
     PatientBirthTime(DCM_PatientBirthTime),
-    OtherPatientIDs(DCM_OtherPatientIDs),
+    OtherPatientIDs(DCM_RETIRED_OtherPatientIDs),
     OtherPatientIDsSequence(),
     OtherPatientNames(DCM_OtherPatientNames),
     EthnicGroup(DCM_EthnicGroup),
@@ -46,6 +47,7 @@ DRTTreatmentSummaryRecordIOD::DRTTreatmentSummaryRecordIOD()
     StrainCodeSequence(),
     StrainAdditionalInformation(DCM_StrainAdditionalInformation),
     StrainStockSequence(),
+    GeneticModificationsSequence(),
     ResponsiblePerson(DCM_ResponsiblePerson),
     ResponsiblePersonRole(DCM_ResponsiblePersonRole),
     ResponsibleOrganization(DCM_ResponsibleOrganization),
@@ -227,6 +229,7 @@ DRTTreatmentSummaryRecordIOD::DRTTreatmentSummaryRecordIOD(const DRTTreatmentSum
     StrainCodeSequence(copy.StrainCodeSequence),
     StrainAdditionalInformation(copy.StrainAdditionalInformation),
     StrainStockSequence(copy.StrainStockSequence),
+    GeneticModificationsSequence(copy.GeneticModificationsSequence),
     ResponsiblePerson(copy.ResponsiblePerson),
     ResponsiblePersonRole(copy.ResponsiblePersonRole),
     ResponsibleOrganization(copy.ResponsibleOrganization),
@@ -414,6 +417,7 @@ DRTTreatmentSummaryRecordIOD &DRTTreatmentSummaryRecordIOD::operator=(const DRTT
         StrainCodeSequence = copy.StrainCodeSequence;
         StrainAdditionalInformation = copy.StrainAdditionalInformation;
         StrainStockSequence = copy.StrainStockSequence;
+        GeneticModificationsSequence = copy.GeneticModificationsSequence;
         ResponsiblePerson = copy.ResponsiblePerson;
         ResponsiblePersonRole = copy.ResponsiblePersonRole;
         ResponsibleOrganization = copy.ResponsibleOrganization;
@@ -596,6 +600,7 @@ void DRTTreatmentSummaryRecordIOD::clear()
     StrainCodeSequence.clear();
     StrainAdditionalInformation.clear();
     StrainStockSequence.clear();
+    GeneticModificationsSequence.clear();
     ResponsiblePerson.clear();
     ResponsiblePersonRole.clear();
     ResponsibleOrganization.clear();
@@ -901,6 +906,7 @@ OFCondition DRTTreatmentSummaryRecordIOD::readPatientData(DcmItem &dataset)
     StrainCodeSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, StrainAdditionalInformation, "1", "3", "PatientModule");
     StrainStockSequence.read(dataset, "1-n", "3", "PatientModule");
+    GeneticModificationsSequence.read(dataset, "1-n", "3", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePerson, "1", "2C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsiblePersonRole, "1", "1C", "PatientModule");
     getAndCheckElementFromDataset(dataset, ResponsibleOrganization, "1", "2C", "PatientModule");
@@ -1072,6 +1078,7 @@ OFCondition DRTTreatmentSummaryRecordIOD::write(DcmItem &dataset)
         if (result.good()) result = StrainCodeSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmUnlimitedText(StrainAdditionalInformation), "1", "3", "PatientModule");
         if (result.good()) result = StrainStockSequence.write(dataset, "1-n" ,"3", "PatientModule");
+        if (result.good()) result = GeneticModificationsSequence.write(dataset, "1-n" ,"3", "PatientModule");
         addElementToDataset(result, dataset, new DcmPersonName(ResponsiblePerson), "1", "2C", "PatientModule");
         addElementToDataset(result, dataset, new DcmCodeString(ResponsiblePersonRole), "1", "1C", "PatientModule");
         addElementToDataset(result, dataset, new DcmLongString(ResponsibleOrganization), "1", "2C", "PatientModule");
diff --git a/dcmrt/libsrc/drttscds.cc b/dcmrt/libsrc/drttscds.cc
index 2c6067f..7ef1513 100644
--- a/dcmrt/libsrc/drttscds.cc
+++ b/dcmrt/libsrc/drttscds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTTreatmentSummaryCalculatedDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drttsibs.cc b/dcmrt/libsrc/drttsibs.cc
index b5a8948..ae1c95f 100644
--- a/dcmrt/libsrc/drttsibs.cc
+++ b/dcmrt/libsrc/drttsibs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTTreatmentSessionIonBeamSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drttsmds.cc b/dcmrt/libsrc/drttsmds.cc
index 9803b93..2599d2c 100644
--- a/dcmrt/libsrc/drttsmds.cc
+++ b/dcmrt/libsrc/drttsmds.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTTreatmentSummaryMeasuredDoseReferenceSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drttts.cc b/dcmrt/libsrc/drttts.cc
index 65d2776..f29efbc 100644
--- a/dcmrt/libsrc/drttts.cc
+++ b/dcmrt/libsrc/drttts.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTToleranceTableSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtudis.cc b/dcmrt/libsrc/drtudis.cc
index 6905be2..e93d954 100644
--- a/dcmrt/libsrc/drtudis.cc
+++ b/dcmrt/libsrc/drtudis.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTUDISequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtvls.cc b/dcmrt/libsrc/drtvls.cc
index d0e33ce..770e307 100644
--- a/dcmrt/libsrc/drtvls.cc
+++ b/dcmrt/libsrc/drtvls.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTVOILUTSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtwps.cc b/dcmrt/libsrc/drtwps.cc
index 3955716..32850f4 100644
--- a/dcmrt/libsrc/drtwps.cc
+++ b/dcmrt/libsrc/drtwps.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTWedgePositionSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtwrs.cc b/dcmrt/libsrc/drtwrs.cc
index 3af75fc..30a8d8b 100644
--- a/dcmrt/libsrc/drtwrs.cc
+++ b/dcmrt/libsrc/drtwrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTWADORetrievalSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtwrsrs.cc b/dcmrt/libsrc/drtwrsrs.cc
index a1cbbcd..11c04ef 100644
--- a/dcmrt/libsrc/drtwrsrs.cc
+++ b/dcmrt/libsrc/drtwrsrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTWADORSRetrievalSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtws.cc b/dcmrt/libsrc/drtws.cc
index ba3ab71..30df08a 100644
--- a/dcmrt/libsrc/drtws.cc
+++ b/dcmrt/libsrc/drtws.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTWedgeSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/libsrc/drtxrs.cc b/dcmrt/libsrc/drtxrs.cc
index e133a96..9271634 100644
--- a/dcmrt/libsrc/drtxrs.cc
+++ b/dcmrt/libsrc/drtxrs.cc
@@ -6,8 +6,8 @@
  *
  *  Source file for class DRTXDSRetrievalSequence
  *
- *  Generated automatically from DICOM PS 3.3-2016e
- *  File created on 2017-01-25 17:55:32
+ *  Generated automatically from DICOM PS 3.3-2017a
+ *  File created on 2017-03-13 11:22:36
  *
  */
 
diff --git a/dcmrt/tests/Makefile.dep b/dcmrt/tests/Makefile.dep
index 9e87cb0..84f6235 100644
--- a/dcmrt/tests/Makefile.dep
+++ b/dcmrt/tests/Makefile.dep
@@ -19,7 +19,10 @@ drttest.o: drttest.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -37,9 +40,9 @@ drttest.o: drttest.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -69,8 +72,6 @@ drttest.o: drttest.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -129,6 +130,7 @@ drttest.o: drttest.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtdcs.h ../include/dcmtk/dcmrt/seq/drtdss.h \
  ../include/dcmtk/dcmrt/seq/drtdspcs.h \
  ../include/dcmtk/dcmrt/seq/drteas.h ../include/dcmtk/dcmrt/seq/drtfes.h \
+ ../include/dcmtk/dcmrt/seq/drtgms.h ../include/dcmtk/dcmrt/seq/drtgmcs.h \
  ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
@@ -265,6 +267,7 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -278,7 +281,9 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -309,6 +314,7 @@ tsearch.o: tsearch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -322,7 +328,9 @@ tsearch.o: tsearch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -362,8 +370,6 @@ tsearch.o: tsearch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -440,6 +446,7 @@ tsearch.o: tsearch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtbvcps.h \
  ../include/dcmtk/dcmrt/seq/drtrbas8.h \
  ../include/dcmtk/dcmrt/seq/drtrdrs8.h \
+ ../include/dcmtk/dcmrt/seq/drtgms.h ../include/dcmtk/dcmrt/seq/drtgmcs.h \
  ../include/dcmtk/dcmrt/seq/drtgpis.h \
  ../include/dcmtk/dcmrt/seq/drtipiqs.h \
  ../include/dcmtk/dcmrt/seq/drtaadcs.h \
diff --git a/dcmrt/tests/Makefile.in b/dcmrt/tests/Makefile.in
index 0c34ff7..63f9b3a 100644
--- a/dcmrt/tests/Makefile.in
+++ b/dcmrt/tests/Makefile.in
@@ -21,7 +21,7 @@ LOCALINCLUDES = -I$(dcmdatadir)/include -I$(oflogdir)/include -I$(ofstddir)/incl
 LIBDIRS = -L$(top_srcdir)/libsrc -L$(dcmimgledir)/libsrc -L$(dcmdatadir)/libsrc \
 	-L$(oflogdir)/libsrc -L$(ofstddir)/libsrc
 LOCALLIBS = -ldcmrt -ldcmimgle -ldcmdata -loflog -lofstd \
-	$(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS)
+	$(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
 test_objs = tests.o tsearch.o
 objs = drttest.o $(test_objs)
@@ -31,7 +31,7 @@ progs = drttest tests
 all: $(progs)
 
 drttest: drttest.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 tests: $(test_objs)
 	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $(test_objs) $(LOCALLIBS) $(LIBS)
diff --git a/dcmseg/CMakeLists.txt b/dcmseg/CMakeLists.txt
index d023052..7d32432 100644
--- a/dcmseg/CMakeLists.txt
+++ b/dcmseg/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmseg)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmseg_SOURCE_DIR}/include  ${dcmfg_SOURCE_DIR}/include ${dcmiod_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${ZLIB_INCDIR})
+INCLUDE_DIRECTORIES("${dcmseg_SOURCE_DIR}/include" "${dcmfg_SOURCE_DIR}/include" "${dcmiod_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" ${ZLIB_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc include tests)
diff --git a/dcmseg/include/CMakeLists.txt b/dcmseg/include/CMakeLists.txt
index 997f241..ce91089 100644
--- a/dcmseg/include/CMakeLists.txt
+++ b/dcmseg/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmseg DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE)
+INSTALL(DIRECTORY dcmtk/dcmseg DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE)
diff --git a/dcmseg/include/dcmtk/dcmseg/segdoc.h b/dcmseg/include/dcmtk/dcmseg/segdoc.h
index c6d0129..98be266 100644
--- a/dcmseg/include/dcmtk/dcmseg/segdoc.h
+++ b/dcmseg/include/dcmtk/dcmseg/segdoc.h
@@ -610,15 +610,17 @@ private:
                                const Uint16& cols,
                                const Uint16& numberOfFrames);
 
-  /** Read Fractional Type of segmentation
+  /** Read Fractional Type of segmentation.
    *  @param  item The item to read from
-   *  @return EC_Normal if type could be read, error otherwise
+   *  @return EC_Normal if type could be read, EC_TagNotFound if tag is not present,
+   *  error otherwise
    */
   OFCondition readSegmentationFractionalType(DcmItem& item);
 
   /** Read Segmentation Type of segmentation object
    *  @param  item The item to read from
-   *  @return EC_Normal if type could be read, error otherwise
+   *  @return EC_Normal if type could be read, EC_TagNotFound if tag is not present,
+   *  error otherwise
    */
   OFCondition readSegmentationType(DcmItem& item);
 
diff --git a/dcmseg/include/dcmtk/dcmseg/segment.h b/dcmseg/include/dcmtk/dcmseg/segment.h
index 74af90f..ce253e3 100644
--- a/dcmseg/include/dcmtk/dcmseg/segment.h
+++ b/dcmseg/include/dcmtk/dcmseg/segment.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, Open Connections GmbH
+ *  Copyright (C) 2015-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -116,7 +116,7 @@ public:
   virtual OFCondition getSegmentDescription(OFString& value,
                                             const signed long pos = 0);
 
-  /** Get the Segment Algorithm Type
+  /** Get the Segment Algorithm Type.
    *  @return The Algorithm Type
    */
   virtual DcmSegTypes::E_SegmentAlgoType getSegmentAlgorithmType();
@@ -150,11 +150,15 @@ public:
    */
   virtual OFVector<CodeSequenceMacro*>& getSegmentedPropertyTypeModifierCode();
 
-  /** Get Segment Surface Generation Algorithm Identification
-   *  @return Reference to the Segment Surface Generation Algorithm
+  /** Get Segmentation Algorithm Identification
+   *  @warning This method has earlier been named getSegmentSurfaceGenerationAlgorithmIdentification()
+   *           which has changed due to DICOM CP-1597. The code value returned is now
+   *           taken from the "Segmentation Algorithm Identification Sequence" instead of the
+   *           "Segment Surface Generation Algorithm Identification Sequence".
+   *  @return Reference to the Segmentation Algorithm Identification
    *  Identification, may be unset
    */
-  virtual AlgorithmIdentificationMacro& getSegmentSurfaceGenerationAlgorithmIdentification();
+  virtual AlgorithmIdentificationMacro& getSegmentationAlgorithmIdentification();
 
   /** Get Recommended Display Grayscale Value
    *  @param  value Reference to variable in which the value should be stored
@@ -219,13 +223,17 @@ public:
                                           const OFString& algoName,
                                           const OFBool checkValue = OFTrue);
 
-  /** Set Segment Surface Generation Algorithm Identification
+  /** Set Segmentation Algorithm Identification
+   *  @warning This method has earlier been named setSegmentSurfaceGenerationAlgorithmIdentification()
+   *           which has changed due to DICOM CP-1597. The resulting code value is now
+   *           written to the "Segmentation Algorithm Identification Sequence" instead of the
+   *           "Segment Surface Generation Algorithm Identification Sequence".
    *  @param  value The algorithm identification
    *  @param  checkValue If OFTrue, value undergoes some validity checks
    *  @return EC_Normal if setting was successful, error otherwise
    */
-  virtual OFCondition setSegmentSurfaceGenerationAlgorithmIdentification(const AlgorithmIdentificationMacro& value,
-                                                                         const OFBool checkValue = OFTrue);
+  virtual OFCondition setSegmentationAlgorithmIdentification(const AlgorithmIdentificationMacro& value,
+                                                             const OFBool checkValue = OFTrue);
 
   /** Set Recommended Display Grayscale Value
    *  @param  value Value to be set (single value only) or "" for no value
@@ -296,9 +304,11 @@ private:
   /// Segment Algorithm Name: (LO, 1, 1C)
   DcmLongString m_SegmentAlgorithmName;
 
-  /// Segment Surface Generation Algorithm Identification (SQ, 1, 3),
-  /// Baseline Context ID is 7162 (Surface Processing Algorithm Families)
-  AlgorithmIdentificationMacro m_SegmentSurfaceGenerationAlgorithmIdentification;
+  /// Segmentation Algorithm Identification (SQ, 1, 3).
+  /// This attribute has earlier been named m_SegmentationSurfaceGenerationAlgorithmIdentification
+  /// representing the related sequence. This has been changed in favor of the
+  /// Segmentation Algorithm Identification Sequence due to DICOM CP-1597.
+  AlgorithmIdentificationMacro m_SegmentationAlgorithmIdentification;
 
   /// Recommended Display Grayscale Value (US, 1, 3)
   DcmUnsignedShort m_RecommendedDisplayGrayscaleValue;
diff --git a/dcmseg/libsrc/Makefile.dep b/dcmseg/libsrc/Makefile.dep
index beca055..37463be 100644
--- a/dcmseg/libsrc/Makefile.dep
+++ b/dcmseg/libsrc/Makefile.dep
@@ -40,7 +40,7 @@ segdoc.o: segdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -59,10 +59,10 @@ segdoc.o: segdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../../dcmiod/include/dcmtk/dcmiod/modpatient.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
@@ -193,7 +193,9 @@ segment.o: segment.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -212,6 +214,7 @@ segment.o: segment.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -227,8 +230,6 @@ segment.o: segment.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmseg/segment.h \
@@ -285,7 +286,6 @@ segment.o: segment.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/dcmseg/segtypes.h ../include/dcmtk/dcmseg/segdef.h \
  ../include/dcmtk/dcmseg/segdoc.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodimage.h \
@@ -353,7 +353,9 @@ segtypes.o: segtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -372,6 +374,7 @@ segtypes.o: segtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -387,8 +390,6 @@ segtypes.o: segtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
@@ -444,7 +445,6 @@ segtypes.o: segtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/dcmseg/segtypes.h ../include/dcmtk/dcmseg/segdef.h
 segutils.o: segutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmseg/segutils.h ../include/dcmtk/dcmseg/segdef.h \
@@ -467,7 +467,10 @@ segutils.o: segutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -485,10 +488,10 @@ segutils.o: segutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -519,8 +522,6 @@ segutils.o: segutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -566,5 +567,4 @@ segutils.o: segutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
- ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h
+ ../../dcmiod/include/dcmtk/dcmiod/modbase.h
diff --git a/dcmseg/libsrc/segdoc.cc b/dcmseg/libsrc/segdoc.cc
index 75d0d0a..3c49436 100644
--- a/dcmseg/libsrc/segdoc.cc
+++ b/dcmseg/libsrc/segdoc.cc
@@ -423,7 +423,7 @@ void DcmSegmentation::getFramesForSegment(const size_t& segmentNumber,
   size_t numFrames = getNumberOfFrames();
   for (size_t count = 0; count < numFrames; count++)
   {
-    FGSegmentation* fg = OFstatic_cast(FGSegmentation*, m_FGInterface.get(count, DcmFGTypes::EFG_SEGMENTATION));
+    FGSegmentation* fg = OFstatic_cast(FGSegmentation*, m_FGInterface.get(OFstatic_cast(Uint32, count), DcmFGTypes::EFG_SEGMENTATION));
     if (fg == NULL)
     {
       DCMSEG_ERROR("Cannot get segmentation functional group for frame " << count);
@@ -451,7 +451,7 @@ OFCondition DcmSegmentation::addFrame(Uint8* pixData,
                                       const Uint16 segmentNumber,
                                       const OFVector<FGBase*>& perFrameInformation)
 {
-  Uint32 frameNo = m_Frames.size(); // will be the index of the frame (counted from 0)
+  Uint32 frameNo = OFstatic_cast(Uint32, m_Frames.size()); // will be the index of the frame (counted from 0)
   OFCondition result;
 
   // Check input parameters
@@ -552,19 +552,31 @@ OFCondition DcmSegmentation::setLossyImageCompressionFlag(const OFString& ratios
 OFCondition DcmSegmentation::saveFile(const OFString& filename,
                                       const E_TransferSyntax writeXfer)
 {
-  if ( (writeXfer != EXS_LittleEndianExplicit) &&
-       (writeXfer != EXS_BigEndianExplicit) &&
-       (writeXfer != EXS_LittleEndianImplicit))
+  if ( (writeXfer != EXS_LittleEndianExplicit)
+    && (writeXfer != EXS_BigEndianExplicit)
+    && (writeXfer != EXS_LittleEndianImplicit)
+#ifdef WITH_ZLIB
+    && (writeXfer != EXS_DeflatedLittleEndianExplicit)
+#endif
+  )
   {
     DcmXfer ts(writeXfer);
-    DCMSEG_ERROR("Cannot write transfer syntax: " << ts.getXferName() << " (can only write uncompressed)");
+#ifdef WITH_ZLIB
+    DCMSEG_ERROR("Cannot write transfer syntax: " << ts.getXferName() << ": Can only write uncompressed or Deflated)");
+#else
+    if (writeXfer == EXS_DeflatedLittleEndianExplicit)
+    {
+      DCMSEG_ERROR("Cannot write transfer syntax: " << ts.getXferName() << ": Deflate (ZLIB) support disabled, can only write uncompressed");
+    }
+#endif
     return EC_CannotChangeRepresentation;
   }
+
   DcmFileFormat dcmff;
   OFCondition result = write( *(dcmff.getDataset()) );
   if (result.good())
   {
-    result = dcmff.saveFile(filename.c_str(), EXS_LittleEndianExplicit);
+    result = dcmff.saveFile(filename.c_str(), writeXfer);
   }
   if (result.bad())
   {
@@ -648,7 +660,7 @@ OFBool DcmSegmentation::getSegmentNumber(const DcmSegment* segment,
     if (m_Segments.at(count) == segment)
     {
       // logical segment numbering starts with 1 but vector index with 0
-      segmentNumber = count + 1;
+      segmentNumber = OFstatic_cast(unsigned int, count + 1);
       return OFTrue;
     }
   }
@@ -884,7 +896,7 @@ OFCondition DcmSegmentation::writeFractionalFrames(DcmItem& dataset)
     memcpy(pixdata + count*(*it)->length, (*it)->pixData, (*it)->length);
     it++;
   }
-  dataset.putAndInsertUint8Array(DCM_PixelData, pixdata, numBytes, OFTrue);
+  dataset.putAndInsertUint8Array(DCM_PixelData, pixdata, OFstatic_cast(unsigned long, numBytes), OFTrue);
   delete[] pixdata;
   return result;
 }
@@ -907,7 +919,7 @@ OFCondition DcmSegmentation::writeBinaryFrames(DcmItem& dataset)
 
   // Fill Pixel Data Element
   concatFrames(m_Frames, pixdata, rows*cols);
-  result = dataset.putAndInsertUint8Array(DCM_PixelData, pixdata, numBytes, OFTrue);
+  result = dataset.putAndInsertUint8Array(DCM_PixelData, pixdata, OFstatic_cast(unsigned long, numBytes), OFTrue);
   delete [] pixdata;
   return result;
 }
@@ -1111,6 +1123,11 @@ OFCondition DcmSegmentation::loadFile(DcmFileFormat& dcmff,
 
 OFCondition DcmSegmentation::readSegmentationFractionalType(DcmItem& item)
 {
+  m_SegmentationFractionalType = DcmSegTypes::SFT_UNKNOWN;
+  if (!item.tagExists(DCM_SegmentationFractionalType))
+  {
+    return EC_TagNotFound;
+  }
   DcmCodeString element(DCM_SegmentationFractionalType);
   OFCondition result = DcmIODUtil::getAndCheckElementFromDataset(item, element, getRules()->getByTag(DCM_SegmentationFractionalType));
   OFString str;
@@ -1132,6 +1149,12 @@ OFCondition DcmSegmentation::readSegmentationFractionalType(DcmItem& item)
 
 OFCondition DcmSegmentation::readSegmentationType(DcmItem& item)
 {
+  m_SegmentationType = DcmSegTypes::ST_UNKNOWN;
+  if (!item.tagExists(DCM_SegmentationType))
+  {
+    return EC_TagNotFound;
+  }
+
   DcmCodeString element(DCM_SegmentationType);
   OFCondition result = DcmIODUtil::getAndCheckElementFromDataset(item, element, getRules()->getByTag(DCM_SegmentationType));
   OFString str;
@@ -1185,7 +1208,7 @@ OFBool DcmSegmentation::check()
   for (size_t count = 0; count < m_Frames.size(); count++)
   {
     OFBool isPerFrame;
-    FGBase* group = m_FGInterface.get(count, DcmFGTypes::EFG_FRAMECONTENT, isPerFrame);
+    FGBase* group = m_FGInterface.get(OFstatic_cast(Uint32, count), DcmFGTypes::EFG_FRAMECONTENT, isPerFrame);
     if (group == NULL)
     {
       DCMSEG_ERROR("Frame Content Functional Group not present for frame " << count);
diff --git a/dcmseg/libsrc/segment.cc b/dcmseg/libsrc/segment.cc
index 81baeac..de0ef59 100644
--- a/dcmseg/libsrc/segment.cc
+++ b/dcmseg/libsrc/segment.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, Open Connections GmbH
+ *  Copyright (C) 2015-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -79,8 +79,8 @@ OFCondition DcmSegment::read(DcmItem& item,
 
   DcmIODUtil::readSingleItem<AlgorithmIdentificationMacro>(
     item,
-    DCM_SegmentSurfaceGenerationAlgorithmIdentificationSequence,
-    m_SegmentSurfaceGenerationAlgorithmIdentification,
+    DCM_SegmentationAlgorithmIdentificationSequence,
+    m_SegmentationAlgorithmIdentification,
     "3",
     "Segmentation Image Module");
 
@@ -99,12 +99,12 @@ OFCondition DcmSegment::write(DcmItem& item)
   result = m_SegmentDescription.write(item);
   DcmIODUtil::copyElementToDataset(result, item, m_SegmentAlgorithmName, m_Rules.getByTag(DCM_SegmentAlgorithmName));
 
-  if (result.good() && m_SegmentSurfaceGenerationAlgorithmIdentification.check(OFTrue /* quiet */).good())
+  if (result.good() && m_SegmentationAlgorithmIdentification.check(OFTrue /* quiet */).good())
   {
     DcmIODUtil::writeSingleItem<AlgorithmIdentificationMacro>(
     result,
-    DCM_SegmentSurfaceGenerationAlgorithmIdentificationSequence,
-    m_SegmentSurfaceGenerationAlgorithmIdentification,
+    DCM_SegmentationAlgorithmIdentificationSequence,
+    m_SegmentationAlgorithmIdentification,
     item,
     "3",
     "Segmentation Image Module");
@@ -124,7 +124,7 @@ void DcmSegment::clearData()
 {
   m_SegmentDescription.clearData();
   m_SegmentAlgorithmName.clear();
-  m_SegmentSurfaceGenerationAlgorithmIdentification.clearData();
+  m_SegmentationAlgorithmIdentification.clearData();
   m_RecommendedDisplayGrayscaleValue.clear();
   m_RecommendedDisplayCIELabValue.clear();
   m_TrackingID.clear();
@@ -144,7 +144,7 @@ DcmSegment::DcmSegment() :
   m_SegmentationDoc(NULL),
   m_SegmentDescription(),
   m_SegmentAlgorithmName(DCM_SegmentAlgorithmName),
-  m_SegmentSurfaceGenerationAlgorithmIdentification(),
+  m_SegmentationAlgorithmIdentification(),
   m_RecommendedDisplayGrayscaleValue(DCM_RecommendedDisplayGrayscaleValue),
   m_RecommendedDisplayCIELabValue(DCM_RecommendedDisplayCIELabValue),
   m_TrackingID(DCM_TrackingID),
@@ -210,9 +210,9 @@ GeneralAnatomyMacro& DcmSegment::getGeneralAnatomyCode()
 }
 
 
-AlgorithmIdentificationMacro& DcmSegment::getSegmentSurfaceGenerationAlgorithmIdentification()
+AlgorithmIdentificationMacro& DcmSegment::getSegmentationAlgorithmIdentification()
 {
-  return m_SegmentSurfaceGenerationAlgorithmIdentification;
+  return m_SegmentationAlgorithmIdentification;
 }
 
 
@@ -325,19 +325,19 @@ OFCondition DcmSegment::setSegmentAlgorithm(const DcmSegTypes::E_SegmentAlgoType
 }
 
 
-OFCondition DcmSegment::setSegmentSurfaceGenerationAlgorithmIdentification(const AlgorithmIdentificationMacro& value,
-                                                                           const OFBool checkValue)
+OFCondition DcmSegment::setSegmentationAlgorithmIdentification(const AlgorithmIdentificationMacro& value,
+                                                               const OFBool checkValue)
 {
-  m_SegmentSurfaceGenerationAlgorithmIdentification = value;
+  m_SegmentationAlgorithmIdentification = value;
   OFCondition result;
   if (checkValue)
   {
-    result = m_SegmentSurfaceGenerationAlgorithmIdentification.check();
+    result = m_SegmentationAlgorithmIdentification.check();
   }
 
   if (result.bad())
   {
-    m_SegmentSurfaceGenerationAlgorithmIdentification.clearData();
+    m_SegmentationAlgorithmIdentification.clearData();
   }
 
   return result;
diff --git a/dcmseg/tests/Makefile.dep b/dcmseg/tests/Makefile.dep
index b01f53c..8e0584d 100644
--- a/dcmseg/tests/Makefile.dep
+++ b/dcmseg/tests/Makefile.dep
@@ -18,6 +18,7 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -31,7 +32,9 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -62,6 +65,7 @@ tutils.o: tutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -75,7 +79,9 @@ tutils.o: tutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -116,8 +122,6 @@ tutils.o: tutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -163,5 +167,4 @@ tutils.o: tutils.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
- ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h
+ ../../dcmiod/include/dcmtk/dcmiod/modbase.h
diff --git a/dcmseg/tests/Makefile.in b/dcmseg/tests/Makefile.in
index c899b67..12ce44f 100644
--- a/dcmseg/tests/Makefile.in
+++ b/dcmseg/tests/Makefile.in
@@ -10,22 +10,21 @@ srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 configdir = @top_srcdir@/@configdir@
 
+include $(configdir)/@common_makefile@
+
 ofstddir = $(top_srcdir)/../ofstd
 oflogdir = $(top_srcdir)/../oflog
 dcmdatadir = $(top_srcdir)/../dcmdata
 dcmioddir = $(top_srcdir)/../dcmiod
 dcmfgdir = $(top_srcdir)/../dcmfg
 
-
-include $(configdir)/@common_makefile@
-
 LIBDIRS = -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc -L$(oflogdir)/libsrc \
 	-L$(dcmdatadir)/libsrc -L$(dcmioddir)/libsrc -L$(dcmfgdir)/libsrc
-LOCALLIBS = -ldcmseg -ldcmfg -ldcmiod -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS)
+LOCALLIBS = -ldcmseg -ldcmfg -ldcmiod -ldcmdata -loflog -lofstd $(ZLIBLIBS) \
+	$(CHARCONVLIBS) $(MATHLIBS)
 LOCALINCLUDES = -I$(top_srcdir)/include -I$(ofstddir)/include -I$(oflogdir)/include \
 	-I$(dcmdatadir)/include -I$(dcmioddir)/include -I$(dcmfgdir)/include \
 
-
 test_objs = tests.o tutils.o
 objs = $(test_objs)
 progs = tests
diff --git a/dcmsign/CMakeLists.txt b/dcmsign/CMakeLists.txt
index dba1e51..9bda43f 100644
--- a/dcmsign/CMakeLists.txt
+++ b/dcmsign/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmsign)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmsign_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${ZLIB_INCDIR} ${OPENSSL_INCDIR})
+INCLUDE_DIRECTORIES("${dcmsign_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" ${ZLIB_INCDIR} ${OPENSSL_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc apps include)
diff --git a/dcmsign/apps/Makefile.dep b/dcmsign/apps/Makefile.dep
index b044fe0..89a8414 100644
--- a/dcmsign/apps/Makefile.dep
+++ b/dcmsign/apps/Makefile.dep
@@ -19,7 +19,10 @@ dcmsign.o: dcmsign.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -37,10 +40,10 @@ dcmsign.o: dcmsign.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmsign/dcsignat.h ../include/dcmtk/dcmsign/sitypes.h \
  ../include/dcmtk/dcmsign/sidefine.h \
@@ -78,8 +81,6 @@ dcmsign.o: dcmsign.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
diff --git a/dcmsign/apps/Makefile.in b/dcmsign/apps/Makefile.in
index f19ba74..9ef70f5 100644
--- a/dcmsign/apps/Makefile.in
+++ b/dcmsign/apps/Makefile.in
@@ -17,8 +17,10 @@ oflogdir = $(top_srcdir)/../oflog
 dcmdatadir = $(top_srcdir)/../dcmdata
 
 LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include -I$(dcmdatadir)/include
-LIBDIRS = -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc -L$(oflogdir)/libsrc -L$(dcmdatadir)/libsrc
-LOCALLIBS = -ldcmdsig -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(OPENSSLLIBS) $(CHARCONVLIBS)
+LIBDIRS = -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc -L$(oflogdir)/libsrc \
+	-L$(dcmdatadir)/libsrc
+LOCALLIBS = -ldcmdsig -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(OPENSSLLIBS) \
+	$(CHARCONVLIBS) $(MATHLIBS)
 
 objs = dcmsign.o
 progs = dcmsign
@@ -27,7 +29,7 @@ progs = dcmsign
 all: $(progs)
 
 dcmsign: dcmsign.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 
 install: all
diff --git a/dcmsign/apps/dcmsign.cc b/dcmsign/apps/dcmsign.cc
index 1a0d81e..4694d4f 100644
--- a/dcmsign/apps/dcmsign.cc
+++ b/dcmsign/apps/dcmsign.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,10 +27,6 @@
 #define INCLUDE_CCTYPE
 #include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>
-#endif
-
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/oflog/oflog.h"
 #include "dcmtk/ofstd/ofconapp.h"
@@ -696,12 +692,6 @@ static int do_remove(
 
 int main(int argc, char *argv[])
 {
-
-#ifdef HAVE_GUSI_H
-  GUSISetup(GUSIwithSIOUXSockets);
-  GUSISetup(GUSIwithInternetSockets);
-#endif
-
   DcmSignature::initializeLibrary(); // initialize dcmsign
 
   const char *                  opt_certfile = NULL;
diff --git a/dcmsign/docs/dcmsign.man b/dcmsign/docs/dcmsign.man
index 6b7a603..5acae9a 100644
--- a/dcmsign/docs/dcmsign.man
+++ b/dcmsign/docs/dcmsign.man
@@ -6,13 +6,13 @@
 \page dcmsign dcmsign: Sign and Verify DICOM Files
 \endif
 
-\section synopsis SYNOPSIS
+\section dcmsign_synopsis SYNOPSIS
 
 \verbatim
 dcmsign [options] dcmfile-in [dcmfile-out]
 \endverbatim
 
-\section description DESCRIPTION
+\section dcmsign_description DESCRIPTION
 
 The \b dcmsign utility reads a DICOM file (\e dcmfile-in), performs a digital
 signature operation and, if any modification has taken place, writes the DICOM
@@ -27,7 +27,7 @@ Five digital signature operations are supported:
 \li removal of a single digital signature from the DICOM file, and
 \li removal of all digital signatures from the DICOM file.
 
-\section parameters PARAMETERS
+\section dcmsign_parameters PARAMETERS
 
 \verbatim
 dcmfile-in   DICOM input filename to be processed
@@ -35,9 +35,9 @@ dcmfile-in   DICOM input filename to be processed
 dcmfile-out  DICOM output filename
 \endverbatim
 
-\section options OPTIONS
+\section dcmsign_options OPTIONS
 
-\subsection general_options general options
+\subsection dcmsign_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -65,7 +65,7 @@ dcmfile-out  DICOM output filename
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dcmsign_input_options input options
 \verbatim
 input file format:
 
@@ -96,7 +96,7 @@ input transfer syntax:
           read with implicit VR little endian TS
 \endverbatim
 
-\subsection signature_commands signature commands
+\subsection dcmsign_signature_commands signature commands
 \verbatim
         --verify
           verify all signatures (default)
@@ -114,7 +114,7 @@ input transfer syntax:
           remove all signatures from data set
 \endverbatim
 
-\subsection signature_creation_options signature creation options (only with --sign or --sign-item):
+\subsection dcmsign_signature_creation_options signature creation options (only with --sign or --sign-item):
 \verbatim
 private key password:
 
@@ -180,7 +180,7 @@ signature format:
           if signature includes compressed pixel data
 \endverbatim
 
-\subsection output_options output options
+\subsection dcmsign_output_options output options
 \verbatim
 output transfer syntax:
 
@@ -211,9 +211,9 @@ other output options:
           (only with --sign or --sign-item)
 \endverbatim
 
-\section notes NOTES
+\section dcmsign_notes NOTES
 
-\subsection files_and_parameters Files and Parameters
+\subsection dcmsign_files_and_parameters Files and Parameters
 
 The \b dcmsign utility reads and writes a number of files and file formats
 which are described in this section.
@@ -269,7 +269,7 @@ ReferencedImageSequence (0008,1140) which is located in the first item of the
 ReferencedSeriesSequence (0008,1115) which is located in the main DICOM
 dataset.
 
-\section logging LOGGING
+\section dcmsign_logging 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
@@ -288,7 +288,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dcmsign_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -310,7 +310,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dcmsign_environment ENVIRONMENT
 
 The \b dcmsign utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -326,8 +326,8 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section copyright COPYRIGHT
+\section dcmsign_copyright COPYRIGHT
 
 Copyright (C) 2000-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
-*/
\ No newline at end of file
+*/
diff --git a/dcmsign/include/CMakeLists.txt b/dcmsign/include/CMakeLists.txt
index 19f266d..7fc3113 100644
--- a/dcmsign/include/CMakeLists.txt
+++ b/dcmsign/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmsign DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmsign DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmsign/libsrc/Makefile.dep b/dcmsign/libsrc/Makefile.dep
index e24c1a1..21c2ccf 100644
--- a/dcmsign/libsrc/Makefile.dep
+++ b/dcmsign/libsrc/Makefile.dep
@@ -22,7 +22,10 @@ dcsignat.o: dcsignat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -40,9 +43,9 @@ dcsignat.o: dcsignat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -102,7 +105,10 @@ siautopr.o: siautopr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -120,9 +126,9 @@ siautopr.o: siautopr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -153,7 +159,10 @@ sibrsapr.o: sibrsapr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -171,9 +180,9 @@ sibrsapr.o: sibrsapr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -200,6 +209,7 @@ sicert.o: sicert.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -212,7 +222,9 @@ sicert.o: sicert.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -277,7 +289,10 @@ sicreapr.o: sicreapr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -295,9 +310,9 @@ sicreapr.o: sicreapr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -342,7 +357,10 @@ simaccon.o: simaccon.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -360,9 +378,9 @@ simaccon.o: simaccon.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -420,7 +438,10 @@ sinullpr.o: sinullpr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -438,9 +459,9 @@ sinullpr.o: sinullpr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h
@@ -564,7 +585,10 @@ sisprof.o: sisprof.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -582,9 +606,9 @@ sisprof.o: sisprof.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
diff --git a/dcmsign/libsrc/sicertvf.cc b/dcmsign/libsrc/sicertvf.cc
index 493840c..5de5efb 100644
--- a/dcmsign/libsrc/sicertvf.cc
+++ b/dcmsign/libsrc/sicertvf.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2016, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -42,7 +42,7 @@ SiCertificateVerifier::SiCertificateVerifier()
 
 SiCertificateVerifier::~SiCertificateVerifier()
 {
-  if (x509store) X509_STORE_free(x509store);	
+  if (x509store) X509_STORE_free(x509store);
 }
 
 
@@ -68,7 +68,7 @@ OFCondition SiCertificateVerifier::addTrustedCertificateDir(const char *pathName
 
 OFCondition SiCertificateVerifier::addCertificateRevocationList(const char *fileName, int fileType)
 {
-  OFCondition result = SI_EC_CannotRead;  
+  OFCondition result = SI_EC_CannotRead;
   X509_CRL *x509crl = NULL;
   if (fileName)
   {
@@ -80,14 +80,14 @@ OFCondition SiCertificateVerifier::addCertificateRevocationList(const char *file
         if (fileType == X509_FILETYPE_ASN1)
         {
           x509crl = d2i_X509_CRL_bio(in, NULL);
-          if (x509crl) 
+          if (x509crl)
           {
             X509_STORE_add_crl(x509store, x509crl);
             result = EC_Normal;
           }
         } else {
           x509crl = PEM_read_bio_X509_CRL(in, NULL, NULL, NULL);
-          if (x509crl) 
+          if (x509crl)
           {
             X509_STORE_add_crl(x509store, x509crl);
             result = EC_Normal;
@@ -109,12 +109,16 @@ OFCondition SiCertificateVerifier::verifyCertificate(SiCertificate& certificate)
 
   X509_STORE_CTX *ctx = X509_STORE_CTX_new();
   X509_STORE_CTX_init(ctx, x509store, rawcert, NULL);
-  int ok = X509_verify_cert(ctx); /* returns nonzero if successful */
+
+  // If a complete chain can be built and validated X509_verify_cert() returns 1,
+  // otherwise it returns zero, in exceptional circumstances it can also return a negative code.
+  int ok = X509_verify_cert(ctx);
+
   errorCode = X509_STORE_CTX_get_error(ctx);
   X509_STORE_CTX_cleanup(ctx);
   X509_STORE_CTX_free(ctx);
 
-  if (ok) return EC_Normal; else return SI_EC_VerificationFailed_NoTrust;
+  if (ok == 1) return EC_Normal; else return SI_EC_VerificationFailed_NoTrust;
 }
 
 
diff --git a/dcmsr/CMakeLists.txt b/dcmsr/CMakeLists.txt
index 52dae65..d4080c6 100644
--- a/dcmsr/CMakeLists.txt
+++ b/dcmsr/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmsr)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmsr_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${dcmimage_SOURCE_DIR}/include ${ZLIB_INCDIR} ${LIBXML_INCDIR})
+INCLUDE_DIRECTORIES("${dcmsr_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" "${dcmimage_SOURCE_DIR}/include" ${ZLIB_INCDIR} ${LIBXML_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc libcmr apps tests include data)
diff --git a/dcmsr/apps/Makefile.dep b/dcmsr/apps/Makefile.dep
index 7eef227..f81801a 100644
--- a/dcmsr/apps/Makefile.dep
+++ b/dcmsr/apps/Makefile.dep
@@ -29,7 +29,10 @@ dsr2html.o: dsr2html.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -46,9 +49,9 @@ dsr2html.o: dsr2html.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -60,8 +63,6 @@ dsr2html.o: dsr2html.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -76,8 +77,7 @@ dsr2html.o: dsr2html.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrrtpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrrtpl.h \
  ../include/dcmtk/dcmsr/dsrctpl.h ../include/dcmtk/dcmsr/dsrsoprf.h \
  ../include/dcmtk/dcmsr/dsrrefin.h ../include/dcmtk/dcmsr/dsrcsidl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
@@ -164,7 +164,10 @@ dsr2xml.o: dsr2xml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -181,9 +184,9 @@ dsr2xml.o: dsr2xml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -195,8 +198,6 @@ dsr2xml.o: dsr2xml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -211,8 +212,7 @@ dsr2xml.o: dsr2xml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrrtpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrrtpl.h \
  ../include/dcmtk/dcmsr/dsrctpl.h ../include/dcmtk/dcmsr/dsrsoprf.h \
  ../include/dcmtk/dcmsr/dsrrefin.h ../include/dcmtk/dcmsr/dsrcsidl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
@@ -299,7 +299,10 @@ dsrdump.o: dsrdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -316,9 +319,9 @@ dsrdump.o: dsrdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -330,8 +333,6 @@ dsrdump.o: dsrdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -346,8 +347,7 @@ dsrdump.o: dsrdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrrtpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrrtpl.h \
  ../include/dcmtk/dcmsr/dsrctpl.h ../include/dcmtk/dcmsr/dsrsoprf.h \
  ../include/dcmtk/dcmsr/dsrrefin.h ../include/dcmtk/dcmsr/dsrcsidl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
@@ -434,7 +434,10 @@ xml2dsr.o: xml2dsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -451,9 +454,9 @@ xml2dsr.o: xml2dsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -465,8 +468,6 @@ xml2dsr.o: xml2dsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -481,8 +482,7 @@ xml2dsr.o: xml2dsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrrtpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrrtpl.h \
  ../include/dcmtk/dcmsr/dsrctpl.h ../include/dcmtk/dcmsr/dsrsoprf.h \
  ../include/dcmtk/dcmsr/dsrrefin.h ../include/dcmtk/dcmsr/dsrcsidl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
diff --git a/dcmsr/apps/Makefile.in b/dcmsr/apps/Makefile.in
index 6de5159..2ca2bbb 100644
--- a/dcmsr/apps/Makefile.in
+++ b/dcmsr/apps/Makefile.in
@@ -23,7 +23,7 @@ LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include -I$(dcmdatadir)/incl
 LIBDIRS = -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc -L$(oflogdir)/libsrc \
 	-L$(dcmdatadir)/libsrc -L$(dcmimgledir)/libsrc -L$(dcmimagedir)/libsrc
 LOCALLIBS = -ldcmsr -ldcmimage -ldcmimgle -ldcmdata -loflog -lofstd $(TIFFLIBS) \
-	$(PNGLIBS) $(XMLLIBS) $(ZLIBLIBS) $(CHARCONVLIBS)
+	$(PNGLIBS) $(XMLLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
 objs = dsrdump.o dsr2html.o dsr2xml.o xml2dsr.o
 progs = dsrdump dsr2html dsr2xml xml2dsr
@@ -32,16 +32,16 @@ progs = dsrdump dsr2html dsr2xml xml2dsr
 all: $(progs)
 
 dsrdump: dsrdump.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dsr2html: dsr2html.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 dsr2xml: dsr2xml.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 xml2dsr: xml2dsr.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 
 install: install-bin
diff --git a/dcmsr/data/CMakeLists.txt b/dcmsr/data/CMakeLists.txt
index 2fb656c..c44e208 100644
--- a/dcmsr/data/CMakeLists.txt
+++ b/dcmsr/data/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(FILES dsr2xml.xsd report.css reportx.css DESTINATION ${DCMTK_INSTALL_DATDIR} COMPONENT data)
+INSTALL(FILES dsr2xml.xsd report.css reportx.css DESTINATION "${DCMTK_INSTALL_DATDIR}" COMPONENT data)
diff --git a/dcmsr/data/dsr2xml.xsd b/dcmsr/data/dsr2xml.xsd
index b9cc3bd..7b5702d 100644
--- a/dcmsr/data/dsr2xml.xsd
+++ b/dcmsr/data/dsr2xml.xsd
@@ -10,7 +10,7 @@
   <xsd:annotation>
     <xsd:documentation xml:lang="en">
       XML Schema for DCMTK tools dsr2xml and xml2dsr.
-      Copyright (C) 2003-2016, OFFIS e.V.
+      Copyright (C) 2003-2017, OFFIS e.V.
       All rights reserved.  See COPYRIGHT file for details.
     </xsd:documentation>
   </xsd:annotation>
@@ -724,6 +724,7 @@
       <xsd:enumeration value="Extensible SR"/>
       <xsd:enumeration value="Acquisition Context SR"/>
       <xsd:enumeration value="Simplified Adult Echo SR"/>
+      <xsd:enumeration value="Patient Radiation Dose SR"/>
     </xsd:restriction>
   </xsd:simpleType>
 
@@ -872,8 +873,9 @@
   </xsd:simpleType>
 
   <xsd:simpleType name="DecimalString">
-    <xsd:restriction base="xsd:decimal">
-      <xsd:totalDigits value="16"/>
+    <xsd:restriction base="xsd:string">
+      <xsd:pattern value="[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?"/>
+      <xsd:maxLength value="16"/>
     </xsd:restriction>
   </xsd:simpleType>
 
@@ -919,9 +921,8 @@
 
   <xsd:simpleType name="UniqueIdentifier">
     <xsd:restriction base="xsd:string">
-      <xsd:minLength value="1"/>
       <xsd:maxLength value="64"/>
-      <xsd:pattern value="\d+(\.\d+)*"/>
+      <xsd:pattern value="(([1-9][0-9]*)|0)(\.([1-9][0-9]*|0))+"/>
     </xsd:restriction>
   </xsd:simpleType>
 
diff --git a/dcmsr/docs/dsr2html.man b/dcmsr/docs/dsr2html.man
index 809fbdc..b3ae2c6 100644
--- a/dcmsr/docs/dsr2html.man
+++ b/dcmsr/docs/dsr2html.man
@@ -6,13 +6,13 @@
 \page dsr2html dsr2html: Render DICOM SR file and data set to HTML/XHTML
 \endif
 
-\section synopsis SYNOPSIS
+\section dsr2html_synopsis SYNOPSIS
 
 \verbatim
 dsr2html [options] dsrfile-in [htmlfile-out]
 \endverbatim
 
-\section description DESCRIPTION
+\section dsr2html_description DESCRIPTION
 
 The \b dsr2html utility renders the contents of a DICOM Structured Reporting
 (SR) document (file format or raw data set) to HTML (Hyper Text Markup
@@ -27,7 +27,7 @@ whenever possible (using the \b dcmconv utility).  It is also possible to use
 the \e -f and <em>-t[ieb]</em> options to force \b dsr2html to read a dataset
 with a particular transfer syntax.
 
-\section parameters PARAMETERS
+\section dsr2html_parameters PARAMETERS
 
 \verbatim
 dsrfile-in    DICOM SR input filename to be rendered
@@ -35,9 +35,9 @@ dsrfile-in    DICOM SR input filename to be rendered
 htmlfile-out  HTML/XHTML output filename (default: stdout)
 \endverbatim
 
-\section options OPTIONS
+\section dsr2html_options OPTIONS
 
-\subsection general_options general options
+\subsection dsr2html_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -65,7 +65,7 @@ htmlfile-out  HTML/XHTML output filename (default: stdout)
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dsr2html_input_options input options
 \verbatim
 input file format:
 
@@ -96,7 +96,7 @@ input transfer syntax:
          read with implicit VR little endian TS
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dsr2html_processing_options processing options
 \verbatim
 additional information:
 
@@ -149,7 +149,7 @@ specific character set:
          # (see output of --version on which one is available)
 \endverbatim
 
-\subsection output_options output options
+\subsection dsr2html_output_options output options
 \verbatim
 HTML/XHTML compatibility:
 
@@ -225,9 +225,9 @@ code rendering:
          render code details as a tooltip (implies +Cc)
 \endverbatim
 
-\section notes NOTES
+\section dsr2html_notes NOTES
 
-\subsection dicom_conformance DICOM Conformance
+\subsection dsr2html_dicom_conformance DICOM Conformance
 
 The \b dsr2html utility supports the following SOP Classes:
 
@@ -250,7 +250,7 @@ AcquisitionContextSRStorage                 1.2.840.10008.5.1.4.1.1.88.71
 SimplifiedAdultEchoSRStorage                1.2.840.10008.5.1.4.1.1.88.72
 \endverbatim
 
-\subsection character_encoding Character Encoding
+\subsection dsr2html_character_encoding Character Encoding
 
 The HTML/XHTML encoding is determined automatically from the DICOM attribute
 (0008,0005) "Specific Character Set" using the following mapping:
@@ -285,7 +285,7 @@ latin-1, latin-2, latin-3, latin-4, latin-5, cyrillic, arabic, greek, hebrew.
 Option \e --convert-to-utf8 can be used to convert the DICOM file or data set
 to UTF-8 encoding prior to the rendering to HTML/XHTML format.
 
-\section logging LOGGING
+\section dsr2html_logging 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
@@ -304,7 +304,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dsr2html_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -326,7 +326,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dsr2html_environment ENVIRONMENT
 
 The \b dsr2html utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -342,16 +342,16 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dsr2html_files FILES
 
 <em>\<datadir\>/report.css</em> - Sample Cascading Stylesheet file for HTML
 <em>\<datadir\>/reportx.css</em> - Sample Cascading Stylesheet file for XHTML
 
-\section see_also SEE ALSO
+\section dsr2html_see_also SEE ALSO
 
 <b>dcmconv</b>(1)
 
-\section copyright COPYRIGHT
+\section dsr2html_copyright COPYRIGHT
 
 Copyright (C) 2000-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmsr/docs/dsr2xml.man b/dcmsr/docs/dsr2xml.man
index 83e8b0b..efa5f0d 100644
--- a/dcmsr/docs/dsr2xml.man
+++ b/dcmsr/docs/dsr2xml.man
@@ -6,13 +6,13 @@
 \page dsr2xml dsr2xml: Convert DICOM SR file and data set to XML
 \endif
 
-\section synopsis SYNOPSIS
+\section dsr2xml_synopsis SYNOPSIS
 
 \verbatim
 dsr2xml [options] dsrfile-in [xmlfile-out]
 \endverbatim
 
-\section description DESCRIPTION
+\section dsr2xml_description DESCRIPTION
 
 The \b dsr2xml utility converts the contents of a DICOM Structured Reporting
 (SR) document (file format or raw data set) to XML (Extensible Markup
@@ -29,7 +29,7 @@ whenever possible (using the \b dcmconv utility).  It is also possible to use
 the \e -f and <em>-t[ieb]</em> options to force \b dsr2xml to read a dataset
 with a particular transfer syntax.
 
-\section parameters PARAMETERS
+\section dsr2xml_parameters PARAMETERS
 
 \verbatim
 dsrfile-in   DICOM SR input filename to be converted
@@ -37,9 +37,9 @@ dsrfile-in   DICOM SR input filename to be converted
 xmlfile-out  XML output filename (default: stdout)
 \endverbatim
 
-\section options OPTIONS
+\section dsr2xml_options OPTIONS
 
-\subsection general_options general options
+\subsection dsr2xml_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -67,7 +67,7 @@ xmlfile-out  XML output filename (default: stdout)
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dsr2xml_input_options input options
 \verbatim
 input file format:
 
@@ -98,7 +98,7 @@ input transfer syntax:
          read with implicit VR little endian TS
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dsr2xml_processing_options processing options
 \verbatim
 error handling:
 
@@ -145,7 +145,7 @@ specific character set:
          # (see output of --version on which one is available)
 \endverbatim
 
-\subsection output_options output options
+\subsection dsr2xml_output_options output options
 \verbatim
 encoding:
 
@@ -191,9 +191,9 @@ writing:
          write template identification information
 \endverbatim
 
-\section notes NOTES
+\section dsr2xml_notes NOTES
 
-\subsection dicom_conformance DICOM Conformance
+\subsection dsr2xml_dicom_conformance DICOM Conformance
 
 The \b dsr2xml utility supports the following SOP Classes:
 
@@ -219,7 +219,7 @@ SimplifiedAdultEchoSRStorage                1.2.840.10008.5.1.4.1.1.88.72
 Please note that currently only mandatory and some optional attributes are
 supported.
 
-\subsection character_encoding Character Encoding
+\subsection dsr2xml_character_encoding Character Encoding
 
 The XML encoding is determined automatically from the DICOM attribute
 (0008,0005) "Specific Character Set" using the following mapping:
@@ -254,7 +254,7 @@ latin-1, latin-2, latin-3, latin-4, latin-5, cyrillic, arabic, greek, hebrew.
 Option \e --convert-to-utf8 can be used to convert the DICOM file or data set
 to UTF-8 encoding prior to the conversion to XML format.
 
-\subsection error_handling Error Handling
+\subsection dsr2xml_error_handling Error Handling
 
 Please be careful with the processing options \e --unknown-relationship,
 \e --invalid-item-value, \e --ignore-constraints, \e --ignore-item-errors and
@@ -263,13 +263,13 @@ DICOM SR input file and, therefore, might result in non-standard conformant
 output.  However, there might be reasons for using one or more of these
 options, e.g. in order to read and process an incorrectly encoded SR document.
 
-\subsection limitations Limitations
+\subsection dsr2xml_limitations Limitations
 
 The XML Schema <em>dsr2xml.xsd</em> does not support all variations of the
 \b dsr2xml output format.  However, the default output format (plus option
 \e --use-xml-namespace) should work.
 
-\section logging LOGGING
+\section dsr2xml_logging 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
@@ -288,7 +288,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dsr2xml_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -310,7 +310,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dsr2xml_environment ENVIRONMENT
 
 The \b dsr2xml utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -326,15 +326,15 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section dsr2xml_files FILES
 
 <em>\<datadir\>/dsr2xml.xsd</em> - XML Schema file
 
-\section see_also SEE ALSO
+\section dsr2xml_see_also SEE ALSO
 
 <b>xml2dsr</b>(1), <b>dcmconv</b>(1)
 
-\section copyright COPYRIGHT
+\section dsr2xml_copyright COPYRIGHT
 
 Copyright (C) 2000-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmsr/docs/dsrdump.man b/dcmsr/docs/dsrdump.man
index b2f51ed..e3e2ab4 100644
--- a/dcmsr/docs/dsrdump.man
+++ b/dcmsr/docs/dsrdump.man
@@ -6,13 +6,13 @@
 \page dsrdump dsrdump: Dump DICOM SR file and data set
 \endif
 
-\section synopsis SYNOPSIS
+\section dsrdump_synopsis SYNOPSIS
 
 \verbatim
 dsrdump [options] dsrfile-in...
 \endverbatim
 
-\section description DESCRIPTION
+\section dsrdump_description DESCRIPTION
 
 The \b dsrdump utility dumps the contents of a DICOM Structured Reporting (SR)
 document (file format or raw data set) to stdout in textual form.  The output
@@ -27,15 +27,15 @@ whenever possible (using the \b dcmconv utility).  It is also possible to use
 the \e -f and <em>-t[ieb]</em> options to force \b dsrdump to read a dataset
 with a particular transfer syntax.
 
-\section parameters PARAMETERS
+\section dsrdump_parameters PARAMETERS
 
 \verbatim
 dsrfile-in  DICOM SR input filename to be dumped
 \endverbatim
 
-\section options OPTIONS
+\section dsrdump_options OPTIONS
 
-\subsection general_options general options
+\subsection dsrdump_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -63,7 +63,7 @@ dsrfile-in  DICOM SR input filename to be dumped
           use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection dsrdump_input_options input options
 \verbatim
 input file format:
 
@@ -94,7 +94,7 @@ input transfer syntax:
           read with implicit VR little endian TS
 \endverbatim
 
-\subsection processing_options processing options
+\subsection dsrdump_processing_options processing options
 \verbatim
 additional information:
 
@@ -133,7 +133,7 @@ specific character set:
           # (see output of --version on which one is available)
 \endverbatim
 
-\subsection output_options output options
+\subsection dsrdump_output_options output options
 \verbatim
 general printing:
 
@@ -203,9 +203,9 @@ color:
           # not available on Windows systems
 \endverbatim
 
-\section notes NOTES
+\section dsrdump_notes NOTES
 
-\subsection dicom_conformance DICOM Conformance
+\subsection dsrdump_dicom_conformance DICOM Conformance
 
 The \b dsrdump utility supports the following SOP Classes:
 
@@ -228,7 +228,7 @@ AcquisitionContextSRStorage                 1.2.840.10008.5.1.4.1.1.88.71
 SimplifiedAdultEchoSRStorage                1.2.840.10008.5.1.4.1.1.88.72
 \endverbatim
 
-\section logging LOGGING
+\section dsrdump_logging 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
@@ -247,7 +247,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section dsrdump_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -269,7 +269,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section dsrdump_environment ENVIRONMENT
 
 The \b dsrdump utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -285,11 +285,11 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section see_also SEE ALSO
+\section dsrdump_see_also SEE ALSO
 
 <b>dcmconv</b>(1)
 
-\section copyright COPYRIGHT
+\section dsrdump_copyright COPYRIGHT
 
 Copyright (C) 2000-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmsr/docs/xml2dsr.man b/dcmsr/docs/xml2dsr.man
index 87a44e9..b2eecfd 100644
--- a/dcmsr/docs/xml2dsr.man
+++ b/dcmsr/docs/xml2dsr.man
@@ -6,13 +6,13 @@
 \page xml2dsr xml2dsr: Convert DICOM SR file and data set to XML
 \endif
 
-\section synopsis SYNOPSIS
+\section xml2dsr_synopsis SYNOPSIS
 
 \verbatim
 xml2dsr [options] xmlfile-in dsrfile-out
 \endverbatim
 
-\section description DESCRIPTION
+\section xml2dsr_description DESCRIPTION
 
 The \b xml2dsr utility converts the contents of an XML (Extensible Markup
 Language) document to DICOM Structured Reporting (SR) format (file format
@@ -24,7 +24,7 @@ Document Architecture).
 An appropriate XML file can be created using the \b dsr2xml tool (option
 \e +Xn recommended to add XML namespace declaration to the root element).
 
-\section parameters PARAMETERS
+\section xml2dsr_parameters PARAMETERS
 
 \verbatim
 xmlfile-in   XML input filename to be converted (stdin: "-")
@@ -32,9 +32,9 @@ xmlfile-in   XML input filename to be converted (stdin: "-")
 dsrfile-out  DICOM SR output filename
 \endverbatim
 
-\section options OPTIONS
+\section xml2dsr_options OPTIONS
 
-\subsection general_options general options
+\subsection xml2dsr_general_options general options
 \verbatim
   -h   --help
          print this help text and exit
@@ -62,7 +62,7 @@ dsrfile-out  DICOM SR output filename
          use config file f for the logger
 \endverbatim
 
-\subsection input_options input options
+\subsection xml2dsr_input_options input options
 \verbatim
 encoding:
 
@@ -70,7 +70,7 @@ encoding:
          template element encloses content items
 \endverbatim
 
-\subsection processing_options processing options
+\subsection xml2dsr_processing_options processing options
 \verbatim
 validation:
 
@@ -95,7 +95,7 @@ unique identifiers:
          overwrite existing UIDs
 \endverbatim
 
-\subsection output_options output options
+\subsection xml2dsr_output_options output options
 \verbatim
 output file format:
 
@@ -167,9 +167,9 @@ deflate compression level (only with --write-xfer-deflated):
          0=uncompressed, 1=fastest, 9=best compression
 \endverbatim
 
-\section notes NOTES
+\section xml2dsr_notes NOTES
 
-\subsection dicom_conformance DICOM Conformance
+\subsection xml2dsr_dicom_conformance DICOM Conformance
 
 The \b xml2dsr utility supports the following SOP Classes:
 
@@ -195,7 +195,7 @@ SimplifiedAdultEchoSRStorage                1.2.840.10008.5.1.4.1.1.88.72
 Please note that currently only mandatory and some optional attributes are
 supported.
 
-\subsection character_encoding Character Encoding
+\subsection xml2dsr_character_encoding Character Encoding
 
 The DICOM character encoding is determined automatically from the element with
 tag "0008,0005" (Specific Character Set) - if present.  The following
@@ -222,14 +222,14 @@ Chinese       "GB18030"     (GB18030)
 Chinese       "GBK"         (GBK)
 \endverbatim
 
-\subsection compression Compression
+\subsection xml2dsr_compression Compression
 
 If libxml is compiled with zlib support, the input file (\e xmlfile-in) can
 also be compressed with ZIP, which usually results in much smaller files.  See
 output of option \e --version in order to check whether zlib support is
 available.
 
-\subsection limitations Limitations
+\subsection xml2dsr_limitations Limitations
 
 The XML Schema <em>dsr2xml.xsd</em> does not support all variations of the
 \b dsr2xml output format.  However, the default output format (plus option
@@ -240,7 +240,7 @@ length of an XML element value.  Therefore, it should be avoided to use very
 long element values.  A typical limit for libxml version 2.7.3 (and above) is
 10 MB for a single element value.
 
-\section logging LOGGING
+\section xml2dsr_logging 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
@@ -259,7 +259,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section xml2dsr_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -281,7 +281,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section xml2dsr_environment ENVIRONMENT
 
 The \b xml2dsr utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -297,15 +297,15 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section files FILES
+\section xml2dsr_files FILES
 
 <em>\<datadir\>/dsr2xml.xsd</em> - XML Schema file
 
-\section see_also SEE ALSO
+\section xml2dsr_see_also SEE ALSO
 
 <b>dsr2xml</b>(1)
 
-\section copyright COPYRIGHT
+\section xml2dsr_copyright COPYRIGHT
 
 Copyright (C) 2003-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
diff --git a/dcmsr/include/CMakeLists.txt b/dcmsr/include/CMakeLists.txt
index 411f0b1..1b6c1bc 100644
--- a/dcmsr/include/CMakeLists.txt
+++ b/dcmsr/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmsr DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmsr DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmsr/include/dcmtk/dcmsr/codes/dcm.h b/dcmsr/include/dcmtk/dcmsr/codes/dcm.h
index f3fbea8..2d8e9e7 100644
--- a/dcmsr/include/dcmtk/dcmsr/codes/dcm.h
+++ b/dcmsr/include/dcmtk/dcmsr/codes/dcm.h
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file with DICOM Code Definitions (Coding Scheme "DCM", Version "01")
  *
- *  Generated automatically from DICOM PS 3.16-2016e
- *  File created on 2016-11-23 13:33:01 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2017a
+ *  File created on 2017-03-10 17:34:41 by J. Riesmeier
  *
  */
 
@@ -33,7 +33,7 @@
  *  code definitions  *
  *--------------------*/
 
-// total number of codes: 3511
+// total number of codes: 3516
 // - retired: 143
 // - no name: 27
 // - not unique: 15
@@ -3453,6 +3453,11 @@
 #define CODE_DCM_ExogenousSubstance                                        DSRBasicCodedEntry("127400", "DCM", "Exogenous substance")
 #define CODE_DCM_TissueOfOrigin                                            DSRBasicCodedEntry("127401", "DCM", "Tissue of origin")
 #define CODE_DCM_TaxonomicRankOfOrigin                                     DSRBasicCodedEntry("127402", "DCM", "Taxonomic rank of origin")
+#define CODE_DCM_Strain                                                    DSRBasicCodedEntry("127411", "DCM", "Strain")
+#define CODE_DCM_StrainDescription                                         DSRBasicCodedEntry("127412", "DCM", "Strain description")
+#define CODE_DCM_Nomenclature                                              DSRBasicCodedEntry("127413", "DCM", "Nomenclature")
+#define CODE_DCM_GeneticModifications                                      DSRBasicCodedEntry("127414", "DCM", "Genetic modifications")
+#define CODE_DCM_GeneticModificationsDescription                           DSRBasicCodedEntry("127415", "DCM", "Genetic modifications description")
 #define CODE_DCM_StereotacticCoordinates                                   DSRBasicCodedEntry("127450", "DCM", "Stereotactic coordinates")
 #define CODE_DCM_PositionReferenceIndicator                                DSRBasicCodedEntry("127451", "DCM", "Position reference indicator")
 #define CODE_DCM_TumorGraft                                                DSRBasicCodedEntry("127460", "DCM", "Tumor graft")
diff --git a/dcmsr/include/dcmtk/dcmsr/codes/ncit.h b/dcmsr/include/dcmtk/dcmsr/codes/ncit.h
index e6c9fc6..8e7fa4f 100644
--- a/dcmsr/include/dcmtk/dcmsr/codes/ncit.h
+++ b/dcmsr/include/dcmtk/dcmsr/codes/ncit.h
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file with NCIt Code Definitions (Coding Scheme "NCIt")
  *
- *  Generated automatically from DICOM PS 3.16-2016e
- *  File created on 2016-11-23 13:29:26 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2017a
+ *  File created on 2017-03-10 17:34:49 by J. Riesmeier
  *
  */
 
@@ -33,7 +33,7 @@
  *  code definitions  *
  *--------------------*/
 
-// total number of codes: 16
+// total number of codes: 17
 // - retired: 0
 // - no name: 0
 // - not unique: 0
@@ -48,6 +48,7 @@
 // description of the code meaning to a compiler-friendly but still human-readable representation.
 
 #define CODE_NCIt_RANO                                                     DSRBasicCodedEntry("C114879", "NCIt", "RANO")
+#define CODE_NCIt_MouseMammaryFatPad                                       DSRBasicCodedEntry("C22550", "NCIt", "Mouse mammary fat pad")
 #define CODE_NCIt_BronchioloalveolarAdenocarcinoma                         DSRBasicCodedEntry("C2923", "NCIt", "Bronchioloalveolar adenocarcinoma")
 #define CODE_NCIt_ExtraluminalRoute                                        DSRBasicCodedEntry("C38213", "NCIt", "Extraluminal route")
 #define CODE_NCIt_IntraepithelialRoute                                     DSRBasicCodedEntry("C38244", "NCIt", "Intraepithelial route")
diff --git a/dcmsr/include/dcmtk/dcmsr/codes/srt.h b/dcmsr/include/dcmtk/dcmsr/codes/srt.h
index 2b96239..007e78f 100644
--- a/dcmsr/include/dcmtk/dcmsr/codes/srt.h
+++ b/dcmsr/include/dcmtk/dcmsr/codes/srt.h
@@ -1,13 +1,13 @@
 /*
  *
- *  Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file with SNOMED-RT Code Definitions (Coding Scheme "SRT")
  *
  *  Generated semi-automatically from DICOM PS 3.16-2015c
  *  File created on 2015-08-24 by J. Riesmeier
- *  Last modified on 2016-02-22 by Riesmeier
+ *  Last modified on 2017-07-04 by Riesmeier
  *
  *  NB: This file does not yet contain all codes defined in PS 3.16 since the
  *      mapping of the code meaning to a compiler-friendly representation is
@@ -30,7 +30,7 @@
 
 #define CODE_SRT_CodingSchemeDesignator  "SRT"
 #define CODE_SRT_CodingSchemeName        "SNOMED-RT"
-#define CODE_SRT_CodingSchemeDescription "SNOMED-CT, using the 'SNOMED-RT style' code values"
+#define CODE_SRT_CodingSchemeDescription "SNOMED, using the 'SNOMED-RT style' code values"
 #define CODE_SRT_CodingSchemeUID         "2.16.840.1.113883.6.96"
 
 
@@ -56,10 +56,10 @@
 #define CODE_SRT_RouteOfAdministration          DSRBasicCodedEntry("G-C340", "SRT", "Route of Administration")
 #define CODE_SRT_Neoplasm_Primary               DSRBasicCodedEntry("M-80003", "SRT", "Neoplasm, Primary")
 #define CODE_SRT_Neoplasm_Secondary             DSRBasicCodedEntry("M-80006", "SRT", "Neoplasm, Secondary")
+#define CODE_SRT_ImagingProcedure               DSRBasicCodedEntry("P0-0099A", "SRT", "Imaging procedure")
 #define CODE_SRT_HalfLifeOfRadiopharmaceutical  DSRBasicCodedEntry("R-42806", "SRT", "Half-life of radiopharmaceutical")
 #define CODE_SRT_AorticArch                     DSRBasicCodedEntry("T-42300", "SRT", "Aortic arch")
-#define CODE_SRT_Liver_T62000                   DSRBasicCodedEntry("T-62000", "SRT", "Liver")
-#define CODE_SRT_Liver_T62002                   DSRBasicCodedEntry("T-62002", "SRT", "Liver")
+#define CODE_SRT_Liver                          DSRBasicCodedEntry("T-62000", "SRT", "Liver")
 #define CODE_SRT_Cerebellum                     DSRBasicCodedEntry("T-A6000", "SRT", "Cerebellum")
 #define CODE_SRT_LymphNode                      DSRBasicCodedEntry("T-C4000", "SRT", "Lymph node")
 
diff --git a/dcmsr/include/dcmtk/dcmsr/codes/ucum.h b/dcmsr/include/dcmtk/dcmsr/codes/ucum.h
index 4a770fb..53c4a49 100644
--- a/dcmsr/include/dcmtk/dcmsr/codes/ucum.h
+++ b/dcmsr/include/dcmtk/dcmsr/codes/ucum.h
@@ -1,13 +1,13 @@
 /*
  *
- *  Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file with UCUM Code Definitions (Coding Scheme "UCUM")
  *
  *  Generated semi-automatically from DICOM PS 3.16-2015c
  *  File created on 2015-08-24 by J. Riesmeier
- *  Last modified on 2016-02-22 by Riesmeier
+ *  Last modified on 2017-03-08 by Riesmeier
  *
  *  NB: This file does not yet contain all codes defined in PS 3.16 since the
  *      mapping of the code meaning to a compiler-friendly representation is
@@ -59,6 +59,6 @@
 #define CODE_UCUM_Bq                DSRBasicCodedEntry("Bq", "UCUM", "Bq")
 #define CODE_UCUM_BqPerMol          DSRBasicCodedEntry("Bq/mol", "UCUM", "Bq/mol")
 #define CODE_UCUM_mmolPerL          DSRBasicCodedEntry("mmol/l", "UCUM", "mmol/l")
-#define CODE_UCUM_CountsPerSecond   DSRBasicCodedEntry("{counts}/s", "UCUM", "Counts per second")
+#define CODE_UCUM_CountsPerSecond   DSRBasicCodedEntry("{counts}/s", "UCUM", "counts/s")
 
 #endif
diff --git a/dcmsr/include/dcmtk/dcmsr/codes/umls.h b/dcmsr/include/dcmtk/dcmsr/codes/umls.h
index 99e0229..f1c0964 100644
--- a/dcmsr/include/dcmtk/dcmsr/codes/umls.h
+++ b/dcmsr/include/dcmtk/dcmsr/codes/umls.h
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file with UMLS Code Definitions (Coding Scheme "UMLS")
  *
- *  Generated automatically from DICOM PS 3.16-2016e
- *  File created on 2016-11-23 13:29:25 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2017a
+ *  File created on 2017-03-10 17:34:48 by J. Riesmeier
  *
  */
 
diff --git a/dcmsr/include/dcmtk/dcmsr/dsrdncsr.h b/dcmsr/include/dcmtk/dcmsr/dsrdncsr.h
index 5512b9e..e32c4e8 100644
--- a/dcmsr/include/dcmtk/dcmsr/dsrdncsr.h
+++ b/dcmsr/include/dcmtk/dcmsr/dsrdncsr.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2016-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
diff --git a/dcmsr/include/dcmtk/dcmsr/dsrdoc.h b/dcmsr/include/dcmtk/dcmsr/dsrdoc.h
index 61f6a5a..614c345 100644
--- a/dcmsr/include/dcmtk/dcmsr/dsrdoc.h
+++ b/dcmsr/include/dcmtk/dcmsr/dsrdoc.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -1213,10 +1213,12 @@ class DCMTK_DCMSR_EXPORT DSRDocument
     /** update various DICOM attributes.
      *  (e.g. set the modality and SOP class UID, generate a new Study, Series and SOP instance UID
      *  if required, set date/time values, etc.)
-     ** @param  updateAll  flag indicating whether all DICOM attributes should be updated or only
-     *                     the IOD-specific ones. (e.g. set DICOM defined terms from enum values)
+     ** @param  updateAll   flag indicating whether all DICOM attributes should be updated or only
+     *                      the IOD-specific ones. (e.g. set DICOM defined terms from enum values)
+     *  @param  verboseMode report (more) processing details to the logger if enabled (default)
      */
-    void updateAttributes(const OFBool updateAll = OFTrue);
+    void updateAttributes(const OFBool updateAll = OFTrue,
+                          const OFBool verboseMode = OFTrue);
 
 
   private:
diff --git a/dcmsr/include/dcmtk/dcmsr/dsrdocst.h b/dcmsr/include/dcmtk/dcmsr/dsrdocst.h
index 14fb69b..5b9508b 100644
--- a/dcmsr/include/dcmtk/dcmsr/dsrdocst.h
+++ b/dcmsr/include/dcmtk/dcmsr/dsrdocst.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -238,20 +238,30 @@ class DCMTK_DCMSR_EXPORT DSRDocumentSubTree
                                  const OFBool startFromRoot = OFTrue,
                                  const OFBool searchIntoSub = OFTrue);
 
-    /** set internal cursor to a named node (starting from the first children of the
-     *  current node).
+    /** set internal cursor to a named node (starting from the first child of the
+     *  current node and searching on this level only).
+     *  This is just a shortcut for calling gotoChild() followed by gotoNamedNode()
+     *  with 'searchIntoSub' being OFFalse, i.e. only the first sub-level is checked.
      *  If more than one node exists with the given concept name, the first one will
-     *  be selected.  Use gotoNextNamedNode() in order to go to the next matching node.
+     *  be selected.
+     ** @param  conceptName    concept name of the node to be searched for
+     ** @return ID of the new current node if successful, 0 otherwise
+     */
+    virtual size_t gotoNamedChildNode(const DSRCodedEntryValue &conceptName);
+
+    /** set internal cursor to a named node in the subtree below the current node.
+     *  If more than one node exists with the given concept name, the first one will
+     *  be selected.  If the current node has no children, the cursor is not moved.
      ** @param  conceptName    concept name of the node to be searched for
      *  @param  searchIntoSub  flag indicating whether to search into sub-trees
-     *                         ("deep search") or on the current level only
+     *                         ("deep search") or on the first sub-level only
      ** @return ID of the new current node if successful, 0 otherwise
      */
-    virtual size_t gotoNamedChildNode(const DSRCodedEntryValue &conceptName,
-                                      const OFBool searchIntoSub = OFTrue);
+    virtual size_t gotoNamedNodeInSubTree(const DSRCodedEntryValue &conceptName,
+                                          const OFBool searchIntoSub = OFTrue);
 
     /** set internal cursor to the next named node.
-     *  Starts from "next" node, i.e. either the first children of the current node
+     *  Starts from "next" node, i.e. either the first child of the current node
      *  or the first sibling following the current node.
      ** @param  conceptName    concept name of the node to be searched for
      *  @param  searchIntoSub  flag indicating whether to search into sub-trees
@@ -274,7 +284,7 @@ class DCMTK_DCMSR_EXPORT DSRDocumentSubTree
                                      const OFBool startFromRoot = OFTrue);
 
     /** set internal cursor to the next annotated node.
-     *  Starts from "next" node, i.e. either the first children of the current node
+     *  Starts from "next" node, i.e. either the first child of the current node
      *  or the first sibling following the current node.
      ** @param  annotationText  annotation text of the node to be searched for
      ** @return ID of the new current node if successful, 0 otherwise
diff --git a/dcmsr/include/dcmtk/dcmsr/dsrtlist.h b/dcmsr/include/dcmtk/dcmsr/dsrtlist.h
index 21e9446..2e18713 100644
--- a/dcmsr/include/dcmtk/dcmsr/dsrtlist.h
+++ b/dcmsr/include/dcmtk/dcmsr/dsrtlist.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -32,6 +32,15 @@
 #include "dcmtk/ofstd/ofvector.h"
 
 
+/** get the default item which is returned in DSRListOfItems::getItem() if the index is invalid.
+ *  This function needs to be specialized and instantiated for each different use of DSRListOfItems.
+ *  @tparam T the type of the object that will be returned.
+ *  @return a reference to an object of type T.
+ */
+template<typename T>
+const T& DSRgetEmptyItem();
+
+
 /*---------------------*
  *  class declaration  *
  *---------------------*/
@@ -127,7 +136,7 @@ template<class T> class DSRListOfItems
         if (gotoItemPos(idx, iterator))
             return *iterator;
         else
-            return EmptyItem;
+            return DSRgetEmptyItem<T>();
     }
 
     /** get copy of the specified item
@@ -247,11 +256,6 @@ template<class T> class DSRListOfItems
         return result;
     }
 
-    /// default item which is returned in getItem() if the index is invalid.
-    /// This static member variable needs to be defined (not only declared)
-    /// in each derived class.
-    static const T EmptyItem;
-
 
   protected:
 
diff --git a/dcmsr/include/dcmtk/dcmsr/dsrtncsr.h b/dcmsr/include/dcmtk/dcmsr/dsrtncsr.h
index 208764f..d3e0d4e 100644
--- a/dcmsr/include/dcmtk/dcmsr/dsrtncsr.h
+++ b/dcmsr/include/dcmtk/dcmsr/dsrtncsr.h
@@ -291,6 +291,11 @@ class DSRTreeNodeCursor
      */
     size_t setCursor(T *node);
 
+    /** get pointer to first child node
+     ** @return pointer to first child node (if any), NULL otherwise
+     */
+    T *getChild() const;
+
     /// pointer to current node
     T *NodeCursor;
     /// stack of node pointers. Used to store the cursor position of upper levels.
@@ -520,6 +525,16 @@ size_t DSRTreeNodeCursor<T, B>::setCursor(T *node)
 
 
 template<typename T, OFBool B>
+T *DSRTreeNodeCursor<T, B>::getChild() const
+{
+    T *node = NULL;
+    if (NodeCursor != NULL)
+        node = NodeCursor->getDown();
+    return node;
+}
+
+
+template<typename T, OFBool B>
 size_t DSRTreeNodeCursor<T, B>::gotoFirst()
 {
     size_t nodeID = 0;
diff --git a/dcmsr/include/dcmtk/dcmsr/dsrtypes.h b/dcmsr/include/dcmtk/dcmsr/dsrtypes.h
index f4c0d2a..54282b3 100644
--- a/dcmsr/include/dcmtk/dcmsr/dsrtypes.h
+++ b/dcmsr/include/dcmtk/dcmsr/dsrtypes.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -534,8 +534,10 @@ class DCMTK_DCMSR_EXPORT DSRTypes
         DT_AcquisitionContextSR,
         /// DICOM IOD: Simplified Adult Echo SR
         DT_SimplifiedAdultEchoSR,
+        /// DICOM IOD: Patient Radiation Dose SR
+        DT_PatientRadiationDoseSR,
         /// internal type used to mark the last entry
-        DT_last = DT_AcquisitionContextSR
+        DT_last = DT_PatientRadiationDoseSR
     };
 
     /** SR relationship types
@@ -628,12 +630,20 @@ class DCMTK_DCMSR_EXPORT DSRTypes
         PT_Blending,
         /// XA/XRF Grayscale Softcopy Presentation State (XGSPS)
         PT_XAXRFGrayscale,
-        /// Grayscale Planar MPR Volumetric Presentation State (GPVPS)
+        /// Grayscale Planar MPR Volumetric Presentation State (GP-VPS)
         PT_GrayscalePlanarMPR,
-        /// Compositing Planar MPR Volumetric Presentation State (CPVPS)
+        /// Compositing Planar MPR Volumetric Presentation State (CP-VPS)
         PT_CompositingPlanarMPR,
+        /// Advanced Blending Presentation State (ABPS)
+        PT_AdvancedBlending,
+        /// Volume Rendering Volumetric Presentation State (VR-VPS)
+        PT_VolumeRendering,
+        /// Segmented Volume Rendering Volumetric Presentation State (SVR-VPS)
+        PT_SegmentedVolumeRendering,
+        /// Multiple Volume Rendering Volumetric Presentation State (MVR-VPS)
+        PT_MultipleVolumeRendering,
         /// internal type used to mark the last entry
-        PT_last = PT_CompositingPlanarMPR
+        PT_last = PT_MultipleVolumeRendering
     };
 
     /** SR graphic types.  Used for content item SCOORD.
diff --git a/dcmsr/libcmr/Makefile.dep b/dcmsr/libcmr/Makefile.dep
index 79c97f5..a7af8e8 100644
--- a/dcmsr/libcmr/Makefile.dep
+++ b/dcmsr/libcmr/Makefile.dep
@@ -29,7 +29,10 @@ cid100.o: cid100.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -46,9 +49,9 @@ cid100.o: cid100.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -59,9 +62,7 @@ cid100.o: cid100.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid10013.o: cid10013.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid10013.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -93,7 +94,10 @@ cid10013.o: cid10013.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -110,9 +114,9 @@ cid10013.o: cid10013.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -123,9 +127,7 @@ cid10013.o: cid10013.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid10013e.o: cid10013e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid10013e.h \
  ../include/dcmtk/dcmsr/cmr/cid10013.h ../include/dcmtk/dcmsr/dsrctxgr.h \
@@ -158,7 +160,10 @@ cid10013e.o: cid10013e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -175,9 +180,9 @@ cid10013e.o: cid10013e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -188,9 +193,7 @@ cid10013e.o: cid10013e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid10033.o: cid10033.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid10033.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -222,7 +225,10 @@ cid10033.o: cid10033.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -239,9 +245,9 @@ cid10033.o: cid10033.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -252,9 +258,7 @@ cid10033.o: cid10033.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid10033e.o: cid10033e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid10033e.h \
  ../include/dcmtk/dcmsr/cmr/cid10033.h ../include/dcmtk/dcmsr/dsrctxgr.h \
@@ -287,7 +291,10 @@ cid10033e.o: cid10033e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -304,9 +311,9 @@ cid10033e.o: cid10033e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -317,9 +324,7 @@ cid10033e.o: cid10033e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid11.o: cid11.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid11.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -351,7 +356,10 @@ cid11.o: cid11.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -368,9 +376,9 @@ cid11.o: cid11.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -381,9 +389,7 @@ cid11.o: cid11.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid244.o: cid244.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid244.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -415,7 +421,10 @@ cid244.o: cid244.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -432,9 +441,9 @@ cid244.o: cid244.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -445,9 +454,7 @@ cid244.o: cid244.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid244e.o: cid244e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid244e.h ../include/dcmtk/dcmsr/cmr/cid244.h \
  ../include/dcmtk/dcmsr/dsrctxgr.h ../include/dcmtk/dcmsr/dsrcodvl.h \
@@ -479,7 +486,10 @@ cid244e.o: cid244e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -496,9 +506,9 @@ cid244e.o: cid244e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -509,9 +519,7 @@ cid244e.o: cid244e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid29.o: cid29.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid29.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -543,7 +551,10 @@ cid29.o: cid29.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -560,9 +571,9 @@ cid29.o: cid29.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -573,9 +584,7 @@ cid29.o: cid29.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid29e.o: cid29e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid29e.h ../include/dcmtk/dcmsr/cmr/cid29.h \
  ../include/dcmtk/dcmsr/dsrctxgr.h ../include/dcmtk/dcmsr/dsrcodvl.h \
@@ -607,7 +616,10 @@ cid29e.o: cid29e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -624,9 +636,9 @@ cid29e.o: cid29e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -638,8 +650,6 @@ cid29e.o: cid29e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/codes/dcm.h
 cid4020.o: cid4020.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid4020.h ../include/dcmtk/dcmsr/dsrctxgr.h \
@@ -672,7 +682,10 @@ cid4020.o: cid4020.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -689,9 +702,9 @@ cid4020.o: cid4020.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -702,9 +715,7 @@ cid4020.o: cid4020.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid4021.o: cid4021.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid4021.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -736,7 +747,10 @@ cid4021.o: cid4021.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -753,9 +767,9 @@ cid4021.o: cid4021.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -766,9 +780,7 @@ cid4021.o: cid4021.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid4031.o: cid4031.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid4031.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -800,7 +812,10 @@ cid4031.o: cid4031.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -817,9 +832,9 @@ cid4031.o: cid4031.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -830,9 +845,7 @@ cid4031.o: cid4031.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid4031e.o: cid4031e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid4031e.h \
  ../include/dcmtk/dcmsr/cmr/cid4031.h ../include/dcmtk/dcmsr/dsrctxgr.h \
@@ -865,7 +878,10 @@ cid4031e.o: cid4031e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -882,9 +898,9 @@ cid4031e.o: cid4031e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -895,9 +911,7 @@ cid4031e.o: cid4031e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid42.o: cid42.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid42.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -929,7 +943,10 @@ cid42.o: cid42.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -946,9 +963,9 @@ cid42.o: cid42.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -959,9 +976,7 @@ cid42.o: cid42.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid5000.o: cid5000.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid5000.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -993,7 +1008,10 @@ cid5000.o: cid5000.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1010,9 +1028,9 @@ cid5000.o: cid5000.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1023,9 +1041,7 @@ cid5000.o: cid5000.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid5001.o: cid5001.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid5001.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -1057,7 +1073,10 @@ cid5001.o: cid5001.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1074,9 +1093,9 @@ cid5001.o: cid5001.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1087,9 +1106,7 @@ cid5001.o: cid5001.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid6147.o: cid6147.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid6147.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -1121,7 +1138,10 @@ cid6147.o: cid6147.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1138,9 +1158,9 @@ cid6147.o: cid6147.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1151,9 +1171,7 @@ cid6147.o: cid6147.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid7021.o: cid7021.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid7021.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -1185,7 +1203,10 @@ cid7021.o: cid7021.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1202,9 +1223,9 @@ cid7021.o: cid7021.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1215,9 +1236,7 @@ cid7021.o: cid7021.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid7181.o: cid7181.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid7181.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -1249,7 +1268,10 @@ cid7181.o: cid7181.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1266,9 +1288,9 @@ cid7181.o: cid7181.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1279,9 +1301,7 @@ cid7181.o: cid7181.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid7445.o: cid7445.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid7445.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -1313,7 +1333,10 @@ cid7445.o: cid7445.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1330,9 +1353,9 @@ cid7445.o: cid7445.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1343,9 +1366,7 @@ cid7445.o: cid7445.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid7452.o: cid7452.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid7452.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -1377,7 +1398,10 @@ cid7452.o: cid7452.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1394,9 +1418,9 @@ cid7452.o: cid7452.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1407,9 +1431,7 @@ cid7452.o: cid7452.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid7453.o: cid7453.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid7453.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -1441,7 +1463,10 @@ cid7453.o: cid7453.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1458,9 +1483,9 @@ cid7453.o: cid7453.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1471,9 +1496,7 @@ cid7453.o: cid7453.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid7464.o: cid7464.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid7464.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -1505,7 +1528,10 @@ cid7464.o: cid7464.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1522,9 +1548,9 @@ cid7464.o: cid7464.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1535,9 +1561,7 @@ cid7464.o: cid7464.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 cid7469.o: cid7469.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/cid7469.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -1569,7 +1593,10 @@ cid7469.o: cid7469.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1586,9 +1613,9 @@ cid7469.o: cid7469.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1599,9 +1626,7 @@ cid7469.o: cid7469.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 init.o: init.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/init.h ../include/dcmtk/dcmsr/cmr/define.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -1634,7 +1659,10 @@ init.o: init.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1651,9 +1679,9 @@ init.o: init.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1664,8 +1692,6 @@ init.o: init.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/cmr/cid29.h ../include/dcmtk/dcmsr/cmr/cid42.h \
  ../include/dcmtk/dcmsr/cmr/cid100.h ../include/dcmtk/dcmsr/cmr/cid244.h \
  ../include/dcmtk/dcmsr/cmr/cid4020.h \
@@ -1703,7 +1729,10 @@ logger.o: logger.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1721,10 +1750,10 @@ logger.o: logger.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmsr/cmr/define.h
 srnumvl.o: srnumvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/srnumvl.h ../include/dcmtk/dcmsr/dsrnumvl.h \
@@ -1757,7 +1786,10 @@ srnumvl.o: srnumvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1774,9 +1806,9 @@ srnumvl.o: srnumvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1791,9 +1823,7 @@ srnumvl.o: srnumvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
  ../include/dcmtk/dcmsr/cmr/cid42.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
 tid1001.o: tid1001.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/cmr/tid1001.h ../include/dcmtk/dcmsr/dsrstpl.h \
  ../include/dcmtk/dcmsr/dsrdoctr.h ../include/dcmtk/dcmsr/dsrdocst.h \
@@ -1826,7 +1856,10 @@ tid1001.o: tid1001.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1843,9 +1876,9 @@ tid1001.o: tid1001.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1857,8 +1890,6 @@ tid1001.o: tid1001.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -1873,8 +1904,7 @@ tid1001.o: tid1001.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrctpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h \
  ../include/dcmtk/dcmsr/cmr/define.h ../include/dcmtk/dcmsr/cmr/cid7445.h \
  ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
@@ -1913,7 +1943,10 @@ tid1204.o: tid1204.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1930,9 +1963,9 @@ tid1204.o: tid1204.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1944,8 +1977,6 @@ tid1204.o: tid1204.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -1960,8 +1991,7 @@ tid1204.o: tid1204.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrctpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h \
  ../include/dcmtk/dcmsr/cmr/define.h ../include/dcmtk/dcmsr/cmr/cid5000.h \
  ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
@@ -1999,7 +2029,10 @@ tid1411.o: tid1411.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2016,9 +2049,9 @@ tid1411.o: tid1411.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2030,8 +2063,6 @@ tid1411.o: tid1411.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -2046,8 +2077,7 @@ tid1411.o: tid1411.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrctpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h \
  ../include/dcmtk/dcmsr/cmr/define.h \
  ../include/dcmtk/dcmsr/cmr/srnumvlu.h \
  ../include/dcmtk/dcmsr/cmr/srnumvl.h ../include/dcmtk/dcmsr/cmr/cid42.h \
@@ -2093,7 +2123,10 @@ tid1500.o: tid1500.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2110,9 +2143,9 @@ tid1500.o: tid1500.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2124,8 +2157,6 @@ tid1500.o: tid1500.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -2140,8 +2171,7 @@ tid1500.o: tid1500.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrctpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h \
  ../include/dcmtk/dcmsr/dsrstpl.h ../include/dcmtk/dcmsr/cmr/define.h \
  ../include/dcmtk/dcmsr/cmr/tid1001.h \
  ../include/dcmtk/dcmsr/cmr/cid7445.h ../include/dcmtk/dcmsr/dsrctxgr.h \
@@ -2197,7 +2227,10 @@ tid1600.o: tid1600.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2214,9 +2247,9 @@ tid1600.o: tid1600.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2228,8 +2261,6 @@ tid1600.o: tid1600.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -2244,8 +2275,7 @@ tid1600.o: tid1600.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrctpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h \
  ../include/dcmtk/dcmsr/cmr/define.h ../include/dcmtk/dcmsr/cmr/cid4020.h \
  ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
diff --git a/dcmsr/libcmr/tid1600.cc b/dcmsr/libcmr/tid1600.cc
index 1f2f68d..ed4ecb5 100644
--- a/dcmsr/libcmr/tid1600.cc
+++ b/dcmsr/libcmr/tid1600.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class TID1600_ImageLibrary
@@ -259,7 +259,7 @@ OFCondition TID1600_ImageLibrary::getImageEntryModality(DSRCodedEntryValue &moda
     if (gotoEntryFromNodeList(this, LAST_IMAGE_LIBRARY_ENTRY) > 0)
     {
         /* get value of TID 1602 (Image Library Entry Descriptors) Row 1 */
-        if ((gotoNamedChildNode(CODE_DCM_Modality, OFFalse /*searchIntoSub*/) > 0))
+        if ((gotoNamedChildNode(CODE_DCM_Modality) > 0))
         {
             modalityCode = getCurrentContentItem().getCodeValue();
             result = EC_Normal;
@@ -709,11 +709,9 @@ OFCondition TID1600_ImageLibrary::goAndCheckImageLibraryEntry(const DSRCodedEntr
     if (gotoEntryFromNodeList(this, LAST_IMAGE_LIBRARY_ENTRY) > 0)
     {
         /* check whether TID 1602 (Image Library Entry Descriptors) Row 1 has correct value */
-        if ((gotoNamedChildNode(CODE_DCM_Modality, OFFalse /*searchIntoSub*/) > 0) &&
-            (getCurrentContentItem().getCodeValue() == modalityCode))
-        {
+        if ((gotoNamedChildNode(CODE_DCM_Modality) > 0) && (getCurrentContentItem().getCodeValue() == modalityCode))
             result = EC_Normal;
-        } else
+        else
             result = CMR_EC_WrongImageLibraryEntryDescriptorModality;
     }
     return result;
diff --git a/dcmsr/libsrc/Makefile.dep b/dcmsr/libsrc/Makefile.dep
index e0af225..1e6ba28 100644
--- a/dcmsr/libsrc/Makefile.dep
+++ b/dcmsr/libsrc/Makefile.dep
@@ -28,7 +28,10 @@ dsracqcc.o: dsracqcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -45,9 +48,9 @@ dsracqcc.o: dsracqcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -86,7 +89,10 @@ dsrbascc.o: dsrbascc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -103,9 +109,9 @@ dsrbascc.o: dsrbascc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -144,7 +150,10 @@ dsrc3dcc.o: dsrc3dcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -161,9 +170,9 @@ dsrc3dcc.o: dsrc3dcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -202,7 +211,10 @@ dsrchecc.o: dsrchecc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -219,9 +231,9 @@ dsrchecc.o: dsrchecc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -260,7 +272,10 @@ dsrcitem.o: dsrcitem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -277,9 +292,9 @@ dsrcitem.o: dsrcitem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -292,8 +307,6 @@ dsrcitem.o: dsrcitem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrnumvl.h \
@@ -345,7 +358,10 @@ dsrcodtn.o: dsrcodtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -362,9 +378,9 @@ dsrcodtn.o: dsrcodtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -377,8 +393,6 @@ dsrcodtn.o: dsrcodtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrxmld.h ../include/dcmtk/dcmsr/dsrxmlc.h \
@@ -412,7 +426,10 @@ dsrcodvl.o: dsrcodvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -429,9 +446,9 @@ dsrcodvl.o: dsrcodvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -486,7 +503,10 @@ dsrcolcc.o: dsrcolcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -503,9 +523,9 @@ dsrcolcc.o: dsrcolcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -544,7 +564,10 @@ dsrcomcc.o: dsrcomcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -561,9 +584,9 @@ dsrcomcc.o: dsrcomcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -601,7 +624,10 @@ dsrcomtn.o: dsrcomtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -618,9 +644,9 @@ dsrcomtn.o: dsrcomtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -633,8 +659,6 @@ dsrcomtn.o: dsrcomtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrcomvl.h ../include/dcmtk/dcmsr/dsrxmld.h \
@@ -670,7 +694,10 @@ dsrcomvl.o: dsrcomvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -687,9 +714,9 @@ dsrcomvl.o: dsrcomvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -733,7 +760,10 @@ dsrcontn.o: dsrcontn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -750,9 +780,9 @@ dsrcontn.o: dsrcontn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -765,8 +795,6 @@ dsrcontn.o: dsrcontn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrxmld.h ../include/dcmtk/dcmsr/dsrxmlc.h \
@@ -801,7 +829,10 @@ dsrcsidl.o: dsrcsidl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -818,9 +849,9 @@ dsrcsidl.o: dsrcsidl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -869,7 +900,10 @@ dsrctpl.o: dsrctpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -886,9 +920,9 @@ dsrctpl.o: dsrctpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -901,8 +935,6 @@ dsrctpl.o: dsrctpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdocst.h \
@@ -918,7 +950,6 @@ dsrctpl.o: dsrctpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
  ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h
@@ -952,7 +983,10 @@ dsrctxgr.o: dsrctxgr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -969,9 +1003,9 @@ dsrctxgr.o: dsrctxgr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1010,7 +1044,10 @@ dsrdattn.o: dsrdattn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1027,9 +1064,9 @@ dsrdattn.o: dsrdattn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1042,8 +1079,6 @@ dsrdattn.o: dsrdattn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrstrvl.h ../include/dcmtk/dcmsr/dsrxmld.h \
@@ -1082,7 +1117,10 @@ dsrdncsr.o: dsrdncsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1099,9 +1137,9 @@ dsrdncsr.o: dsrdncsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1113,8 +1151,6 @@ dsrdncsr.o: dsrdncsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrtree.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrtpltn.h ../include/dcmtk/dcmsr/dsrstpl.h \
@@ -1130,8 +1166,7 @@ dsrdncsr.o: dsrdncsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrctpl.h
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h
 dsrdoc.o: dsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrdoc.h ../include/dcmtk/dcmsr/dsrdoctr.h \
  ../include/dcmtk/dcmsr/dsrdocst.h ../include/dcmtk/dcmsr/dsrtree.h \
@@ -1163,7 +1198,10 @@ dsrdoc.o: dsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1180,9 +1218,9 @@ dsrdoc.o: dsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1194,8 +1232,6 @@ dsrdoc.o: dsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -1210,8 +1246,7 @@ dsrdoc.o: dsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrrtpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrrtpl.h \
  ../include/dcmtk/dcmsr/dsrctpl.h ../include/dcmtk/dcmsr/dsrsoprf.h \
  ../include/dcmtk/dcmsr/dsrrefin.h ../include/dcmtk/dcmsr/dsrcsidl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
@@ -1264,7 +1299,10 @@ dsrdocst.o: dsrdocst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1281,9 +1319,9 @@ dsrdocst.o: dsrdocst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1295,8 +1333,6 @@ dsrdocst.o: dsrdocst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -1311,12 +1347,10 @@ dsrdocst.o: dsrdocst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../include/dcmtk/dcmsr/dsrcontn.h ../include/dcmtk/dcmsr/dsrreftn.h \
- ../include/dcmtk/dcmsr/dsrtpltn.h ../include/dcmtk/dcmsr/dsrstpl.h \
- ../include/dcmtk/dcmsr/dsrdoctr.h ../include/dcmtk/dcmsr/dsrctpl.h \
- ../include/dcmtk/dcmsr/dsriodcc.h
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrcontn.h \
+ ../include/dcmtk/dcmsr/dsrreftn.h ../include/dcmtk/dcmsr/dsrtpltn.h \
+ ../include/dcmtk/dcmsr/dsrstpl.h ../include/dcmtk/dcmsr/dsrdoctr.h \
+ ../include/dcmtk/dcmsr/dsrctpl.h ../include/dcmtk/dcmsr/dsriodcc.h
 dsrdoctn.o: dsrdoctn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrtree.h \
  ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \
@@ -1347,7 +1381,10 @@ dsrdoctn.o: dsrdoctn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1364,9 +1401,9 @@ dsrdoctn.o: dsrdoctn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1378,8 +1415,6 @@ dsrdoctn.o: dsrdoctn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrdtitn.h \
@@ -1426,7 +1461,10 @@ dsrdoctr.o: dsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1443,9 +1481,9 @@ dsrdoctr.o: dsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1457,8 +1495,6 @@ dsrdoctr.o: dsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -1473,11 +1509,9 @@ dsrdoctr.o: dsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../include/dcmtk/dcmsr/dsrcontn.h ../include/dcmtk/dcmsr/dsrreftn.h \
- ../include/dcmtk/dcmsr/dsrxmld.h ../include/dcmtk/dcmsr/dsrxmlc.h \
- ../include/dcmtk/dcmsr/dsriodcc.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrcontn.h \
+ ../include/dcmtk/dcmsr/dsrreftn.h ../include/dcmtk/dcmsr/dsrxmld.h \
+ ../include/dcmtk/dcmsr/dsrxmlc.h ../include/dcmtk/dcmsr/dsriodcc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h
 dsrdtitn.o: dsrdtitn.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -1509,7 +1543,10 @@ dsrdtitn.o: dsrdtitn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1526,9 +1563,9 @@ dsrdtitn.o: dsrdtitn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1541,8 +1578,6 @@ dsrdtitn.o: dsrdtitn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrstrvl.h ../include/dcmtk/dcmsr/dsrxmld.h \
@@ -1583,7 +1618,10 @@ dsrenhcc.o: dsrenhcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1600,9 +1638,9 @@ dsrenhcc.o: dsrenhcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1641,7 +1679,10 @@ dsrimgfr.o: dsrimgfr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1658,9 +1699,9 @@ dsrimgfr.o: dsrimgfr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1672,11 +1713,7 @@ dsrimgfr.o: dsrimgfr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtlist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/nsdfti.def \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def
+ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h
 dsrimgse.o: dsrimgse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrtypes.h \
  ../include/dcmtk/dcmsr/dsdefine.h \
@@ -1707,7 +1744,10 @@ dsrimgse.o: dsrimgse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1724,9 +1764,9 @@ dsrimgse.o: dsrimgse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1737,11 +1777,7 @@ dsrimgse.o: dsrimgse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmsr/dsrtlist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/nsdfti.def \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h
 dsrimgtn.o: dsrimgtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -1771,7 +1807,10 @@ dsrimgtn.o: dsrimgtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1788,9 +1827,9 @@ dsrimgtn.o: dsrimgtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1803,8 +1842,6 @@ dsrimgtn.o: dsrimgtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrcomvl.h \
@@ -1842,7 +1879,10 @@ dsrimgvl.o: dsrimgvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1859,9 +1899,9 @@ dsrimgvl.o: dsrimgvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1928,7 +1968,10 @@ dsrimpcc.o: dsrimpcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -1945,9 +1988,9 @@ dsrimpcc.o: dsrimpcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -1986,7 +2029,10 @@ dsriodcc.o: dsriodcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2003,9 +2049,9 @@ dsriodcc.o: dsriodcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2044,7 +2090,10 @@ dsrkeycc.o: dsrkeycc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2061,9 +2110,9 @@ dsrkeycc.o: dsrkeycc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2102,7 +2151,10 @@ dsrmaccc.o: dsrmaccc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2119,9 +2171,9 @@ dsrmaccc.o: dsrmaccc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2160,7 +2212,10 @@ dsrmamcc.o: dsrmamcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2177,9 +2232,9 @@ dsrmamcc.o: dsrmamcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2217,7 +2272,10 @@ dsrnumtn.o: dsrnumtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2234,9 +2292,9 @@ dsrnumtn.o: dsrnumtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2249,8 +2307,6 @@ dsrnumtn.o: dsrnumtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrnumvl.h \
@@ -2287,7 +2343,10 @@ dsrnumvl.o: dsrnumvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2304,9 +2363,9 @@ dsrnumvl.o: dsrnumvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2353,7 +2412,10 @@ dsrpnmtn.o: dsrpnmtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2370,9 +2432,9 @@ dsrpnmtn.o: dsrpnmtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2385,8 +2447,6 @@ dsrpnmtn.o: dsrpnmtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrstrvl.h ../include/dcmtk/dcmsr/dsrxmld.h \
@@ -2426,7 +2486,10 @@ dsrposcn.o: dsrposcn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2442,9 +2505,9 @@ dsrposcn.o: dsrposcn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2483,7 +2546,10 @@ dsrprocc.o: dsrprocc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2500,9 +2566,9 @@ dsrprocc.o: dsrprocc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2541,7 +2607,10 @@ dsrrefin.o: dsrrefin.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2558,9 +2627,9 @@ dsrrefin.o: dsrrefin.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2605,7 +2674,10 @@ dsrreftn.o: dsrreftn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2622,9 +2694,9 @@ dsrreftn.o: dsrreftn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2637,8 +2709,6 @@ dsrreftn.o: dsrreftn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrxmld.h ../include/dcmtk/dcmsr/dsrxmlc.h \
@@ -2674,7 +2744,10 @@ dsrrrdcc.o: dsrrrdcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2691,9 +2764,9 @@ dsrrrdcc.o: dsrrrdcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2733,7 +2806,10 @@ dsrrtpl.o: dsrrtpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2750,9 +2826,9 @@ dsrrtpl.o: dsrrtpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2764,8 +2840,6 @@ dsrrtpl.o: dsrrtpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -2780,8 +2854,7 @@ dsrrtpl.o: dsrrtpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrctpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h \
  ../include/dcmtk/dcmsr/dsrstpl.h ../include/dcmtk/dcmsr/dsrxmld.h \
  ../include/dcmtk/dcmsr/dsrxmlc.h
 dsrsaecc.o: dsrsaecc.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -2814,7 +2887,10 @@ dsrsaecc.o: dsrsaecc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2831,9 +2907,9 @@ dsrsaecc.o: dsrsaecc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2872,7 +2948,10 @@ dsrsc3gr.o: dsrsc3gr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2889,9 +2968,9 @@ dsrsc3gr.o: dsrsc3gr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2902,11 +2981,7 @@ dsrsc3gr.o: dsrsc3gr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmsr/dsrtlist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrfl.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/nsdfti.def \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrfl.h
 dsrsc3tn.o: dsrsc3tn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -2936,7 +3011,10 @@ dsrsc3tn.o: dsrsc3tn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -2953,9 +3031,9 @@ dsrsc3tn.o: dsrsc3tn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -2968,8 +3046,6 @@ dsrsc3tn.o: dsrsc3tn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrsc3vl.h ../include/dcmtk/dcmsr/dsrsc3gr.h \
@@ -3005,7 +3081,10 @@ dsrsc3vl.o: dsrsc3vl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3022,9 +3101,9 @@ dsrsc3vl.o: dsrsc3vl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3068,7 +3147,10 @@ dsrscogr.o: dsrscogr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3085,9 +3167,9 @@ dsrscogr.o: dsrscogr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3098,11 +3180,7 @@ dsrscogr.o: dsrscogr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmsr/dsrtlist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrfl.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/nsdfti.def \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrfl.h
 dsrscotn.o: dsrscotn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -3132,7 +3210,10 @@ dsrscotn.o: dsrscotn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3149,9 +3230,9 @@ dsrscotn.o: dsrscotn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3164,8 +3245,6 @@ dsrscotn.o: dsrscotn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrscovl.h ../include/dcmtk/dcmsr/dsrscogr.h \
@@ -3201,7 +3280,10 @@ dsrscovl.o: dsrscovl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3218,9 +3300,9 @@ dsrscovl.o: dsrscovl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3264,7 +3346,10 @@ dsrsoprf.o: dsrsoprf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3281,9 +3366,9 @@ dsrsoprf.o: dsrsoprf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3333,7 +3418,10 @@ dsrspecc.o: dsrspecc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3350,9 +3438,9 @@ dsrspecc.o: dsrspecc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3392,7 +3480,10 @@ dsrstpl.o: dsrstpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3409,9 +3500,9 @@ dsrstpl.o: dsrstpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3423,8 +3514,6 @@ dsrstpl.o: dsrstpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -3439,8 +3528,7 @@ dsrstpl.o: dsrstpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrctpl.h
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h
 dsrstrvl.o: dsrstrvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrstrvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
  ../include/dcmtk/dcmsr/dsdefine.h \
@@ -3471,7 +3559,10 @@ dsrstrvl.o: dsrstrvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3488,9 +3579,9 @@ dsrstrvl.o: dsrstrvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3530,7 +3621,10 @@ dsrtcodt.o: dsrtcodt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3547,9 +3641,9 @@ dsrtcodt.o: dsrtcodt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3564,11 +3658,7 @@ dsrtcodt.o: dsrtcodt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
  ../../ofstd/include/dcmtk/ofstd/ofdate.h \
- ../../ofstd/include/dcmtk/ofstd/oftime.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/nsdfti.def \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def
+ ../../ofstd/include/dcmtk/ofstd/oftime.h
 dsrtcosp.o: dsrtcosp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcosp.h ../include/dcmtk/dcmsr/dsrtypes.h \
  ../include/dcmtk/dcmsr/dsdefine.h \
@@ -3599,7 +3689,10 @@ dsrtcosp.o: dsrtcosp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3616,9 +3709,9 @@ dsrtcosp.o: dsrtcosp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3629,11 +3722,7 @@ dsrtcosp.o: dsrtcosp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmsr/dsrtlist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/nsdfti.def \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h
 dsrtcotn.o: dsrtcotn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -3663,7 +3752,10 @@ dsrtcotn.o: dsrtcotn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3680,9 +3772,9 @@ dsrtcotn.o: dsrtcotn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3695,8 +3787,6 @@ dsrtcotn.o: dsrtcotn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrtcovl.h ../include/dcmtk/dcmsr/dsrtcodt.h \
@@ -3733,7 +3823,10 @@ dsrtcoto.o: dsrtcoto.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3750,9 +3843,9 @@ dsrtcoto.o: dsrtcoto.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3764,11 +3857,7 @@ dsrtcoto.o: dsrtcoto.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtlist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/nsdfti.def \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def
+ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h
 dsrtcovl.o: dsrtcovl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcovl.h ../include/dcmtk/dcmsr/dsrtypes.h \
  ../include/dcmtk/dcmsr/dsdefine.h \
@@ -3799,7 +3888,10 @@ dsrtcovl.o: dsrtcovl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3816,9 +3908,9 @@ dsrtcovl.o: dsrtcovl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3860,7 +3952,10 @@ dsrtextn.o: dsrtextn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3877,9 +3972,9 @@ dsrtextn.o: dsrtextn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3892,8 +3987,6 @@ dsrtextn.o: dsrtextn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrstrvl.h ../include/dcmtk/dcmsr/dsrxmld.h \
@@ -3931,7 +4024,10 @@ dsrtimtn.o: dsrtimtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -3948,9 +4044,9 @@ dsrtimtn.o: dsrtimtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -3963,8 +4059,6 @@ dsrtimtn.o: dsrtimtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrstrvl.h ../include/dcmtk/dcmsr/dsrxmld.h \
@@ -4002,7 +4096,10 @@ dsrtpltn.o: dsrtpltn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4019,9 +4116,9 @@ dsrtpltn.o: dsrtpltn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -4034,8 +4131,6 @@ dsrtpltn.o: dsrtpltn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrstpl.h ../include/dcmtk/dcmsr/dsrdoctr.h \
@@ -4051,8 +4146,7 @@ dsrtpltn.o: dsrtpltn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrctpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrctpl.h \
  ../include/dcmtk/dcmsr/dsrxmld.h ../include/dcmtk/dcmsr/dsrxmlc.h
 dsrtree.o: dsrtree.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -4084,7 +4178,10 @@ dsrtree.o: dsrtree.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4101,9 +4198,9 @@ dsrtree.o: dsrtree.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -4114,9 +4211,7 @@ dsrtree.o: dsrtree.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
- ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofstack.h
 dsrtypes.o: dsrtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -4146,7 +4241,10 @@ dsrtypes.o: dsrtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4163,9 +4261,9 @@ dsrtypes.o: dsrtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -4178,8 +4276,6 @@ dsrtypes.o: dsrtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrstrvl.h ../include/dcmtk/dcmsr/dsrcodtn.h \
@@ -4249,7 +4345,10 @@ dsruidtn.o: dsruidtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4266,9 +4365,9 @@ dsruidtn.o: dsruidtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -4281,8 +4380,6 @@ dsruidtn.o: dsruidtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrstrvl.h ../include/dcmtk/dcmsr/dsrxmld.h \
@@ -4320,7 +4417,10 @@ dsrwavch.o: dsrwavch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4337,9 +4437,9 @@ dsrwavch.o: dsrwavch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -4351,11 +4451,7 @@ dsrwavch.o: dsrwavch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtlist.h ../include/dcmtk/dcmsr/dsrxmld.h \
  ../include/dcmtk/dcmsr/dsrxmlc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/nsdfti.def \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h
 dsrwavtn.o: dsrwavtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -4385,7 +4481,10 @@ dsrwavtn.o: dsrwavtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4402,9 +4501,9 @@ dsrwavtn.o: dsrwavtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -4417,8 +4516,6 @@ dsrwavtn.o: dsrwavtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtree.h ../include/dcmtk/dcmsr/dsrtncsr.h \
  ../include/dcmtk/dcmsr/dsrposcn.h ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrwavvl.h ../include/dcmtk/dcmsr/dsrcomvl.h \
@@ -4455,7 +4552,10 @@ dsrwavvl.o: dsrwavvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4472,9 +4572,9 @@ dsrwavvl.o: dsrwavvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -4525,7 +4625,10 @@ dsrxmld.o: dsrxmld.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4542,9 +4645,9 @@ dsrxmld.o: dsrxmld.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -4584,7 +4687,10 @@ dsrxrdcc.o: dsrxrdcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -4601,9 +4707,9 @@ dsrxrdcc.o: dsrxrdcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
diff --git a/dcmsr/libsrc/dsrdoc.cc b/dcmsr/libsrc/dsrdoc.cc
index d723303..7137cfb 100644
--- a/dcmsr/libsrc/dsrdoc.cc
+++ b/dcmsr/libsrc/dsrdoc.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -108,8 +108,9 @@ DSRDocument::DSRDocument(const E_DocumentType documentType)
     PertinentOtherEvidence(DCM_PertinentOtherEvidenceSequence),
     ReferencedInstances()
 {
+    DCMSR_DEBUG("Initializing all DICOM header attributes");
     /* set initial values for a new SOP instance */
-    updateAttributes();
+    updateAttributes(OFTrue /*updateAll*/, OFFalse /*verboseMode*/);
 }
 
 
@@ -429,6 +430,7 @@ OFCondition DSRDocument::read(DcmItem &dataset,
 {
     OFCondition result = EC_Normal;
     E_DocumentType documentType = DT_invalid;
+    DCMSR_DEBUG("Reading SR document from DICOM dataset");
     /* re-initialize SR document */
     clear();
     /* check SOP class UID and modality first */
@@ -614,6 +616,7 @@ OFCondition DSRDocument::write(DcmItem &dataset,
     /* only write valid documents */
     if (isValid())
     {
+        DCMSR_DEBUG("Writing SR document to DICOM dataset");
         /* update all DICOM attributes */
         updateAttributes();
 
@@ -743,6 +746,7 @@ OFCondition DSRDocument::readXML(const OFString &filename,
                                  const size_t flags)
 {
     DSRXMLDocument doc;
+    DCMSR_DEBUG("Reading SR document from XML format");
     /* read, parse and validate XML document */
     OFCondition result = doc.read(filename, flags);
     if (result.good())
@@ -1229,6 +1233,7 @@ OFCondition DSRDocument::writeXML(STD_NAMESPACE ostream &stream,
     /* only write valid documents */
     if (isValid())
     {
+        DCMSR_DEBUG("Writing SR document to XML format");
         /* used for multiple purposes */
         OFString tmpString;
         /* update all DICOM attributes */
@@ -2895,9 +2900,11 @@ OFCondition DSRDocument::finalizeDocument()
 }
 
 
-void DSRDocument::updateAttributes(const OFBool updateAll)
+void DSRDocument::updateAttributes(const OFBool updateAll,
+                                   const OFBool verboseMode)
 {
-    DCMSR_DEBUG("Updating " << (updateAll ? "all " : "") << "DICOM header attributes");
+    if (verboseMode)
+        DCMSR_DEBUG("Updating " << (updateAll ? "all " : "") << "DICOM header attributes");
     const E_DocumentType documentType = getDocumentType();
     /* retrieve SOP class UID from internal document type */
     SOPClassUID.putString(documentTypeToSOPClassUID(documentType));
@@ -2924,7 +2931,8 @@ void DSRDocument::updateAttributes(const OFBool updateAll)
         /* create new SOP instance UID if required */
         if (SOPInstanceUID.isEmpty())
         {
-            DCMSR_DEBUG("  Generating new value for SOP Instance UID");
+            if (verboseMode)
+                DCMSR_DEBUG("  Generating new value for SOP Instance UID");
             SOPInstanceUID.putString(dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT));
             /* set instance creation date to current date (YYYYMMDD) */
             InstanceCreationDate.putOFStringArray(currentDate(tmpString));
@@ -2936,13 +2944,15 @@ void DSRDocument::updateAttributes(const OFBool updateAll)
         /* create new study instance UID if required */
         if (StudyInstanceUID.isEmpty())
         {
-            DCMSR_DEBUG("  Generating new value for Study Instance UID");
+            if (verboseMode)
+                DCMSR_DEBUG("  Generating new value for Study Instance UID");
             StudyInstanceUID.putString(dcmGenerateUniqueIdentifier(uid, SITE_STUDY_UID_ROOT));
         }
         /* create new series instance UID if required */
         if (SeriesInstanceUID.isEmpty())
         {
-            DCMSR_DEBUG("  Generating new value for Series Instance UID");
+            if (verboseMode)
+                DCMSR_DEBUG("  Generating new value for Series Instance UID");
             SeriesInstanceUID.putString(dcmGenerateUniqueIdentifier(uid, SITE_SERIES_UID_ROOT));
         }
 
diff --git a/dcmsr/libsrc/dsrdocst.cc b/dcmsr/libsrc/dsrdocst.cc
index 2467e78..1e2243d 100644
--- a/dcmsr/libsrc/dsrdocst.cc
+++ b/dcmsr/libsrc/dsrdocst.cc
@@ -347,6 +347,7 @@ size_t DSRDocumentSubTree::gotoNamedNode(const DSRCodedEntryValue &conceptName,
         /* iterate over all nodes */
         do {
             node = getNode();
+            /* and check for the desired concept name */
             if ((node != NULL) && (node->getConceptName() == conceptName))
                 nodeID = node->getNodeID();
         } while ((nodeID == 0) && iterate(searchIntoSub));
@@ -355,13 +356,39 @@ size_t DSRDocumentSubTree::gotoNamedNode(const DSRCodedEntryValue &conceptName,
 }
 
 
-size_t DSRDocumentSubTree::gotoNamedChildNode(const DSRCodedEntryValue &conceptName,
-                                              const OFBool searchIntoSub)
+size_t DSRDocumentSubTree::gotoNamedChildNode(const DSRCodedEntryValue &conceptName)
 {
     /* first, goto child node */
     size_t nodeID = gotoChild();
     if (nodeID > 0)
-        nodeID = gotoNamedNode(conceptName, OFFalse /*startFromRoot*/, searchIntoSub);
+        nodeID = gotoNamedNode(conceptName, OFFalse /*startFromRoot*/, OFFalse /*searchIntoSub*/);
+    return nodeID;
+}
+
+
+size_t DSRDocumentSubTree::gotoNamedNodeInSubTree(const DSRCodedEntryValue &conceptName,
+                                                  const OFBool searchIntoSub)
+{
+    size_t nodeID = 0;
+    if (hasChildNodes())
+    {
+        /* start from first child node */
+        DSRDocumentTreeNodeCursor cursor(getChild());
+        if (cursor.isValid())
+        {
+            const DSRDocumentTreeNode *node;
+            /* iterate over all nodes in the subtree */
+            do {
+                node = cursor.getNode();
+                /* and check for the desired concept name */
+                if ((node != NULL) && (node->getConceptName() == conceptName))
+                    nodeID = node->getNodeID();
+            } while ((nodeID == 0) && cursor.iterate(searchIntoSub));
+            /* if found, set internal cursor to this node */
+            if (nodeID > 0)
+                nodeID = gotoNode(nodeID, OFFalse /*startFromRoot*/);
+        }
+    }
     return nodeID;
 }
 
diff --git a/dcmsr/libsrc/dsrimgfr.cc b/dcmsr/libsrc/dsrimgfr.cc
index b4c2cc6..992b19c 100644
--- a/dcmsr/libsrc/dsrimgfr.cc
+++ b/dcmsr/libsrc/dsrimgfr.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -30,16 +30,15 @@
 
 #define INCLUDE_CSTDIO
 #include "dcmtk/ofstd/ofstdinc.h"
-#include "dcmtk/ofstd/ofdiag.h"
-
-// This is not about specialization but static member initialization, the
-// Visual Studio warning is therefore inappropriate and suppressed.
-#include DCMTK_DIAGNOSTIC_PUSH
-#include DCMTK_DIAGNOSTIC_IGNORE_NO_SUITABLE_DEFINITION_FOR_TEMPLATE_INSTANTIATION
-/* declared in class DSRListOfItems<T> */
-DCMTK_EXPLICIT_SPECIALIZATION
-const Sint32 DSRListOfItems<Sint32>::EmptyItem = 0;
-#include DCMTK_DIAGNOSTIC_POP
+
+
+template<>
+const Sint32& DSRgetEmptyItem<Sint32>()
+{
+    // no need to be thread-safe, since it is only an int
+    static const Sint32 t = 0;
+    return t;
+}
 
 
 DSRImageFrameList::DSRImageFrameList()
diff --git a/dcmsr/libsrc/dsrimgse.cc b/dcmsr/libsrc/dsrimgse.cc
index 1d2b6a4..f038758 100644
--- a/dcmsr/libsrc/dsrimgse.cc
+++ b/dcmsr/libsrc/dsrimgse.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2013-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -30,16 +30,15 @@
 
 #define INCLUDE_CSTDIO
 #include "dcmtk/ofstd/ofstdinc.h"
-#include "dcmtk/ofstd/ofdiag.h"
-
-// This is not about specialization but static member initialization, the
-// Visual Studio warning is therefore inappropriate and suppressed.
-#include DCMTK_DIAGNOSTIC_PUSH
-#include DCMTK_DIAGNOSTIC_IGNORE_NO_SUITABLE_DEFINITION_FOR_TEMPLATE_INSTANTIATION
-/* declared in class DSRListOfItems<T> */
-DCMTK_EXPLICIT_SPECIALIZATION
-const Uint16 DSRListOfItems<Uint16>::EmptyItem = 0;
-#include DCMTK_DIAGNOSTIC_POP
+
+
+template<>
+const Uint16& DSRgetEmptyItem<Uint16>()
+{
+    // no need to be thread-safe, since it is only an int
+    static const Uint16 t = 0;
+    return t;
+}
 
 
 DSRImageSegmentList::DSRImageSegmentList()
diff --git a/dcmsr/libsrc/dsrsc3gr.cc b/dcmsr/libsrc/dsrsc3gr.cc
index 7e281f7..7dfb0d9 100644
--- a/dcmsr/libsrc/dsrsc3gr.cc
+++ b/dcmsr/libsrc/dsrsc3gr.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2010-2016, OFFIS e.V.
+ *  Copyright (C) 2010-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -29,16 +29,16 @@
 #include "dcmtk/dcmdata/dcvrfl.h"
 
 #include "dcmtk/ofstd/ofstd.h"
-#include "dcmtk/ofstd/ofdiag.h"
-
-// This is not about specialization but static member initialization, the
-// Visual Studio warning is therefore inappropriate and suppressed.
-#include DCMTK_DIAGNOSTIC_PUSH
-#include DCMTK_DIAGNOSTIC_IGNORE_NO_SUITABLE_DEFINITION_FOR_TEMPLATE_INSTANTIATION
-/* declared in class DSRListOfItems<T> */
-DCMTK_EXPLICIT_SPECIALIZATION
-const DSRGraphicData3DItem DSRListOfItems<DSRGraphicData3DItem>::EmptyItem(0, 0, 0);
-#include DCMTK_DIAGNOSTIC_POP
+
+
+// global empty item object so it gets initialized and cleaned up by the linker
+const DSRGraphicData3DItem DSRGraphicData3DEmptyItem(0, 0, 0);
+
+template<>
+const DSRGraphicData3DItem& DSRgetEmptyItem<DSRGraphicData3DItem>()
+{
+    return DSRGraphicData3DEmptyItem;
+}
 
 
 DSRGraphicData3DList::DSRGraphicData3DList()
diff --git a/dcmsr/libsrc/dsrscogr.cc b/dcmsr/libsrc/dsrscogr.cc
index 815c284..9f2c4f9 100644
--- a/dcmsr/libsrc/dsrscogr.cc
+++ b/dcmsr/libsrc/dsrscogr.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -29,16 +29,16 @@
 #include "dcmtk/dcmdata/dcvrfl.h"
 
 #include "dcmtk/ofstd/ofstd.h"
-#include "dcmtk/ofstd/ofdiag.h"
-
-// This is not about specialization but static member initialization, the
-// Visual Studio warning is therefore inappropriate and suppressed.
-#include DCMTK_DIAGNOSTIC_PUSH
-#include DCMTK_DIAGNOSTIC_IGNORE_NO_SUITABLE_DEFINITION_FOR_TEMPLATE_INSTANTIATION
-/* declared in class DSRListOfItems<T> */
-DCMTK_EXPLICIT_SPECIALIZATION
-const DSRGraphicDataItem DSRListOfItems<DSRGraphicDataItem>::EmptyItem(0, 0);
-#include DCMTK_DIAGNOSTIC_POP
+
+
+// global empty item object so it gets initialized and cleaned up by the linker
+const DSRGraphicDataItem DSRGraphicDataEmptyItem(0, 0);
+
+template<>
+const DSRGraphicDataItem& DSRgetEmptyItem<DSRGraphicDataItem>()
+{
+    return DSRGraphicDataEmptyItem;
+}
 
 
 DSRGraphicDataList::DSRGraphicDataList()
diff --git a/dcmsr/libsrc/dsrtcodt.cc b/dcmsr/libsrc/dsrtcodt.cc
index c4fdd85..ea18b90 100644
--- a/dcmsr/libsrc/dsrtcodt.cc
+++ b/dcmsr/libsrc/dsrtcodt.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,16 +27,16 @@
 
 #include "dcmtk/dcmdata/dcdeftag.h"
 #include "dcmtk/dcmdata/dcvrdt.h"
-#include "dcmtk/ofstd/ofdiag.h"
-
-// This is not about specialization but static member initialization, the
-// Visual Studio warning is therefore inappropriate and suppressed.
-#include DCMTK_DIAGNOSTIC_PUSH
-#include DCMTK_DIAGNOSTIC_IGNORE_NO_SUITABLE_DEFINITION_FOR_TEMPLATE_INSTANTIATION
-/* declared in class DSRListOfItems<T> */
-DCMTK_EXPLICIT_SPECIALIZATION
-const OFString DSRListOfItems<OFString>::EmptyItem;
-#include DCMTK_DIAGNOSTIC_POP
+
+
+// global empty item object so it gets initialized and cleaned up by the linker
+const OFString OFStringEmptyItem;
+
+template<>
+const OFString& DSRgetEmptyItem<OFString>()
+{
+    return OFStringEmptyItem;
+}
 
 
 DSRReferencedDateTimeList::DSRReferencedDateTimeList()
diff --git a/dcmsr/libsrc/dsrtcosp.cc b/dcmsr/libsrc/dsrtcosp.cc
index b91f19d..fa4c981 100644
--- a/dcmsr/libsrc/dsrtcosp.cc
+++ b/dcmsr/libsrc/dsrtcosp.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -30,16 +30,15 @@
 
 #define INCLUDE_CSTDIO
 #include "dcmtk/ofstd/ofstdinc.h"
-#include "dcmtk/ofstd/ofdiag.h"
-
-// This is not about specialization but static member initialization, the
-// Visual Studio warning is therefore inappropriate and suppressed.
-#include DCMTK_DIAGNOSTIC_PUSH
-#include DCMTK_DIAGNOSTIC_IGNORE_NO_SUITABLE_DEFINITION_FOR_TEMPLATE_INSTANTIATION
-/* declared in class DSRListOfItems<T> */
-DCMTK_EXPLICIT_SPECIALIZATION
-const Uint32 DSRListOfItems<Uint32>::EmptyItem = 0;
-#include DCMTK_DIAGNOSTIC_POP
+
+
+template<>
+const Uint32& DSRgetEmptyItem<Uint32>()
+{
+    // no need to be thread-safe, since it is only an int
+    static const Uint32 t = 0;
+    return t;
+}
 
 
 DSRReferencedSamplePositionList::DSRReferencedSamplePositionList()
diff --git a/dcmsr/libsrc/dsrtcoto.cc b/dcmsr/libsrc/dsrtcoto.cc
index 277fc74..7ce45ba 100644
--- a/dcmsr/libsrc/dsrtcoto.cc
+++ b/dcmsr/libsrc/dsrtcoto.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -31,15 +31,16 @@
 #include "dcmtk/ofstd/ofstd.h"
 #define INCLUDE_CSTDIO
 #include "dcmtk/ofstd/ofstdinc.h"
-#include "dcmtk/ofstd/ofdiag.h"
-
-// This is not about specialization but static member initialization, the
-// Visual Studio warning is therefore inappropriate and suppressed.
-#include DCMTK_DIAGNOSTIC_PUSH
-#include DCMTK_DIAGNOSTIC_IGNORE_NO_SUITABLE_DEFINITION_FOR_TEMPLATE_INSTANTIATION
-/* declared in class DSRListOfItems<T> */
-DCMTK_EXPLICIT_SPECIALIZATION const Float64 DSRListOfItems<Float64>::EmptyItem = 0;
-#include DCMTK_DIAGNOSTIC_POP
+
+
+template<>
+const Float64& DSRgetEmptyItem<Float64>()
+{
+    // no need to be thread-safe, since it is only a float
+    static const Float64 t = 0;
+    return t;
+}
+
 
 DSRReferencedTimeOffsetList::DSRReferencedTimeOffsetList()
   : DSRListOfItems<Float64>()
diff --git a/dcmsr/libsrc/dsrtypes.cc b/dcmsr/libsrc/dsrtypes.cc
index f95ac68..f9218ee 100644
--- a/dcmsr/libsrc/dsrtypes.cc
+++ b/dcmsr/libsrc/dsrtypes.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -335,7 +335,8 @@ static const S_DocumentTypeNameMap DocumentTypeNameMap[] =
     {DSRTypes::DT_RadiopharmaceuticalRadiationDoseSR,  UID_RadiopharmaceuticalRadiationDoseSRStorage,  EM_EnhancedEquipment,               "SR", "Radiopharmaceutical Radiation Dose SR"},
     {DSRTypes::DT_ExtensibleSR,                        UID_ExtensibleSRStorage,                        EM_EnhancedEquipment,               "SR", "Extensible SR"},
     {DSRTypes::DT_AcquisitionContextSR,                UID_AcquisitionContextSRStorage,                EM_EnhancedEquipment,               "SR", "Acquisition Context SR"},
-    {DSRTypes::DT_SimplifiedAdultEchoSR,               UID_SimplifiedAdultEchoSRStorage,               EM_EnhancedEquipment | EM_Timezone, "SR", "Simplified Adult Echo SR"}
+    {DSRTypes::DT_SimplifiedAdultEchoSR,               UID_SimplifiedAdultEchoSRStorage,               EM_EnhancedEquipment | EM_Timezone, "SR", "Simplified Adult Echo SR"},
+    {DSRTypes::DT_PatientRadiationDoseSR,              UID_PatientRadiationDoseSRStorage,              EM_EnhancedEquipment,               "SR", "Patient Radiation Dose SR"}
 };
 
 
@@ -356,37 +357,41 @@ static const S_RelationshipTypeNameMap RelationshipTypeNameMap[] =
 
 static const S_ValueTypeNameMap ValueTypeNameMap[] =
 {
-    {DSRTypes::VT_invalid,          "",                "item",      "invalid/unknown value type"},
-    {DSRTypes::VT_Text,             "TEXT",            "text",      "Text"},
-    {DSRTypes::VT_Code,             "CODE",            "code",      "Code"},
-    {DSRTypes::VT_Num,              "NUM",             "num",       "Number"},
-    {DSRTypes::VT_DateTime,         "DATETIME",        "datetime",  "Date/Time"},
-    {DSRTypes::VT_Date,             "DATE",            "date",      "Date"},
-    {DSRTypes::VT_Time,             "TIME",            "time",      "Time"},
-    {DSRTypes::VT_UIDRef,           "UIDREF",          "uidref",    "UID Reference"},
-    {DSRTypes::VT_PName,            "PNAME",           "pname",     "Person Name"},
-    {DSRTypes::VT_SCoord,           "SCOORD",          "scoord",    "Spatial Coordinates"},
-    {DSRTypes::VT_SCoord3D,         "SCOORD3D",        "scoord3d",  "Spatial Coordinates (3D)"},
-    {DSRTypes::VT_TCoord,           "TCOORD",          "tcoord",    "Temporal Coordinates"},
-    {DSRTypes::VT_Composite,        "COMPOSITE",       "composite", "Composite Object"},
-    {DSRTypes::VT_Image,            "IMAGE",           "image",     "Image"},
-    {DSRTypes::VT_Waveform,         "WAVEFORM",        "waveform",  "Waveform"},
-    {DSRTypes::VT_Container,        "CONTAINER",       "container", "Container"},
-    {DSRTypes::VT_byReference,      "(by-reference)",  "reference", "(by-reference)"},
-    {DSRTypes::VT_includedTemplate, "(incl-template)", "template",  "(included template)"}
+    {DSRTypes::VT_invalid,          "",                "item",       "invalid/unknown value type"},
+    {DSRTypes::VT_Text,             "TEXT",            "text",       "Text"},
+    {DSRTypes::VT_Code,             "CODE",            "code",       "Code"},
+    {DSRTypes::VT_Num,              "NUM",             "num",        "Number"},
+    {DSRTypes::VT_DateTime,         "DATETIME",        "datetime",   "Date/Time"},
+    {DSRTypes::VT_Date,             "DATE",            "date",       "Date"},
+    {DSRTypes::VT_Time,             "TIME",            "time",       "Time"},
+    {DSRTypes::VT_UIDRef,           "UIDREF",          "uidref",     "UID Reference"},
+    {DSRTypes::VT_PName,            "PNAME",           "pname",      "Person Name"},
+    {DSRTypes::VT_SCoord,           "SCOORD",          "scoord",     "Spatial Coordinates"},
+    {DSRTypes::VT_SCoord3D,         "SCOORD3D",        "scoord3d",   "Spatial Coordinates (3D)"},
+    {DSRTypes::VT_TCoord,           "TCOORD",          "tcoord",     "Temporal Coordinates"},
+    {DSRTypes::VT_Composite,        "COMPOSITE",       "composite",  "Composite Object"},
+    {DSRTypes::VT_Image,            "IMAGE",           "image",      "Image"},
+    {DSRTypes::VT_Waveform,         "WAVEFORM",        "waveform",   "Waveform"},
+    {DSRTypes::VT_Container,        "CONTAINER",       "container",  "Container"},
+    {DSRTypes::VT_byReference,      "(by-reference)",  "reference",  "(by-reference)"},
+    {DSRTypes::VT_includedTemplate, "(incl-template)", "INCL-TEMPL", "(included template)"}     // the XML name should never be used!
 };
 
 
 static const S_PresentationStateTypeNameMap PresentationStateTypeNameMap[] =
 {
-    {DSRTypes::PT_invalid,              "",                                                         "invalid/unknown presentation state type"},
-    {DSRTypes::PT_Grayscale,            UID_GrayscaleSoftcopyPresentationStateStorage,              "GSPS"},
-    {DSRTypes::PT_Color,                UID_ColorSoftcopyPresentationStateStorage,                  "CSPS"},
-    {DSRTypes::PT_PseudoColor,          UID_PseudoColorSoftcopyPresentationStateStorage,            "PCSPS"},
-    {DSRTypes::PT_Blending,             UID_BlendingSoftcopyPresentationStateStorage,               "BSPS"},
-    {DSRTypes::PT_XAXRFGrayscale,       UID_XAXRFGrayscaleSoftcopyPresentationStateStorage,         "XGSPS"},
-    {DSRTypes::PT_GrayscalePlanarMPR,   UID_GrayscalePlanarMPRVolumetricPresentationStateStorage,   "GPVPS"},
-    {DSRTypes::PT_CompositingPlanarMPR, UID_CompositingPlanarMPRVolumetricPresentationStateStorage, "CPVPS"}
+    {DSRTypes::PT_invalid,                  "",                                                             "invalid/unknown presentation state type"},
+    {DSRTypes::PT_Grayscale,                UID_GrayscaleSoftcopyPresentationStateStorage,                  "GSPS"},
+    {DSRTypes::PT_Color,                    UID_ColorSoftcopyPresentationStateStorage,                      "CSPS"},
+    {DSRTypes::PT_PseudoColor,              UID_PseudoColorSoftcopyPresentationStateStorage,                "PCSPS"},
+    {DSRTypes::PT_Blending,                 UID_BlendingSoftcopyPresentationStateStorage,                   "BSPS"},
+    {DSRTypes::PT_XAXRFGrayscale,           UID_XAXRFGrayscaleSoftcopyPresentationStateStorage,             "XGSPS"},
+    {DSRTypes::PT_GrayscalePlanarMPR,       UID_GrayscalePlanarMPRVolumetricPresentationStateStorage,       "GP-VPS"},
+    {DSRTypes::PT_CompositingPlanarMPR,     UID_CompositingPlanarMPRVolumetricPresentationStateStorage,     "CP-VPS"},
+    {DSRTypes::PT_AdvancedBlending,         UID_AdvancedBlendingPresentationStateStorage,                   "ABPS"},
+    {DSRTypes::PT_VolumeRendering,          UID_VolumeRenderingVolumetricPresentationStateStorage,          "VR-VPS"},
+    {DSRTypes::PT_SegmentedVolumeRendering, UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage, "SVR-VPS"},
+    {DSRTypes::PT_MultipleVolumeRendering,  UID_MultipleVolumeRenderingVolumetricPresentationStateStorage,  "MVR-VPS"}
 };
 
 
@@ -902,7 +907,7 @@ DSRTypes::E_CharacterSet DSRTypes::definedTermToCharacterSet(const OFString &def
 
 OFBool DSRTypes::isDocumentTypeSupported(const E_DocumentType documentType)
 {
-    return (documentType != DT_invalid) && (documentType != DT_ExtensibleSR);
+    return (documentType != DT_invalid) && (documentType != DT_ExtensibleSR) && (documentType != DT_PatientRadiationDoseSR);
 }
 
 
@@ -1489,6 +1494,9 @@ DSRIODConstraintChecker *DSRTypes::createIODConstraintChecker(const E_DocumentTy
         case DT_SimplifiedAdultEchoSR:
             checker = new DSRSimplifiedAdultEchoSRConstraintChecker();
             break;
+        case DT_PatientRadiationDoseSR:
+            /* not yet supported */
+            break;
         case DT_invalid:
             /* nothing to do */
             break;
diff --git a/dcmsr/libsrc/dsrwavch.cc b/dcmsr/libsrc/dsrwavch.cc
index b73a4c0..6e70549 100644
--- a/dcmsr/libsrc/dsrwavch.cc
+++ b/dcmsr/libsrc/dsrwavch.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -31,16 +31,16 @@
 
 #define INCLUDE_CSTDIO
 #include "dcmtk/ofstd/ofstdinc.h"
-#include "dcmtk/ofstd/ofdiag.h"
-
-// This is not about specialization but static member initialization, the
-// Visual Studio warning is therefore inappropriate and suppressed.
-#include DCMTK_DIAGNOSTIC_PUSH
-#include DCMTK_DIAGNOSTIC_IGNORE_NO_SUITABLE_DEFINITION_FOR_TEMPLATE_INSTANTIATION
-/* declared in class DSRListOfItems<T> */
-DCMTK_EXPLICIT_SPECIALIZATION
-const DSRWaveformChannelItem DSRListOfItems<DSRWaveformChannelItem>::EmptyItem(0, 0);
-#include DCMTK_DIAGNOSTIC_POP
+
+
+// global empty item object so it gets initialized and cleaned up by the linker
+const DSRWaveformChannelItem DSRWaveformChannelEmptyItem(0, 0);
+
+template<>
+const DSRWaveformChannelItem& DSRgetEmptyItem<DSRWaveformChannelItem>()
+{
+    return DSRWaveformChannelEmptyItem;
+}
 
 
 DSRWaveformChannelList::DSRWaveformChannelList()
diff --git a/dcmsr/tests/Makefile.dep b/dcmsr/tests/Makefile.dep
index c3114bf..0db80f8 100644
--- a/dcmsr/tests/Makefile.dep
+++ b/dcmsr/tests/Makefile.dep
@@ -29,7 +29,10 @@ mkreport.o: mkreport.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -46,9 +49,9 @@ mkreport.o: mkreport.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -60,8 +63,6 @@ mkreport.o: mkreport.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -76,8 +77,7 @@ mkreport.o: mkreport.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrrtpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrrtpl.h \
  ../include/dcmtk/dcmsr/dsrctpl.h ../include/dcmtk/dcmsr/dsrsoprf.h \
  ../include/dcmtk/dcmsr/dsrrefin.h ../include/dcmtk/dcmsr/dsrcsidl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
@@ -153,6 +153,7 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -166,7 +167,9 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -197,6 +200,7 @@ tsrcmr.o: tsrcmr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -210,7 +214,9 @@ tsrcmr.o: tsrcmr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -243,8 +249,6 @@ tsrcmr.o: tsrcmr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -259,8 +263,7 @@ tsrcmr.o: tsrcmr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrrtpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrrtpl.h \
  ../include/dcmtk/dcmsr/dsrctpl.h ../include/dcmtk/dcmsr/dsrsoprf.h \
  ../include/dcmtk/dcmsr/dsrrefin.h ../include/dcmtk/dcmsr/dsrcsidl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
@@ -327,6 +330,7 @@ tsrcodvl.o: tsrcodvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -340,7 +344,9 @@ tsrcodvl.o: tsrcodvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -390,6 +396,7 @@ tsrdoc.o: tsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -403,7 +410,9 @@ tsrdoc.o: tsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -434,8 +443,6 @@ tsrdoc.o: tsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -450,8 +457,7 @@ tsrdoc.o: tsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrrtpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrrtpl.h \
  ../include/dcmtk/dcmsr/dsrctpl.h ../include/dcmtk/dcmsr/dsrsoprf.h \
  ../include/dcmtk/dcmsr/dsrrefin.h ../include/dcmtk/dcmsr/dsrcsidl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
@@ -486,6 +492,7 @@ tsrdoctr.o: tsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -499,7 +506,9 @@ tsrdoctr.o: tsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -530,8 +539,6 @@ tsrdoctr.o: tsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -546,8 +553,7 @@ tsrdoctr.o: tsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrrtpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrrtpl.h \
  ../include/dcmtk/dcmsr/dsrctpl.h ../include/dcmtk/dcmsr/dsrsoprf.h \
  ../include/dcmtk/dcmsr/dsrrefin.h ../include/dcmtk/dcmsr/dsrcsidl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
@@ -585,6 +591,7 @@ tsrlist.o: tsrlist.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -598,7 +605,9 @@ tsrlist.o: tsrlist.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -609,8 +618,12 @@ tsrlist.o: tsrlist.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/logmacro.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../include/dcmtk/dcmsr/dsrtlist.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcerror.h
+ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/shadow.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def
 tsrnumvl.o: tsrnumvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
@@ -631,6 +644,7 @@ tsrnumvl.o: tsrnumvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -644,7 +658,9 @@ tsrnumvl.o: tsrnumvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -696,6 +712,7 @@ tsrtpl.o: tsrtpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -709,7 +726,9 @@ tsrtpl.o: tsrtpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -740,8 +759,6 @@ tsrtpl.o: tsrtpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmsr/dsrdoctn.h ../include/dcmtk/dcmsr/dsrcodvl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/dcmsr/dsrdncsr.h ../include/dcmtk/dcmsr/dsrcitem.h \
@@ -756,8 +773,7 @@ tsrtpl.o: tsrtpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrtcoto.h ../include/dcmtk/dcmsr/dsrcomvl.h \
  ../include/dcmtk/dcmsr/dsrimgvl.h ../include/dcmtk/dcmsr/dsrimgfr.h \
  ../include/dcmtk/dcmsr/dsrimgse.h ../include/dcmtk/dcmsr/dsrwavvl.h \
- ../include/dcmtk/dcmsr/dsrwavch.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmsr/dsrrtpl.h \
+ ../include/dcmtk/dcmsr/dsrwavch.h ../include/dcmtk/dcmsr/dsrrtpl.h \
  ../include/dcmtk/dcmsr/dsrctpl.h ../include/dcmtk/dcmsr/dsrsoprf.h \
  ../include/dcmtk/dcmsr/dsrrefin.h ../include/dcmtk/dcmsr/dsrcsidl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
@@ -793,6 +809,7 @@ tsrtree.o: tsrtree.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -806,7 +823,9 @@ tsrtree.o: tsrtree.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -835,6 +854,4 @@ tsrtree.o: tsrtree.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrposcn.h \
  ../include/dcmtk/dcmsr/dsrtnant.h \
- ../../ofstd/include/dcmtk/ofstd/ofstack.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../../ofstd/include/dcmtk/ofstd/ofstack.h
diff --git a/dcmsr/tests/Makefile.in b/dcmsr/tests/Makefile.in
index fea8927..fad35c5 100644
--- a/dcmsr/tests/Makefile.in
+++ b/dcmsr/tests/Makefile.in
@@ -24,7 +24,7 @@ LIBDIRS = -L$(top_srcdir)/libcmr -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc \
 	-L$(oflogdir)/libsrc -L$(dcmdatadir)/libsrc -L$(dcmimgledir)/libsrc \
 	-L$(dcmimagedir)/libsrc
 LOCALLIBS = -lcmr -ldcmsr -ldcmimage -ldcmimgle -ldcmdata -loflog -lofstd $(TIFFLIBS) \
-	$(PNGLIBS) $(XMLLIBS) $(ZLIBLIBS) $(CHARCONVLIBS)
+	$(PNGLIBS) $(XMLLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
 tstobjs = tests.o tsrtree.o tsrdoctr.o tsrdoc.o tsrcodvl.o tsrnumvl.o tsrtpl.o tsrcmr.o \
 	tsrlist.o
@@ -35,10 +35,10 @@ progs = mkreport tests
 all: $(progs)
 
 mkreport: mkreport.o
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ mkreport.o $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ mkreport.o $(LOCALLIBS) $(LIBS)
 
 tests: $(tstobjs)
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $(tstobjs) $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $(tstobjs) $(LOCALLIBS) $(LIBS)
 
 
 check: tests
diff --git a/dcmsr/tests/tests.cc b/dcmsr/tests/tests.cc
index 36fd320..09785e2 100644
--- a/dcmsr/tests/tests.cc
+++ b/dcmsr/tests/tests.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2012-2016, OFFIS e.V.
+ *  Copyright (C) 2012-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -46,6 +46,8 @@ OFTEST_REGISTER(dcmsr_addContentItem_2);
 OFTEST_REGISTER(dcmsr_copyContentItem);
 OFTEST_REGISTER(dcmsr_getCurrentNode);
 OFTEST_REGISTER(dcmsr_gotoNamedNode);
+OFTEST_REGISTER(dcmsr_gotoNamedChildNode);
+OFTEST_REGISTER(dcmsr_gotoNamedNodeInSubTree);
 OFTEST_REGISTER(dcmsr_gotoAnnotatedNode);
 OFTEST_REGISTER(dcmsr_createDocSubTree);
 OFTEST_REGISTER(dcmsr_copyDocSubTree);
diff --git a/dcmsr/tests/tsrdoctr.cc b/dcmsr/tests/tsrdoctr.cc
index b1dc5c9..4942e24 100644
--- a/dcmsr/tests/tsrdoctr.cc
+++ b/dcmsr/tests/tsrdoctr.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2014-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2014-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -144,6 +144,85 @@ OFTEST(dcmsr_gotoNamedNode)
 }
 
 
+OFTEST(dcmsr_gotoNamedChildNode)
+{
+    /* first, create a new SR document */
+    DSRDocument doc(DSRTypes::DT_ComprehensiveSR);
+    DSRDocumentTree &tree = doc.getTree();
+    /* then add some content items */
+    OFCHECK(tree.addContentItem(DSRTypes::RT_isRoot, DSRTypes::VT_Container));
+    OFCHECK(tree.addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Text, DSRTypes::AM_belowCurrent));
+    OFCHECK(tree.addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num, DSRTypes::AM_afterCurrent));
+    OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("N-1", "99_PRV", "NUM #1")).good());
+    OFCHECK(tree.addContentItem(DSRTypes::RT_hasProperties, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent));
+    OFCHECK(tree.addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_afterCurrent));
+    const size_t nodeID1 = tree.getNodeID();
+    OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("121206", "DCM", "Distance")).good());
+    OFCHECK(tree.goUp() > 0);
+    OFCHECK(tree.addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num, DSRTypes::AM_afterCurrent));
+    OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("N-2", "99_PRV", "NUM #2")).good());
+    OFCHECK(tree.addContentItem(DSRTypes::RT_hasProperties, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent));
+    OFCHECK(tree.addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_afterCurrent));
+    const size_t nodeID2 = tree.getNodeID();
+    OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("121207", "DCM", "Height")).good());
+    OFCHECK(tree.addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent));
+    OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("111221", "DCM", "Unknown failure")).good());
+    /* and check the "search by name" function */
+    OFCHECK(tree.gotoNamedNode(DSRCodedEntryValue("N-1", "99_PRV", "NUM #1")) > 0);
+    OFCHECK_EQUAL(tree.gotoNamedChildNode(DSRCodedEntryValue("121206", "DCM", "Distance")), nodeID1);
+    OFCHECK(tree.gotoNamedNode(DSRCodedEntryValue("N-1", "99_PRV", "NUM #1")) > 0);
+    OFCHECK(tree.gotoNamedChildNode(DSRCodedEntryValue("121207", "DCM", "Height")) == 0);
+    OFCHECK(tree.gotoNamedNode(DSRCodedEntryValue("N-1", "99_PRV", "NUM #1")) > 0);
+    OFCHECK(tree.gotoNamedChildNode(DSRCodedEntryValue("111221", "DCM", "Unknown failure")) == 0);
+    OFCHECK(tree.gotoNamedNode(DSRCodedEntryValue("N-2", "99_PRV", "NUM #2")) > 0);
+    OFCHECK(tree.gotoNamedChildNode(DSRCodedEntryValue("121206", "DCM", "Distance")) == 0);
+    OFCHECK(tree.gotoNamedNode(DSRCodedEntryValue("N-2", "99_PRV", "NUM #2")) > 0);
+    OFCHECK_EQUAL(tree.gotoNamedChildNode(DSRCodedEntryValue("121207", "DCM", "Height")), nodeID2);
+    OFCHECK(tree.gotoNamedNode(DSRCodedEntryValue("N-2", "99_PRV", "NUM #2")) > 0);
+    OFCHECK(tree.gotoNamedChildNode(DSRCodedEntryValue("111221", "DCM", "Unknown failure")) == 0);
+}
+
+
+OFTEST(dcmsr_gotoNamedNodeInSubTree)
+{
+    /* first, create a new SR document */
+    DSRDocument doc(DSRTypes::DT_ComprehensiveSR);
+    DSRDocumentTree &tree = doc.getTree();
+    /* then add some content items */
+    OFCHECK(tree.addContentItem(DSRTypes::RT_isRoot, DSRTypes::VT_Container));
+    OFCHECK(tree.addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Text, DSRTypes::AM_belowCurrent));
+    OFCHECK(tree.addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num, DSRTypes::AM_afterCurrent));
+    OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("N-1", "99_PRV", "NUM #1")).good());
+    OFCHECK(tree.addContentItem(DSRTypes::RT_hasProperties, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent));
+    OFCHECK(tree.addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_afterCurrent));
+    const size_t nodeID1 = tree.getNodeID();
+    OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("121206", "DCM", "Distance")).good());
+    OFCHECK(tree.goUp() > 0);
+    OFCHECK(tree.addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num, DSRTypes::AM_afterCurrent));
+    OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("N-2", "99_PRV", "NUM #2")).good());
+    OFCHECK(tree.addContentItem(DSRTypes::RT_hasProperties, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent));
+    OFCHECK(tree.addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_afterCurrent));
+    const size_t nodeID2 = tree.getNodeID();
+    OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("121207", "DCM", "Height")).good());
+    OFCHECK(tree.addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent));
+    const size_t nodeID3 = tree.getNodeID();
+    OFCHECK(tree.getCurrentContentItem().setConceptName(DSRCodedEntryValue("111221", "DCM", "Unknown failure")).good());
+    /* and check the "search by name" function */
+    OFCHECK(tree.gotoNamedNode(DSRCodedEntryValue("N-1", "99_PRV", "NUM #1")) > 0);
+    OFCHECK_EQUAL(tree.gotoNamedNodeInSubTree(DSRCodedEntryValue("121206", "DCM", "Distance")), nodeID1);
+    OFCHECK(tree.gotoNamedNode(DSRCodedEntryValue("N-1", "99_PRV", "NUM #1")) > 0);
+    OFCHECK(tree.gotoNamedNodeInSubTree(DSRCodedEntryValue("121207", "DCM", "Height")) == 0);
+    OFCHECK(tree.gotoNamedNode(DSRCodedEntryValue("N-1", "99_PRV", "NUM #1")) > 0);
+    OFCHECK(tree.gotoNamedChildNode(DSRCodedEntryValue("111221", "DCM", "Unknown failure")) == 0);
+    OFCHECK(tree.gotoNamedNode(DSRCodedEntryValue("N-2", "99_PRV", "NUM #2")) > 0);
+    OFCHECK(tree.gotoNamedNodeInSubTree(DSRCodedEntryValue("121206", "DCM", "Distance")) == 0);
+    OFCHECK(tree.gotoNamedNode(DSRCodedEntryValue("N-2", "99_PRV", "NUM #2")) > 0);
+    OFCHECK_EQUAL(tree.gotoNamedNodeInSubTree(DSRCodedEntryValue("121207", "DCM", "Height")), nodeID2);
+    OFCHECK(tree.gotoNamedNode(DSRCodedEntryValue("N-2", "99_PRV", "NUM #2")) > 0);
+    OFCHECK_EQUAL(tree.gotoNamedNodeInSubTree(DSRCodedEntryValue("111221", "DCM", "Unknown failure")), nodeID3);
+}
+
+
 OFTEST(dcmsr_gotoAnnotatedNode)
 {
     /* first, create a new SR document */
diff --git a/dcmsr/tests/tsrlist.cc b/dcmsr/tests/tsrlist.cc
index 499ce1c..a7c4251 100644
--- a/dcmsr/tests/tsrlist.cc
+++ b/dcmsr/tests/tsrlist.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2016-2017, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -24,45 +24,63 @@
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
 #include "dcmtk/ofstd/oftest.h"
+#include "dcmtk/ofstd/ofdiag.h"
 
 #include "dcmtk/dcmsr/dsrtlist.h"
 
 
+// small dummy struct to use as list element, ensuring no other instance
+// of DSRListOfItems with this element type exists as a workaround for
+// Visual Studio not understanding C++ templates (again)
+struct Elem
+{
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_SHADOW
+    Elem(int i = 0) : i(i) {}
+#include DCMTK_DIAGNOSTIC_POP
+    OFBool operator==(const Elem& rhs) const {return i == rhs.i;}
+    int i;
+};
+
+
+// provide EmptyItem for instantiation
+template<>
+const Elem& DSRgetEmptyItem<Elem>()
+{
+    static const Elem e;
+    return e;
+}
+
+
 OFTEST(dcmsr_addItems)
 {
-    // disable test case when building shared libraries because of linker errors
-#ifndef DCMTK_SHARED
     /* prepare test data */
-    OFVector<Uint16> vec;
-    for (Uint16 i = 0; i < 10; ++i)
+    OFVector<Elem> vec;
+    for (int i = 0; i < 10; ++i)
         vec.push_back(i);
     /* add data to list */
-    DSRListOfItems<Uint16> lst;
+    DSRListOfItems<Elem> lst;
     lst.addItems(vec);
     /* and check result */
     OFCHECK_EQUAL(lst.getNumberOfItems(), 10);
-    for (Uint16 j = 0; j < 10; ++j)
-        OFCHECK_EQUAL(lst.getItem(j + 1), j);
+    for (int j = 0; j < 10; ++j)
+        OFCHECK_EQUAL(lst.getItem(j + 1).i, j);
     OFCHECK(lst.isElement(7));
     OFCHECK(!lst.isElement(10));
-#endif
 }
 
 
 OFTEST(dcmsr_getItems)
 {
-    // disable test case when building shared libraries because of linker errors
-#ifndef DCMTK_SHARED
-    DSRListOfItems<Uint16> lst;
+    DSRListOfItems<Elem> lst;
     /* add data to list */
-    for (Uint16 i = 0; i < 10; ++i)
+    for (int i = 0; i < 10; ++i)
         lst.addItem(i);
     /* and check result */
     OFCHECK_EQUAL(lst.getNumberOfItems(), 10);
-    OFVector<Uint16> vec;
+    OFVector<Elem> vec;
     OFCHECK(lst.getItems(vec).good());
     OFCHECK_EQUAL(vec.size(), 10);
-    for (Uint16 j = 0; j < 10; ++j)
-        OFCHECK_EQUAL(vec.at(j), j);
-#endif
+    for (int j = 0; j < 10; ++j)
+        OFCHECK_EQUAL(vec.at(j).i, j);
 }
diff --git a/dcmtls/CMakeLists.txt b/dcmtls/CMakeLists.txt
index 5ea7952..85ab8e8 100644
--- a/dcmtls/CMakeLists.txt
+++ b/dcmtls/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmtls)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmtls_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmnet_SOURCE_DIR}/include ${ZLIB_INCDIR} ${OPENSSL_INCDIR})
+INCLUDE_DIRECTORIES("${dcmtls_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmnet_SOURCE_DIR}/include" ${ZLIB_INCDIR} ${OPENSSL_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc include docs)
diff --git a/dcmtls/docs/CMakeLists.txt b/dcmtls/docs/CMakeLists.txt
index 0f7b434..b14aa00 100644
--- a/dcmtls/docs/CMakeLists.txt
+++ b/dcmtls/docs/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(FILES ciphers.txt randseed.txt DESTINATION ${DCMTK_INSTALL_DOCDIR} COMPONENT doc)
+INSTALL(FILES ciphers.txt randseed.txt DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc)
diff --git a/dcmtls/include/CMakeLists.txt b/dcmtls/include/CMakeLists.txt
index 4c58d23..2d0d960 100644
--- a/dcmtls/include/CMakeLists.txt
+++ b/dcmtls/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmtls DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmtls DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmtls/include/dcmtk/dcmtls/tlslayer.h b/dcmtls/include/dcmtk/dcmtls/tlslayer.h
index 38def8a..6126b42 100644
--- a/dcmtls/include/dcmtk/dcmtls/tlslayer.h
+++ b/dcmtls/include/dcmtk/dcmtls/tlslayer.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2015, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -104,7 +104,7 @@ public:
    *    transparent layer is used.
    *  @return pointer to new connection object if successful, NULL otherwise.
    */
-  virtual DcmTransportConnection *createConnection(int openSocket, OFBool useSecureLayer);
+  virtual DcmTransportConnection *createConnection(DcmNativeSocketType openSocket, OFBool useSecureLayer);
 
   /** loads the private key used for authentication of this application from a file.
    *  @param fileName path to the private key file
diff --git a/dcmtls/include/dcmtk/dcmtls/tlstrans.h b/dcmtls/include/dcmtk/dcmtls/tlstrans.h
index 74736c3..0d7196a 100644
--- a/dcmtls/include/dcmtk/dcmtls/tlstrans.h
+++ b/dcmtls/include/dcmtk/dcmtls/tlstrans.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2011, OFFIS e.V.
+ *  Copyright (C) 1998-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -49,7 +49,7 @@ public:
    *  @param newTLSConnection pointer to intialized OpenSSL connection object
    *    to be used for this connection.
    */
-  DcmTLSConnection(int openSocket, SSL *newTLSConnection);
+  DcmTLSConnection(DcmNativeSocketType openSocket, SSL *newTLSConnection);
 
   /** destructor
    */
diff --git a/dcmtls/libsrc/Makefile.dep b/dcmtls/libsrc/Makefile.dep
index 89f4e97..efeb2c1 100644
--- a/dcmtls/libsrc/Makefile.dep
+++ b/dcmtls/libsrc/Makefile.dep
@@ -10,6 +10,7 @@ tlslayer.o: tlslayer.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
@@ -21,7 +22,10 @@ tlslayer.o: tlslayer.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -39,10 +43,10 @@ tlslayer.o: tlslayer.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmtls/tlstrans.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -76,7 +80,10 @@ tlsscu.o: tlsscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -94,10 +101,10 @@ tlsscu.o: tlsscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -125,8 +132,6 @@ tlsscu.o: tlsscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -178,6 +183,7 @@ tlsscu.o: tlsscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcasccff.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcasccfg.h \
@@ -207,6 +213,7 @@ tlstrans.o: tlstrans.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmtls/tlsdefin.h ../include/dcmtk/dcmtls/tlslayer.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -219,7 +226,10 @@ tlstrans.o: tlstrans.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -236,10 +246,10 @@ tlstrans.o: tlstrans.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
  ../../dcmnet/include/dcmtk/dcmnet/diutil.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
diff --git a/dcmtls/libsrc/tlslayer.cc b/dcmtls/libsrc/tlslayer.cc
index ddb086f..24fc5b2 100644
--- a/dcmtls/libsrc/tlslayer.cc
+++ b/dcmtls/libsrc/tlslayer.cc
@@ -31,6 +31,7 @@
 
 BEGIN_EXTERN_C
 #ifdef HAVE_WINDOWS_H
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <winbase.h>
 #endif
@@ -408,7 +409,7 @@ DcmTransportLayerStatus DcmTLSTransportLayer::addTrustedClientCertificateFile(co
   return TCS_ok;
 }
 
-DcmTransportConnection *DcmTLSTransportLayer::createConnection(int openSocket, OFBool useSecureLayer)
+DcmTransportConnection *DcmTLSTransportLayer::createConnection(DcmNativeSocketType openSocket, OFBool useSecureLayer)
 {
   if (useSecureLayer)
   {
diff --git a/dcmtls/libsrc/tlstrans.cc b/dcmtls/libsrc/tlstrans.cc
index 1fd695a..f50c449 100644
--- a/dcmtls/libsrc/tlstrans.cc
+++ b/dcmtls/libsrc/tlstrans.cc
@@ -24,6 +24,11 @@
 
 #ifdef WITH_OPENSSL
 
+#ifdef HAVE_WINDOWS_H
+// on Windows, we need Winsock2 for network functions
+#include <winsock2.h>
+#endif
+
 #define INCLUDE_CSTDLIB
 #define INCLUDE_CSTDIO
 #define INCLUDE_CSTRING
@@ -42,17 +47,9 @@ BEGIN_EXTERN_C
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>
-#include <winbase.h>
-#endif
 #include <openssl/err.h>
 END_EXTERN_C
 
-#ifdef HAVE_GUSI_H
-#include <GUSI.h>	/* Use the Grand Unified Sockets Interface (GUSI) on Macintosh */
-#endif
-
 #include "dcmtk/ofstd/ofbmanip.h"
 #include "dcmtk/dcmtls/tlstrans.h"
 #include "dcmtk/dcmtls/tlslayer.h"
@@ -60,7 +57,7 @@ END_EXTERN_C
 #include "dcmtk/dcmnet/diutil.h"
 
 
-DcmTLSConnection::DcmTLSConnection(int openSocket, SSL *newTLSConnection)
+DcmTLSConnection::DcmTLSConnection(DcmNativeSocketType openSocket, SSL *newTLSConnection)
 : DcmTransportConnection(openSocket)
 , tlsConnection(newTLSConnection)
 , lastError(0)
@@ -270,9 +267,10 @@ OFBool DcmTLSConnection::networkDataAvailable(int timeout)
   t.tv_usec = 0;
 
 #ifdef HAVE_INTP_SELECT
-  nfound = select(getSocket() + 1, (int *)(&fdset), NULL, NULL, &t);
+  nfound = select(OFstatic_cast(int, getSocket() + 1), (int *)(&fdset), NULL, NULL, &t);
 #else
-  nfound = select(getSocket() + 1, &fdset, NULL, NULL, &t);
+  // This is safe because on Windows the first select() parameter is ignored anyway
+  nfound = select(OFstatic_cast(int, getSocket() + 1), &fdset, NULL, NULL, &t);
 #endif
   if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
   {
diff --git a/dcmtract/CMakeLists.txt b/dcmtract/CMakeLists.txt
index 55ccfd0..a178cf1 100644
--- a/dcmtract/CMakeLists.txt
+++ b/dcmtract/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(dcmtract)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmtract_SOURCE_DIR}/include  ${dcmiod_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${ZLIB_INCDIR})
+INCLUDE_DIRECTORIES("${dcmtract_SOURCE_DIR}/include" "${dcmiod_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" ${ZLIB_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc include)
diff --git a/dcmtract/include/CMakeLists.txt b/dcmtract/include/CMakeLists.txt
index 8e86d4f..f05bd83 100644
--- a/dcmtract/include/CMakeLists.txt
+++ b/dcmtract/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmtract DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE)
+INSTALL(DIRECTORY dcmtk/dcmtract DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE)
diff --git a/dcmtract/libsrc/Makefile.dep b/dcmtract/libsrc/Makefile.dep
index ff84b2e..8f9fabd 100644
--- a/dcmtract/libsrc/Makefile.dep
+++ b/dcmtract/libsrc/Makefile.dep
@@ -30,7 +30,9 @@ trcmeasurement.o: trcmeasurement.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -49,6 +51,7 @@ trcmeasurement.o: trcmeasurement.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -64,13 +67,10 @@ trcmeasurement.o: trcmeasurement.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmtract/trcmeasurement.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
@@ -154,7 +154,9 @@ trcmodtractresults.o: trcmodtractresults.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -173,6 +175,7 @@ trcmodtractresults.o: trcmodtractresults.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -188,13 +191,10 @@ trcmodtractresults.o: trcmodtractresults.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmtract/trcmodtractresults.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
@@ -283,7 +283,9 @@ trcstatistic.o: trcstatistic.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -302,6 +304,7 @@ trcstatistic.o: trcstatistic.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -317,13 +320,10 @@ trcstatistic.o: trcstatistic.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmtract/trcstatistic.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
@@ -407,7 +407,9 @@ trctrack.o: trctrack.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -426,6 +428,7 @@ trctrack.o: trctrack.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -441,13 +444,10 @@ trctrack.o: trctrack.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmtract/trctrack.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/dcmtract/trctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../include/dcmtk/dcmtract/trcdef.h
@@ -485,7 +485,7 @@ trctrackset.o: trctrackset.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -504,6 +504,7 @@ trctrackset.o: trctrackset.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -523,7 +524,6 @@ trctrackset.o: trctrackset.cc \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../include/dcmtk/dcmtract/trctrackset.h \
  ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
@@ -611,7 +611,9 @@ trctractographyresults.o: trctractographyresults.cc \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -630,6 +632,7 @@ trctractographyresults.o: trctractographyresults.cc \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -645,12 +648,9 @@ trctractographyresults.o: trctractographyresults.cc \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \
  ../../dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \
@@ -742,7 +742,10 @@ trctypes.o: trctypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -760,9 +763,9 @@ trctypes.o: trctypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../include/dcmtk/dcmtract/trcdef.h
diff --git a/dcmtract/libsrc/trcstatistic.cc b/dcmtract/libsrc/trcstatistic.cc
index a04c8f7..36586d8 100755
--- a/dcmtract/libsrc/trcstatistic.cc
+++ b/dcmtract/libsrc/trcstatistic.cc
@@ -158,7 +158,7 @@ OFCondition TrcTracksStatistic::create(const CodeSequenceMacro& typeCode,
   OFCondition result = statistic->TrcStatistic::setCommon(typeCode, typeModifierCode, unitsCode);
   if (result.good())
   {
-    result = statistic->getData().putAndInsertFloat32Array(DCM_FloatingPointValues, statisticValues, numValues);
+    result = statistic->getData().putAndInsertFloat32Array(DCM_FloatingPointValues, statisticValues, OFstatic_cast(unsigned long, numValues));
     if (result.bad())
     {
       result = TRC_EC_InvalidStatisticData;
@@ -234,7 +234,7 @@ OFCondition TrcTracksStatistic::set(const CodeSequenceMacro& typeCode,
   OFCondition result = TrcStatistic::setCommon(typeCode, typeModifierCode, unitsCode);
   if (result.good())
   {
-    result = m_Item->putAndInsertFloat32Array(DCM_FloatingPointValues, statisticValues, numValues);
+    result = m_Item->putAndInsertFloat32Array(DCM_FloatingPointValues, statisticValues, OFstatic_cast(unsigned long, numValues));
   }
   return result;
 }
diff --git a/dcmtract/libsrc/trctrack.cc b/dcmtract/libsrc/trctrack.cc
index c4abfd3..41d48c6 100644
--- a/dcmtract/libsrc/trctrack.cc
+++ b/dcmtract/libsrc/trctrack.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016, Open Connections GmbH
+ *  Copyright (C) 2016-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -270,7 +270,7 @@ TrcTypes::E_TrackColorMode TrcTrack::getRecommendedDisplayCIELabMode()
 OFCondition TrcTrack::setTrackData(const Float32* trackDataPoints,
                                    const size_t numPoints)
 {
-  return m_Item->putAndInsertFloat32Array(DCM_PointCoordinatesData, trackDataPoints, numPoints*3);
+  return m_Item->putAndInsertFloat32Array(DCM_PointCoordinatesData, trackDataPoints, OFstatic_cast(unsigned long, numPoints*3));
 }
 
 
@@ -290,11 +290,11 @@ OFCondition TrcTrack::setRecommendedDisplayCIELabValues(const Uint16* colors,
   }
   if (numColors == 1)
   {
-    return m_Item->putAndInsertUint16Array(DCM_RecommendedDisplayCIELabValue, colors, numColors * 3);
+    return m_Item->putAndInsertUint16Array(DCM_RecommendedDisplayCIELabValue, colors, OFstatic_cast(unsigned long, numColors * 3));
   }
   else
   {
-    return m_Item->putAndInsertUint16Array(DCM_RecommendedDisplayCIELabValueList, colors, numColors * 3);
+    return m_Item->putAndInsertUint16Array(DCM_RecommendedDisplayCIELabValueList, colors, OFstatic_cast(unsigned long, numColors * 3));
   }
   // should never get here
   return TRC_EC_InvalidColorInformation;
diff --git a/dcmtract/libsrc/trctractographyresults.cc b/dcmtract/libsrc/trctractographyresults.cc
index a64cd11..0cfe941 100644
--- a/dcmtract/libsrc/trctractographyresults.cc
+++ b/dcmtract/libsrc/trctractographyresults.cc
@@ -1,6 +1,6 @@
   /*
  *
- *  Copyright (C) 2016, Open Connections GmbH
+ *  Copyright (C) 2016-2017, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -144,7 +144,7 @@ OFCondition TrcTractographyResults::addTrackSet(const OFString& trackSetLabel,
   OFCondition result = TrcTrackSet::create(trackSetLabel, trackSetDescription, anatomyCode, diffusionModelCode, algoIdentCode, trackSet);
   if (result.good())
   {
-    result = trackSet->getData().putAndInsertUint32(DCM_TrackSetNumber, m_TractographyResultsModule.getTrackSets().size() + 1);
+    result = trackSet->getData().putAndInsertUint32(DCM_TrackSetNumber, OFstatic_cast(Uint32, m_TractographyResultsModule.getTrackSets().size() + 1));
     if (result.good())
     {
       m_TractographyResultsModule.getTrackSets().push_back(trackSet);
diff --git a/dcmwlm/CMakeLists.txt b/dcmwlm/CMakeLists.txt
index 3e35568..6ced531 100644
--- a/dcmwlm/CMakeLists.txt
+++ b/dcmwlm/CMakeLists.txt
@@ -2,9 +2,9 @@
 PROJECT(dcmwlm)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${dcmwlm_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmnet_SOURCE_DIR}/include ${ZLIB_INCDIR})
+INCLUDE_DIRECTORIES("${dcmwlm_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmnet_SOURCE_DIR}/include" ${ZLIB_INCDIR})
 
 # recurse into subdirectories
-FOREACH(SUBDIR libsrc apps include data)
+FOREACH(SUBDIR libsrc apps include data tests)
   ADD_SUBDIRECTORY(${SUBDIR})
 ENDFOREACH(SUBDIR)
diff --git a/dcmwlm/apps/CMakeLists.txt b/dcmwlm/apps/CMakeLists.txt
index 3891dab..ff553ba 100644
--- a/dcmwlm/apps/CMakeLists.txt
+++ b/dcmwlm/apps/CMakeLists.txt
@@ -1,5 +1,5 @@
 # declare additional include directories
-INCLUDE_DIRECTORIES(${dcmtls_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES("${dcmtls_SOURCE_DIR}/include")
 
 # declare executables
 DCMTK_ADD_EXECUTABLE(wlmscpfs wlmscpfs wlcefs)
diff --git a/dcmwlm/apps/Makefile.dep b/dcmwlm/apps/Makefile.dep
index b2ceb34..8506feb 100644
--- a/dcmwlm/apps/Makefile.dep
+++ b/dcmwlm/apps/Makefile.dep
@@ -28,7 +28,10 @@ wlcefs.o: wlcefs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -44,9 +47,9 @@ wlcefs.o: wlcefs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmwlm/wltypdef.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -59,6 +62,7 @@ wlcefs.o: wlcefs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
@@ -109,7 +113,10 @@ wlmscpfs.o: wlmscpfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -125,9 +132,9 @@ wlmscpfs.o: wlmscpfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmwlm/wltypdef.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -140,6 +147,7 @@ wlmscpfs.o: wlmscpfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
diff --git a/dcmwlm/apps/Makefile.in b/dcmwlm/apps/Makefile.in
index 491deb3..880a48d 100644
--- a/dcmwlm/apps/Makefile.in
+++ b/dcmwlm/apps/Makefile.in
@@ -36,7 +36,7 @@ LOCALINCLUDES = $(dcmnetinc) $(dcmdatainc) $(ofloginc) $(ofstdinc)
 LIBDIRS = -L$(top_srcdir)/libsrc $(dcmnetlibdir) $(dcmdatalibdir) \
 	$(ofloglibdir) $(ofstdlibdir)
 LOCALLIBS = -ldcmwlm $(dcmnetlib) $(dcmdatalib) $(ofloglib) $(ofstdlib) \
-	$(ZLIBLIBS) $(TCPWRAPPERLIBS) $(CHARCONVLIBS)
+	$(ZLIBLIBS) $(TCPWRAPPERLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
 objs = wlcefs.o wlmscpfs.o
 progs = wlmscpfs
@@ -45,7 +45,7 @@ progs = wlmscpfs
 all: $(progs)
 
 wlmscpfs: $(objs)
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $(objs) $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $(objs) $(LOCALLIBS) $(LIBS)
 
 
 install: all
diff --git a/dcmwlm/apps/wlcefs.cc b/dcmwlm/apps/wlcefs.cc
index 8f44dee..69de081 100644
--- a/dcmwlm/apps/wlcefs.cc
+++ b/dcmwlm/apps/wlcefs.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2014, OFFIS e.V.
+ *  Copyright (C) 1996-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -81,7 +81,7 @@ WlmConsoleEngineFileSystem::WlmConsoleEngineFileSystem( int argc, char *argv[],
   sprintf( rcsid, "$dcmtk: %s v%s %s $", applicationName, OFFIS_DCMTK_VERSION, OFFIS_DCMTK_RELEASEDATE );
 
   // Initialize starting values for variables pertaining to program options.
-  opt_dfPath = "/home/www/wlist";
+  opt_dfPath = ".";
 
   // default: spawn new process for each incoming connection (fork()-OS or WIN32)
 #if defined(HAVE_FORK) || defined(_WIN32)
diff --git a/dcmwlm/data/CMakeLists.txt b/dcmwlm/data/CMakeLists.txt
index d5f75df..c1f4160 100644
--- a/dcmwlm/data/CMakeLists.txt
+++ b/dcmwlm/data/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare directories to be installed
-INSTALL(DIRECTORY wlistdb wlistqry DESTINATION ${DCMTK_INSTALL_DATDIR} COMPONENT data)
+INSTALL(DIRECTORY wlistdb wlistqry DESTINATION "${DCMTK_INSTALL_DATDIR}" COMPONENT data)
diff --git a/dcmwlm/docs/wlmscpfs.man b/dcmwlm/docs/wlmscpfs.man
index ad67a48..8a559ee 100644
--- a/dcmwlm/docs/wlmscpfs.man
+++ b/dcmwlm/docs/wlmscpfs.man
@@ -6,13 +6,13 @@
 \page wlmscpfs wlmscpfs: DICOM Basic Worklist Management SCP (based on data files)
 \endif
 
-\section synopsis SYNOPSIS
+\section wlmscpfs_synopsis SYNOPSIS
 
 \verbatim
 wlmscpfs [options] port
 \endverbatim
 
-\section description DESCRIPTION
+\section wlmscpfs_description DESCRIPTION
 
 The \b wlmscpfs application implements a Service Class Provider (SCP) for the
 Basic Worklist Management Service.  The application will listen on a specified
@@ -25,15 +25,15 @@ information back to the calling Worklist Management SCU.  Aside from dealing
 with Worklist Management queries, the \b wlmscpfs application also supports
 the Verification Service Class as an SCP.
 
-\section parameters PARAMETERS
+\section wlmscpfs_parameters PARAMETERS
 
 \verbatim
 port  tcp/ip port number to listen on
 \endverbatim
 
-\section options OPTIONS
+\section wlmscpfs_options OPTIONS
 
-\subsection general_options general options
+\subsection wlmscpfs_general_options general options
 \verbatim
   -h    --help
           print this help text and exit
@@ -61,7 +61,7 @@ port  tcp/ip port number to listen on
           use config file f for the logger
 \endverbatim
 
-\subsection multiprocess_options multi-process options
+\subsection wlmscpfs_multiprocess_options multi-process options
 \verbatim
   -s    --single-process
           single process mode
@@ -70,11 +70,11 @@ port  tcp/ip port number to listen on
           fork child process for each association (default)
 \endverbatim
 
-\subsection input_options input options
+\subsection wlmscpfs_input_options input options
 \verbatim
 general:
 
-  -dfp  --data-files-path  [p]ath: string (default: /home/www/wlist)
+  -dfp  --data-files-path  [p]ath: string (default: .)
           path to worklist data files
 
 handling of worklist files:
@@ -86,7 +86,7 @@ handling of worklist files:
           disable rejection of incomplete worklist files
 \endverbatim
 
-\subsection processing_options processing options
+\subsection wlmscpfs_processing_options processing options
 \verbatim
 returned character set:
 
@@ -106,7 +106,7 @@ other processing options:
           request messages
 \endverbatim
 
-\subsection network_options network options
+\subsection wlmscpfs_network_options network options
 \verbatim
 preferred network transfer syntaxes:
 
@@ -179,7 +179,7 @@ other network options:
           disable hostname lookup
 \endverbatim
 
-\section notes NOTES
+\section wlmscpfs_notes NOTES
 
 The semantic impacts of the above mentioned options is clear for the majority
 of options.  Some particular options, however, are so specific that they need
@@ -217,7 +217,7 @@ which the SCP might have to return to an SCU in a C-FIND response message.
 Table K.6-1 in part 4 annex K of the DICOM standard lists all corresponding
 type 1 attributes (see column "Return Key Type").
 
-\subsection dicom_conformance DICOM Conformance
+\subsection wlmscpfs_dicom_conformance DICOM Conformance
 
 The \b wlmscpfs application supports the following SOP Classes as an SCP:
 
@@ -299,7 +299,7 @@ As return keys the following attributes are currently supported by \b wlmscpfs:
 (0010,0021) IssuerOfPatientID
 (0010,0030) PatientBirthDate
 (0010,0040) PatientSex
-(0010,1000) OtherPatientIDs
+(0010,1000) OtherPatientIDs (retired)
 (0010,1001) OtherPatientNames
 (0010,1020) PatientSize
 (0010,1030) PatientWeight
@@ -312,8 +312,8 @@ As return keys the following attributes are currently supported by \b wlmscpfs:
 (0010,21b0) AdditionalPatientHistory
 (0010,21c0) PregnancyStatus
 (0010,21d0) LastMenstrualDate
-(0010,2297) Responsible Person
-(0010,2298) Responsible Person Role
+(0010,2297) ResponsiblePerson
+(0010,2298) ResponsiblePersonRole
 (0010,4000) PatientComments
 (0020,000d) StudyInstanceUID
 (0032,1032) RequestingPhysician
@@ -374,7 +374,7 @@ As return keys the following attributes are currently supported by \b wlmscpfs:
 The attribute (0008,0005) SpecificCharacterSet is a special case and its
 support by \b wlmscpfs is discussed in the NOTES section above.
 
-\subsection access_control Access Control
+\subsection wlmscpfs_access_control Access Control
 
 When compiled on Unix platforms with TCP wrapper support, host-based access
 control can be enabled with the \e --access-control command line option.  In
@@ -383,7 +383,7 @@ tables for \b wlmscpfs are enforced.  The default locations of the host access
 control tables are <em>/etc/hosts.allow</em> and <em>/etc/hosts.deny</em>.
 Further details are described in <b>hosts_access</b>(5).
 
-\section logging LOGGING
+\section wlmscpfs_logging 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
@@ -402,7 +402,7 @@ 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 <em>\<etcdir\>/logger.cfg</em>.
 
-\section command_line COMMAND LINE
+\section wlmscpfs_command_line COMMAND LINE
 
 All command line tools use the following notation for parameters: square
 brackets enclose optional values (0-1), three trailing dots indicate that
@@ -424,7 +424,7 @@ allows one to summarize common combinations of options/parameters and avoids
 longish and confusing command lines (an example is provided in file
 <em>\<datadir\>/dumppat.txt</em>).
 
-\section environment ENVIRONMENT
+\section wlmscpfs_environment ENVIRONMENT
 
 The \b wlmscpfs utility will attempt to load DICOM data dictionaries specified
 in the \e DCMDICTPATH environment variable.  By default, i.e. if the
@@ -440,8 +440,8 @@ a semicolon (";") is used as a separator.  The data dictionary code will
 attempt to load each file specified in the \e DCMDICTPATH environment variable.
 It is an error if no data dictionary can be loaded.
 
-\section copyright COPYRIGHT
+\section wlmscpfs_copyright COPYRIGHT
 
-Copyright (C) 1996-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1996-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
diff --git a/dcmwlm/include/CMakeLists.txt b/dcmwlm/include/CMakeLists.txt
index 34df8b2..c20211c 100644
--- a/dcmwlm/include/CMakeLists.txt
+++ b/dcmwlm/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/dcmwlm DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/dcmwlm DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/dcmwlm/include/dcmtk/dcmwlm/wlds.h b/dcmwlm/include/dcmtk/dcmwlm/wlds.h
index 39ccc73..8931da7 100644
--- a/dcmwlm/include/dcmtk/dcmwlm/wlds.h
+++ b/dcmwlm/include/dcmtk/dcmwlm/wlds.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2012, OFFIS e.V.
+ *  Copyright (C) 1996-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -201,7 +201,7 @@ class DCMTK_DCMWLM_EXPORT WlmDataSource
        *    DCM_NamesOfIntendedRecipientsOfResults                (0040,1010)  PN  O  3  (from the Requested Procedure Module)
        *    DCM_InstitutionName                                   (0008,0080)  LO  O  3  (from the Visit Identification Module)
        *    DCM_AdmittingDiagnosesDescription                     (0008,1080)  LO  O  3  (from the Visit Admission Module)
-       *    DCM_OtherPatientIDs                                   (0010,1000)  LO  O  3  (from the Patient Identification Module)
+       *    DCM_RETIRED_OtherPatientIDs                           (0010,1000)  LO  O  3  (from the Patient Identification Module)
        *    DCM_PatientSize                                       (0010,1020)  DS  O  3  (from the Patient Demographic Module)
        *    DCM_EthnicGroup                                       (0010,2160)  SH  O  3  (from the Patient Demographic Module)
        *    DCM_PatientComments                                   (0010,4000)  LT  O  3  (from the Patient Demographic Module)
@@ -373,12 +373,12 @@ class DCMTK_DCMWLM_EXPORT WlmDataSource
     virtual ~WlmDataSource();
 
       /** Connects to the data source.
-       * @return Indicates if the connection was established succesfully.
+       * @return Indicates if the connection was established successfully.
        */
     virtual OFCondition ConnectToDataSource() = 0;
 
       /** Disconnects from the data source.
-       * @return Indicates if the disconnection was completed succesfully.
+       * @return Indicates if the disconnection was completed successfully.
        */
     virtual OFCondition DisconnectFromDataSource() = 0;
 
diff --git a/dcmwlm/include/dcmtk/dcmwlm/wldsfs.h b/dcmwlm/include/dcmtk/dcmwlm/wldsfs.h
index 3e8b310..ed4f3b3 100644
--- a/dcmwlm/include/dcmtk/dcmwlm/wldsfs.h
+++ b/dcmwlm/include/dcmtk/dcmwlm/wldsfs.h
@@ -103,12 +103,12 @@ class DCMTK_DCMWLM_EXPORT WlmDataSourceFileSystem : public WlmDataSource
     ~WlmDataSourceFileSystem();
 
       /** Connects to the data source.
-       * @return Indicates if the connection was established succesfully.
+       * @return Indicates if the connection was established successfully.
        */
     OFCondition ConnectToDataSource();
 
       /** Disconnects from the data source.
-       * @return Indicates if the disconnection was completed succesfully.
+       * @return Indicates if the disconnection was completed successfully.
        */
     OFCondition DisconnectFromDataSource();
 
diff --git a/dcmwlm/include/dcmtk/dcmwlm/wlfsim.h b/dcmwlm/include/dcmtk/dcmwlm/wlfsim.h
index c02a145..eb90f4e 100644
--- a/dcmwlm/include/dcmtk/dcmwlm/wlfsim.h
+++ b/dcmwlm/include/dcmtk/dcmwlm/wlfsim.h
@@ -42,6 +42,10 @@ class DcmItem;
 class DCMTK_DCMWLM_EXPORT WlmFileSystemInteractionManager
 {
   private:
+
+      /** Matching keys configuration. */
+    class MatchingKeys;
+
       /** Privately defined copy constructor.
        *  @param old Object which shall be copied.
        */
@@ -123,11 +127,15 @@ class DCMTK_DCMWLM_EXPORT WlmFileSystemInteractionManager
        */
     OFBool ReferencedStudyOrPatientSequenceIsAbsentOrExistentButNonEmptyAndIncomplete( DcmTagKey sequenceTagKey, DcmItem *dset );
 
-      /** This function checks if the specified description and code sequence attribute are both incomplete in the given dataset.
+      /** This method ensures that either code or description is set to a non-empty value,
+       *  and at the same time none of the attributes is present with a zero-length value.
+       *  If one of these requirements are not met, then OFTrue is returned, otherwise OFFalse.
        *  @param descriptionTagKey The description attribute which shall be checked.
        *  @param codeSequenceTagKey The codeSequence attribute which shall be checked.
        *  @param dset The dataset in which the attributes are contained.
-       *  @return OFTrue in case both attributes are incomplete, OFFalse otherwise.
+       *  @return OFFalse (i.e. no error regarding the standard) in case at least
+       *          one of both attributes has a non-empty, valid value, and none
+       *          is set to an empty value. OFTrue otherwise.
        */
     OFBool DescriptionAndCodeSequenceAttributesAreIncomplete( DcmTagKey descriptionTagKey, DcmTagKey codeSequenceTagKey, DcmItem *dset );
 
@@ -138,277 +146,23 @@ class DCMTK_DCMWLM_EXPORT WlmFileSystemInteractionManager
        */
     OFBool AttributeIsAbsentOrEmpty( DcmTagKey elemTagKey, DcmItem *dset );
 
+      /** This function returns OFTrue, if the matching key attribute values in the one of the items of the candidate sequence
+       *  match the matching key attribute values in at least one of the items of the query sequence.
+       *  @param candidate  The candidate sequence.
+       *  @param query The query sequence.
+       *  @param matchingKeys The matching keys to regard.
+       *  @return OFTrue in case at least one item matches, OFFalse otherwise.
+       */
+    OFBool MatchSequences( DcmSequenceOfItems& candidate, DcmSequenceOfItems& query, const MatchingKeys& matchingKeys );
+
       /** This function returns OFTrue, if the matching key attribute values in the
        *  dataset match the matching key attribute values in the search mask.
        *  @param dataset    The dataset which shall be checked.
        *  @param searchMask The search mask.
+       *  @param matchingKeys The matching keys to regard.
        *  @return OFTrue in case the dataset matches the search mask in the matching key attribute values, OFFalse otherwise.
        */
-    OFBool DatasetMatchesSearchMask( DcmDataset *dataset, DcmDataset *searchMask );
-
-      /** This function determines the values of the matching key attributes in the given dataset.
-       *  @param dataset Dataset from which the values shall be extracted.
-       *  @param matchingKeyAttrValues Contains in the end the values of the matching key
-       *         attributes in the search mask. Is an array of pointers.
-       */
-    void DetermineMatchingKeyAttributeValues( DcmDataset *dataset, const char **&matchingKeyAttrValues );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute issuer of patient id match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool IssuerOfPatientIDsMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute study date and study time match; otherwise OFFalse will be returned.
-       *  @param datasetDateValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param datasetTimeValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskDateValue Value for the corresponding attribute in the search mask; might be NULL.
-       *  @param searchMaskTimeValue Value for the corresponding attribute in the search mask; might be NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool StudyDateTimesMatch( const char *datasetDateValue, const char *datasetTimeValue, const char *searchMaskDateValue, const char *searchMaskTimeValue  );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute scheduled station AE title match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool ScheduledStationAETitlesMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attributes scheduled procedure step start date and scheduled procedure step
-       *  start time match; otherwise OFFalse will be returned.
-       *  @param datasetDateValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param datasetTimeValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskDateValue Value for the corresponding attribute in the search mask; might be NULL.
-       *  @param searchMaskTimeValue Value for the corresponding attribute in the search mask; might be NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool ScheduledProcedureStepStartDateTimesMatch( const char *datasetDateValue, const char *datasetTimeValue, const char *searchMaskDateValue, const char *searchMaskTimeValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute modality match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool ModalitiesMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute scheduled performing physician's names match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool ScheduledPerformingPhysicianNamesMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute patient's names match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool PatientsNamesMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute patient id match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool PatientsIDsMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute accession number match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool AccessionNumbersMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute requested procedure id match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool RequestedProcedureIdsMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute referring physician's name match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool ReferringPhysicianNamesMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute patient sex match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool PatientsSexesMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute requesting physician match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool RequestingPhysiciansMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute admission id match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool AdmissionIdsMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute requested procedure priorities match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool RequestedProcedurePrioritiesMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values in
-       *  attribute patient's birth date match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool PatientsBirthDatesMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function performs a date time range match and returns OFTrue if the dataset's
-       *  and the search mask's values in the corresponding attributes match; otherwise OFFalse
-       *  will be returned.
-       *  @param datasetDateValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param datasetTimeValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskDateValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @param searchMaskTimeValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool DateTimeRangeMatch( const char *datasetDateValue, const char *datasetTimeValue, const char *searchMaskDateValue, const char *searchMaskTimeValue );
-
-      /** This function performs a date range match and returns OFTrue if the dataset's and
-       *  the search mask's values in the corresponding attributes match; otherwise OFFalse
-       *  will be returned.
-       *  @param datasetDateValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskDateValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool DateRangeMatch( const char *datasetDateValue, const char *searchMaskDateValue );
-
-      /** This function performs a time range match and returns OFTrue if the dataset's and
-       *  the search mask's values in the corresponding attributes match; otherwise OFFalse
-       *  will be returned.
-       *  @param datasetTimeValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskTimeValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool TimeRangeMatch( const char *datasetTimeValue, const char *searchMaskTimeValue );
-
-      /** This function performs a date time single value match and returns OFTrue if the dataset's
-       *  and the search mask's values in the corresponding attributes match; otherwise OFFalse
-       *  will be returned.
-       *  @param datasetDateValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param datasetTimeValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskDateValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @param searchMaskTimeValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool DateTimeSingleValueMatch( const char *datasetDateValue, const char *datasetTimeValue, const char *searchMaskDateValue, const char *searchMaskTimeValue );
-
-      /** This function performs a date single value match and returns OFTrue if the dataset's
-       *  and the search mask's values in the corresponding attributes match; otherwise OFFalse
-       *  will be returned.
-       *  @param datasetDateValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskDateValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool DateSingleValueMatch( const char *datasetDateValue, const char *searchMaskDateValue );
-
-      /** This function performs a time single value match and returns OFTrue if the dataset's
-       *  and the search mask's values in the corresponding attributes match; otherwise OFFalse
-       *  will be returned.
-       *  @param datasetTimeValue    Value for the corresponding attribute in the dataset; might be NULL.
-       *  @param searchMaskTimeValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool TimeSingleValueMatch( const char *datasetTimeValue, const char *searchMaskTimeValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values
-       *  match while performing a case sensitive single value match; otherwise OFFalse
-       *  will be returned. If the dataset's value is NULL, only a "*" matches.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; may be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool CaseSensitiveSingleValueOrWildcardMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values
-       *  match while performing a case sensitive single value match; otherwise OFFalse
-       *  will be returned. If the dataset's value is NULL, only a "*" matches.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; may be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the
-       *         search mask; trailing spaces are ignored; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool CaseSensitiveSingleValueOrWildcardStripSpacesMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values
-       *  match while performing a case sensitive single value match; otherwise OFFalse
-       *  will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; never NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool CaseSensitiveSingleValueMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values
-       *  match while performing a wildcard match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; never NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool WildcardMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function returns OFTrue if the dataset's and the search mask's values
-       *  match while performing a wildcard match; otherwise OFFalse will be returned.
-       *  @param datasetValue    Value for the corresponding attribute in the dataset; may be NULL.
-       *  @param searchMaskValue Value for the corresponding attribute in the
-       *         search mask; trailing spaces are ignored; never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool WildcardStripSpacesMatch( const char *datasetValue, const char *searchMaskValue );
-
-      /** This function is called, if the search pattern contains a star symbol. It determines
-       *  if dv (the dataset's value) still matches sv (the search mask's value). This function
-       *  takes the star symbol in sv into account. (Note that the pattern value might contain
-       *  more wild card symbols.) The function will return OFTrue if there is a match; if there
-       *  is not a match it will return OFFalse.
-       *  @param dv Dataset's value; never NULL.
-       *  @param sv Search mask's value (may contain wild card symbols); never NULL.
-       *  @return OFTrue if the values match, OFFalse otherwise.
-       */
-    OFBool MatchStarSymbol( const char *dv, const char *sv );
-
-      /** This function extracts the actual lower and upper date or time values from a given
-       *  date or time range.
-       *  @param range Date or time range from which lower and upper values shall be extracted.
-       *  @param lower Newly created string specifying the lower value from the date/time range;
-       *               NULL if value is not specified in range.
-       *  @param upper Newly created string specifying the upper value from the date/time range;
-       *               NULL if value is not specified in range.
-       */
-    void ExtractValuesFromRange( const char *range, char *&lower, char *&upper );
+    OFBool DatasetMatchesSearchMask( DcmItem *dataset, DcmItem *searchMask, const MatchingKeys& matchingKeys );
 
   public:
       /** default constructor.
diff --git a/dcmwlm/libsrc/Makefile.dep b/dcmwlm/libsrc/Makefile.dep
index b6f71a5..a2cfac4 100644
--- a/dcmwlm/libsrc/Makefile.dep
+++ b/dcmwlm/libsrc/Makefile.dep
@@ -28,7 +28,10 @@ wlds.o: wlds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -44,9 +47,9 @@ wlds.o: wlds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmwlm/wltypdef.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -111,7 +114,10 @@ wldsfs.o: wldsfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -127,9 +133,9 @@ wldsfs.o: wldsfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmwlm/wltypdef.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -185,7 +191,10 @@ wlfsim.o: wlfsim.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -201,9 +210,9 @@ wlfsim.o: wlfsim.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -221,6 +230,7 @@ wlfsim.o: wlfsim.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../ofstd/include/dcmtk/ofstd/ofdate.h \
  ../../ofstd/include/dcmtk/ofstd/oftime.h \
@@ -244,8 +254,6 @@ wlfsim.o: wlfsim.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
@@ -313,7 +321,10 @@ wlmactmg.o: wlmactmg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -329,9 +340,9 @@ wlmactmg.o: wlmactmg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmwlm/wltypdef.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
@@ -359,6 +370,7 @@ wlmactmg.o: wlmactmg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
  ../../dcmnet/include/dcmtk/dcmnet/diutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \
diff --git a/dcmwlm/libsrc/wlds.cc b/dcmwlm/libsrc/wlds.cc
index 24c3780..19a3735 100644
--- a/dcmwlm/libsrc/wlds.cc
+++ b/dcmwlm/libsrc/wlds.cc
@@ -1035,12 +1035,12 @@ OFBool WlmDataSource::ContainsOnlyValidCharacters( const char *s, const char *ch
   }
 
   // return OFTrue if all the characters of s can be found in the string charset.
-  int s_len = strlen( s );
-  int charset_len = strlen( charset );
-  for( int i=0 ; i<s_len && result ; i++ )
+  size_t s_len = strlen( s );
+  size_t charset_len = strlen( charset );
+  for( size_t i=0 ; i<s_len && result ; i++ )
   {
     OFBool isSetMember = OFFalse;
-    for( int j=0 ; !isSetMember && j<charset_len ; j++ )
+    for( size_t j=0 ; !isSetMember && j<charset_len ; j++ )
     {
       if( s[i] == charset[j] )
         isSetMember = OFTrue;
@@ -1306,7 +1306,7 @@ OFBool WlmDataSource::IsSupportedReturnKeyAttribute( DcmElement *element, DcmSeq
 //                   DCM_NamesOfIntendedRecipientsOfResults                (0040,1010)  PN  O  3  (from the Requested Procedure Module)
 //                   DCM_InstitutionName                                   (0008,0080)  LO  O  3  (from the Visit Identification Module)
 //                   DCM_AdmittingDiagnosesDescription                     (0008,1080)  LO  O  3  (from the Visit Admission Module)
-//                   DCM_OtherPatientIDs                                   (0010,1000)  LO  O  3  (from the Patient Identification Module)
+//                   DCM_RETIRED_OtherPatientIDs                           (0010,1000)  LO  O  3  (from the Patient Identification Module)
 //                   DCM_PatientSize                                       (0010,1020)  DS  O  3  (from the Patient Demographic Module)
 //                   DCM_EthnicGroup                                       (0010,2160)  SH  O  3  (from the Patient Demographic Module)
 //                   DCM_PatientComments                                   (0010,4000)  LT  O  3  (from the Patient Demographic Module)
@@ -1429,7 +1429,7 @@ OFBool WlmDataSource::IsSupportedReturnKeyAttribute( DcmElement *element, DcmSeq
         elementKey == DCM_NamesOfIntendedRecipientsOfResults                ||
         elementKey == DCM_InstitutionName                                   ||
         elementKey == DCM_AdmittingDiagnosesDescription                     ||
-        elementKey == DCM_OtherPatientIDs                                   ||
+        elementKey == DCM_RETIRED_OtherPatientIDs                           ||
         elementKey == DCM_PatientSize                                       ||
         elementKey == DCM_EthnicGroup                                       ||
         elementKey == DCM_PatientComments                                   ||
diff --git a/dcmwlm/libsrc/wldsfs.cc b/dcmwlm/libsrc/wldsfs.cc
index ae724e6..0fa71c3 100644
--- a/dcmwlm/libsrc/wldsfs.cc
+++ b/dcmwlm/libsrc/wldsfs.cc
@@ -76,7 +76,7 @@ OFCondition WlmDataSourceFileSystem::ConnectToDataSource()
 // Author       : Thomas Wilkens
 // Task         : Connects to the data source.
 // Parameters   : none.
-// Return Value : Indicates if the connection was established succesfully.
+// Return Value : Indicates if the connection was established successfully.
 {
   // set variables in fileSystemInteractionManager object
   fileSystemInteractionManager.SetEnableRejectionOfIncompleteWlFiles( enableRejectionOfIncompleteWlFiles );
@@ -95,7 +95,7 @@ OFCondition WlmDataSourceFileSystem::DisconnectFromDataSource()
 // Author       : Thomas Wilkens
 // Task         : Disconnects from the data source.
 // Parameters   : none.
-// Return Value : Indicates if the disconnection was completed succesfully.
+// Return Value : Indicates if the disconnection was completed successfully.
 {
   // disconnect from file system
   OFCondition cond = fileSystemInteractionManager.DisconnectFromFileSystem();
@@ -676,10 +676,9 @@ OFBool WlmDataSourceFileSystem::SetReadlock()
   handleToReadLockFile = open( lockname.c_str(), O_RDWR );
   if( handleToReadLockFile == -1 )
   {
-    char buf[256];
     handleToReadLockFile = 0;
     DCMWLM_ERROR("WlmDataSourceFileSystem::SetReadlock: Cannot open file " << lockname
-      << " (return code: " << OFStandard::strerror(errno, buf, sizeof(buf)) << ")");
+      << " (return code: " << OFStandard::getLastSystemErrorCode().message() << ")");
     return OFFalse;
   }
 
diff --git a/dcmwlm/libsrc/wlfsim.cc b/dcmwlm/libsrc/wlfsim.cc
index 3f165ad..38bdf13 100644
--- a/dcmwlm/libsrc/wlfsim.cc
+++ b/dcmwlm/libsrc/wlfsim.cc
@@ -60,6 +60,43 @@ END_EXTERN_C
 
 // ----------------------------------------------------------------------------
 
+class WlmFileSystemInteractionManager::MatchingKeys
+{
+  MatchingKeys(int)
+  {
+    keys.push_back(OFMake_pair(DCM_PatientName,OFTrue));
+    keys.push_back(OFMake_pair(DCM_ResponsiblePerson,OFTrue));
+    keys.push_back(OFMake_pair(DCM_ResponsiblePersonRole,OFTrue));
+    keys.push_back(OFMake_pair(DCM_PatientID,OFFalse));
+    keys.push_back(OFMake_pair(DCM_AccessionNumber,OFTrue));
+    keys.push_back(OFMake_pair(DCM_RequestedProcedureID,OFTrue));
+    keys.push_back(OFMake_pair(DCM_ReferringPhysicianName,OFTrue));
+    keys.push_back(OFMake_pair(DCM_PatientSex,OFTrue));
+    keys.push_back(OFMake_pair(DCM_RequestingPhysician,OFTrue));
+    keys.push_back(OFMake_pair(DCM_AdmissionID,OFTrue));
+    keys.push_back(OFMake_pair(DCM_RequestedProcedurePriority,OFTrue));
+    keys.push_back(OFMake_pair(DCM_PatientBirthDate,OFTrue));
+    keys.push_back(OFMake_pair(DCM_IssuerOfPatientID,OFTrue));
+    combinedKeys.push_back(OFMake_pair(DCM_StudyDate,DCM_StudyTime));
+    sequenceKeys.push_back(OFMake_pair(DCM_ScheduledProcedureStepSequence,MatchingKeys()));
+    sequenceKeys.back().second.keys.push_back(OFMake_pair(DCM_ScheduledStationAETitle,OFFalse));
+    sequenceKeys.back().second.keys.push_back(OFMake_pair(DCM_Modality,OFFalse));
+    sequenceKeys.back().second.keys.push_back(OFMake_pair(DCM_ScheduledPerformingPhysicianName,OFTrue));
+    sequenceKeys.back().second.combinedKeys.push_back(OFMake_pair(DCM_ScheduledProcedureStepStartDate,DCM_ScheduledProcedureStepStartTime));
+  }
+
+public:
+  static const MatchingKeys root;
+  MatchingKeys() {}
+  OFVector<OFPair<DcmTagKey,OFBool> >       keys;
+  OFVector<OFPair<DcmTagKey,DcmTagKey> >    combinedKeys;
+  OFVector<OFPair<DcmTagKey,MatchingKeys> > sequenceKeys;
+};
+
+const WlmFileSystemInteractionManager::MatchingKeys WlmFileSystemInteractionManager::MatchingKeys::root(0);
+
+// ----------------------------------------------------------------------------
+
 WlmFileSystemInteractionManager::WlmFileSystemInteractionManager()
 // Date         : July 11, 2002
 // Author       : Thomas Wilkens
@@ -216,7 +253,7 @@ unsigned long WlmFileSystemInteractionManager::DetermineMatchingRecords( DcmData
         else
         {
           // check if the current dataset matches the matching key attribute values
-          if( !DatasetMatchesSearchMask( dataset, searchMask ) )
+          if( !DatasetMatchesSearchMask( dataset, searchMask, MatchingKeys::root ) )
           {
             DCMWLM_INFO("Information from worklist file " << worklistFiles[i] << " does not match query");
           }
@@ -453,7 +490,7 @@ void WlmFileSystemInteractionManager::DetermineWorklistFiles( OFVector<OFString>
   int ret = 0;
 
   // start a loop; in each iteration another directory entry is determined
-  long hFile = _findfirst( (char*)searchname.c_str(), &fileData );
+  long hFile = OFstatic_cast(long, _findfirst( (char*)searchname.c_str(), &fileData ));
   while( hFile != -1L && ret == 0 )
   {
     // if the current entry refers to a worklist file, do something
@@ -478,14 +515,14 @@ void WlmFileSystemInteractionManager::DetermineWorklistFiles( OFVector<OFString>
   if( dirp != NULL )
   {
     // start a loop; in each iteration another directory entry is determined.
-#if defined(_REENTRANT) && !defined(_WIN32) && !defined(__CYGWIN__)
+#ifdef HAVE_READDIR_R
     unsigned char entryBuffer[sizeof(struct dirent) + _POSIX_PATH_MAX + 1];
 #ifdef HAVE_OLD_READDIR_R
     for( dp = readdir_r( dirp, (struct dirent *)entryBuffer ) ; dp != NULL ; dp = readdir_r( dirp, (struct dirent *)entryBuffer ) )
 #else
     for( int readResult = readdir_r( dirp, (struct dirent *)entryBuffer, &dp ) ; readResult == 0 && dp ; readResult = readdir_r( dirp, (struct dirent *)entryBuffer, &dp ) )
 #endif
-#else
+#else // HAVE_READDIR_R
     for( dp = readdir( dirp ) ; dp != NULL ; dp = readdir( dirp ) )
 #endif
     {
@@ -710,44 +747,64 @@ OFBool WlmFileSystemInteractionManager::ReferencedStudyOrPatientSequenceIsAbsent
 // ----------------------------------------------------------------------------
 
 OFBool WlmFileSystemInteractionManager::DescriptionAndCodeSequenceAttributesAreIncomplete( DcmTagKey descriptionTagKey, DcmTagKey codeSequenceTagKey, DcmItem *dset )
-// Date         : May 4, 2005
-// Author       : Thomas Wilkens
-// Task         : This function checks if the specified description and code sequence attribute are both incomplete in the given dataset.
+// Date         : April 18, 2017
+// Author       : Michael Onken
+// Task         : This method ensures that either code or description is set to a non-empty value,
+//                and at the same time none of the attributes is present with a zero-length value.
+//                If one of these requirements are not met, then OFTrue is returned, otherwise OFFalse.
 // Parameters   : descriptionTagKey  - [in] The description attribute which shall be checked.
 //                codeSequenceTagKey - [in] The codeSequence attribute which shall be checked.
 //                dset               - [in] The dataset in which the attributes are contained.
-// Return Value : OFTrue in case both attributes are incomplete, OFFalse otherwise.
+// Return Value : OFFalse (i.e. no error regarding the standard) in case at least
+//                one of both attributes has a non-empty, valid value, and none
+//                is set to an empty value. OFTrue otherwise.
 {
-  DcmElement *codeSequence = NULL;
-
   // check if the code sequence attribute is complete,
   // i.e. if complete information can be retrieved from this attribute
 
   // if the attribute is not existent or has no items, we consider it incomplete
-  OFBool codeSequenceComplete = OFTrue;
-  if( dset->findAndGetElement( codeSequenceTagKey, codeSequence ).bad() || ((DcmSequenceOfItems*)codeSequence)->card() == 0 )
+  DcmSequenceOfItems* seq = NULL;
+  if (dset->findAndGetSequence( codeSequenceTagKey, seq ).good())
   {
-    DCMWLM_DEBUG("- " << DcmTag(codeSequenceTagKey).getTagName() << " " << codeSequenceTagKey << " is missing or empty");
-    codeSequenceComplete = OFFalse;
+    if (seq->card() == 0)
+    {
+      DCMWLM_DEBUG("- " << DcmTag(codeSequenceTagKey).getTagName() << " " << codeSequenceTagKey << " is empty");
+      return OFTrue;
+    }
+    else if (seq->card() > 0)
+    {
+      // if it is existent and has items, check every item for completeness
+      for( unsigned long i=0; i< seq->card(); i++ )
+      {
+        if( AttributeIsAbsentOrEmpty( DCM_CodeValue, seq->getItem(i) ) ||
+            AttributeIsAbsentOrEmpty( DCM_CodingSchemeDesignator, seq->getItem(i) ) )
+        {
+          DCMWLM_DEBUG("- " << DcmTag(codeSequenceTagKey).getTagName() << " " << codeSequenceTagKey << " has incomplete or empty code entries");
+          return OFTrue;
+        }
+      }
+    }
   }
-  else
+  // check whether description is valid. If sequence does exists, the attribute
+  // must exist with a valid value.
+  OFString description;
+  if (dset->findAndGetOFStringArray(descriptionTagKey, description).bad())
   {
-    // if it is existent and has items, check every item for completeness
-    for( unsigned long i=0 ; i<((DcmSequenceOfItems*)codeSequence)->card() && codeSequenceComplete;i++ )
+    if (!seq)
     {
-      if( AttributeIsAbsentOrEmpty( DCM_CodeValue, ((DcmSequenceOfItems*)codeSequence)->getItem(i) ) ||
-          AttributeIsAbsentOrEmpty( DCM_CodingSchemeDesignator, ((DcmSequenceOfItems*)codeSequence)->getItem(i) ) )
-        codeSequenceComplete = OFFalse;
+      DCMWLM_DEBUG("- " << DcmTag(codeSequenceTagKey).getTagName() << " " << codeSequenceTagKey
+        << " and " << DcmTag(descriptionTagKey) << " " << descriptionTagKey << " are both not set");
+      return OFTrue;
     }
-    if( !codeSequenceComplete )
-      DCMWLM_DEBUG("- " << DcmTag(codeSequenceTagKey).getTagName() << " " << codeSequenceTagKey << " is incomplete");
+  }
+  // in any case, description must not exist with empty value in the dataset
+  else if (description.empty())
+  {
+    DCMWLM_DEBUG("- " << DcmTag(descriptionTagKey).getTagName() << " " << descriptionTagKey << " is empty");
+    return OFTrue;
   }
 
-  // now check the above condition
-  if( !codeSequenceComplete && AttributeIsAbsentOrEmpty( descriptionTagKey, dset ) )
-    return( OFTrue );
-  else
-    return( OFFalse );
+  return OFFalse;
 }
 
 // ----------------------------------------------------------------------------
@@ -771,9 +828,21 @@ OFBool WlmFileSystemInteractionManager::AttributeIsAbsentOrEmpty( DcmTagKey elem
     return( OFFalse );
 }
 
+OFBool WlmFileSystemInteractionManager::MatchSequences( DcmSequenceOfItems& candidate,
+                                                        DcmSequenceOfItems& query,
+                                                        const MatchingKeys& matchingKeys )
+{
+  for( DcmObject* pQueryItem = query.nextInContainer( OFnullptr); pQueryItem; pQueryItem = query.nextInContainer( pQueryItem ) )
+    for( DcmObject* pCandidateItem = candidate.nextInContainer( OFnullptr); pCandidateItem; pCandidateItem = candidate.nextInContainer( pCandidateItem ) )
+      if( DatasetMatchesSearchMask( OFstatic_cast( DcmItem*, pCandidateItem ), OFstatic_cast( DcmItem*, pQueryItem ), matchingKeys ) )
+        return OFTrue;
+  return OFFalse;
+}
+
 // ----------------------------------------------------------------------------
 
-OFBool WlmFileSystemInteractionManager::DatasetMatchesSearchMask( DcmDataset *dataset, DcmDataset *searchMask )
+OFBool WlmFileSystemInteractionManager::DatasetMatchesSearchMask( DcmItem *dataset, DcmItem *searchMask,
+                                                                  const MatchingKeys& matchingKeys )
 // Date         : July 11, 2002
 // Author       : Thomas Wilkens
 // Task         : This function returns OFTrue, if the matching key attribute values in the
@@ -783,1329 +852,80 @@ OFBool WlmFileSystemInteractionManager::DatasetMatchesSearchMask( DcmDataset *da
 // Return Value : OFTrue  - The dataset matches the search mask in the matching key attribute values.
 //                OFFalse - The dataset does not match the search mask in the matching key attribute values.
 {
-  OFBool dateTimeMatchHasBeenPerformed = OFFalse;
-  OFBool studyDateTimeMatchHasBeenPerformed = OFFalse;
-
-  // initialize result variable
-  OFBool matchFound = OFTrue;
-
-  // determine matching key attribute values in the dataset
-  const char **mkaValuesDataset = NULL;
-  DetermineMatchingKeyAttributeValues( dataset, mkaValuesDataset );
-
-  // determine matching key attribute values in the search mask
-  const char **mkaValuesSearchMask = NULL;
-  DetermineMatchingKeyAttributeValues( searchMask, mkaValuesSearchMask );
-
-  // go through the arrays of matching key attribute values
-  for( unsigned long i=0 ; i<NUMBER_OF_SUPPORTED_MATCHING_KEY_ATTRIBUTES && matchFound ; i++ )
-  {
-    // check if the current matching key attribute actually had a value in the search mask
-    if( mkaValuesSearchMask[i] != NULL  )
-    {
-      // if it did, check if the values from search mask and dataset match
-      switch( i )
-      {
-        case 0:
-          // matching key attribute is DCM_ScheduledStationAETitle (AE, 1-n)
-          matchFound = ScheduledStationAETitlesMatch( mkaValuesDataset[0], mkaValuesSearchMask[0] );
-          break;
-
-        case 1:
-        case 2:
-          // matching key attributes are DCM_ScheduledProcedureStepStartDate (DA, 1)
-          // and DCM_ScheduledProcedureStepStartTime (TM, 1)
-          // only do something if a date time match has not yet been performed
-          if( !dateTimeMatchHasBeenPerformed )
-          {
-            matchFound = ScheduledProcedureStepStartDateTimesMatch( mkaValuesDataset[1], mkaValuesDataset[2], mkaValuesSearchMask[1], mkaValuesSearchMask[2] );
-            dateTimeMatchHasBeenPerformed = OFTrue;
-          }
-          break;
-
-        case 3:
-          // matching key attribute is DCM_Modality (CS, 1)
-          matchFound = ModalitiesMatch( mkaValuesDataset[3], mkaValuesSearchMask[3] );
-          break;
-
-        case 4:
-          // matching key attribute is DCM_ScheduledPerformingPhysicianName (PN, 1)
-          matchFound = ScheduledPerformingPhysicianNamesMatch( mkaValuesDataset[4], mkaValuesSearchMask[4] );
-          break;
-
-        case 5:
-          // matching key attribute is DCM_PatientName (PN, 1)
-          matchFound = PatientsNamesMatch( mkaValuesDataset[5], mkaValuesSearchMask[5] );
-          break;
-
-        case 6:
-          // matching key attribute is DCM_ResponsiblePerson (PN, 3)
-          matchFound = CaseSensitiveSingleValueOrWildcardStripSpacesMatch( mkaValuesDataset[6], mkaValuesSearchMask[6] );
-          break;
-
-        case 7:
-          // matching key attribute is DCM_ResponsiblePersonRole (CS, 3)
-          matchFound = CaseSensitiveSingleValueOrWildcardMatch( mkaValuesDataset[7], mkaValuesSearchMask[7] );
-          break;
-
-        case 8:
-          // matching key attribute is DCM_PatientID (LO, 1)
-          matchFound = PatientsIDsMatch( mkaValuesDataset[8], mkaValuesSearchMask[8] );
-          break;
-
-        case 9:
-          // matching key attribute is DCM_AccessionNumber (SH, 2)
-          matchFound = AccessionNumbersMatch( mkaValuesDataset[9], mkaValuesSearchMask[9] );
-          break;
-
-        case 10:
-          // matching key attribute is DCM_RequestedProcedureID (SH, 1)
-          matchFound = RequestedProcedureIdsMatch( mkaValuesDataset[10], mkaValuesSearchMask[10] );
-          break;
-
-        case 11:
-          // matching key attribute is DCM_ReferringPhysicianName (PN, 2)
-          matchFound = ReferringPhysicianNamesMatch( mkaValuesDataset[11], mkaValuesSearchMask[11] );
-          break;
-
-        case 12:
-          // matching key attribute is DCM_PatientSex (CS, 2)
-          matchFound = PatientsSexesMatch( mkaValuesDataset[12], mkaValuesSearchMask[12] );
-          break;
-
-        case 13:
-          // matching key attribute is DCM_RequestingPhysician (PN, 2)
-          matchFound = RequestingPhysiciansMatch( mkaValuesDataset[13], mkaValuesSearchMask[13] );
-          break;
-
-        case 14:
-          // matching key attribute is DCM_AdmissionID (LO, 2)
-          matchFound = AdmissionIdsMatch( mkaValuesDataset[14], mkaValuesSearchMask[14] );
-          break;
-
-        case 15:
-          // matching key attribute is DCM_RequestedProcedurePriority (SH, 2)
-          matchFound = RequestedProcedurePrioritiesMatch( mkaValuesDataset[15], mkaValuesSearchMask[15] );
-          break;
-
-        case 16:
-          // matching key attribute is DCM_PatientBirthDate (DA, 2)
-          matchFound = PatientsBirthDatesMatch( mkaValuesDataset[16], mkaValuesSearchMask[16] );
-          break;
-
-        case 17:
-          // matching key attribute is DCM_IssuerOfPatientID (LO, 1)
-          matchFound = IssuerOfPatientIDsMatch( mkaValuesDataset[17], mkaValuesSearchMask[17] );
-          break;
-
-        case 18:
-        case 19:
-          // matching key attributes are  DCM_StudyDate (DA, 1) and DCM_StudyTime (TM, 1)
-          // only do something if a date time match has not yet been performed
-          if( !studyDateTimeMatchHasBeenPerformed )
-          {
-            matchFound = StudyDateTimesMatch( mkaValuesDataset[18], mkaValuesDataset[19], mkaValuesSearchMask[18], mkaValuesSearchMask[19] );
-            studyDateTimeMatchHasBeenPerformed = OFTrue;
-          }
-          break;
-
-        default:
-          break;
-      }
-    }
-  }
-
-  // free locally allocated memory
-  delete[] mkaValuesDataset;
-  delete[] mkaValuesSearchMask;
-
-  // return result
-  return( matchFound );
-}
-
-// ----------------------------------------------------------------------------
-
-void WlmFileSystemInteractionManager::DetermineMatchingKeyAttributeValues( DcmDataset *dataset, const char **&matchingKeyAttrValues )
-// Date         : July 12, 2002
-// Author       : Thomas Wilkens
-// Task         : This function determines the values of the matching key attributes in the given dataset.
-// Parameters   : dataset               - [in] Dataset from which the values shall be extracted.
-//                matchingKeyAttrValues - [out] Contains in the end the values of the matching key
-//                                        attributes in the search mask. Is an array of pointers.
-// Return Value : none.
-{
-  // Initialize array of strings because all currently
-  // supported matching key attributes are strings
-  matchingKeyAttrValues = new const char*[ NUMBER_OF_SUPPORTED_MATCHING_KEY_ATTRIBUTES ];
-
-  // find matching key attributes in the dataset and remember their values.
-  for( unsigned long i=0 ; i<NUMBER_OF_SUPPORTED_MATCHING_KEY_ATTRIBUTES ; i++ )
-  {
-    // initialize array field
-    matchingKeyAttrValues[i] = NULL;
-
-    // determine which matching key attribute we want to find
-    DcmTagKey tag;
-    switch( i )
-    {
-      case 0 : tag = DCM_ScheduledStationAETitle           ; break;
-      case 1 : tag = DCM_ScheduledProcedureStepStartDate   ; break;
-      case 2 : tag = DCM_ScheduledProcedureStepStartTime   ; break;
-      case 3 : tag = DCM_Modality                          ; break;
-      case 4 : tag = DCM_ScheduledPerformingPhysicianName  ; break;
-      case 5 : tag = DCM_PatientName                       ; break;
-      case 6 : tag = DCM_ResponsiblePerson                 ; break;
-      case 7 : tag = DCM_ResponsiblePersonRole             ; break;
-      case 8 : tag = DCM_PatientID                         ; break;
-      case 9 : tag = DCM_AccessionNumber                   ; break;
-      case 10 : tag = DCM_RequestedProcedureID             ; break;
-      case 11 : tag = DCM_ReferringPhysicianName           ; break;
-      case 12 : tag = DCM_PatientSex                       ; break;
-      case 13 : tag = DCM_RequestingPhysician              ; break;
-      case 14 : tag = DCM_AdmissionID                      ; break;
-      case 15 : tag = DCM_RequestedProcedurePriority       ; break;
-      case 16 : tag = DCM_PatientBirthDate                 ; break;
-      case 17 : tag = DCM_IssuerOfPatientID                ; break;
-      case 18 : tag = DCM_StudyDate                        ; break;
-      case 19 : tag = DCM_StudyTime                        ; break;
-      default:                                               break;
-    }
-
-    // try to find matching key attribute in the dataset
-    dataset->findAndGetString( tag, matchingKeyAttrValues[i], OFTrue );
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::CaseSensitiveSingleValueOrWildcardMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : December 04, 2012
-// Author       : Uli Schlachter
-// Task         : Make this file shorter
-// Docs         : Can be found in wilfsim.h
-{
-  // if there is a value in the dataset, perform case sensitive single value matching
-  if( datasetValue != NULL )
-    return( CaseSensitiveSingleValueMatch( datasetValue, searchMaskValue ) );
-  else
-  {
-    // if datasetValue is not existent, the search mask's value has to be empty to have
-    // a match (universal matching); in all other cases, we do not have a match
-    if( strcmp( searchMaskValue, "" ) == 0 )
-      return( OFTrue );
-    else
-      return( OFFalse );
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::CaseSensitiveSingleValueOrWildcardStripSpacesMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : December 04, 2012
-// Author       : Uli Schlachter
-// Task         : Make this file shorter
-// Docs         : Can be found in wilfsim.h
-{
-  // copy search mask value
-  char *sv = new char[ strlen( searchMaskValue ) + 1 ];
-  strcpy( sv, searchMaskValue );
-
-  // strip trailing spaces
-  DU_stripTrailingSpaces( sv );
-
-  // if we are dealing with universal matching, there is always a match
-  if( strcmp( sv, "" ) == 0 || strcmp( sv, "*" ) == 0 )
-  {
-    delete[] sv;
-    return( OFTrue );
-  }
-  else
-  {
-    delete[] sv;
-    // if we are not dealing with universal matching...
-    // ...and the dataset value is not existent, there is no match
-    if( datasetValue == NULL )
-    {
-      return( OFFalse );
-    }
-    // ...and the dataset value is existent, we have to perform case sensitive single value matching or wildcard matching
-    OFBool result = CaseSensitiveSingleValueMatch( datasetValue, searchMaskValue ) || WildcardMatch( datasetValue, searchMaskValue );
-    return result;
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::WildcardStripSpacesMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : December 04, 2012
-// Author       : Uli Schlachter
-// Task         : Make this file shorter
-// Docs         : Can be found in wilfsim.h
-{
-  // copy search mask value
-  char *sv = new char[ strlen( searchMaskValue ) + 1 ];
-  strcpy( sv, searchMaskValue );
-
-  // strip trailing spaces
-  DU_stripTrailingSpaces( sv );
-
-  // if we are dealing with universal matching, there is always a match
-  if( strcmp( sv, "" ) == 0 || strcmp( sv, "*" ) == 0 )
-  {
-    delete[] sv;
-    return( OFTrue );
-  }
-  else
-  {
-    delete[] sv;
-    // if we are not dealing with universal matching...
-    // ...and the dataset value is not existent, there is no match
-    if( datasetValue == NULL )
-      return( OFFalse );
-    // ...and the dataset value is existent, we want to perform wildcard matching
-    else
-      return( WildcardMatch( datasetValue, searchMaskValue ) );
-  }
-}
-
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::IssuerOfPatientIDsMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : January 23, 2017
-// Author       : Thorben Hasenpusch
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute issuer of patient id match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  return WildcardStripSpacesMatch( datasetValue, searchMaskValue );
-}
-
-OFBool WlmFileSystemInteractionManager::StudyDateTimesMatch( const char *datasetDateValue, const char *datasetTimeValue, const char *searchMaskDateValue, const char *searchMaskTimeValue )
-// Date         : Februar 27, 2017
-// Author       : Jan Schlamelcher
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute study date and study time match; otherwise OFFalse will be returned.
-// Parameters   : datasetDateValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                datasetTimeValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskDateValue - [in] Value for the corresponding attribute in the search mask; might be NULL.
-//                searchMaskTimeValue - [in] Value for the corresponding attribute in the search mask; might be NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  if( !datasetDateValue )
-    datasetDateValue = "";
-  if( !datasetTimeValue )
-    datasetTimeValue = "";
-  if( !searchMaskDateValue )
-    searchMaskDateValue = "";
-  if( !searchMaskTimeValue )
-    searchMaskTimeValue = "";
-  const char* datasetDateValueEnd = datasetDateValue + strlen( datasetDateValue );
-  const char* datasetTimeValueEnd = datasetTimeValue + strlen( datasetTimeValue );
-  const char* searchMaskDateValueEnd = searchMaskDateValue + strlen( searchMaskDateValue );
-  const char* searchMaskTimeValueEnd = searchMaskTimeValue + strlen( searchMaskTimeValue );
-  OFStandard::trimString( datasetDateValue, datasetDateValueEnd );
-  OFStandard::trimString( datasetTimeValue, datasetTimeValueEnd );
-  OFStandard::trimString( searchMaskDateValue, searchMaskDateValueEnd );
-  OFStandard::trimString( searchMaskTimeValue, searchMaskTimeValueEnd );
-  return DcmAttributeMatching::rangeMatchingDateTime( datasetDateValue, datasetDateValueEnd - datasetDateValue,
-                                                      datasetTimeValue, datasetTimeValueEnd - datasetTimeValue,
-                                                      searchMaskDateValue, searchMaskDateValueEnd - searchMaskDateValue,
-                                                      searchMaskTimeValue, searchMaskTimeValueEnd - searchMaskTimeValue );
-}
-
-OFBool WlmFileSystemInteractionManager::ScheduledStationAETitlesMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : July 12, 2002
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute scheduled station AE title match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  return CaseSensitiveSingleValueOrWildcardMatch( datasetValue, searchMaskValue );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::ScheduledProcedureStepStartDateTimesMatch( const char *datasetDateValue, const char *datasetTimeValue, const char *searchMaskDateValue, const char *searchMaskTimeValue )
-// Date         : July 15, 2002
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attributes scheduled procedure step start date and scheduled procedure step
-//                start time match; otherwise OFFalse will be returned.
-// Parameters   : datasetDateValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                datasetTimeValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskDateValue - [in] Value for the corresponding attribute in the search mask; might be NULL.
-//                searchMaskTimeValue - [in] Value for the corresponding attribute in the search mask; might be NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  OFBool isMatch = OFFalse;
-
-  // four things are of interest before matching
-  OFBool dateGiven = ( searchMaskDateValue != NULL ) ? OFTrue : OFFalse;
-  OFBool timeGiven = ( searchMaskTimeValue != NULL ) ? OFTrue : OFFalse;
-  OFBool dateIsDateRange = ( dateGiven && strchr( searchMaskDateValue, '-' ) != NULL ) ? OFTrue : OFFalse;
-  OFBool timeIsTimeRange = ( timeGiven && strchr( searchMaskTimeValue, '-' ) != NULL ) ? OFTrue : OFFalse;
-
-  // depending on these four things perform different kinds of matching
-  if( dateIsDateRange && timeIsTimeRange )
-  {
-    // perform range matching taking into account date and time
-    isMatch = DateTimeRangeMatch( datasetDateValue, datasetTimeValue, searchMaskDateValue, searchMaskTimeValue );
-  }
-  else if( dateIsDateRange && !timeIsTimeRange )
-  {
-    // perform range matching taking into account date only
-    isMatch = DateRangeMatch( datasetDateValue, searchMaskDateValue );
-  }
-  else if( dateGiven && !dateIsDateRange && timeIsTimeRange )
-  {
-    // perform a date single value match and a time range match
-    isMatch = DateSingleValueMatch( datasetDateValue, searchMaskDateValue ) && TimeRangeMatch( datasetTimeValue, searchMaskTimeValue );
-  }
-  else if( !dateGiven && !dateIsDateRange && timeIsTimeRange )
-  {
-    // perform range matching taking into account time only
-    isMatch = TimeRangeMatch( datasetTimeValue, searchMaskTimeValue );
-  }
-  else if( dateGiven && !dateIsDateRange && timeGiven && !timeIsTimeRange )
-  {
-    // perform single value matching taking into account date and time
-    isMatch = DateTimeSingleValueMatch( datasetDateValue, datasetTimeValue, searchMaskDateValue, searchMaskTimeValue );
-  }
-  else if( dateGiven && !dateIsDateRange && !timeGiven && !timeIsTimeRange )
-  {
-    // perform single value matching taking into account date only
-    isMatch = DateSingleValueMatch( datasetDateValue, searchMaskDateValue );
-  }
-  else if( !dateGiven && timeGiven && !timeIsTimeRange && !dateIsDateRange )
-  {
-    // perform single value matching taking into account time only
-    isMatch = TimeSingleValueMatch( datasetTimeValue, searchMaskTimeValue );
-  }
-  else // if( !dateGiven && !timeGiven && !dateIsDateRange && !timeIsTimeRange ) // this case can actually never happen, because either time or date will always be given in this function
-  {
-    // return OFTrue
-    isMatch = OFTrue;
-  }
-
-  // return result
-  return( isMatch );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::ModalitiesMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : July 12, 2002
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute modality match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  return CaseSensitiveSingleValueOrWildcardMatch( datasetValue, searchMaskValue );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::ScheduledPerformingPhysicianNamesMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : July 12, 2002
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute scheduled performing physician's names match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  return CaseSensitiveSingleValueOrWildcardStripSpacesMatch( datasetValue, searchMaskValue );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::PatientsNamesMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : July 12, 2002
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute patient's names match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  return CaseSensitiveSingleValueOrWildcardStripSpacesMatch( datasetValue, searchMaskValue );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::PatientsIDsMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : July 12, 2002
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute patient id match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  return CaseSensitiveSingleValueOrWildcardMatch( datasetValue, searchMaskValue);
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::AccessionNumbersMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : December 22, 2003
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute accession number match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  return WildcardStripSpacesMatch( datasetValue, searchMaskValue );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::RequestedProcedureIdsMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : December 22, 2003
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute requested procedure id match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  return WildcardStripSpacesMatch( datasetValue, searchMaskValue );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::ReferringPhysicianNamesMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : December 22, 2003
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute referring physician's name match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  return WildcardStripSpacesMatch( datasetValue, searchMaskValue );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::PatientsSexesMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : December 22, 2003
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute patient sex match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  return WildcardStripSpacesMatch( datasetValue, searchMaskValue );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::RequestingPhysiciansMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : December 22, 2003
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute requesting physician match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  return WildcardStripSpacesMatch( datasetValue, searchMaskValue );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::AdmissionIdsMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : December 22, 2003
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute admission id match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  return WildcardStripSpacesMatch( datasetValue, searchMaskValue );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::RequestedProcedurePrioritiesMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : December 22, 2003
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute requested procedure priorities match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  return WildcardStripSpacesMatch( datasetValue, searchMaskValue );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::PatientsBirthDatesMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : September 23, 2005
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values in
-//                attribute patient's birth date match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  OFBool isMatch = OFFalse;
-
-  // before matching, determine if the date value is a date range value
-  OFBool dateIsDateRange = ( strchr( searchMaskValue, '-' ) != NULL ) ? OFTrue : OFFalse;
-
-  // depending upon this information, perform different kinds of matching
-  if( dateIsDateRange )
-  {
-    // perform range matching
-    isMatch = DateRangeMatch( datasetValue, searchMaskValue );
-  }
-  else
-  {
-    // perform single value matching
-    isMatch = DateSingleValueMatch( datasetValue, searchMaskValue );
-  }
-
-  // return result
-  return( isMatch );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::DateTimeRangeMatch( const char *datasetDateValue, const char *datasetTimeValue, const char *searchMaskDateValue, const char *searchMaskTimeValue )
-// Date         : July 15, 2002
-// Author       : Thomas Wilkens
-// Task         : This function performs a date time range match and returns OFTrue if the dataset's
-//                and the search mask's values in the corresponding attributes match; otherwise OFFalse
-//                will be returned
-// Parameters   : datasetDateValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                datasetTimeValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskDateValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-//                searchMaskTimeValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  char *sdvv1 = NULL, *sdvv2 = NULL, *stvv1 = NULL, *stvv2 = NULL;
-  OFDate datasetDateVal, searchMaskDateVal1, searchMaskDateVal2;
-  OFTime datasetTimeVal, searchMaskTimeVal1, searchMaskTimeVal2;
-  OFCondition cond;
-
-  // if values in dataset are both given, perform date time range match
-  if( datasetDateValue != NULL && datasetTimeValue != NULL )
-  {
-    // initialize result
-    OFBool isMatch = OFFalse;
-
-    // copy values
-    char *ddv = new char[ strlen( datasetDateValue ) + 1 ];     strcpy( ddv, datasetDateValue );
-    char *dtv = new char[ strlen( datasetTimeValue ) + 1 ];     strcpy( dtv, datasetTimeValue );
-    char *sdv = new char[ strlen( searchMaskDateValue ) + 1 ];  strcpy( sdv, searchMaskDateValue );
-    char *stv = new char[ strlen( searchMaskTimeValue ) + 1 ];  strcpy( stv, searchMaskTimeValue );
-
-    // strip trailing spaces
-    DU_stripTrailingSpaces( ddv );
-    DU_stripTrailingSpaces( dtv );
-    DU_stripTrailingSpaces( sdv );
-    DU_stripTrailingSpaces( stv );
-
-    // get actual date/time boundary values
-    ExtractValuesFromRange( sdv, sdvv1, sdvv2 );
-    ExtractValuesFromRange( stv, stvv1, stvv2 );
-
-    // generate OFDate and OFTime objects from strings
-    cond = DcmDate::getOFDateFromString( OFString( ddv ), datasetDateVal );
-    if( cond.good() )
-    {
-      cond = DcmTime::getOFTimeFromString( OFString( dtv ), datasetTimeVal );
-      if( cond.good() )
-      {
-        cond = DcmDate::getOFDateFromString( (( sdvv1 != NULL ) ? OFString( sdvv1 ) : OFString("19000101")), searchMaskDateVal1 );
-        if( cond.good() )
-        {
-          cond = DcmDate::getOFDateFromString( (( sdvv2 != NULL ) ? OFString( sdvv2 ) : OFString("39991231")), searchMaskDateVal2 );
-          if( cond.good() )
-          {
-            cond = DcmTime::getOFTimeFromString( (( stvv1 != NULL ) ? OFString( stvv1 ) : OFString("000000")), searchMaskTimeVal1 );
-            if( cond.good() )
-            {
-              cond = DcmTime::getOFTimeFromString( (( stvv2 != NULL ) ? OFString( stvv2 ) : OFString("235959")), searchMaskTimeVal2 );
-              if( cond.good() )
-              {
-                // now that we have the date and time objects we can actually
-                // compare the date and time values and determine if it's a match
-
-                // check if the lower value in the search mask is earlier
-                // than or equal to the lower value in the dataset
-                if( searchMaskDateVal1 < datasetDateVal ||
-                    ( searchMaskDateVal1 == datasetDateVal && searchMaskTimeVal1 <= datasetTimeVal ) )
-                {
-                  // now check if the upper value in the search mask is later
-                  // than or equal to the upper value in the dataset
-                  if( searchMaskDateVal2 > datasetDateVal ||
-                      ( searchMaskDateVal2 == datasetDateVal && searchMaskTimeVal2 >= datasetTimeVal ) )
-                  {
-                    // if all these conditions are met, then this is considered to be a match
-                    isMatch = OFTrue;
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-
-    // free memory
-    delete[] ddv;
-    delete[] dtv;
-    delete[] sdv;
-    delete[] stv;
-    if( sdvv1 != NULL ) delete[] sdvv1;
-    if( sdvv2 != NULL ) delete[] sdvv2;
-    if( stvv1 != NULL ) delete[] stvv1;
-    if( stvv2 != NULL ) delete[] stvv2;
-
-    // return result
-    return( isMatch );
-  }
-  else
-  {
-    // so at least one of the two values (date or time) or not given in
-    // the dataset; in this case, since the date and time values in the
-    // search mask are both non-universal, we do not have a match
-    return( OFFalse );
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::DateRangeMatch( const char *datasetDateValue, const char *searchMaskDateValue )
-// Date         : July 15, 2002
-// Author       : Thomas Wilkens
-// Task         : This function performs a date range match and returns OFTrue if the dataset's and
-//                the search mask's values in the corresponding attributes match; otherwise OFFalse
-//                will be returned
-// Parameters   : datasetDateValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskDateValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  char *sdvv1 = NULL, *sdvv2 = NULL;
-  OFDate datasetDateVal, searchMaskDateVal1, searchMaskDateVal2;
-  OFCondition cond;
+  assert( dataset );
+  assert( searchMask );
 
-  // if date value in dataset is given, perform date range match
-  if( datasetDateValue != NULL )
+#ifdef HAVE_CXX11
+  for( auto& key : matchingKeys.keys )
   {
-    // initialize result
-    OFBool isMatch = OFFalse;
-
-    // copy values
-    char *ddv = new char[ strlen( datasetDateValue ) + 1 ];     strcpy( ddv, datasetDateValue );
-    char *sdv = new char[ strlen( searchMaskDateValue ) + 1 ];  strcpy( sdv, searchMaskDateValue );
-
-    // strip trailing spaces
-    DU_stripTrailingSpaces( ddv );
-    DU_stripTrailingSpaces( sdv );
-
-    // get actual date boundary values
-    ExtractValuesFromRange( sdv, sdvv1, sdvv2 );
-
-    // generate OFDate objects from strings
-    cond = DcmDate::getOFDateFromString( OFString( ddv ), datasetDateVal );
-    if( cond.good() )
-    {
-      cond = DcmDate::getOFDateFromString( (( sdvv1 != NULL ) ? OFString( sdvv1 ) : OFString("19000101")), searchMaskDateVal1 );
-      if( cond.good() )
-      {
-        cond = DcmDate::getOFDateFromString( (( sdvv2 != NULL ) ? OFString( sdvv2 ) : OFString("39991231")), searchMaskDateVal2 );
-        if( cond.good() )
-        {
-          // now that we have the date objects we can actually
-          // compare the date values and determine if it's a match
-
-          // check if the lower value in the search mask is earlier
-          // than or equal to the lower value in the dataset
-          if( searchMaskDateVal1 <= datasetDateVal )
-          {
-            // now check if the upper value in the search mask is later
-            // than or equal to the upper value in the dataset
-            if( searchMaskDateVal2 >= datasetDateVal )
-            {
-              // if these conditions are met, then this is considered to be a match
-              isMatch = OFTrue;
-            }
-          }
-        }
-      }
-    }
-
-    // free memory
-    delete[] ddv;
-    delete[] sdv;
-    if( sdvv1 != NULL ) delete[] sdvv1;
-    if( sdvv2 != NULL ) delete[] sdvv2;
-
-    // return result
-    return( isMatch );
-  }
-  else
-  {
-    // so dataset date value is not given; in this case, since the date
-    // value in the search mask is non-universal, we do not have a match
-    return( OFFalse );
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::TimeRangeMatch( const char *datasetTimeValue, const char *searchMaskTimeValue )
-// Date         : July 15, 2002
-// Author       : Thomas Wilkens
-// Task         : This function performs a time range match and returns OFTrue if the dataset's and
-//                the search mask's values in the corresponding attributes match; otherwise OFFalse
-//                will be returned
-// Parameters   : datasetTimeValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskTimeValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  char *stvv1 = NULL, *stvv2 = NULL;
-  OFTime datasetTimeVal, searchMaskTimeVal1, searchMaskTimeVal2;
-  OFCondition cond;
-
-  // if time value in dataset is given, perform date range match
-  if( datasetTimeValue != NULL )
+#else
+  // remove this bloated version of the code if C++11 ever becomes a requirement of DCMTK
+  for( OFVector<OFPair<DcmTagKey,OFBool> >::const_iterator it = matchingKeys.keys.begin(); it != matchingKeys.keys.end(); ++it )
   {
-    // initialize result
-    OFBool isMatch = OFFalse;
-
-    // copy values
-    char *dtv = new char[ strlen( datasetTimeValue ) + 1 ];     strcpy( dtv, datasetTimeValue );
-    char *stv = new char[ strlen( searchMaskTimeValue ) + 1 ];  strcpy( stv, searchMaskTimeValue );
-
-    // strip trailing spaces
-    DU_stripTrailingSpaces( dtv );
-    DU_stripTrailingSpaces( stv );
-
-    // get actual time boundary values
-    ExtractValuesFromRange( stv, stvv1, stvv2 );
-
-    // generate OFTime objects from strings
-    cond = DcmTime::getOFTimeFromString( OFString( dtv ), datasetTimeVal );
-    if( cond.good() )
+    const OFPair<DcmTagKey,OFBool>& key = *it;
+#endif
+    DcmElement* query = OFnullptr;
+    if( searchMask->findAndGetElement( key.first, query, OFFalse ).good() && query )
     {
-      cond = DcmTime::getOFTimeFromString( (( stvv1 != NULL ) ? OFString( stvv1 ) : OFString("000000")), searchMaskTimeVal1 );
-      if( cond.good() )
-      {
-        cond = DcmTime::getOFTimeFromString( (( stvv2 != NULL ) ? OFString( stvv2 ) : OFString("235959")), searchMaskTimeVal2 );
-        if( cond.good() )
-        {
-          // now that we have the time objects we can actually
-          // compare the time values and determine if it's a match
-
-          // check if the lower value in the search mask is earlier
-          // than or equal to the lower value in the dataset
-          if( searchMaskTimeVal1 <= datasetTimeVal )
-          {
-            // now check if the upper value in the search mask is later
-            // than or equal to the upper value in the dataset
-            if( searchMaskTimeVal2 >= datasetTimeVal )
-            {
-              // if these conditions are met, then this is considered to be a match
-              isMatch = OFTrue;
-            }
-          }
-        }
-      }
+      DcmElement* candidate = OFnullptr;
+      if( dataset->findAndGetElement( key.first, candidate, OFFalse ).bad() || !candidate || !query->matches( *candidate, key.second ) )
+        return OFFalse;
     }
-
-    // free memory
-    delete[] dtv;
-    delete[] stv;
-    if( stvv1 != NULL ) delete[] stvv1;
-    if( stvv2 != NULL ) delete[] stvv2;
-
-    // return result
-    return( isMatch );
   }
-  else
-  {
-    // so dataset time value is not given; in this case, since the time
-    // value in the search mask is non-universal, we do not have a match
-    return( OFFalse );
-  }
-}
-
-// ----------------------------------------------------------------------------
 
-OFBool WlmFileSystemInteractionManager::DateTimeSingleValueMatch( const char *datasetDateValue, const char *datasetTimeValue, const char *searchMaskDateValue, const char *searchMaskTimeValue )
-// Date         : July 15, 2002
-// Author       : Thomas Wilkens
-// Task         : This function performs a date time single value match and returns OFTrue if the dataset's
-//                and the search mask's values in the corresponding attributes match; otherwise OFFalse
-//                will be returned
-// Parameters   : datasetDateValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                datasetTimeValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskDateValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-//                searchMaskTimeValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  OFDate datasetDateVal, searchMaskDateVal;
-  OFTime datasetTimeVal, searchMaskTimeVal;
-  OFCondition cond;
-
-  // if we are dealing with universal matching in date and time, there is a match
-  if( strcmp( searchMaskDateValue, "" ) == 0 && strcmp( searchMaskTimeValue, "" ) == 0 )
+#ifdef HAVE_CXX11
+  for( auto& combinedKey : matchingKeys.combinedKeys )
   {
-    return( OFTrue );
-  }
-  else
+#else
+  // remove this bloated version of the code if C++11 ever becomes a requirement of DCMTK
+  for( OFVector<OFPair<DcmTagKey,DcmTagKey> >::const_iterator it = matchingKeys.combinedKeys.begin(); it != matchingKeys.combinedKeys.end(); ++it )
   {
-    // so we are not dealing with universal matching in date and time, we have to check both values individually
-    OFBool dateValuesMatch = OFFalse;
-    OFBool timeValuesMatch = OFFalse;
-
-    // check date values
-    if( strcmp( searchMaskDateValue, "" ) == 0 )
-    {
-      // a universal date always matches
-      dateValuesMatch = OFTrue;
-    }
-    else
+    const OFPair<DcmTagKey,DcmTagKey>& combinedKey = *it;
+#endif
+    DcmElement* query = OFnullptr;
+    if( searchMask->findAndGetElement( combinedKey.first, query, OFFalse ).good() && query )
     {
-      // so we do not have a universal date
-      if( datasetDateValue == NULL )
+      DcmElement* candidate = OFnullptr;
+      if( dataset->findAndGetElement( combinedKey.first, candidate, OFFalse ).bad() || !candidate )
+        return OFFalse;
+      DcmElement* secondQuery = OFnullptr;
+      if( searchMask->findAndGetElement( combinedKey.second, secondQuery, OFFalse ).good() && secondQuery )
       {
-        // if there is no date value in the dataset, the non-universal date is not matched
-        dateValuesMatch = OFFalse;
+        DcmElement* secondCandidate = OFnullptr;
+        if( dataset->findAndGetElement( combinedKey.second, secondCandidate, OFFalse ).bad() || !secondCandidate || !query->combinationMatches( *secondQuery, *candidate, *secondCandidate ) )
+            return OFFalse;
       }
-      else
+      else if( !query->matches( *candidate ) )
       {
-        // in this case that we are dealing with a non-universal date and a
-        // date value in the dataset, perform the date match
-
-        // copy values
-        char *ddv = new char[ strlen( datasetDateValue ) + 1 ];     strcpy( ddv, datasetDateValue );
-        char *sdv = new char[ strlen( searchMaskDateValue ) + 1 ];  strcpy( sdv, searchMaskDateValue );
-
-        // strip trailing spaces
-        DU_stripTrailingSpaces( ddv );
-        DU_stripTrailingSpaces( sdv );
-
-        // generate OFDate objects from strings
-        cond = DcmDate::getOFDateFromString( OFString( ddv ), datasetDateVal );
-        if( cond.good() )
-        {
-          cond = DcmDate::getOFDateFromString( OFString( sdv ), searchMaskDateVal );
-          if( cond.good() )
-          {
-            // now that we have the date objects we can actually
-            // compare the date values and determine if it's a match
-
-            // check if the date value in the search mask equals the date value in the dataset
-            if( searchMaskDateVal == datasetDateVal )
-            {
-              // if these conditions are met, then this is considered to be a match
-              dateValuesMatch = OFTrue;
-            }
-          }
-        }
-
-        // free memory
-        delete[] ddv;
-        delete[] sdv;
+        return OFFalse;
       }
     }
-
-    // check time values
-    if( strcmp( searchMaskTimeValue, "" ) == 0 )
-    {
-      // a universal time always matches
-      timeValuesMatch = OFTrue;
-    }
-    else
+    else if( searchMask->findAndGetElement( combinedKey.second, query, OFFalse ).good() && query )
     {
-      // so we do not have a universal time
-      if( datasetTimeValue == NULL )
-      {
-        // if there is no time value in the dataset, the non-universal time is not matched
-        timeValuesMatch = OFFalse;
-      }
-      else
-      {
-        // in this case that we are dealing with a non-universal time and a
-        // time value in the dataset, perform the time match
-
-        // copy values
-        char *dtv = new char[ strlen( datasetTimeValue ) + 1 ];     strcpy( dtv, datasetTimeValue );
-        char *stv = new char[ strlen( searchMaskTimeValue ) + 1 ];  strcpy( stv, searchMaskTimeValue );
-
-        // strip trailing spaces
-        DU_stripTrailingSpaces( dtv );
-        DU_stripTrailingSpaces( stv );
-
-        // generate OFTime objects from strings
-        cond = DcmTime::getOFTimeFromString( OFString( dtv ), datasetTimeVal );
-        if( cond.good() )
-        {
-          cond = DcmTime::getOFTimeFromString( OFString( stv ), searchMaskTimeVal );
-          if( cond.good() )
-          {
-            // now that we have the time objects we can actually
-            // compare the time values and determine if it's a match
-
-            // check if the time value in the search mask equals the time value in the dataset
-            if( searchMaskTimeVal == datasetTimeVal )
-            {
-              // if these conditions are met, then this is considered to be a match
-              timeValuesMatch = OFTrue;
-            }
-          }
-        }
-
-        // free memory
-        delete[] dtv;
-        delete[] stv;
-      }
+      DcmElement* candidate = OFnullptr;
+      if( dataset->findAndGetElement( combinedKey.second, candidate, OFFalse ).bad() || !candidate || !query->matches( *candidate ) )
+        return OFFalse;
     }
-
-    // in case date and time values match, we have a match
-    if( dateValuesMatch && timeValuesMatch )
-      return( OFTrue );
-    else
-      return( OFFalse );
   }
-}
 
-// ----------------------------------------------------------------------------
+  // sequence matching
 
-OFBool WlmFileSystemInteractionManager::DateSingleValueMatch( const char *datasetDateValue, const char *searchMaskDateValue )
-// Date         : July 15, 2002
-// Author       : Thomas Wilkens
-// Task         : This function performs a date single value match and returns OFTrue if the dataset's
-//                and the search mask's values in the corresponding attributes match; otherwise OFFalse
-//                will be returned
-// Parameters   : datasetDateValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskDateValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  OFDate datasetDateVal, searchMaskDateVal;
-  OFCondition cond;
-
-  // if we are dealing with universal matching, there is a match
-  if( strcmp( searchMaskDateValue, "" ) == 0 )
-    return( OFTrue );
-  else
+#ifdef HAVE_CXX11
+  for( auto& sequenceKey : matchingKeys.sequenceKeys )
   {
-    // if we are not dealing with universal matching and there is a
-    // date value in the dataset, compare the two date values
-    if( datasetDateValue != NULL )
-    {
-      // initialize result
-      OFBool isMatch = OFFalse;
-
-      // copy values
-      char *ddv = new char[ strlen( datasetDateValue ) + 1 ];     strcpy( ddv, datasetDateValue );
-      char *sdv = new char[ strlen( searchMaskDateValue ) + 1 ];  strcpy( sdv, searchMaskDateValue );
-
-      // strip trailing spaces
-      DU_stripTrailingSpaces( ddv );
-      DU_stripTrailingSpaces( sdv );
-
-      // generate OFDate objects from strings
-      cond = DcmDate::getOFDateFromString( OFString( ddv ), datasetDateVal );
-      if( cond.good() )
-      {
-        cond = DcmDate::getOFDateFromString( OFString( sdv ), searchMaskDateVal );
-        if( cond.good() )
-        {
-          // now that we have the date objects we can actually
-          // compare the date values and determine if it's a match
-
-          // check if the date value in the search mask equals the date value in the dataset
-          if( searchMaskDateVal == datasetDateVal )
-          {
-            // if this condition is met, then this is considered to be a match
-            isMatch = OFTrue;
-          }
-        }
-      }
-
-      // free memory
-      delete[] ddv;
-      delete[] sdv;
-
-      // return result
-      return( isMatch );
-    }
-    else
-    {
-      // if we are not dealing with universal matching and there
-      // is no date value in the dataset, there is no match
-      return( OFFalse );
-    }
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::TimeSingleValueMatch( const char *datasetTimeValue, const char *searchMaskTimeValue )
-// Date         : July 15, 2002
-// Author       : Thomas Wilkens
-// Task         : This function performs a time single value match and returns OFTrue if the dataset's
-//                and the search mask's values in the corresponding attributes match; otherwise OFFalse
-//                will be returned
-// Parameters   : datasetTimeValue    - [in] Value for the corresponding attribute in the dataset; might be NULL.
-//                searchMaskTimeValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  OFTime datasetTimeVal, searchMaskTimeVal;
-  OFCondition cond;
-
-  // if we are dealing with universal matching, there is a match
-  if( strcmp( searchMaskTimeValue, "" ) == 0 )
-    return( OFTrue );
-  else
+#else
+  // remove this bloated version of the code if C++11 ever becomes a requirement of DCMTK
+  for( OFVector<OFPair<DcmTagKey,MatchingKeys> >::const_iterator it = matchingKeys.sequenceKeys.begin(); it != matchingKeys.sequenceKeys.end(); ++it )
   {
-    // if we are not dealing with universal matching and there is a
-    // time value in the dataset, compare the two date values
-    if( datasetTimeValue != NULL )
-    {
-      // initialize result
-      OFBool isMatch = OFFalse;
-
-      // copy values
-      char *dtv = new char[ strlen( datasetTimeValue ) + 1 ];     strcpy( dtv, datasetTimeValue );
-      char *stv = new char[ strlen( searchMaskTimeValue ) + 1 ];  strcpy( stv, searchMaskTimeValue );
-
-      // strip trailing spaces
-      DU_stripTrailingSpaces( dtv );
-      DU_stripTrailingSpaces( stv );
-
-      // generate OFTime objects from strings
-      cond = DcmTime::getOFTimeFromString( OFString( dtv ), datasetTimeVal );
-      if( cond.good() )
-      {
-        cond = DcmTime::getOFTimeFromString( OFString( stv ), searchMaskTimeVal );
-        if( cond.good() )
-        {
-          // now that we have the time objects we can actually
-          // compare the time values and determine if it's a match
-
-          // check if the time value in the search mask equals the time value in the dataset
-          if( searchMaskTimeVal == datasetTimeVal )
-          {
-            // if this condition is met, then this is considered to be a match
-            isMatch = OFTrue;
-          }
-        }
-      }
-
-      // free memory
-      delete[] dtv;
-      delete[] stv;
-
-      // return result
-      return( isMatch );
-    }
-    else
+    const OFPair<DcmTagKey,MatchingKeys>& sequenceKey = *it;
+#endif
+    DcmElement* query = OFnullptr;
+    if( searchMask->findAndGetElement( sequenceKey.first, query, OFFalse ).good() && query && query->ident() == EVR_SQ && !OFstatic_cast( DcmSequenceOfItems*, query )->isEmpty() )
     {
-      // if we are not dealing with universal matching and there
-      // is no time value in the dataset, there is no match
-      return( OFFalse );
+      DcmElement* candidate = OFnullptr;
+      if( dataset->findAndGetElement( sequenceKey.first, candidate, OFFalse ).bad() || !candidate || candidate->ident() != EVR_SQ || !MatchSequences( OFstatic_cast( DcmSequenceOfItems&, *candidate ), OFstatic_cast( DcmSequenceOfItems&, *query ), sequenceKey.second ) )
+        return OFFalse;
     }
   }
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::CaseSensitiveSingleValueMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : July 12, 2002
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values
-//                match while performing a case sensitive single value match; otherwise OFFalse
-//                will be returned
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; never NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  // initialize result variable
-  OFBool matchFound = OFTrue;
-
-  // copy values
-  char *dv = new char[ strlen( datasetValue ) + 1 ];
-  strcpy( dv, datasetValue );
-  char *sv = new char[ strlen( searchMaskValue ) + 1 ];
-  strcpy( sv, searchMaskValue );
-
-  // strip trailing spaces
-  DU_stripTrailingSpaces( dv );
-  DU_stripTrailingSpaces( sv );
-
-  // perform match
-  if( strcmp( dv, sv ) != 0 )
-    matchFound = OFFalse;
-
-  // free memory
-  delete[] dv;
-  delete[] sv;
-
-  // return result
-  return( matchFound );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::WildcardMatch( const char *datasetValue, const char *searchMaskValue )
-// Date         : July 12, 2002
-// Author       : Thomas Wilkens
-// Task         : This function returns OFTrue if the dataset's and the search mask's values
-//                match while performing a wildcard match; otherwise OFFalse will be returned.
-// Parameters   : datasetValue    - [in] Value for the corresponding attribute in the dataset; never NULL.
-//                searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  // initialize return value
-  OFBool ok = OFFalse;
-
-  // copy values
-  char *dv = new char[ strlen( datasetValue ) + 1 ];
-  strcpy( dv, datasetValue );
-  char *sv = new char[ strlen( searchMaskValue ) + 1 ];
-  strcpy( sv, searchMaskValue );
-
-  // remember the pointers for delete
-  char *dvanchor = dv;
-  char *svanchor = sv;
-
-  // strip trailing spaces
-  DU_stripTrailingSpaces( dv );
-  DU_stripTrailingSpaces( sv );
-
-  // go through both strings character by character as long as
-  // a) we do not see an EOS in sv AND
-  // b) we do not see a '*' in sv AND
-  // c) the current character in dv is equal to the
-  //    current character in the sv, or sv contains
-  //    a '?' and sv does not yet show an EOS.
-  while( *sv != '\0' &&
-         *sv != '*'  &&
-         ( *sv == *dv || ( *sv == '?' && *dv != '\0' ) ) )
-  {
-    sv++;
-    dv++;
-  }
-
-  // if the current pattern character equals the star symbol (wild card symbol) we need
-  // to call another function. If this is not the case, ok will be set to OFTrue or
-  // OFFalse, depending on if we got to the end of both strings in the above loop.
-  if( *sv == '*' )
-    ok = MatchStarSymbol( dv, sv+1 );
-  else
-  {
-    if( *sv == '\0' && *dv == '\0' )
-      ok = OFTrue;
-    else
-      ok = OFFalse;
-  }
-
-  // free memory
-  delete[] dvanchor;
-  delete[] svanchor;
-
-  // return result
-  return( ok );
-}
-
-// ----------------------------------------------------------------------------
-
-OFBool WlmFileSystemInteractionManager::MatchStarSymbol( const char *dv, const char *sv )
-// Date         : July 12, 2002
-// Author       : Thomas Wilkens
-// Task         : This function is called, if the search pattern contains a star symbol. It determines
-//                if dv (the dataset's value) still matches sv (the search mask's value). This function
-//                takes the star symbol in sv into account. (Note that the pattern value might contain
-//                more wild card symbols.) The function will return OFTrue if there is a match; if there
-//                is not a match it will return OFFalse.
-// Parameters   : dv - [in] Dataset's value; never NULL.
-//                sv - [in] Search mask's value (may contain wild card symbols); never NULL.
-// Return Value : OFTrue if the values match, OFFalse otherwise.
-{
-  // initialize result value
-  OFBool ok = OFFalse;
-
-  // move pointer one char to the right as long as it points to a star symbol
-  while( *sv == '*' )
-    sv++;
-
-  // if we got to the end of sv, return OFTrue
-  if( *sv == '\0' )
-    return OFTrue;
-
-  // if there is something else at the end of sv,
-  // we need to go ahead and compare the rest of the two strings
-
-  // as long as ok equals OFFalse and we did not get to the end of the string
-  while( !ok && *dv != '\0' )
-  {
-    // if sv reveals a '?' or if both pointers refer to the same
-    // character, we need to call WildcardMatch again, to determine a result
-    if( *sv == '?' || *dv == *sv )
-      ok = WildcardMatch( dv+1, sv+1 );
-
-    // if ok still equals OFFalse, set pointer one character to the right
-    if( !ok )
-      dv++;
-  }
-
-  // return result
-  return( ok );
-}
-
-// ----------------------------------------------------------------------------
-
-void WlmFileSystemInteractionManager::ExtractValuesFromRange( const char *range, char *&lower, char *&upper )
-// Date         : July 15, 2002
-// Author       : Thomas Wilkens
-// Task         : This function extracts the actual lower and upper date or time values from a given
-//                date or time range.
-// Parameters   : range - [in] Date or time range from which lower and upper values shall be extracted.
-//                lower - [out] Newly created string specifying the lower value from the date/time range;
-//                        NULL if value is not specified in range.
-//                upper - [out] Newly created string specifying the upper value from the date/time range;
-//                        NULL if value is not specified in range.
-// Return Value : none.
-{
-  // get lower value
-  const char *tmp = strchr( range, '-' );
-  int res = tmp - range;
-  if( res == 0 )
-    lower = NULL;
-  else
-  {
-    lower = new char[ res + 1 ];
-    strncpy( lower, range, res );
-    lower[res] = '\0';
-  }
-
-  // get upper value
-  int len = strlen( range );
-  if( res == len - 1 )
-    upper = NULL;
-  else
-  {
-    upper = new char[ len - 1 - res + 1 ];
-    strncpy( upper, tmp + 1, len - 1 - res );
-    upper[len-1-res] = '\0';
-  }
+  return OFTrue;
 }
diff --git a/dcmwlm/libsrc/wlmactmg.cc b/dcmwlm/libsrc/wlmactmg.cc
index 351ccb8..7e90a3f 100644
--- a/dcmwlm/libsrc/wlmactmg.cc
+++ b/dcmwlm/libsrc/wlmactmg.cc
@@ -142,19 +142,7 @@ WlmActivityManager::WlmActivityManager(
   if (!opt_forkedChild)
     DCMWLM_WARN("(notice: dcmdata auto correction disabled.)");
 
-#ifdef HAVE_GUSI_H
-  // needed for Macintosh.
-  GUSISetup( GUSIwithSIOUXSockets );
-  GUSISetup( GUSIwithInternetSockets );
-#endif
-
-#ifdef HAVE_WINSOCK_H
-  WSAData winSockData;
-  // we need at least version 1.1.
-  WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
-  WSAStartup(winSockVersionNeeded, &winSockData);
-#endif
-
+  OFStandard::initializeNetwork();
 }
 
 // ----------------------------------------------------------------------------
@@ -171,9 +159,7 @@ WlmActivityManager::~WlmActivityManager()
   delete[] supportedAbstractSyntaxes[1];
   delete[] supportedAbstractSyntaxes;
 
-#ifdef HAVE_WINSOCK_H
-  WSACleanup();
-#endif
+  OFStandard::shutdownNetwork();
 }
 
 // ----------------------------------------------------------------------------
@@ -208,26 +194,8 @@ OFCondition WlmActivityManager::StartProvidingService()
   /* if this process was started by CreateProcess, opt_forkedChild is set */
   if (opt_forkedChild)
   {
-    /* tell dcmnet DUL about child process status, too */
-    DUL_markProcessAsForkedChild();
-
-    char buf[256];
-    DWORD bytesRead = 0;
-    HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE);
-
-    // read socket handle number from stdin, i.e. the anonymous pipe
-    // to which our parent process has written the handle number.
-    if (ReadFile(hStdIn, buf, sizeof(buf) - 1, &bytesRead, NULL))
-    {
-      // make sure buffer is zero terminated
-      buf[bytesRead] = '\0';
-      dcmExternalSocketHandle.set(atoi(buf));
-    }
-    else
-    {
-      DCMWLM_ERROR("cannot read socket handle: " << GetLastError());
-      exit(0);
-    }
+    // we are a child process in multi-process mode
+    if (DUL_readSocketHandleAsForkedChild().bad()) exit(10);
   }
   else
   {
diff --git a/dcmwlm/tests/CMakeLists.txt b/dcmwlm/tests/CMakeLists.txt
new file mode 100644
index 0000000..27ff621
--- /dev/null
+++ b/dcmwlm/tests/CMakeLists.txt
@@ -0,0 +1,5 @@
+# declare executables
+DCMTK_ADD_EXECUTABLE(wltest wltest)
+
+# make sure executables are linked to the corresponding libraries
+DCMTK_TARGET_LINK_MODULES(wltest dcmwlm dcmnet dcmtls dcmdata oflog ofstd)
diff --git a/dcmwlm/tests/Makefile.dep b/dcmwlm/tests/Makefile.dep
index fefa231..3adbdab 100644
--- a/dcmwlm/tests/Makefile.dep
+++ b/dcmwlm/tests/Makefile.dep
@@ -28,7 +28,10 @@ wltest.o: wltest.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tchar.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -44,14 +47,15 @@ wltest.o: wltest.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmwlm/wltypdef.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../include/dcmtk/dcmwlm/wldefine.h \
diff --git a/dcmwlm/tests/Makefile.in b/dcmwlm/tests/Makefile.in
index a73d088..2ba9569 100644
--- a/dcmwlm/tests/Makefile.in
+++ b/dcmwlm/tests/Makefile.in
@@ -22,7 +22,7 @@ LOCALINCLUDES = -I$(dcmnetdir)/include -I$(dcmdatadir)/include \
 LIBDIRS = -L$(top_srcdir)/libsrc -L$(dcmnetdir)/libsrc -L$(dcmdatadir)/libsrc \
 	-L$(oflogdir)/libsrc -L$(ofstddir)/libsrc
 LOCALLIBS = -ldcmwlm -ldcmnet -ldcmdata -loflog -lofstd $(ZLIBLIBS) \
-	$(TCPWRAPPERLIBS) $(CHARCONVLIBS)
+	$(TCPWRAPPERLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
 objs = wltest.o
 progs = wltest
@@ -31,7 +31,7 @@ progs = wltest
 all: $(progs)
 
 wltest: $(objs)
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $(objs) $(LOCALLIBS) $(MATHLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $(objs) $(LOCALLIBS) $(LIBS)
 
 
 check:
diff --git a/dcmwlm/tests/wltest.cc b/dcmwlm/tests/wltest.cc
index f737b47..866ed19 100644
--- a/dcmwlm/tests/wltest.cc
+++ b/dcmwlm/tests/wltest.cc
@@ -24,7 +24,6 @@
 #define INCLUDE_CSTDLIB
 #define INCLUDE_CSTRING
 #define INCLUDE_CSTDARG
-#define INCLUDE_CERRNO
 #define INCLUDE_UNISTD
 #include "dcmtk/ofstd/ofstdinc.h"
 
@@ -139,12 +138,6 @@ int main(int argc, char* argv[])
     int i = 0;
     int j = 0;
 
-#ifdef HAVE_GUSI_H
-    /* needed for Macintosh */
-    GUSISetup(GUSIwithSIOUXSockets);
-    GUSISetup(GUSIwithInternetSockets);
-#endif
-
 #ifdef WITH_TCPWRAPPER
     // this code makes sure that the linker cannot optimize away
     // the DUL part of the network module where the external flags
@@ -208,8 +201,8 @@ int main(int argc, char* argv[])
 
     for (j=i; j<argc; j++) {
         if (!OFStandard::pathExists(argv[j])) {
-            char buf[256];
-            errmsg("cannot access %s: %s", argv[j], OFStandard::strerror(errno, buf, sizeof(buf)));
+            OFString buffer = OFStandard::getLastSystemErrorCode().message();
+            errmsg("cannot access %s: %s", argv[j], buffer.c_str());
             usage();
         }
     }
diff --git a/docs/CHANGES.361 b/docs/CHANGES.362
similarity index 86%
rename from docs/CHANGES.361
rename to docs/CHANGES.362
index 3c6f4be..5d00a1e 100644
--- a/docs/CHANGES.361
+++ b/docs/CHANGES.362
@@ -1,5 +1,3347 @@
 
-Changes between releases are documented here.
+Release 3.6.2 (Public Release - 2017-07-14)
+
+**** Changes from 2017.07.14 (schlamelcher)
+
+- Created CHANGES.362 for DCMTK release 3.6.2:
+  Created CHANGES.362 for DCMTK release based on CHANGES.361 and the commit
+  history since the last snapshot.
+  Modified CHANGES to no longer only refer to DCMTK snapshots.
+  CHANGES.361 has been removed since the content is included in CHANGES.362.
+  Added:   docs/CHANGES.362
+  Affects: CHANGES
+  Removed: docs/CHANGES.361
+
+- Updated man pages for DCMTK release 3.6.2.
+  Affects: doxygen/manpages/man1/dcm2json.1
+           doxygen/manpages/man1/dcm2pdf.1
+           doxygen/manpages/man1/dcm2pnm.1
+           doxygen/manpages/man1/dcm2xml.1
+           doxygen/manpages/man1/dcmcjpeg.1
+           doxygen/manpages/man1/dcmcjpls.1
+           doxygen/manpages/man1/dcmconv.1
+           doxygen/manpages/man1/dcmcrle.1
+           doxygen/manpages/man1/dcmdjpeg.1
+           doxygen/manpages/man1/dcmdjpls.1
+           doxygen/manpages/man1/dcmdrle.1
+           doxygen/manpages/man1/dcmdspfn.1
+           doxygen/manpages/man1/dcmdump.1
+           doxygen/manpages/man1/dcmftest.1
+           doxygen/manpages/man1/dcmgpdir.1
+           doxygen/manpages/man1/dcmj2pnm.1
+           doxygen/manpages/man1/dcml2pnm.1
+           doxygen/manpages/man1/dcmmkcrv.1
+           doxygen/manpages/man1/dcmmkdir.1
+           doxygen/manpages/man1/dcmmklut.1
+           doxygen/manpages/man1/dcmodify.1
+           doxygen/manpages/man1/dcmp2pgm.1
+           doxygen/manpages/man1/dcmprscp.1
+           doxygen/manpages/man1/dcmprscu.1
+           doxygen/manpages/man1/dcmpschk.1
+           doxygen/manpages/man1/dcmpsmk.1
+           doxygen/manpages/man1/dcmpsprt.1
+           doxygen/manpages/man1/dcmpsrcv.1
+           doxygen/manpages/man1/dcmpssnd.1
+           doxygen/manpages/man1/dcmqridx.1
+           doxygen/manpages/man1/dcmqrscp.1
+           doxygen/manpages/man1/dcmqrti.1
+           doxygen/manpages/man1/dcmquant.1
+           doxygen/manpages/man1/dcmrecv.1
+           doxygen/manpages/man1/dcmscale.1
+           doxygen/manpages/man1/dcmsend.1
+           doxygen/manpages/man1/dcmsign.1
+           doxygen/manpages/man1/dcod2lum.1
+           doxygen/manpages/man1/dconvlum.1
+           doxygen/manpages/man1/drtdump.1
+           doxygen/manpages/man1/dsr2html.1
+           doxygen/manpages/man1/dsr2xml.1
+           doxygen/manpages/man1/dsrdump.1
+           doxygen/manpages/man1/dump2dcm.1
+           doxygen/manpages/man1/echoscu.1
+           doxygen/manpages/man1/findscu.1
+           doxygen/manpages/man1/getscu.1
+           doxygen/manpages/man1/img2dcm.1
+           doxygen/manpages/man1/movescu.1
+           doxygen/manpages/man1/pdf2dcm.1
+           doxygen/manpages/man1/storescp.1
+           doxygen/manpages/man1/storescu.1
+           doxygen/manpages/man1/termscu.1
+           doxygen/manpages/man1/wlmscpfs.1
+           doxygen/manpages/man1/xml2dcm.1
+           doxygen/manpages/man1/xml2dsr.1
+
+- Updated version information for DCMTK release 3.6.2.
+  Affects: CMake/dcmtkPrepare.cmake
+           VERSION
+           config/configure
+           config/configure.in
+
+- Updated Makefile dependencies.
+  Affects: dcmdata/apps/Makefile.dep
+           dcmdata/libi2d/Makefile.dep
+           dcmdata/libsrc/Makefile.dep
+           dcmdata/tests/Makefile.dep
+           dcmfg/libsrc/Makefile.dep
+           dcmimage/apps/Makefile.dep
+           dcmimage/libsrc/Makefile.dep
+           dcmimgle/apps/Makefile.dep
+           dcmimgle/libsrc/Makefile.dep
+           dcmiod/libsrc/Makefile.dep
+           dcmiod/tests/Makefile.dep
+           dcmjpeg/apps/Makefile.dep
+           dcmjpeg/libsrc/Makefile.dep
+           dcmjpls/apps/Makefile.dep
+           dcmjpls/libcharls/Makefile.dep
+           dcmjpls/libsrc/Makefile.dep
+           dcmnet/apps/Makefile.dep
+           dcmnet/libsrc/Makefile.dep
+           dcmnet/tests/Makefile.dep
+           dcmpmap/libsrc/Makefile.dep
+           dcmpstat/apps/Makefile.dep
+           dcmpstat/libsrc/Makefile.dep
+           dcmpstat/tests/Makefile.dep
+           dcmqrdb/apps/Makefile.dep
+           dcmqrdb/libsrc/Makefile.dep
+           dcmrt/apps/Makefile.dep
+           dcmrt/libsrc/Makefile.dep
+           dcmrt/tests/Makefile.dep
+           dcmseg/libsrc/Makefile.dep
+           dcmseg/tests/Makefile.dep
+           dcmsign/apps/Makefile.dep
+           dcmsign/libsrc/Makefile.dep
+           dcmsr/apps/Makefile.dep
+           dcmsr/libcmr/Makefile.dep
+           dcmsr/libsrc/Makefile.dep
+           dcmsr/tests/Makefile.dep
+           dcmtls/libsrc/Makefile.dep
+           dcmtract/libsrc/Makefile.dep
+           dcmwlm/apps/Makefile.dep
+           dcmwlm/libsrc/Makefile.dep
+           dcmwlm/tests/Makefile.dep
+           oflog/libsrc/Makefile.dep
+           ofstd/libsrc/Makefile.dep
+
+- Updated ANNOUNCE and INSTALL for DCMTK release 3.6.2.
+  Affects: ANNOUNCE
+           INSTALL
+
+**** Changes from 2017.07.13 (schlamelcher)
+
+- Made including third-party libraries version agnostic:
+  Made the Windows specific CMake code for including third party libraries
+  version agnostic, i.e. it now searches for "libtiff*" instead of
+  "libtiff-<hardcoded version number>".
+  Affects: CMake/3rdparty.cmake
+
+**** Changes from 2017.07.12 (schlamelcher)
+
+- Added support for suppressing C4307 on Visual Studio:
+  Added support for suppressing integer overflow warnings emitted by Visual
+  Studio, currently used to suppress this warning in the OFnumeric_limits unit
+  test where the integer overflow behavior is being tested.
+  Affects: ofstd/include/dcmtk/ofstd/diag/overflow.def
+
+- Removed several macros from config/docs/macros.txt:
+  Removed the description of several macros from config/docs/macros.txt since
+  they are now controlled by Autoconf/CMake and should no longer be modified by
+  the user directly.
+  Affects: config/docs/macros.txt
+
+- Removed no longer required section from COPYRIGHT:
+  Removed no longer required section about the Android toolchain configuration
+  file from COPYRIGHT since the reference file has been removed from DCMTK.
+  Affects: COPYRIGHT
+
+**** Changes from 2017.07.12 (onken)
+
+- Export new LFS CMake flag to DCMTKConfig.cmake:
+  Export the recently introduced LFS CMake flag to DCMTKConfig.cmake (for
+  current CMake version and legacy versions > 2.8.3).
+  Affects: CMake/DCMTKConfig.cmake.in
+           CMake/DCMTKConfig.old_cmake.in
+
+**** Changes from 2017.07.12 (riesmeier)
+
+- Updated copyright date.
+  Affects: COPYRIGHT
+
+**** Changes from 2017.07.11 (schlamelcher)
+
+- Added a workaround for inconsistent LFS API under QNX.
+  Affects: ofstd/include/dcmtk/ofstd/offile.h
+
+- More fixes for SunPro:
+  Modified the configuration test for readdir_r to also check the number of
+  arguments and their types. This broke overnight for an unknown reason.
+  Silenced some warnings about overloaded methods being hidden in derived
+  classes.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           dcmdata/include/dcmtk/dcmdata/dcchrstr.h
+           dcmdata/include/dcmtk/dcmdata/dcvrae.h
+           dcmdata/include/dcmtk/dcmdata/dcvrcs.h
+           dcmdata/include/dcmtk/dcmdata/dcvrda.h
+           dcmdata/include/dcmtk/dcmdata/dcvrdt.h
+           dcmdata/include/dcmtk/dcmdata/dcvrtm.h
+           dcmdata/include/dcmtk/dcmdata/dcvrur.h
+
+- Small fixes for a previous commit:
+  Fixed a typo and removed an inappropriate restriction (only affecting the
+  CMake GUI):
+  DCMTK_ENABLE_LFS was falsely restricted to the modes that were detected as
+  available, making it impossible to choose 'lfs' in case 'lfs64' was available
+  (since in that case the test looking for 'lfs' was not run and it was
+  therefore unknown whether it is available or not). Now it is also possible to
+  choose modes where the configuration tests have not been executed yet to
+  trigger launching the tests in the first place.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+- Workaround for strange LFS implementation on Windows:
+  Windows (Visual Studio) provides a strange implicit LFS implementation where
+  fpos_t is a 64 bit type but off_t is 32 bit.
+  This implementation is now detected via configuration tests (CMake, not
+  relevant for Autoconf since it is Windows only) and then honored by ignoring
+  off_t and using Sint64 instead. This replaces the '#ifdef _WIN32' hacks
+  removed by a previous commit hoping the already introduced configuration tests
+  made them obsolete (which should now finally be the case).
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+           ofstd/include/dcmtk/ofstd/offile.h
+
+**** Changes from 2017.07.10 (schlamelcher)
+
+- Added DCMTK_ENABLE_LFS for choosing LFS type (CMake):
+  Added CMake variable for choosing the LFS type (lfs64/lfs/auto/off). This
+  implementation is now similar to the Autoconf one (--enable-lfs=).
+  Also modified the resulting macro in 'osconfig.h' to explicitly select the
+  implementation, similar to DCMTK_ENABLE_CHARSET_CONVERSION. OFFile will now
+  use EXPLICIT_LFS64 in case DCMTK_ENABLE_LFS is set to DCMTK_LFS64 and call
+  the normal file access functions otherwise.
+  The only difference between setting DCMTK_ENABLE_LFS to 'lfs' and 'off' is
+  that setting it to 'off' will not set the required compiler flags and
+  preprocessor definitions (if any) i.e. it is not possible forcibly disable LFS
+  in case it is implicitly provided without setting any flags and/or
+  preprocessor definitions.
+  Added:   config/tests/lfs.c
+           config/tests/lfs64.cc
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+           config/aclocal.m4
+           config/configure
+           config/configure.in
+           config/include/dcmtk/config/osconfig.h.in
+           ofstd/include/dcmtk/ofstd/offile.h
+
+- Added a workaround for C++11 compiling errors:
+  Added a workaround for errors when enabling C++11 (DCMTK_ENABLE_CXX11) without
+  enabling std::tuple. It is of course debatable whether this scenario makes any
+  sense at all, but since it is currently the default behavior this workaround
+  should increase usability.
+  We should possible override the user choice whether or not to enable
+  std::tuple in case C++11 was enabled in the future or provide a full C++11
+  implementation of OFtuple (is there any C++11 compiler that does not have
+  std::tuple?).
+  Affects: ofstd/include/dcmtk/ofstd/variadic/tuple.h
+
+**** Changes from 2017.07.07 (schlamelcher)
+
+- Silenced output of FIND_PACKAGE(ICU):
+  Silenced the output of FIND_PACKAGE(ICU) to be consistent with the other
+  occurrences of FIND_PACKAGE() within the CMake configuration.
+  Affects: CMake/3rdparty.cmake
+
+- Fixed wrong usage of alignas:
+  Fixed using alignas within typedefs (which was first introduced to realize
+  compatibility with the implementation for Visual Studio). The new
+  implementations of OFalign and OFalign_typename for alignas only define the
+  given type without the alignment (for handling arrays) and add the alignment
+  modifier on preprocessor level.
+  Adjusted the documentation of OFalign accordingly and removed the now
+  unnecessary configuration test whether type definitions using alignas are
+  possible (since even if the test succeeded the compilers most likely didn't
+  actually align the resulting type as one would expect).
+  Thanks to Stefan Hengelein and Peter Klotz for reporting the issue.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+           config/aclocal.m4
+           config/configure
+           config/configure.in
+           config/include/dcmtk/config/osconfig.h.in
+           ofstd/include/dcmtk/ofstd/ofalign.h
+           ofstd/include/dcmtk/ofstd/ofoption.h
+
+**** Changes from 2017.07.06 (schlamelcher)
+
+- Fixed unexpected iconv behavior on FreeBSD:
+  The iconv implementation inside FreeBSD's C standard library shows custom
+  behavior when illegal character sequences are encountered (replacing them
+  with '?' instead of failing the conversion). OFCharacterEncoding now correctly
+  describes this behavior as unknown and does not longer claim that it supports
+  the mode 'AbortTranscodingOnIllegalSequence'.
+  Affects: ofstd/libsrc/ofchrenc.cc
+
+**** Changes from 2017.07.05 (schlamelcher)
+
+- Fixed compiling with Oracle Developer Studio (SunPro):
+  Fixed linker issues caused by missing 'const' modifiers on some by-value
+  arguments. The compiler seems to understand that these functions are
+  compatible but then creates symbol references to the spelling that doesn't
+  exist, leading to linker errors later in the build process.
+  Removed some of the previously introduced workarounds that are not necessary
+  on newer versions of SunPro, the old versions that required them lack some
+  fundamental C++ features that are necessary for building DCMTK anyway (also
+  removing the comment that SunPro was the retarded child of a Java compiler and
+  an actual C++ compiler that is no longer true - SunPro can no longer be
+  considered a child). Use Oracle Developer Studio 12.5 or later!
+  Affects: dcmiod/include/dcmtk/dcmiod/iodcommn.h
+           dcmiod/libsrc/iodcommn.cc
+           dcmiod/libsrc/modbase.cc
+           dcmnet/libsrc/scp.cc
+           dcmtls/libsrc/tlslayer.cc
+           dcmwlm/libsrc/wlfsim.cc
+           oflog/include/dcmtk/oflog/appender.h
+           oflog/include/dcmtk/oflog/spi/factory.h
+           oflog/libsrc/appender.cc
+
+- Fixed compiler errors on Visual Studio with OpenSSL:
+  Fixed compiling dcmtls with Visual Studio and OpenSSL 1.1.0f by:
+  - Ensuring that OpenSSL headers can be included when performing the
+    configuration tests, even when they are no in the system include
+    directories.
+  - Linking to the correct library (dcmtkeay was renamed to dcmtkcrypto).
+  - Fixing related code in dcmtls (added missing include and fixed
+    SOCKET -> DcmNativeSocketType).
+  Affects: CMake/3rdparty.cmake
+           CMake/CheckFunctionWithHeaderExists.cmake
+           CMake/GenerateDCMTKConfigure.cmake
+           dcmtls/include/dcmtk/dcmtls/tlslayer.h
+           dcmtls/include/dcmtk/dcmtls/tlstrans.h
+           dcmtls/libsrc/tlslayer.cc
+           dcmtls/libsrc/tlstrans.cc
+
+**** Changes from 2017.07.04 (riesmeier)
+
+- Fixed typo in Coding Scheme Description.
+  Affects: dcmsr/include/dcmtk/dcmsr/codes/srt.h
+
+**** Changes from 2017.07.03 (schlamelcher)
+
+- Many workarounds for SunPro:
+  Many workarounds and some actually meaningful fixes for the SunPro compiler.
+  In general the compiler at best seems to have a basic implementation of
+  some parts of the C++ type system but does not actually implement it, e.g.
+  fails to understand more complex types and perform any meaningful operations
+  on them.
+  The (perhaps) meaningful fixes are:
+  1. The configuration test for detecting whether the compiler is able to
+  identify default constructable classes via SFINAE now also tests whether the
+  result is the expected one and not only whether the code compiles.
+  2. The configuration tests for std::list and std::vector now also tests
+  whether a const_iterator can be compared to a mutable iterator of the
+  respective template, e.g. whether the compiler understands that a
+  const_iterator can be constructed out of an iterator for the comparison on the
+  fly.
+  3. The configuration tests for 'getgrnam_r' and 'getpwnam_r' now also ensure
+  that both functions take the expected number (and types) of arguments.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/dcmtkPrepare.cmake
+           config/tests/list.cc
+           config/tests/vector.cc
+           dcmdata/libsrc/CMakeLists.txt
+           dcmiod/libsrc/cielabutil.cc
+           dcmtls/libsrc/tlslayer.cc
+           dcmwlm/libsrc/wlfsim.cc
+           oflog/include/dcmtk/oflog/appender.h
+           oflog/include/dcmtk/oflog/spi/factory.h
+           oflog/libsrc/appender.cc
+           ofstd/include/dcmtk/ofstd/ofalign.h
+           ofstd/include/dcmtk/ofstd/ofutil.h
+           ofstd/libsrc/ofstd.cc
+           ofstd/libsrc/ofxml.cc
+
+**** Changes from 2017.07.03 (onken)
+
+- Moved TRY_COMPILE to where it is first needed:
+  Moved TRY_COMPILE macro inclusion to the position where it is
+  first needed since otherwise CMake Version 2.8.3 will generate
+  an error when trying to run cmake in an existing build tree again.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+- Require CMake > 2.8.3. Extended DCMTKConfig.cmake:
+  The minimum CMake version required to build DCMTK was forwarded to
+  2.8.3. since at least the FindICU.cmake script needs this version.
+  The minimum required version used before (2.6) has been broken also for
+  other other reasons (unsupported CACHE target for SET_PROPERTY and
+  problems with some syntax constructs which could probably be solved).
+  Also, more build parameters are now being exported to DCMTKConfig.cmake
+  which now better reflect the current build configuration switches used
+  when building DCMTK.
+  The version DCMTKConfig.cmake26.in has been renamed to
+  CMake/DCMTKConfig.old_cmake.in in order to reflect the new minimum version.
+  Note that it is now only used for all CMake versions betweeen 2.8.3 (new
+  minimum) and 2.8.8 (exclusively), since the latter includes the features required
+  to use the "modern" DCMTKConfig.cmake.
+  Added:   CMake/DCMTKConfig.old_cmake.in
+  Removed: CMake/DCMTKConfig.cmake26.in
+  Affects: CMake/DCMTKConfig.cmake.in
+           CMakeLists.txt
+
+**** Changes from 2017.07.01 (schlamelcher)
+
+- Fixed wrong syntax in previous commit.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+- Workaround for SunPro C vs. C++ inconsistencies:
+  The SunPro C compiler provides __PRETTY_FUNCTION__ et al. whereas its C++
+  version doesn't. Added configuration tests to ensure these macros are
+  available for C and C++ before enabling them in the code (via 'osconfig.h').
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+- Fixed configuration test errors:
+  Fixed configuration test errors on Unix like systems introduced by the
+  previous commit that fixed them on Visual Studio.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+**** Changes from 2017.07.01 (grallert)
+
+- Fixed configuration test errors on Visual Studio:
+  Fixed inappropriate use of CHECK_FUNCTION_EXISTS() for detecting 'memcmp',
+  'memcpy' and 'memset', which became apparent by the recent modification that
+  changed the configuration tests to be run in 'Release' mode.
+  As described by the CMake documentation, CHECK_FUNCTION_EXISTS() cannot be
+  used to detect functions that are inlined in headers or specified as a macro
+  and fails to detect anything in the 32-bit versions of the Win32 API, because
+  of a mismatch in calling conventions.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+**** Changes from 2017.06.30 (schlamelcher)
+
+- Several fixes for the SunPro compiler (Solaris):
+  Added some missing includes to 'arith.cc' and a special compiler flag to
+  CMAKE_CXX_FLAGS and CMAKE_C_FLAGS.
+  Affects: CMake/dcmtkPrepare.cmake
+           config/tests/arith.cc
+
+**** Changes from 2017.06.30 (riesmeier)
+
+- Minor fixes in Makefile:
+  Minor fixes in Makefile (mainly for reasons of consistency.
+  Affects: dcmfg/tests/Makefile.in
+           dcmjpls/apps/Makefile.in
+           dcmseg/tests/Makefile.in
+
+- Removed useless target "tclabutil" from Makefile.
+  Affects: dcmiod/tests/Makefile.in
+
+- Moved MATHLIBS to LOCALLIBS:
+  Moved MATHLIBS to LOCALLIBS definition for reasons of consistency with
+  other similar libraries, e.g. ZLIBLIBS and CHARCONVLIBS.
+  Affects: dcmdata/apps/Makefile.in
+           dcmimage/apps/Makefile.in
+           dcmimgle/apps/Makefile.in
+           dcmjpeg/apps/Makefile.in
+           dcmjpls/apps/Makefile.in
+           dcmnet/apps/Makefile.in
+           dcmpstat/apps/Makefile.in
+           dcmqrdb/apps/Makefile.in
+           dcmrt/apps/Makefile.in
+           dcmsign/apps/Makefile.in
+           dcmsr/apps/Makefile.in
+           dcmwlm/apps/Makefile.in
+
+- Link MATHLIBS to all test programs:
+  Link MATHLIBS to all test programs (similar to all programs in the "apps"
+  subdirectory). This is e.g. required for linking the tests on QNX/ARM.
+  Affects: dcmdata/tests/Makefile.in
+           dcmiod/tests/Makefile.in
+           dcmnet/tests/Makefile.in
+           dcmpstat/tests/Makefile.in
+           dcmrt/tests/Makefile.in
+           dcmseg/tests/Makefile.in
+           dcmsr/tests/Makefile.in
+           dcmwlm/tests/Makefile.in
+           ofstd/tests/Makefile.in
+
+**** Changes from 2017.06.30 (schlamelcher)
+
+- Fixed using wrong build type for configuration test:
+  CMake will now use the same build configuration for running the unit tests
+  (e.g. 'Release' or 'Debug') as the one that was chosen for building DCMTK.
+  This fixes different configuration results incompatible with the later build,
+  e.g. not detecting the problems with Visual Studio 2005's STL vector that
+  led to failing the OFVector unit test.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+**** Changes from 2017.06.30 (grallert)
+
+- Modified compiler Flags for Solaris (CMake):
+  The compiler flags for Solaris will now be auto-detected by CMake instead of
+  setting them manually. This fixes problems with clang.
+  Affects: CMake/dcmtkPrepare.cmake
+
+- Added missing compiler flags for NetBSD (Autoconf).
+  Affects: config/configure
+           config/configure.in
+
+**** Changes from 2017.06.29 (schlamelcher)
+
+- Removed broken attributes from dcmqrdb:
+  Removed incomplete implementation of the special Query Retrieve attributes
+  'Number of Patient Related Studies', 'Number of Patient Related Series',
+  'Number of Patient Related Instances', 'Number of Study Related Series' and
+  'Number of Study Related Instances'.
+  This closes DCMTK bug #328.
+  Affects: dcmqrdb/docs/dcmqrscp.man
+           dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h
+           dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h
+           dcmqrdb/libsrc/dcmqrdbi.cc
+
+**** Changes from 2017.06.29 (grallert)
+
+- Fixed compiling error on Android:
+  Added missing define "HAVE_PROTOTYPE_GETHOSTBYADDR_R" in CMake/osconfig.h.in.
+  Affects: CMake/osconfig.h.in
+
+**** Changes from 2017.06.29 (schlamelcher)
+
+- Added a workaround for a bug in x87 FPUs/GCC:
+  Added a workaround for buggy code generated by GCC for x87 FPUs.
+  Affects: ofstd/libsrc/oftime.cc
+
+**** Changes from 2017.06.23 (riesmeier)
+
+- Removed 2nd parameter from gotoNamedChildNode():
+  Removed optional second parameter "searchIntoSub" from gotoNamedChildNode()
+  since using a value of "OFTrue" (which was also the default) makes no sense
+  and resulted in unexpected behavior. Now, only the first sub-level is checked
+  for matching child nodes. Also enhanced recently added test cases.
+  Acknowledgement: This work has been supported in part by the "QIICR" project.
+  Affects: dcmsr/include/dcmtk/dcmsr/dsrdocst.h
+           dcmsr/libcmr/tid1600.cc
+           dcmsr/libsrc/dsrdocst.cc
+           dcmsr/tests/tsrdoctr.cc
+
+**** Changes from 2017.06.22 (riesmeier)
+
+- Added new method gotoNamedNodeInSubTree():
+  Added new method that allows for setting the cursor to a named node in the
+  subtree below the current node. This method complements the existing method
+  gotoNamedChildNode().
+  Also added test cases for gotoNamedNodeInSubTree() and gotoNamedChildNode().
+  Acknowledgement: This work has been supported in part by the "QIICR" project.
+  Affects: dcmsr/include/dcmtk/dcmsr/dsrdncsr.h
+           dcmsr/include/dcmtk/dcmsr/dsrdocst.h
+           dcmsr/include/dcmtk/dcmsr/dsrtncsr.h
+           dcmsr/libsrc/dsrdocst.cc
+           dcmsr/tests/tests.cc
+           dcmsr/tests/tsrdoctr.cc
+
+**** Changes from 2017.06.21 (riesmeier)
+
+- Enhanced documentation of gotoNamedChildNode():
+  Enhanced API documentation of gotoNamedChildNode(), which is just a shortcut
+  for calling gotoChild() followed by gotoNamedNode().
+  Affects: dcmsr/include/dcmtk/dcmsr/dsrdocst.h
+
+**** Changes from 2017.06.21 (grallert)
+
+- Several fixes for NetBSD support:
+  Added required compiler flags and ensured linking the required libraries.
+  Implemented additional configuration tests for gethostbyname_r and
+  gethostbyaddr_r. Fixed CMakeLists.txt in dcmpstat/apps because it links
+  unnecessary libraries to dcmmkcrv and dcmmklut which result in an error.
+  Changed iconv_t test by using 0 instead of NULL. Added sys/socket.h in ofstd.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/dcmtkPrepare.cmake
+           config/configure
+           config/configure.in
+           config/include/dcmtk/config/osconfig.h.in
+           dcmpstat/apps/CMakeLists.txt
+           ofstd/libsrc/ofstd.cc
+
+**** Changes from 2017.06.20 (riesmeier)
+
+- Updated latest tested CMake version:
+  Updated information on latest CMake version that has been tested to "3.8.2".
+  Affects: CMake/dcmtkPrepare.cmake
+
+**** Changes from 2017.06.15 (riesmeier)
+
+- Added new Storage SOP Classes to comment sections:
+  Added recently approved Storage SOP classes also to the "Storage SCU" and
+  "Role Selection" sections, but only as comments since the maximum number of
+  presentation contexts has already been reached.
+  Affects: dcmqrdb/etc/dcmqrprf.cfg
+
+- Added definition of new Presentation States:
+  Added new Presentation State SOP Classes (from Supplement 189 and 190) to
+  the list of known Presentation State (PR) types, i.e. accept them in an SR
+  document where a PR object is expected, and associate a human readable name
+  with them.
+  Affects: dcmsr/include/dcmtk/dcmsr/dsrtypes.h
+           dcmsr/libsrc/dsrtypes.cc
+
+- Initial support for "Patient Radiation Dose SR":
+  Added initial support for the new "Patient Radiation Dose SR" Storage
+  SOP Class (Supplement 191), i.e. this new SR document type is now known
+  to the "dcmsr" module but now yet fully supported. In particular, the
+  corresponding "IOD Constraint Checker" still has to be implemented.
+  Affects: dcmsr/data/dsr2xml.xsd
+           dcmsr/include/dcmtk/dcmsr/dsrtypes.h
+           dcmsr/libsrc/dsrtypes.cc
+
+- Added support for new "SR" and "PR" SOP Classes:
+  Added support for recently approved Structured Reporting (SR) and
+  Presentation State (PR) SOP Classes to the DICOMDIR generation code.
+  Affects: dcmdata/libsrc/dcddirif.cc
+
+- Support new SOP Classes by networking tools:
+  Added support for recently approved Storage SOP Classes to the various
+  networking tools. This includes Supplement 189, 190, 191 and 197.
+  Affects: dcmnet/docs/movescu.man
+           dcmnet/docs/storescp.man
+           dcmnet/etc/storescp.cfg
+           dcmnet/etc/storescu.cfg
+           dcmqrdb/docs/dcmqrscp.man
+           dcmqrdb/etc/dcmqrprf.cfg
+           dcmqrdb/libsrc/dcmqrdbi.cc
+
+- Added definition of new Storage SOP Class UIDs:
+  Updated list of Storage SOP Class UIDs known to the DCMTK based of DICOM
+  2017b. This includes Supplement 189, 190, 191 and 197.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h
+           dcmdata/libsrc/dcuid.cc
+
+- Updated data dictionary for DICOM 2017b:
+  Updated data dictionary for the latest edition of the DICOM standard, which
+  has been released only recently.
+  Since three DICOM attributes were "retired", the name of the associated
+  DcmTagKey constants also changed. This required minor changes to the source
+  code, especially with regards to the attribute Other Patient IDs (0010,1000):
+  the name changed from DCM_OtherPatientIDs to DCM_RETIRED_OtherPatientIDs.
+  Affects: dcmdata/data/dicom.dic
+           dcmdata/include/dcmtk/dcmdata/dcdeftag.h
+           dcmdata/libsrc/dcdictbi.cc
+           dcmdata/tests/tparent.cc
+           dcmiod/libsrc/modhelp.cc
+           dcmqrdb/docs/dcmqrscp.man
+           dcmqrdb/libsrc/dcmqrdbi.cc
+           dcmrt/libsrc/drtdose.cc
+           dcmrt/libsrc/drtimage.cc
+           dcmrt/libsrc/drtionpl.cc
+           dcmrt/libsrc/drtiontr.cc
+           dcmrt/libsrc/drtplan.cc
+           dcmrt/libsrc/drtstrct.cc
+           dcmrt/libsrc/drttreat.cc
+           dcmwlm/docs/wlmscpfs.man
+           dcmwlm/include/dcmtk/dcmwlm/wlds.h
+           dcmwlm/libsrc/wlds.cc
+
+**** Changes from 2017.06.13 (riesmeier)
+
+- Updated Makefile dependencies:
+  Updated Makefile dependencies (oferror and terror were missing).
+  Affects: ofstd/libsrc/Makefile.dep
+           ofstd/tests/Makefile.dep
+
+- Fixed issue with configure test on QNX 6.5:
+  Fixed issue with configure test for the macro INCLUDE_LIBC_H_AS_EXTERN_C,
+  which used to work on QNX 6.2 but does not work anymore on QNX 6.5. This
+  test should have no meaning for any other platform / operating system.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           config/aclocal.m4
+           config/configure
+
+**** Changes from 2017.06.12 (riesmeier)
+
+- Added explicit type cast to keep QNX 6.5 quiet:
+  Added explicit type cast when comparing numeric values with a variable
+  of type "offile_off_t" in order to keep gcc on QNX 6.5 quiet.
+  Affects: dcmdata/libsrc/dcelem.cc
+           dcmdata/libsrc/dcitem.cc
+           dcmdata/libsrc/dcsequen.cc
+
+- Minor changes for supporting QNX 6.5:
+  Included system header "unix.h" (if available) and disabled definition of
+  "EXPLICIT_LFS_64" in order to compile on QNX 6.5.
+  Affects: ofstd/include/dcmtk/ofstd/offile.h
+
+- Changed the way XMLLIBS is set (Autoconf):
+  Changed the way XMLLIBS is set when using Autoconf. Now, the value returned
+  by "xml2-config --libs" is used, which might include the library path (i.e.
+  something like "-L/usr/local/lib").
+  This change was needed for supporting QNX 6.5 but, of course, it should also
+  work on other systems.
+  Affects: config/configure
+           config/configure.in
+
+**** Changes from 2017.06.12 (onken)
+
+- Removed unused variable.
+  Affects: dcmnet/libsrc/dccfrsmp.cc
+
+**** Changes from 2017.06.09 (onken)
+
+- Fixed typos.
+  Affects: dcmnet/libsrc/assoc.cc
+           dcmnet/tests/tscuscp.cc
+           dcmwlm/include/dcmtk/dcmwlm/wlds.h
+           dcmwlm/include/dcmtk/dcmwlm/wldsfs.h
+           dcmwlm/libsrc/wldsfs.cc
+
+**** Changes from 2017.06.09 (schlamelcher)
+
+- Added a partial workaround for DCMTK bug #758:
+  Added a check to the configuration and unit tests of std::vector/OFVector to
+  ensure that the construction of recursive data structures based on OFVector
+  does not cause a stack overflow.
+  Modified the default constructor of DCMTK's OFVector implementation to no
+  longer predictively construct some elements, such that it passes the new test.
+  Affects: config/tests/vector.cc
+           ofstd/include/dcmtk/ofstd/ofvector.h
+           ofstd/tests/tvec.cc
+
+**** Changes from 2017.06.09 (onken)
+
+- Added missing space.
+  Affects: dcmnet/libsrc/assoc.cc
+
+- Fixed ASCII art in test.
+  Affects: dcmnet/tests/tscuscp.cc
+
+- Test recently introduced role selection option:
+  Test the recently introduced role selection compatibility option for
+  accepting Default role even if SCP role is configured for the
+  association acceptor.
+  Affects: dcmnet/tests/tscuscp.cc
+
+- Opt. accept Default role if SCP role expected:
+  Added option to dcmnet assocation acceptor code that allows to accept
+  a Default role (no role selection in request) even if the acceptor is
+  configured to only accept SCP role. This is helpful for faulty clients
+  in services like Storage Commitment or Retrieve (via C-GET) very
+  association requestors have to use role selection if they want to be
+  correct with respect to the standard. Sine some are not, this option
+  makes sure that such requests can be accepted (with return Default role,
+  too).
+  Added option to association acceptance code in dcmnet in order to allow
+  for accepting
+  Affects: dcmnet/include/dcmtk/dcmnet/assoc.h
+           dcmnet/include/dcmtk/dcmnet/dcasccfg.h
+           dcmnet/include/dcmtk/dcmnet/dul.h
+           dcmnet/include/dcmtk/dcmnet/scp.h
+           dcmnet/include/dcmtk/dcmnet/scpcfg.h
+           dcmnet/libsrc/assoc.cc
+           dcmnet/libsrc/dcasccfg.cc
+           dcmnet/libsrc/scp.cc
+           dcmnet/libsrc/scpcfg.cc
+
+- Fixed ASCII art in comment.
+  Affects: dcmnet/include/dcmtk/dcmnet/dul.h
+           dcmnet/tests/tscuscp.cc
+
+- Fixed error message.
+  Affects: dcmnet/libsrc/assoc.cc
+
+- Fixed doubled space in log output.
+  Affects: dcmnet/libsrc/assoc.cc
+
+- Removed leftovers from dcmStrictRoleSelection.
+  Affects: dcmnet/libsrc/dul.cc
+
+**** Changes from 2017.06.08 (onken)
+
+- Added role selection tests.
+  Affects: dcmnet/tests/tests.cc
+           dcmnet/tests/tscuscp.cc
+
+- Allow search for role in SCU presentation contexts.
+  Affects: dcmnet/include/dcmtk/dcmnet/scu.h
+           dcmnet/libsrc/scu.cc
+
+- Better parameter name and documentation.
+  Affects: dcmnet/include/dcmtk/dcmnet/scp.h
+           dcmnet/include/dcmtk/dcmnet/scu.h
+           dcmnet/libsrc/scp.cc
+
+- Enhanced role selection documentation.
+  Affects: dcmnet/include/dcmtk/dcmnet/dul.h
+           dcmnet/include/dcmtk/dcmnet/scu.h
+           dcmnet/libsrc/dulconst.cc
+
+- Removed dcmStrictRoleSelection config. switch:
+  Removed global dcmStrictRoleSelection configuration switch since it does
+  not offer additional value to association acceptors who can enforce the
+  same behaviour by already configuring the proposed roles accordingly.
+  Affects: dcmnet/include/dcmtk/dcmnet/dul.h
+           dcmnet/libsrc/assoc.cc
+
+- Fixed possible role selection config. problem:
+  Fixed possible role selection problem for association acceptors. If the
+  first presentation context added to the association configuration used a
+  default role, any other presentation context with role selection
+  configured would not configure correctly. The reason is that when
+  creating the underlying association profile in the first step, one
+  already has to know the role selection profile, which does not exist if
+  not instantly added together with the association configuration profile
+  (together with the first presentation context). This commit ensures that
+  an empty role selection profile can and is created in any case and all
+  presentation contexts with role selection being added refer to that profile.
+  Affects: dcmnet/include/dcmtk/dcmnet/dcasccfg.h
+           dcmnet/include/dcmtk/dcmnet/dccfrsmp.h
+           dcmnet/libsrc/dcasccfg.cc
+           dcmnet/libsrc/dccfrsmp.cc
+           dcmnet/libsrc/scpcfg.cc
+
+- Made parameter const.
+  Affects: dcmnet/include/dcmtk/dcmnet/assoc.h
+           dcmnet/libsrc/assoc.cc
+
+- Fixed wrong copy of SOP class in role selection:
+  Fixed copying of SOP class in role selection code which could lead to
+  shortened SOP Class UIDs in role selection items and thus to
+  presentation contexts not being marked with the correct role.
+  Affects: dcmnet/libsrc/dulparse.cc
+
+**** Changes from 2017.06.06 (goldhammer)
+
+- Fixed OFerror_code's unit test not working on OpenBSD:
+  OpenBSD defines EPROTOTYPE instead of EPROTO. This is now covered by an
+  additional "#elif __OpenBSD__" section.
+  Affects: ofstd/tests/terror.cc
+
+**** Changes from 2017.06.02 (riesmeier)
+
+- Fixed typo and rewrapped new text paragraphs.
+  Affects: dcmqrdb/docs/dcmqrscp.man
+
+**** Changes from 2017.06.01 (schlamelcher)
+
+- Refactored dcmwlm's attribute matching implementation:
+  Refactored dcmwlm to use the recently introduced attribute matching
+  implementation from the DcmElement class hierarchy.
+  Affects: dcmwlm/include/dcmtk/dcmwlm/wlfsim.h
+           dcmwlm/libsrc/wlfsim.cc
+
+- Fixed combined date time range matching:
+  Fixed a bug in the combined date time (range) matching implementation in
+  DcmAttributeMatching.
+  Affects: dcmdata/libsrc/dcmatch.cc
+
+- Added attribute matching functions to DcmElement etc:
+  Added methods to perform the appropriate kind of attribute matching on an
+  instance of one of the DcmElement and derived classes: matches() and
+  combinationMatches(), the latter being used for combined date time (range)
+  matching.
+  Calling match() will check that both the left hand DcmElement object and
+  the one provided as its argument are compatible (e.g. similar VR) and then
+  return the results from the appropriate matching function from
+  DcmAttributeMatching (Wildcard Matching, Range Matching, etc.).
+  Affects: dcmdata/include/dcmtk/dcmdata/dcbytstr.h
+           dcmdata/include/dcmtk/dcmdata/dcchrstr.h
+           dcmdata/include/dcmtk/dcmdata/dcelem.h
+           dcmdata/include/dcmtk/dcmdata/dcvrae.h
+           dcmdata/include/dcmtk/dcmdata/dcvrcs.h
+           dcmdata/include/dcmtk/dcmdata/dcvrda.h
+           dcmdata/include/dcmtk/dcmdata/dcvrdt.h
+           dcmdata/include/dcmtk/dcmdata/dcvrfd.h
+           dcmdata/include/dcmtk/dcmdata/dcvrfl.h
+           dcmdata/include/dcmtk/dcmdata/dcvrsl.h
+           dcmdata/include/dcmtk/dcmdata/dcvrss.h
+           dcmdata/include/dcmtk/dcmdata/dcvrtm.h
+           dcmdata/include/dcmtk/dcmdata/dcvrui.h
+           dcmdata/include/dcmtk/dcmdata/dcvrul.h
+           dcmdata/include/dcmtk/dcmdata/dcvrur.h
+           dcmdata/include/dcmtk/dcmdata/dcvrus.h
+           dcmdata/libsrc/dcbytstr.cc
+           dcmdata/libsrc/dcchrstr.cc
+           dcmdata/libsrc/dcelem.cc
+           dcmdata/libsrc/dcvrae.cc
+           dcmdata/libsrc/dcvrcs.cc
+           dcmdata/libsrc/dcvrda.cc
+           dcmdata/libsrc/dcvrdt.cc
+           dcmdata/libsrc/dcvrfd.cc
+           dcmdata/libsrc/dcvrfl.cc
+           dcmdata/libsrc/dcvrsl.cc
+           dcmdata/libsrc/dcvrss.cc
+           dcmdata/libsrc/dcvrtm.cc
+           dcmdata/libsrc/dcvrul.cc
+           dcmdata/libsrc/dcvrur.cc
+           dcmdata/libsrc/dcvrus.cc
+
+**** Changes from 2017.05.30 (schlamelcher)
+
+- Added association negotiation profiles to dcmqrscp:
+  Added support for association negotiation profiles via configuration file
+  to dcmqrscp. The configuration file may be used to propose and accept
+  additional storage SOP Classes as required for both incoming and outgoing
+  associations separately.
+  Accepting non storage SOP Class presentation contexts is not affected by the
+  selected profiles.
+  Added:   dcmqrdb/etc/dcmqrprf.cfg
+  Affects: dcmqrdb/apps/dcmqrscp.cc
+           dcmqrdb/docs/dcmqrscp.man
+           dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbm.h
+           dcmqrdb/include/dcmtk/dcmqrdb/dcmqropt.h
+           dcmqrdb/include/dcmtk/dcmqrdb/dcmqrsrv.h
+           dcmqrdb/libsrc/dcmqrcbm.cc
+           dcmqrdb/libsrc/dcmqropt.cc
+           dcmqrdb/libsrc/dcmqrsrv.cc
+
+**** Changes from 2017.05.29 (grallert)
+
+- Fixed compiling on Solaris:
+  Changed CMAKE_C_FLAGS and added missing include (netinet/in.h) to dwrap.c.
+  Affects: CMake/dcmtkPrepare.cmake
+           dcmnet/libsrc/dwrap.c
+
+**** Changes from 2017.05.26 (riesmeier)
+
+- Fixed various stylistic issues:
+  Fixed wrong identation, superfluos space characters and CMake commands
+  written in lower case.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+**** Changes from 2017.05.26 (grallert)
+
+- Several fixes for Solaris support:
+  Added required compiler flags and libraries (CMake, Autoconf seemingly already
+  had them). Implemented configuration tests for the libraries similar to the
+  ones Autoconf has.
+  Fixed 'arith.cc': Solaris seemed to reset the signal handlers after every
+  processed signal, they are now always re-enabled as a workaround for that.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/dcmtkPrepare.cmake
+           config/tests/arith.cc
+           ofstd/libsrc/CMakeLists.txt
+
+**** Changes from 2017.05.26 (eichelberg)
+
+- Removed support for HAVE_GUSI_H (MacOS classic):
+  Removed support for the HAVE_GUSI_H macro and the
+  <GUSI.h> header file, which was used in previous releases
+  when compiling on MacOS classic, which is not supported anymore.
+  Closes DCMTK Feature #743.
+  Affects: dcmdata/apps/dcmconv.cc
+           dcmdata/apps/dcmcrle.cc
+           dcmdata/apps/dcmdrle.cc
+           dcmdata/apps/dcmdump.cc
+           dcmdata/apps/dump2dcm.cc
+           dcmdata/apps/pdf2dcm.cc
+           dcmdata/tests/tpath.cc
+           dcmdata/tests/tpread.cc
+           dcmimage/apps/dcm2pnm.cc
+           dcmimage/apps/dcmquant.cc
+           dcmimage/apps/dcmscale.cc
+           dcmimgle/apps/dcmdspfn.cc
+           dcmjpeg/apps/dcmcjpeg.cc
+           dcmjpeg/apps/dcmdjpeg.cc
+           dcmjpls/apps/dcmcjpls.cc
+           dcmjpls/apps/dcmdjpls.cc
+           dcmnet/apps/getscu.cc
+           dcmnet/include/dcmtk/dcmnet/dcompat.h
+           dcmnet/libsrc/dcmtrans.cc
+           dcmnet/libsrc/dul.cc
+           dcmnet/libsrc/dulfsm.cc
+           dcmpstat/apps/dcmmkcrv.cc
+           dcmpstat/apps/dcmmklut.cc
+           dcmpstat/apps/dcmp2pgm.cc
+           dcmpstat/apps/dcmpsmk.cc
+           dcmpstat/apps/dcmpsprt.cc
+           dcmpstat/tests/msgserv.cc
+           dcmqrdb/apps/dcmqridx.cc
+           dcmsign/apps/dcmsign.cc
+           dcmtls/libsrc/tlstrans.cc
+           dcmwlm/tests/wltest.cc
+           ofstd/include/dcmtk/ofstd/ofstd.h
+           ofstd/libsrc/ofstd.cc
+
+**** Changes from 2017.05.26 (grallert)
+
+- Added config test for the feenableexcept function:
+  Added configuration test for the feenableexcept function for Autoconf and
+  CMake.
+  Modified the code to set the respective FPU flags manually if feenableexcept
+  is not available.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+           config/configure
+           config/configure.in
+           config/include/dcmtk/config/osconfig.h.in
+           config/tests/arith.cc
+
+**** Changes from 2017.05.21 (schlamelcher)
+
+- Fixed wrong paths to 'config' dir in CMake scripts.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+**** Changes from 2017.05.19 (onken)
+
+- Fixed compiler warning on integer casting.
+  Affects: dcmiod/libsrc/iodreferences.cc
+
+- Log write errors to error logger:
+  Make sure that errors in elements (e.g. VR violation or missing attribute) are
+  logged to error logger during write process. While reading, the same errors are
+  printed to warning logger (as before).
+  Acknowledgement: This work has been supported in part by the "QIICR" project.
+  Affects: dcmiod/include/dcmtk/dcmiod/iodutil.h
+           dcmiod/libsrc/iodutil.cc
+           dcmiod/libsrc/modbase.cc
+
+**** Changes from 2017.05.17 (schlamelcher)
+
+- Updated copyright notice in recently modified file.
+  Affects: dcmdata/include/dcmtk/dcmdata/dchashdi.h
+
+- Fixed some code relying on C++11 features:
+  The recently introduced configuration tests for several STL features allowed
+  using certain classes like std::tuple and std::error_code that were previously
+  only enabled if C++11 support was enabled.
+  The affected code was refactored to not depend on C++11 features any more
+  (if possible) or wrapped behind #ifdef HAVE_CXX11 with an added fall-back
+  implementation (hybrid between the existing fall-back implementation and using
+  the native STL classes).
+  Affects: ofstd/include/dcmtk/ofstd/oferror.h
+           ofstd/include/dcmtk/ofstd/oftuple.h
+           ofstd/include/dcmtk/ofstd/ofutil.h
+
+- Enhanced recently introduced STL configuration tests:
+  The configuration tests for std::list and std::vector now also ensure that
+  calling x.swap(y) does not invalidate any existing iterators (except for the
+  ones referring to past-the-end) as required by the C++ standard and DCMTK.
+  The configuration test for std::tuple now also ensures that std::tuple
+  can take at least 50 template parameters (same as DCMTK's fall-back
+  implementation) since otherwise DCMTK's fall-back implementation can be
+  considered more mature.
+  Affects: config/tests/list.cc
+           config/tests/tuple.cc
+           config/tests/vector.cc
+
+- Fixed segmentation fault in DcmDataDictionary:
+  Fixed DcmDataDictionary's implementation relied on comparing default
+  constructed iterators, which was undefined behavior prior to C++14.
+  This closes DCMTK bug #755.
+  Affects: dcmdata/include/dcmtk/dcmdata/dchashdi.h
+
+**** Changes from 2017.05.16 (schlamelcher)
+
+- Added configuration options for STL and C++11:
+  Added configuration options for enabling STL and C++11 features for Autoconf
+  and CMake. Enabling the STL will by default enable all separate STL classes
+  (std::vector etc.) and functions, unless the respective switches are
+  set individually. One may also enable only a single STL feature (e.g.
+  std::string) without enabling all of the STL classes. Not all possible
+  combinations may work though!
+  C++11 support can either be enabled or disabled entirely, enabling individual
+  C++11 features while disabling others is currently not supported (and probably
+  never will be).
+  Enabling an STL feature or C++11 will not directly set the respective MACRO
+  (e.g. HAVE_STL_STRING), instead a configuration test will be performed to
+  determine if the compiler provides an implementation that is sufficiently
+  close enough to the C++ standard for DCMTK's requirements. If not, the feature
+  will not be enabled!
+  Enhanced the documentation in config/docs/macros.txt and config/docs/cxx11.dox
+  appropriately for these changes.
+  Tested several plausible combinations auf enabled/disabled STL and C++11
+  features and fixed the affected code as required.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/dcmtkPrepare.cmake
+           CMake/osconfig.h.in
+           INSTALL
+           config/configure
+           config/configure.in
+           config/docs/cxx11.dox
+           config/docs/macros.txt
+           config/include/dcmtk/config/osconfig.h.in
+           ofstd/include/dcmtk/ofstd/oflimits.h
+           ofstd/include/dcmtk/ofstd/ofutil.h
+           ofstd/libsrc/ofstd.cc
+
+**** Changes from 2017.05.16 (hasenpusch)
+
+- Renamed several HAVE_ macros for better consistency:
+  Renamed several macros like HAVE_STD_STRING -> HAVE_STL_STRING for better
+  consistency, primarily DCMTK_USE_CXX11_STL -> HAVE_CXX11.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcmatch.h
+           dcmdata/include/dcmtk/dcmdata/dcspchrs.h
+           dcmiod/include/dcmtk/dcmiod/iodimage.h
+           dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h
+           ofstd/include/dcmtk/ofstd/ofalgo.h
+           ofstd/include/dcmtk/ofstd/ofalign.h
+           ofstd/include/dcmtk/ofstd/ofchrenc.h
+           ofstd/include/dcmtk/ofstd/ofdefine.h
+           ofstd/include/dcmtk/ofstd/oferror.h
+           ofstd/include/dcmtk/ofstd/oflimits.h
+           ofstd/include/dcmtk/ofstd/oflist.h
+           ofstd/include/dcmtk/ofstd/ofmap.h
+           ofstd/include/dcmtk/ofstd/ofmem.h
+           ofstd/include/dcmtk/ofstd/ofoption.h
+           ofstd/include/dcmtk/ofstd/ofstack.h
+           ofstd/include/dcmtk/ofstd/ofstream.h
+           ofstd/include/dcmtk/ofstd/ofstring.h
+           ofstd/include/dcmtk/ofstd/oftraits.h
+           ofstd/include/dcmtk/ofstd/oftuple.h
+           ofstd/include/dcmtk/ofstd/oftypes.h
+           ofstd/include/dcmtk/ofstd/ofutil.h
+           ofstd/include/dcmtk/ofstd/ofvector.h
+           ofstd/include/dcmtk/ofstd/ofvriant.h
+           ofstd/libsrc/oferror.cc
+           ofstd/libsrc/ofstd.cc
+           ofstd/libsrc/ofstring.cc
+           ofstd/tests/toption.cc
+
+**** Changes from 2017.05.16 (schlamelcher)
+
+- Moved config/arith.cc to config/tests/arith.c:
+  Moved config/arith.cc to the recently introduced 'tests' subdirectory for
+  consistency with the other C++ source file based configuration tests.
+  Added:   config/tests/arith.cc
+  Removed: config/arith.cc
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           config/Makefile.in
+
+**** Changes from 2017.05.16 (hasenpusch)
+
+- Added feature test files for STL and C++11 support:
+  Added several C++ source files to the 'config' module (new sub directory
+  'tests') that will be used for implementing configuration checks for several
+  C++ STL features and C++11 support by Autoconf and CMake.
+  Also added stdcxx.m4 script that will be used by Autoconf to configure C++11
+  settings.
+  Added:   config/stdcxx.m4
+           config/tests/algo.cc
+           config/tests/cxx11.cc
+           config/tests/limits.cc
+           config/tests/list.cc
+           config/tests/map.cc
+           config/tests/memory.cc
+           config/tests/stack.cc
+           config/tests/string.cc
+           config/tests/syserr.cc
+           config/tests/ttraits.cc
+           config/tests/tuple.cc
+           config/tests/vector.cc
+
+**** Changes from 2017.05.05 (onken)
+
+- Added OB/OW-related comparison operators:
+  Added comparsion() method to all OB/OW-based classes that usually deal
+  with pixel data. So far, elements instantiated into such classes used
+  the inherited compare() method from DcmElement and thus also returned
+  equality if only tag and (E)VR have been identical, without even looking
+  into the values.
+  The new method uses the DcmElement check, and then compares the values
+  in a meaningful way.
+  For compressed data, equality is only returned if both elements do have
+  native pixel data which is identical, or the have same current
+  representation (compressed pixel data), i.e. the same transfer syntax,
+  the same number of pixel items, with the same values (compared bytewise).
+  If both elements do have the same representations (besides others) but
+  those are not the current ones, the comparison will not return equality.
+  Extended test for all data types (VRs) now offering the compare() method.
+  This closes DCMTK Bug #674.
+  Acknowledgement: This work has been supported in part by the "QIICR" project.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcpixseq.h
+           dcmdata/include/dcmtk/dcmdata/dcvrobow.h
+           dcmdata/include/dcmtk/dcmdata/dcvrpobw.h
+           dcmdata/libsrc/dcpixel.cc
+           dcmdata/libsrc/dcvrobow.cc
+           dcmdata/libsrc/dcvrpobw.cc
+           dcmdata/tests/tvrcomp.cc
+
+- First check number of components before value:
+  compare() was changed to first check the number of values of an element
+  instead of first comparing the values. The reason is that it takes
+  significantly more effort to compare the values which is often not
+  necessary if the number of components is different anyway. This is
+  especially useful for large binary values (like pixel data). The
+  following commit will introduced specific comparsion operators for such
+  elements.
+  This might result in calls to compare() that now return -1 that earlier
+  returned 1, and vice versa. This is not considered harmful since the
+  functionality is quite new in DCMTK, and the majority of use cases would
+  only check whether two elements are equal (0 returned) or not. The new
+  implementation will never return equality (0) where it earlier returned
+  -1 or 1.
+  Acknowledgement: This work has been supported in part by the "QIICR" project.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcbytstr.h
+           dcmdata/include/dcmtk/dcmdata/dcelem.h
+           dcmdata/include/dcmtk/dcmdata/dcitem.h
+           dcmdata/include/dcmtk/dcmdata/dcpixel.h
+           dcmdata/include/dcmtk/dcmdata/dcsequen.h
+           dcmdata/include/dcmtk/dcmdata/dcvrat.h
+           dcmdata/include/dcmtk/dcmdata/dcvrfl.h
+           dcmdata/include/dcmtk/dcmdata/dcvrsl.h
+           dcmdata/include/dcmtk/dcmdata/dcvrss.h
+           dcmdata/include/dcmtk/dcmdata/dcvrul.h
+           dcmdata/include/dcmtk/dcmdata/dcvrus.h
+           dcmdata/libsrc/dcbytstr.cc
+           dcmdata/libsrc/dcitem.cc
+           dcmdata/libsrc/dcsequen.cc
+           dcmdata/libsrc/dcvrat.cc
+           dcmdata/libsrc/dcvrfd.cc
+           dcmdata/libsrc/dcvrfl.cc
+           dcmdata/libsrc/dcvrsl.cc
+           dcmdata/libsrc/dcvrss.cc
+           dcmdata/libsrc/dcvrul.cc
+           dcmdata/libsrc/dcvrus.cc
+
+- Fixed check for transcoding, added documentation:
+  Fixed code that checks whether transcoding from one compressed transfer
+  syntax to another is possible. Added some comments for clarity.
+  Affects: dcmdata/libsrc/dcpixel.cc
+
+**** Changes from 2017.05.02 (schlamelcher)
+
+- Hid some Visual Studio warnings regarding libxml:
+  Added compiler definition -DLIBXML_STATIC for linking libxmlXXX.lib under
+  Visual Studio without warnings (this even applies when linking the libxml
+  DLL, since it is linked using the static helper libraries).
+  This closes DCMTK bug #741.
+  Affects: CMake/3rdparty.cmake
+
+**** Changes from 2017.05.02 (grallert)
+
+- Added some Attributes to DcmItem::checkAndUpdateVR():
+  Added detection for
+   DCM_ChannelMinimumValue, DCM_ChannelMaximumValue,
+   DCM_SmallestImagePixelValue, DCM_LargestImagePixelValue,
+   DCM_SmallestPixelValueInSeries, DCM_LargestPixelValueInSeries,
+   DCM_LUTDescriptor, DCM_RealWorldValueLastValueMapped and
+   DCM_RealWorldValueFirstValueMapped
+  when read in implicit mode to set correct VR.
+  This closes DCMTK bug #370.
+  Affects: dcmdata/libsrc/dcitem.cc
+
+**** Changes from 2017.05.02 (riesmeier)
+
+- Added unsigned suffix to large decimal constants:
+  Added suffix "U" (for unsigned integer) to very large decimal constants
+  in order to avoid the warning message "this decimal constant is unsigned
+  only in ISO C90" reported by gcc 3.9.2.
+  Affects: dcmdata/libsrc/dcvr.cc
+
+**** Changes from 2017.05.01 (eichelberg)
+
+- Fixed handling of EINTR in networkDataAvailable():
+  networkDataAvailable() and selectReadableAssociation() in class DcmTCPConnection
+  now properly handle interruptions of the select() call through signal handlers,
+  i.e. they restart the select() call with an updated timeout parameter.
+  Thanks to DCMTK forum user "michael12345" for the bug report and patch.
+  This closes DCMTK bug #614.
+  Affects: dcmnet/libsrc/dcmtrans.cc
+
+- Converting large attributes to UN in explicit VR:
+  When writing in explicit VR, some VRs are encoded with a 2-byte length field,
+  whereas other VRs are encoded with a 4-byte length field. When writing
+  implicit VR, all length fields are always encoded with 4 bytes. In some
+  cases attribute values of the affected VRs may be larger than 64 kBytes,
+  in which case the dataset can be represented in implicit VR, but not in
+  explicit VR. Instead of refusing to write such datasets in explicit VR,
+  DCMTK now automatically converts the affected attributes to UN
+  (or, when generation of post-1993 VRs is disabled, to OB).
+  This implements DICOM CP 1066 and closes DCMTK issue #331.
+  Affects: dcmdata/libsrc/dcelem.cc
+           dcmdata/libsrc/dcobject.cc
+
+- Removed unused variables.
+  Affects: dcmdata/libsrc/cmdlnarg.cc
+
+**** Changes from 2017.04.28 (onken)
+
+- Suppress error message for missing segm. types:
+  Suppress error message for missing Segmentation Fractional Type and
+  Segmentation Type. Before, an error was printed while reading if one
+  of the attributes was missing. Howeer, since both attributes are of
+  type 1C, this is not necessarily an error.
+  Affects: dcmseg/include/dcmtk/dcmseg/segdoc.h
+           dcmseg/libsrc/segdoc.cc
+
+- Fixed write transfer syntax and support Deflated:
+  Make sure that uncompressed transfer syntax is written as desired by
+  the user (before Little Endian Explicit has always been written). Also,
+  support Deflated Transfer Syntax when saving Segmentation files if DCMTK
+  has been compiled with ZLIB support. Loading Deflated as been supported
+  before.
+  Affects: dcmseg/libsrc/segdoc.cc
+
+**** Changes from 2017.04.27 (riesmeier)
+
+- Fixed issue with Simplified Adult Echo SR:
+  Fixed issue with Simplified Adult Echo SR not being detected as one of the
+  supported Structured Reporting IODs due to a wrong value of the end of list
+  marker "DT_last".
+  Affects: dcmsr/include/dcmtk/dcmsr/dsrtypes.h
+
+- Fixed documentation and other minor issues.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcvr.h
+           dcmdata/libsrc/dcvr.cc
+
+**** Changes from 2017.04.26 (grallert)
+
+- Enhanced value length information in DcmVR:
+  Corrected wrong maxlength for some VR definitions that previously used
+  DCM_UndefinedLength for specifying unlimited lengths.
+  Added DCMVR_PROP_ISLENGTHINCHAR to specify whether length is given in bytes
+  or characters and isLengthInChar() to query this information.
+  This closes DCMTK bug #590.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcvr.h
+           dcmdata/libsrc/dcvr.cc
+
+**** Changes from 2017.04.25 (riesmeier)
+
+- Fixed inconsistent documentation in man page:
+  Converted additional description of command line option --formatted-code,
+  which is only present in the man page, into a comment.
+  Affects: dcmdata/docs/dcm2json.man
+
+- Removed unused local variable:
+  This avoids a warning message reported by gcc.
+  Affects: dcmwlm/libsrc/wlfsim.cc
+
+**** Changes from 2017.04.25 (grallert)
+
+- Added an argument conflict check for dcm2json:
+  Added a conflict check for --read-dataset and --write-meta, since writing the
+  meta header information requires reading it.
+  Affects: dcmdata/apps/dcm2json.cc
+
+**** Changes from 2017.04.25 (schlamelcher)
+
+- Removed dead code from dcmnet:
+  Removed dead code from 'dcompat.cc' that has been replaced by
+  OFStandard::strerror().
+  Affects: dcmnet/libsrc/dcompat.cc
+
+**** Changes from 2017.04.25 (grallert)
+
+- Enhanced dcm2json application documentation:
+  Added a warning to the description of --write-meta in dcm2json and the
+  manpage. Also changed the description of --formatted-code and --compact-code.
+  Affects: dcmdata/apps/dcm2json.cc
+           dcmdata/docs/dcm2json.man
+
+**** Changes from 2017.04.25 (goldhammer)
+
+- Partially refactored 'errno' usage within dcmnet:
+  Added specialized error code handling for WinSock by using
+  OFStandard::getLastNetworkErrorCode() and the respective WinSock error
+  constants (WSAEINTR) as appropriate within dulfsm.cc.
+  Most of the other files in dcmnet and the rest of DCMTK already have a
+  separate Windows implementation in this regard, so this fixes most of the
+  remaining problems.
+  Affects: dcmnet/libsrc/dulfsm.cc
+
+- Replaced 'errno' with OFStandard::getLast*ErrorCode():
+  Replaced occurrences of 'errno' with the appropriate call to one of the
+  recently introduced methods OFStandard::getLastSystemErrorCode() and
+  OFStandard::getLastNetworkErrorCode().
+  This refactoring should ensure that DCMTK always uses the right source for
+  printing operating system error codes, preventing inappropriate error messages
+  like "error: no error".
+  Major step towards closing DCMTK bug #393.
+  Affects: dcmdata/apps/dump2dcm.cc
+           dcmdata/apps/xml2dcm.cc
+           dcmdata/libsrc/cmdlnarg.cc
+           dcmdata/libsrc/dcddirif.cc
+           dcmdata/libsrc/dcdicdir.cc
+           dcmdata/libsrc/dcdirrec.cc
+           dcmdata/libsrc/dcostrmf.cc
+           dcmdata/libsrc/dcuid.cc
+           dcmdata/libsrc/vrscan.cc
+           dcmnet/include/dcmtk/dcmnet/dcompat.h
+           dcmnet/libsrc/dcompat.cc
+           dcmnet/libsrc/dimse.cc
+           dcmnet/libsrc/dul.cc
+           dcmnet/libsrc/dulfsm.cc
+           dcmqrdb/apps/dcmqrscp.cc
+           dcmqrdb/libsrc/dcmqrcbg.cc
+           dcmqrdb/libsrc/dcmqrcbm.cc
+           dcmqrdb/libsrc/dcmqrdbi.cc
+           dcmqrdb/libsrc/dcmqrsrv.cc
+           dcmwlm/libsrc/wldsfs.cc
+           dcmwlm/tests/wltest.cc
+
+**** Changes from 2017.04.24 (schlamelcher)
+
+- Fixed CMake check for <png.h> resp. <libpng/png.h>:
+  CMake now honors the zlib and libpng include directories while searching for
+  <png.h> and <libpng/png.h>. This fixes detecting these files when they are not
+  in the default include paths (e.g. on Windows).
+  Including <png.h> is preferred, therefore, <libpng/png.h> is not searched for
+  if <png.h> exists. The old CMake code simply did not define HAVE_LIBPNG_PNG_H
+  no matter what, now, it is used as a fallback mechanism if <png.h> is
+  unavailable.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+
+**** Changes from 2017.04.21 (schlamelcher)
+
+- Added some CMake config tests and removed a macro:
+  Added tests for std::nothrow new/delete and the std namespace itself. These
+  have previously been fixed constants in the CMake configuration.
+  Removed macro NO_IOS_BASE_ASSIGN, since copy assignment of std::iostreams is
+  generally a bad idea. The affected code was modified to always operate without
+  assigning iostreams to another (perhaps assigning the underlying streambuffers
+  would be what the author originally intended, but the code should have been
+  dead without anybody noticing it for quite some time now anyway, so removing
+  it should be safe).
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+           config/configure.in
+           config/docs/macros.txt
+           config/include/dcmtk/config/osconfig.h.in
+           dcmdata/libsrc/cmdlnarg.cc
+
+**** Changes from 2017.04.21 (riesmeier)
+
+- Updated latest tested CMake version:
+  Updated information on latest CMake version that has been tested to "3.8.0".
+  Affects: CMake/dcmtkPrepare.cmake
+
+**** Changes from 2017.04.21 (schlamelcher)
+
+- Workaround for Clang regarding OFerror_category:
+  Older versions of Clang did not generate a default constructor for the error
+  category classes introduced by a previous commit but required one for their
+  initialization (seemingly an edge case since they have no data members).
+  Affects: ofstd/libsrc/oferror.cc
+
+**** Changes from 2017.04.20 (riesmeier)
+
+- Fixed non-ASCII character (German umlaut).
+  Affects: CREDITS
+
+**** Changes from 2017.04.20 (schlamelcher)
+
+- Fixed a misplaced dllexport/dllimport declaration.
+  Affects: ofstd/include/dcmtk/ofstd/oferror.h
+           ofstd/libsrc/oferror.cc
+
+**** Changes from 2017.04.20 (eichelberg)
+
+- Updated CREDITS.
+  Affects: CREDITS
+
+**** Changes from 2017.04.20 (riesmeier)
+
+- Added missing object file to Makefile (Autoconf).
+  Affects: ofstd/libsrc/Makefile.in
+
+**** Changes from 2017.04.19 (eichelberg)
+
+- Updated Makefile.
+  Affects: ofstd/tests/Makefile.in
+
+**** Changes from 2017.04.19 (goldhammer)
+
+- Introduced OFerror_code and related functionalities:
+  Introduced OFerror_code, OFerror_category and the functions
+  OFsystem_category() and OFgeneric_category() as portable implementations of
+  C++11's std::error_code etc.
+  Implemented the custom functions OFStandard::getLastSystemErrorCode() and
+  OFStandard::getLastNetworkErrorCode() that return an OFerror_code object
+  referring to the most recent error (using errno, GetLastError() or
+  WSAGetLastError() as appropriate).
+  The returned object can then be used to log the error message in a portable
+  fashion, since the linked OFsystem_category() ensures the use of strerror,
+  strerror_r or FormatMessage() as required by the target platform.
+  Added:   ofstd/include/dcmtk/ofstd/oferror.h
+           ofstd/libsrc/oferror.cc
+           ofstd/tests/terror.cc
+  Affects: ofstd/include/dcmtk/ofstd/ofstd.h
+           ofstd/libsrc/CMakeLists.txt
+           ofstd/libsrc/ofstd.cc
+           ofstd/tests/CMakeLists.txt
+           ofstd/tests/tests.cc
+
+**** Changes from 2017.04.19 (schlamelcher)
+
+- Refactored getMACAddress() and its use:
+  The recently modified getMACAddress() function now uses OFVector for
+  allocating and freeing the buffer memory and has been changed to return not
+  only the MAC address of the first adapter but instead the MAC addresses of all
+  adapters. The function has therefore been renamed to getMACAddresses().
+  The calling code now adds all available MAC addresses to the CRC hash for
+  generating a UUID.
+  Also, a warning message output has been added in case GetAdaptersInfo() fails,
+  to help in case of problems resulting from potential future API changes by
+  Microsoft.
+  Affects: dcmdata/libsrc/dcuid.cc
+
+**** Changes from 2017.04.18 (onken)
+
+- Ensure SPS/RP Description/Code is never empty:
+  Per DICOM standard, either SPS Description or Scheduled Protocol Code, as well
+  as either Requested Procedure Description or Requested Protocol Code must be
+  filled in (type 1C, with the condition that either one of both attributes in
+  each of both cases must be supported). The old code permitted that if the
+  respective sequence is filled in, the description may have an empty value.
+  Now an empty value is forbidden for the descriptions and for the sequences
+  in any case. One of both (for each case)  has to exist with a (non-empty)
+  value.
+  Thanks to Anne-Gaelle Berge <anne-gaelle.berge at kereval.com> for reporting
+  a related issue.
+  This closes DCMTK Bug #472.
+  Affects: dcmwlm/include/dcmtk/dcmwlm/wlfsim.h
+           dcmwlm/libsrc/wlfsim.cc
+
+- Take over charset on import. Minor changes:
+  Take over charset when importing patient/study/series information from existing
+  instance, if desired. Made some bool parameters const. Added / fixed
+  documentation.
+  Affects: dcmiod/include/dcmtk/dcmiod/iodcommn.h
+           dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h
+           dcmiod/libsrc/iodcommn.cc
+           dcmiod/libsrc/iodutil.cc
+
+**** Changes from 2017.04.17 (riesmeier)
+
+- Disabled check of VR for unsupported charsets:
+  Disabled check of value representation (VR) in checkValue() method when
+  using an unsupported character set, i.e. something else than ASCII or
+  Latin-1. This applies to all VR classes derived from DcmCharString: PN,
+  SH, ST, LO, LT, UC, UT.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcvrlo.h
+           dcmdata/include/dcmtk/dcmdata/dcvrlt.h
+           dcmdata/include/dcmtk/dcmdata/dcvrpn.h
+           dcmdata/include/dcmtk/dcmdata/dcvrsh.h
+           dcmdata/include/dcmtk/dcmdata/dcvrst.h
+           dcmdata/include/dcmtk/dcmdata/dcvruc.h
+           dcmdata/include/dcmtk/dcmdata/dcvrut.h
+           dcmdata/libsrc/dcvrlo.cc
+           dcmdata/libsrc/dcvrlt.cc
+           dcmdata/libsrc/dcvrpn.cc
+           dcmdata/libsrc/dcvrsh.cc
+           dcmdata/libsrc/dcvrst.cc
+           dcmdata/libsrc/dcvruc.cc
+           dcmdata/libsrc/dcvrut.cc
+
+- Separated test for dcmGenerateUniqueIdentifier():
+  Created separate source file for recently added regression test of function
+  dcmGenerateUniqueIdentifier() since this has nothing to do with the VR class
+  DcmUniqueIdentifier.
+  Added:   dcmdata/tests/tgenuid.cc
+  Affects: dcmdata/tests/CMakeLists.txt
+           dcmdata/tests/Makefile.in
+           dcmdata/tests/tests.cc
+           dcmdata/tests/tvrui.cc
+
+- Fixed API documentation of newDicomElement():
+  Fixed API documentation of newDicomElement() and newDicomElementWithVR().
+  Affects: dcmdata/include/dcmtk/dcmdata/dcitem.h
+           dcmdata/libsrc/dcitem.cc
+
+**** Changes from 2017.04.17 (eichelberg)
+
+- Fixed private tag issue with dump2dcm and xml2dcm:
+  Fixed an issue causing the VR of private tags to not be properly
+  retained in dump2dcm and xml2dcm introduced by commit ae4ae81.
+  This fixes DCMTK bug #745.
+  Affects: dcmdata/apps/dump2dcm.cc
+           dcmdata/apps/xml2dcm.cc
+           dcmdata/include/dcmtk/dcmdata/dcitem.h
+           dcmdata/libsrc/dcitem.cc
+
+- getMacAddress() on Windows now uses GetAdaptersInfo:
+  The getMacAddress() function, which is used on Windows as part of the
+  UID generation code, is now based on GetAdaptersInfo() instead of the
+  old implementation, which was based on NETBIOS and SNMP and does not
+  work reliably anymore on Windows 10.
+  This closes DCMTK bug #594.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/dcmtkPrepare.cmake
+           dcmdata/libsrc/dcuid.cc
+           dcmdata/tests/tests.cc
+           dcmdata/tests/tvrui.cc
+
+**** Changes from 2017.04.15 (eichelberg)
+
+- Socket handle now always passed as 64-bit on Win32:
+  The network layer now always passes the socket handle as an unsigned 64-bit
+  integer on Win32 platforms when using the multi-process code. The code
+  that reads the socket handle from the pipe in the client process has been
+  moved into a helper function named DUL_readSocketHandleAsForkedChild().
+  Affects: dcmnet/apps/storescp.cc
+           dcmnet/include/dcmtk/dcmnet/cond.h
+           dcmnet/include/dcmtk/dcmnet/dul.h
+           dcmnet/libsrc/cond.cc
+           dcmnet/libsrc/dul.cc
+           dcmwlm/libsrc/wlmactmg.cc
+
+- Prevent infinite loop in DUL_AbortAssociation:
+  Added code to prevent an potential infinite loop in DUL_AbortAssociation()
+  that can occur when garbage is received over the network connection after
+  sending an A-ABORT message. Thanks to Tamas Nemeth for the bug report.
+  This closes DCMTK bug #371.
+  Affects: dcmnet/libsrc/dul.cc
+
+**** Changes from 2017.04.14 (dicom)
+
+- Fixed typo in method name and API docs.
+  Affects: dcmfg/include/dcmtk/dcmfg/fgrealworldvaluemapping.h
+           dcmfg/libsrc/fgrealworldvaluemapping.cc
+
+**** Changes from 2017.04.14 (riesmeier)
+
+- Fixed timezone issue with setISOFormattedTime():
+  Fixed issue with OFTime::setISOFormattedTime() when passing a timezone
+  <= -0800 or >= +0800, because sscanf() interprets a leading 0 as octal
+  number using the conversion pattern "%i". Also added a regression test.
+  Thanks to forum user "Shaeto" for the report.
+  Affects: ofstd/libsrc/oftime.cc
+           ofstd/tests/tofdatim.cc
+
+**** Changes from 2017.04.14 (eichelberg)
+
+- Now setting LossyImageCompression when decompressing:
+  All DCMTK-based image decompression codecs now insert the attribute
+  LossyImageCompression with a value of 01 when decompressing an image
+  encoded in a lossy transfer syntax. This makes sure that a warning
+  about the reduced image quality remains in the dataset even if the
+  encoder did not appropriately create it.
+  This closes DCMTK feature #307.
+  Affects: dcmjpeg/include/dcmtk/dcmjpeg/djcodecd.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djdecbas.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djdecext.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djdeclol.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djdecpro.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djdecsps.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djdecsv1.h
+           dcmjpeg/libsrc/djcodecd.cc
+           dcmjpeg/libsrc/djdecbas.cc
+           dcmjpeg/libsrc/djdecext.cc
+           dcmjpeg/libsrc/djdeclol.cc
+           dcmjpeg/libsrc/djdecpro.cc
+           dcmjpeg/libsrc/djdecsps.cc
+           dcmjpeg/libsrc/djdecsv1.cc
+           dcmjpls/include/dcmtk/dcmjpls/djcodecd.h
+           dcmjpls/libsrc/djcodecd.cc
+
+- Updated COPYRIGHT file:
+  The COPYRIGHT file now also includes the license notices of the
+  external libraries that DCMTK can optionally be configured to
+  use, such as zlib, libxml2 and openssl. This is to make sure
+  that the copyright notices remain available to users that only
+  download and install the executable binary package, which does
+  include the COPYRIGHT file.
+  This closes DCMTK bug #384.
+  Affects: COPYRIGHT
+
+**** Changes from 2017.04.14 (riesmeier)
+
+- Enhanced XSD definition of "UniqueIdentifier":
+  Enhanced XML Schema (XSD) definition of the DICOM value representation
+  "Unique Identifier" (UI), which was not as strict as possible. Actually,
+  the first component of an OSI Object Identification (numeric form) always
+  starts with "0", "1" or "2" but this is currently not checked in order to
+  accept values that are sometimes used for testing purposes (e.g. "99.xxx").
+  Thanks to Mathieu Malaterre <mathieu.malaterre at gmail.com> for the report
+  and suggested fix.
+  Affects: dcmsr/data/dsr2xml.xsd
+
+**** Changes from 2017.04.14 (eichelberg)
+
+- Fixed conversion of OF/OD to OB in big endian:
+  When the generation of post-1993 VRs is disabled in the parser,
+  OF and OF elements are converted to OB. However, byte order was
+  not handled when writing to Explicit VR Big Endian.
+  This is now fixed for all VRs that are converted to OB.
+  This closes DCMTK bug #554.
+  Affects: dcmdata/libsrc/dcelem.cc
+
+- Added timeout handler to DUL FSM state 5:
+  Added code to handle a timout occuring while the association initiator is
+  waiting for an A-ASSOCIATE-AC or A-ASSOCIATE-RJ PDU.
+  Thanks to Atsushi Suzuki for the suggestion and patch.
+  This closes DCMTK bug #560.
+  Affects: dcmnet/include/dcmtk/dcmnet/dul.h
+           dcmnet/libsrc/dulfsm.cc
+
+**** Changes from 2017.04.13 (schlamelcher)
+
+- Fixed and refactored running the unit tests via CTest:
+  CTest will now always set the environment variable DCMDICTPATH appropriately
+  such that the DICOM dictionaries from the source code folder will be used
+  for running the tests. This prevents the test from failing caused by
+  accidental use of a wrong dictionary or failing to load the dictionary.
+  The test can now be executed via Wine and utilizing the Android emulator
+  again, in both cases now also supporting to run the test in exhaustive mode
+  (via make test-exhaustive etc.) and also correctly setting DCMDICTPATH.
+  For both Android and Wine a CTestCustom.cmake file will be created to ensure:
+  The Android emulator will be started, prepared and stopped as necessary, that
+  is, the unit tests, required shared objects and now also the DICOM
+  dictionaries will be copied to the device before running the tests.
+  DCMDICTPATH and LD_LIBRARY_PATH will be set accordingly on the device during
+  test execution.
+  The Wine variant of the CTestCustom.cmake will ensure that the 'wineserver'
+  process is already running during test execution, preventing CTest from
+  attaching itself to that process leading to unnecessary and annoying wait
+  times before executing the next test.
+  Added:   CMake/CTest/CTestCustomAndroid.cmake.in
+           CMake/CTest/CTestCustomWine.cmake.in
+           CMake/CTest/dcmtkCTestRun.cmake.in
+           CMake/CTest/dcmtkCTestRunWine.cmake.in
+  Removed: CMake/CTest/CTestCustom.cmake
+           CMake/CTest/dcmtkCTestConfig.cmake.in
+           CMake/CTest/dcmtkCTestRun.cmake
+  Affects: CMake/CTest/dcmtkCTestRunAndroid.cmake.in
+           CMake/dcmtkMacros.cmake
+           CMakeLists.txt
+           dcmdata/data/CMakeLists.txt
+
+**** Changes from 2017.04.12 (riesmeier)
+
+- Enhanced XSD definition of "DecimalString":
+  Enhanced XML Schema (XSD) definition of the DICOM value representation
+  "Decimal String" (DS), which did not allow for scientic notation.
+  Thanks to Mathieu Malaterre <mathieu.malaterre at gmail.com> for the report
+  and suggested fix.
+  Affects: dcmsr/data/dsr2xml.xsd
+
+**** Changes from 2017.04.12 (onken)
+
+- Warn if patient name may lead to broken dir name:
+  The option --sort-on-patientname uses the patient name from received files
+  in order to create a storage directory. The dir name is always in ASCII.
+  storescp already defines a mapping from Latin-1 to ASCII. However, if
+  a patient name uses a different character set, the latin-1 mapping is
+  silently performed anyway.
+  The new code does print a warning for cases where the patient name is not
+  in ASCII or latin-1 denoting that the resulting directory name may be broken.
+  Also, the current behaviour is documented.
+  This fixes DCMTK Bug #557.
+  Affects: dcmnet/apps/storescp.cc
+           dcmnet/docs/storescp.man
+
+**** Changes from 2017.04.11 (schlamelcher)
+
+- Fixed and refactored cross compiling for Android:
+  Removed previously introduced CMake function DCMTK_ATEXIT, since the utilized
+  exploit seems to no longer work on newer versions of CMake. The Android
+  emulator instance launched for performing the configuration tests will now
+  only be shut down when/if CMake successfully finishes configuring the DCMTK
+  build. This is hardly ideal, but there does not seem to be a proper solution
+  with newer versions of CMake.
+  Added a configuration test for detecting whether the implementation of 'lockf'
+  that newer versions of Android provide can actually be used, i.e. whether it
+  includes the definition of required macro constants.
+  Fixed two breaking changes regarding the Android emulators command line
+  arguments/handling.
+  Modified accessing the emulator such that all commands will be executed with
+  root access rights as a workaround for emulated devices of newer SDK versions
+  not allowing access to /cache or executing applications on the sdcard.
+  Removed outdated 'android.toolchain.cmake' that no longer works with newer SDK
+  versions. Use the Android cross compiling support included in/provided by
+  CMake version 3.7.2 and later instead!
+  This commit will break running the unit tests on the Android emulator, which
+  will be addressed by a follow-up refactoring of the unit test related CMake
+  configuration.
+  Removed: CMake/android.toolchain.cmake
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/dcmtkMacros.cmake
+           CMake/dcmtkPrepare.cmake
+           CMake/dcmtkUseAndroidSDK.cmake
+           CMakeLists.txt
+
+- Refactored cross compiling support with MinGW/Wine:
+  When cross compiling for Windows using MinGW/Wine, the configuration tests
+  will now run in a specifically prepared wineprefix that is configured for
+  linking the detected/configured MinGW runtime DLLs.
+  The Wine instances will also be spawned as detached processes, with their
+  IO streams redirected to temporary files. This works around a problem where
+  CMake was waiting for the whole 'wineserver' process to shutdown instead of
+  only the spawned application, before continuing the execution. The temporary
+  files will be read and displayed etc. such that the user experience does not
+  change significantly compared to before.
+  This commit will break running the unit tests via Wine, which will be
+  addressed by a follow-up refactoring of the unit test related CMake
+  configuration.
+  Added:   CMake/dcmtkWinePath.reg.in
+  Affects: CMake/dcmtkTryRun.cmake
+           CMake/dcmtkUseWine.cmake
+
+**** Changes from 2017.04.11 (onken)
+
+- Check override keys in img2dcm library code:
+  img2dcm silently ignored errors if override keys defined with the --key
+  option (or by the library user) can neither be parsed to a valid tag nor
+  tag dictionary name. Now the error is handled and returned to the user.
+  Additionally, the related method now uses a unique pointer to ensure that
+  all code paths are cleaning up memory in case of error.
+  This closes DCMTK bug #589.
+  Affects: dcmdata/libi2d/i2d.cc
+
+**** Changes from 2017.04.11 (schlamelcher)
+
+- Fixed a mistake in the code generating arith.h:
+  The configuration test for inspecting the fundamental arithmetic types was
+  written under the wrong assumption that std::isnormal tests for non-subnormal
+  values. Instead isnormal returns true if the value is neither zero, subnormal
+  NaN or infinity.
+  The test now compares the given value with FLT_MIN resp. DBL_MIN instead,
+  which should be more appropriate. Luckily, the results seem to be the same
+  on the platforms we have tested so far.
+  Affects: config/arith.cc
+
+**** Changes from 2017.04.11 (onken)
+
+- Fix backslash quoting for Windows --fork mode:
+  Windows --fork mode in DCMTK sets quotes ("") around each command
+  line argument before providing it to CreateProcess. If the last
+  character in the argument is a backslash, it escaped the following
+  appended quote so that the delimiter of that command line argument
+  was missing.
+  The fix checks whether the last character is a backslash, and if so,
+  escapes it so the finalizing quote stays intact.
+  This closes DCMTK Bug #392.
+  Affects: dcmnet/libsrc/dul.cc
+
+**** Changes from 2017.04.06 (riesmeier)
+
+- Fixed minor issues in manpage:
+  Also reworded recently revised section on "Character Encoding".
+  Affects: dcmdata/docs/dcm2json.man
+
+**** Changes from 2017.04.06 (grallert)
+
+- Fixed the encoding section in dcm2json man page:
+  Removed the encoding table in dcm2json man page and replaced it with a small
+  explanation that dcm2json always tries to output in UTF-8 if possible or in
+  ASCII if not.
+  Affects: dcmdata/docs/dcm2json.man
+
+- Added unique section labels in DCMTK man pages:
+  Replaced identical section, subsection and subsubsection labels with unique
+  labels, which are composed of the application name and the existing labels.
+  Closes DCMTK bug #723.
+  Affects: dcmdata/docs/dcm2json.man
+           dcmdata/docs/dcm2pdf.man
+           dcmdata/docs/dcm2xml.man
+           dcmdata/docs/dcmconv.man
+           dcmdata/docs/dcmcrle.man
+           dcmdata/docs/dcmdrle.man
+           dcmdata/docs/dcmdump.man
+           dcmdata/docs/dcmftest.man
+           dcmdata/docs/dcmgpdir.man
+           dcmdata/docs/dcmodify.man
+           dcmdata/docs/dump2dcm.man
+           dcmdata/docs/img2dcm.man
+           dcmdata/docs/pdf2dcm.man
+           dcmdata/docs/xml2dcm.man
+           dcmimage/docs/dcm2pnm.man
+           dcmimage/docs/dcmquant.man
+           dcmimage/docs/dcmscale.man
+           dcmimgle/docs/dcmdspfn.man
+           dcmimgle/docs/dcod2lum.man
+           dcmimgle/docs/dconvlum.man
+           dcmjpeg/docs/dcmcjpeg.man
+           dcmjpeg/docs/dcmdjpeg.man
+           dcmjpeg/docs/dcmj2pnm.man
+           dcmjpeg/docs/dcmmkdir.man
+           dcmjpls/docs/dcmcjpls.man
+           dcmjpls/docs/dcmdjpls.man
+           dcmjpls/docs/dcml2pnm.man
+           dcmnet/docs/getscu.man
+           dcmnet/docs/movescu.man
+           dcmpstat/docs/dcmmkcrv.man
+           dcmpstat/docs/dcmmklut.man
+           dcmpstat/docs/dcmp2pgm.man
+           dcmpstat/docs/dcmprscp.man
+           dcmpstat/docs/dcmprscu.man
+           dcmpstat/docs/dcmpschk.man
+           dcmpstat/docs/dcmpsmk.man
+           dcmpstat/docs/dcmpsprt.man
+           dcmpstat/docs/dcmpsrcv.man
+           dcmpstat/docs/dcmpssnd.man
+           dcmqrdb/docs/dcmqridx.man
+           dcmqrdb/docs/dcmqrscp.man
+           dcmqrdb/docs/dcmqrti.man
+           dcmrt/docs/drtdump.man
+           dcmsign/docs/dcmsign.man
+           dcmsr/docs/dsr2html.man
+           dcmsr/docs/dsr2xml.man
+           dcmsr/docs/dsrdump.man
+           dcmsr/docs/xml2dsr.man
+           dcmwlm/docs/wlmscpfs.man
+
+**** Changes from 2017.04.04 (schlamelcher)
+
+- Fixed CTest failing tests that did not compile:
+  The previously introduced script based approach to run the unit tests for
+  allowing additional parameters (e.g. -x) caused unit tests to fail if the
+  respective test binary was unavailable instead of the correct and previous
+  behavior to skip them.
+  The respective binaries are now correctly marked as unit test dependency to
+  restore the previous behavior.
+  Affects: CMake/dcmtkMacros.cmake
+
+- Added config tests for including libc.h and math.h:
+  CMake now also determines whether <libc.h> and <math.h> may be included as
+  extern "C" or must be included as C++ headers, instead of hardcoding the
+  results that seem to have worked in the past but were never verified.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+
+- Modified CMake configuration regarding MinGW:
+  CMake now uses the same path and environment separator etc. settings for MinGW
+  as it does for other compilers that target native Windows (e.g. Visual
+  Studio). The only remaining exception now is Cygwin, where the resulting
+  executables are expected to be run in the Cygwin shell.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+**** Changes from 2017.04.04 (riesmeier)
+
+- Fixed issue reading XML template identification:
+  Fixed issue when reading the template identification from XML input (e.g.
+  using xml2dsr). Background: the internal value type "VT_includedTemplate"
+  was mapped to the XML element name "template", which is also used for
+  identifying the SR template in the XML document. Solution: use a different
+  name for the mapping, i.e. something that never occurs in practice.
+  Thanks to Mathieu Malaterre <mathieu.malaterre at gmail.com> for the original
+  report (including sample file and command line call showing this behavior).
+  Affects: dcmsr/libsrc/dsrtypes.cc
+
+**** Changes from 2017.04.03 (schlamelcher)
+
+- Added CMake config tests for int64_t and uint64_t:
+  Added CMake configuration tests for int64_t and uint64_t defining the
+  respective macros HAVE_INT64_T and HAVE_UINT64_T if available.
+  Modified oftypes.h to use HAVE_UINT64_T instead of presuming uint64_t exists
+  when HAVE_INT64_T was defined.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+           ofstd/include/dcmtk/ofstd/oftypes.h
+
+- Added double quotes around paths in CMake files:
+  Added double quotes around paths inside the CMake configuration files to
+  prevent errors resulting from paths that may contain spaces etc.
+  Closes DCMTK bug #633.
+  Affects: CMake/3rdparty.cmake
+           CMake/CheckFunctionWithHeaderExists.cmake
+           CMake/GenerateCMakeExports.cmake
+           CMake/GenerateDCMTKConfigure.cmake
+           CMake/dcmtkAfterModules.cmake
+           CMake/dcmtkMacros.cmake
+           CMake/dcmtkPrepare.cmake
+           CMake/dcmtkTryCompile.cmake
+           CMake/dcmtkTryRun.cmake
+           CMake/dcmtkUseAndroidSDK.cmake
+           CMakeLists.txt
+           config/docs/CMakeLists.txt
+           dcmdata/CMakeLists.txt
+           dcmdata/data/CMakeLists.txt
+           dcmdata/docs/CMakeLists.txt
+           dcmdata/include/CMakeLists.txt
+           dcmdata/libsrc/CMakeLists.txt
+           dcmfg/CMakeLists.txt
+           dcmfg/include/CMakeLists.txt
+           dcmimage/CMakeLists.txt
+           dcmimage/include/CMakeLists.txt
+           dcmimgle/CMakeLists.txt
+           dcmimgle/data/CMakeLists.txt
+           dcmimgle/include/CMakeLists.txt
+           dcmiod/CMakeLists.txt
+           dcmiod/include/CMakeLists.txt
+           dcmjpeg/apps/CMakeLists.txt
+           dcmjpeg/include/CMakeLists.txt
+           dcmjpeg/libsrc/CMakeLists.txt
+           dcmjpls/apps/CMakeLists.txt
+           dcmjpls/include/CMakeLists.txt
+           dcmjpls/libcharls/CMakeLists.txt
+           dcmjpls/libsrc/CMakeLists.txt
+           dcmnet/CMakeLists.txt
+           dcmnet/apps/CMakeLists.txt
+           dcmnet/docs/CMakeLists.txt
+           dcmnet/etc/CMakeLists.txt
+           dcmnet/include/CMakeLists.txt
+           dcmpmap/CMakeLists.txt
+           dcmpmap/include/CMakeLists.txt
+           dcmpstat/CMakeLists.txt
+           dcmpstat/data/CMakeLists.txt
+           dcmpstat/etc/CMakeLists.txt
+           dcmpstat/include/CMakeLists.txt
+           dcmqrdb/CMakeLists.txt
+           dcmqrdb/docs/CMakeLists.txt
+           dcmqrdb/etc/CMakeLists.txt
+           dcmqrdb/include/CMakeLists.txt
+           dcmrt/CMakeLists.txt
+           dcmrt/include/CMakeLists.txt
+           dcmseg/CMakeLists.txt
+           dcmseg/include/CMakeLists.txt
+           dcmsign/CMakeLists.txt
+           dcmsign/include/CMakeLists.txt
+           dcmsr/CMakeLists.txt
+           dcmsr/data/CMakeLists.txt
+           dcmsr/include/CMakeLists.txt
+           dcmtls/CMakeLists.txt
+           dcmtls/docs/CMakeLists.txt
+           dcmtls/include/CMakeLists.txt
+           dcmtract/CMakeLists.txt
+           dcmtract/include/CMakeLists.txt
+           dcmwlm/CMakeLists.txt
+           dcmwlm/apps/CMakeLists.txt
+           dcmwlm/data/CMakeLists.txt
+           dcmwlm/include/CMakeLists.txt
+           doxygen/CMakeLists.txt
+           oflog/CMakeLists.txt
+           oflog/etc/CMakeLists.txt
+           oflog/include/CMakeLists.txt
+           ofstd/CMakeLists.txt
+           ofstd/include/CMakeLists.txt
+           ofstd/tests/CMakeLists.txt
+
+**** Changes from 2017.03.31 (grallert)
+
+- Again, a small fix for HEVC/H.265 commit.
+  Affects: dcmnet/apps/movescu.cc
+           dcmqrdb/libsrc/dcmqrsrv.cc
+
+- Small fix for HEVC/H.265 commit.
+  Affects: dcmnet/apps/movescu.cc
+
+- Added command line options for HEVC/H.265:
+  Added command line options for the two new transfer syntaxes HEVC/H.265 Main
+  Profile and HEVC/H.265 Main 10 Profile introduced by supplement 195.
+  Closes DCMTK conformance #702.
+  Affects: dcmnet/apps/getscu.cc
+           dcmnet/apps/movescu.cc
+           dcmnet/apps/storescp.cc
+           dcmnet/apps/storescu.cc
+           dcmnet/docs/getscu.man
+           dcmnet/docs/movescu.man
+           dcmnet/docs/storescp.man
+           dcmnet/docs/storescu.man
+           dcmqrdb/apps/dcmqrscp.cc
+           dcmqrdb/docs/dcmqrscp.man
+           dcmqrdb/libsrc/dcmqrcbm.cc
+           dcmqrdb/libsrc/dcmqrsrv.cc
+
+**** Changes from 2017.03.30 (schlamelcher)
+
+- Refactored low level network API usage:
+  Created dcmnet header file dntypes.h defining platform independent socket
+  file descriptor/handle data type etc.
+  Added OFStandard::initializeNetwork() and OFStandard::shutdownNetwork().
+  Employed above definitions to replace platform specific networking code
+  everywhere except within oflog.
+  Closes DCMTK feature #451 (again).
+  Added:   dcmnet/include/dcmtk/dcmnet/dntypes.h
+  Affects: dcmdata/libsrc/dcuid.cc
+           dcmdata/libsrc/mkdeftag.cc
+           dcmdata/libsrc/mkdictbi.cc
+           dcmnet/apps/echoscu.cc
+           dcmnet/apps/findscu.cc
+           dcmnet/apps/movescu.cc
+           dcmnet/apps/storescp.cc
+           dcmnet/apps/storescu.cc
+           dcmnet/apps/termscu.cc
+           dcmnet/include/dcmtk/dcmnet/dcmlayer.h
+           dcmnet/include/dcmtk/dcmnet/dcmtrans.h
+           dcmnet/include/dcmtk/dcmnet/dcompat.h
+           dcmnet/include/dcmtk/dcmnet/dul.h
+           dcmnet/libsrc/assoc.cc
+           dcmnet/libsrc/dcmlayer.cc
+           dcmnet/libsrc/dcmtrans.cc
+           dcmnet/libsrc/dcompat.cc
+           dcmnet/libsrc/dfindscu.cc
+           dcmnet/libsrc/dul.cc
+           dcmnet/libsrc/dulextra.cc
+           dcmnet/libsrc/dulfsm.cc
+           dcmnet/libsrc/dulstruc.h
+           dcmnet/libsrc/scp.cc
+           dcmnet/libsrc/scu.cc
+           dcmpstat/apps/dcmprscp.cc
+           dcmpstat/apps/dcmprscu.cc
+           dcmpstat/apps/dcmpschk.cc
+           dcmpstat/apps/dcmpsrcv.cc
+           dcmpstat/apps/dcmpssnd.cc
+           dcmpstat/libsrc/dviface.cc
+           dcmpstat/libsrc/dvpsmsg.cc
+           dcmpstat/libsrc/dvpspr.cc
+           dcmpstat/tests/msgserv.cc
+           dcmqrdb/apps/dcmqrscp.cc
+           dcmqrdb/apps/dcmqrti.cc
+           dcmqrdb/libsrc/dcmqrcbm.cc
+           dcmqrdb/libsrc/dcmqrtis.cc
+           dcmwlm/libsrc/wlmactmg.cc
+           ofstd/include/dcmtk/ofstd/ofstd.h
+           ofstd/libsrc/ofstd.cc
+
+**** Changes from 2017.03.27 (schlamelcher)
+
+- Added configure tests for some reentrant functions:
+  Added configuration tests for some reentrant alternatives for the respective
+  functions for CMake and Autoconf.
+  Adjusted the code using the functions accordingly.
+  Closes DCMTK bug #600.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+           config/configure
+           config/configure.in
+           config/include/dcmtk/config/osconfig.h.in
+           dcmwlm/libsrc/wlfsim.cc
+           ofstd/libsrc/ofstd.cc
+
+- Added test-exhaustive target for CMake:
+  Modified the CMake unit test configuration to allow passing additional
+  arguments via the DCMTK_CTEST_EXTRA_ARGUMENTS environment variable.
+  Added the test-exhaustive and <module>-test-exhaustive targets to run the
+  respective unit tests in exhaustive mode (passing -x to the test executable).
+  Added:   CMake/CTest/dcmtkCTestRun.cmake
+           CMake/CTest/dcmtkCTestRunExhaustive.cmake
+  Affects: CMake/dcmtkMacros.cmake
+           CMakeLists.txt
+           INSTALL
+
+**** Changes from 2017.03.26 (eichelberg)
+
+- DCMTK now uses SOCKET data type on Windows:
+  While Posix systems use an int type to represent network sockets,
+  Win32 uses a type named SOCKET, which is a 64-bit unsigned integer
+  when compiling on x64. DCMTK now properly uses this type.
+  Affects: dcmnet/include/dcmtk/dcmnet/dcmlayer.h
+           dcmnet/include/dcmtk/dcmnet/dcmtrans.h
+           dcmnet/include/dcmtk/dcmnet/dul.h
+           dcmnet/libsrc/assoc.cc
+           dcmnet/libsrc/dcmlayer.cc
+           dcmnet/libsrc/dcmtrans.cc
+           dcmnet/libsrc/dfindscu.cc
+           dcmnet/libsrc/dul.cc
+           dcmnet/libsrc/dulextra.cc
+           dcmnet/libsrc/dulfsm.cc
+           dcmnet/libsrc/dulstruc.h
+           dcmpstat/libsrc/dvpsmsg.cc
+           dcmpstat/tests/msgserv.cc
+           dcmtls/include/dcmtk/dcmtls/tlslayer.h
+           dcmtls/include/dcmtk/dcmtls/tlstrans.h
+           dcmtls/libsrc/tlslayer.cc
+           dcmtls/libsrc/tlstrans.cc
+
+- Explicitly include <winsock2.h> on Windows.
+  Affects: dcmdata/libsrc/dcuid.cc
+           dcmdata/libsrc/mkdeftag.cc
+           dcmdata/libsrc/mkdictbi.cc
+           dcmnet/apps/echoscu.cc
+           dcmnet/apps/findscu.cc
+           dcmnet/apps/movescu.cc
+           dcmnet/apps/storescp.cc
+           dcmnet/apps/storescu.cc
+           dcmnet/apps/termscu.cc
+           dcmnet/libsrc/scp.cc
+           dcmnet/libsrc/scu.cc
+           dcmpstat/apps/dcmprscp.cc
+           dcmpstat/apps/dcmprscu.cc
+           dcmpstat/apps/dcmpschk.cc
+           dcmpstat/apps/dcmpsrcv.cc
+           dcmpstat/apps/dcmpssnd.cc
+           dcmpstat/libsrc/dviface.cc
+           dcmpstat/libsrc/dvpspr.cc
+           dcmqrdb/apps/dcmqrscp.cc
+           dcmqrdb/apps/dcmqrti.cc
+           dcmqrdb/libsrc/dcmqrcbm.cc
+           dcmqrdb/libsrc/dcmqrtis.cc
+           dcmwlm/libsrc/wlmactmg.cc
+           ofstd/libsrc/ofstd.cc
+
+- Fixed server socket options on WIN32:
+  On Windows, the socket option SO_REUSEADDR has different semantics than on
+  Posix systems. Now using SO_EXCLUSIVEADDRUSE when compiling on Windows.
+  This closes DCMTK bug #559.
+  Affects: dcmnet/libsrc/dul.cc
+           dcmpstat/tests/msgserv.cc
+
+**** Changes from 2017.03.24 (riesmeier)
+
+- Removed trailing spaces added by last commit.
+  Affects: dcmsign/libsrc/sicertvf.cc
+
+- Documented new default value of --data-files-path.
+  Affects: dcmwlm/docs/wlmscpfs.man
+
+- Updated Manpage after --write-us has been added.
+  Affects: dcmimage/docs/dcmquant.man
+
+- Documented that --write-ow is now the default.
+  Affects: dcmimage/apps/dcmquant.cc
+
+**** Changes from 2017.03.24 (eichelberg)
+
+- dcmquant now by default generates OW LUT data:
+  dcmquant now by default uses the OW value representation for the generated
+  palette color LUT entries. Using US VR for these elements was retired with
+  CP 143.
+  This closes DCMTK issue #578.
+  Affects: dcmimage/apps/dcmquant.cc
+
+- Changed wlmscpfs default data path to current dir:
+  Changed the default path under which wlmscpfs looks for worklist files to the current directory.
+  This closes DCMTK feature #454.
+  Affects: dcmwlm/apps/wlcefs.cc
+
+- Fixed bug in dcmsign certification validation code:
+  Fixed bug in dcmsign certification validation code that caused a
+  certificate chain to be (incorrectly) accepted when X509_verify_cert()
+  returned a negative number.
+  Thanks to <rlq1969612634 at gmail.com> for the bug report and fix.
+  This closes DCMTK bug #740.
+  Affects: dcmsign/libsrc/sicertvf.cc
+
+**** Changes from 2017.03.24 (schlamelcher)
+
+- Fixed linking some dcmsr unit tests with MSVC:
+  Fixed linking dcmsr_addItems and dcmsr_getItems when building shared libraries
+  (DLLs) with Visual Studio. The tests had previously been disabled when
+  building shared libraries since Visual Studio is unable to handle some of
+  the symbols that are part of the DSRListOfItems template.
+  This workaround employs a dummy class to create specific symbols for the tests
+  only.
+  Closes DCMTK bug #694.
+  Affects: dcmsr/tests/tsrlist.cc
+
+**** Changes from 2017.03.23 (onken)
+
+- Added support for final text CP-1619:
+  CP-1619 changed the attribute for the code segmentation algorithm from "Segment
+  Surface Generation Algorithm Identification Sequence" to the new attribute
+  "Segmentation Algorithm Identification Sequence". Class member and method names
+  now reflect the new attribute.
+  Existing implementations using those methods have to adapt their code.
+  Segmentation objects that use the old sequence attribute will be read
+  successfully, but the algorithm code data will be ignored, i.e. the new
+  implementation does not evaluate the "Segment Surface Generation Algorithm
+  Identification Sequence" any more. Since not many implementations of
+  Segmentation objects can be found so far, only a few users are expected to be
+  affected and those are warned since their existing code does not compile any
+  more.
+  Rationale from the CP:
+  The Segmentation IOD currently only allows specification of algorithm
+  parameters in the Segment Surface Generation Algorithm Identification Sequence.
+  Create a new attribute that is not limited to "Surface Generation" and that may
+  may be used for any segmentation algorithm.
+  Affects: dcmseg/include/dcmtk/dcmseg/segment.h
+           dcmseg/libsrc/segment.cc
+
+**** Changes from 2017.03.23 (schlamelcher)
+
+- Suppressed an inappropriate Visual Studio warning.
+  Affects: dcmdata/libsrc/dcmatch.cc
+
+- Refactored DSRListOfItems::EmptyItem:
+  DSRListOfItems::EmptyItem is now no longer a static member variable but
+  instead a global function template. While there was nothing wrong with the
+  previous approach, the new one will hopefully have better compiler
+  compatibility.
+  Especially Visual Studio and some older versions of Clang have bugs that lead
+  to problems with the previous approach when building shared objects (DLLs).
+  Affects: dcmsr/include/dcmtk/dcmsr/dsrtlist.h
+           dcmsr/libsrc/dsrimgfr.cc
+           dcmsr/libsrc/dsrimgse.cc
+           dcmsr/libsrc/dsrsc3gr.cc
+           dcmsr/libsrc/dsrscogr.cc
+           dcmsr/libsrc/dsrtcodt.cc
+           dcmsr/libsrc/dsrtcosp.cc
+           dcmsr/libsrc/dsrtcoto.cc
+           dcmsr/libsrc/dsrwavch.cc
+
+**** Changes from 2017.03.23 (riesmeier)
+
+- Replaced spaces by tabs in comment header.
+  Affects: dcmdata/data/dicom.dic
+
+- Enhanced logging of interface class DSRDocument:
+  Enhanced logging of main interface class DSRDocument by adding output to
+  the debug logger when creating, reading or writing a DICOM SR document.
+  Affects: dcmsr/include/dcmtk/dcmsr/dsrdoc.h
+           dcmsr/libsrc/dsrdoc.cc
+
+**** Changes from 2017.03.22 (riesmeier)
+
+- Fixed warnings on unused parameters:
+  Fixed warnings on unused parameters (reported by gcc -Wunused-parameter).
+  Affects: dcmdata/libsrc/dcjson.cc
+           ofstd/include/dcmtk/ofstd/ofstd.h
+
+- Removed unused variable "checkAllStrings":
+  Removed unused variable "opt_checkAllStrings" and parameter "checkAllStrings"
+  (reported by gcc -Wunused-parameter).
+  Affects: dcmdata/apps/dcm2json.cc
+
+- Fixed warnings reported by gcc with "-Wshadow":
+  Renamed parameter that shadows a member variable (reported by gcc -Wshadow).
+  Affects: dcmdata/include/dcmtk/dcmdata/dcjson.h
+           dcmdata/libsrc/dcjson.cc
+
+- Fixed warning reported by gcc 4.8.5 (Linux):
+  Fixed warning "comparison between signed and unsigned integer expressions
+  [-Wsign-compare]" reported by gcc 4.8.5 on Linux.
+  Affects: dcmwlm/libsrc/wlfsim.cc
+
+**** Changes from 2017.03.20 (eichelberg)
+
+- Fixed DLL compilation of libcharls.
+  Affects: dcmjpls/libcharls/CMakeLists.txt
+
+**** Changes from 2017.03.19 (eichelberg)
+
+- Fixed warnings reported by VS 2017 x64.
+  Affects: dcmiod/libsrc/iodreferences.cc
+           dcmnet/libsrc/diutil.cc
+
+- Fixed warnings reported by VS 2017 x64.
+  Affects: dcmdata/libi2d/i2djpgs.cc
+           dcmfg/libsrc/fginterface.cc
+           dcmfg/libsrc/fgrealworldvaluemapping.cc
+           dcmfg/libsrc/stackinterface.cc
+           dcmimage/libsrc/diqthash.cc
+           dcmiod/include/dcmtk/dcmiod/iodutil.h
+           dcmiod/libsrc/iodutil.cc
+           dcmiod/libsrc/modimagepixel.cc
+           dcmiod/libsrc/modmultiframedimension.cc
+           dcmiod/libsrc/modusfor.cc
+           dcmjpeg/libsrc/djcodece.cc
+           dcmjpls/libsrc/djcodece.cc
+           dcmnet/apps/storescu.cc
+           dcmnet/libsrc/dcmtrans.cc
+           dcmnet/libsrc/dimstore.cc
+           dcmnet/libsrc/dul.cc
+           dcmpmap/libsrc/dpmparametricmapiod.cc
+           dcmpstat/apps/dcmpschk.cc
+           dcmpstat/tests/msgserv.cc
+           dcmqrdb/libsrc/dcmqrcbg.cc
+           dcmqrdb/libsrc/dcmqrcbm.cc
+           dcmqrdb/libsrc/dcmqrdbi.cc
+           dcmseg/libsrc/segdoc.cc
+           dcmtract/libsrc/trcstatistic.cc
+           dcmtract/libsrc/trctrack.cc
+           dcmtract/libsrc/trctractographyresults.cc
+           dcmwlm/libsrc/wlds.cc
+           dcmwlm/libsrc/wlfsim.cc
+
+**** Changes from 2017.03.17 (riesmeier)
+
+- Added standard comments to new CMake files:
+  Added standard comments to recently introduced "CMakeLists.txt" files.
+  These comments are used for the CMake file in all "tests" subdirectories.
+  Affects: dcmpstat/tests/CMakeLists.txt
+           dcmwlm/tests/CMakeLists.txt
+
+**** Changes from 2017.03.17 (schlamelcher)
+
+- Added dcmpstat and dcmwlm test applications to CMake:
+  The CMake project configuration now also handles the test folders of dcmpstat
+  and dcmwlm, which contain non unit-test like testing applications for those
+  modules.
+  Added:   dcmpstat/tests/CMakeLists.txt
+           dcmwlm/tests/CMakeLists.txt
+  Affects: dcmpstat/CMakeLists.txt
+           dcmwlm/CMakeLists.txt
+
+- Fixed misleading commit introduced by copy and paste.
+  Affects: CMakeLists.txt
+
+**** Changes from 2017.03.17 (eichelberg)
+
+- Fixed warnings reported by VS 2017 x64.
+  Affects: dcmpstat/include/dcmtk/dcmpstat/dvcache.h
+           dcmpstat/libsrc/dcmpstat.cc
+           dcmpstat/libsrc/dvpscu.cc
+           dcmpstat/libsrc/dvpsgll.cc
+           dcmpstat/libsrc/dvpsgr.cc
+           dcmpstat/libsrc/dvpsmsg.cc
+           dcmpstat/libsrc/dvpssp.cc
+           dcmpstat/libsrc/dvpstat.cc
+           dcmpstat/libsrc/dvpsvw.cc
+
+- Fixed warnings reported by VS 2017 x64.
+  Affects: dcmpstat/apps/dcmmkcrv.cc
+
+**** Changes from 2017.03.17 (schlamelcher)
+
+- Enhanced the way <windows.h> is included:
+  The file <windows.h> is now always included with WIN32_LEAN_AND_MEAN defined,
+  in order to increase the performance of the compilation process.
+  In some cases specific Winsock functions are used, which only works when
+  WIN32_LEAN_AND_MEAN is not defined while including <windows.h>. All these
+  occurrences are now consistently marked with '#undef WIN32_LEAN_AND_MEAN' and
+  an appropriate comment.
+  Closes DCMTK feature #451.
+  Affects: dcmdata/libsrc/dcuid.cc
+           dcmdata/libsrc/mkdeftag.cc
+           dcmdata/libsrc/mkdictbi.cc
+           dcmjpeg/libijg12/jerror.c
+           dcmjpeg/libijg16/jerror.c
+           dcmjpeg/libijg8/jerror.c
+           dcmnet/apps/echoscu.cc
+           dcmnet/apps/movescu.cc
+           dcmnet/apps/storescp.cc
+           dcmnet/apps/storescu.cc
+           dcmnet/apps/termscu.cc
+           dcmnet/include/dcmtk/dcmnet/dcompat.h
+           dcmnet/libsrc/assoc.cc
+           dcmnet/libsrc/dcmtrans.cc
+           dcmnet/libsrc/dul.cc
+           dcmnet/libsrc/dulextra.cc
+           dcmnet/libsrc/dulfsm.cc
+           dcmnet/libsrc/scu.cc
+           dcmpstat/apps/dcmprscu.cc
+           dcmpstat/apps/dcmpschk.cc
+           dcmpstat/libsrc/dviface.cc
+           dcmpstat/libsrc/dvpsmsg.cc
+           dcmqrdb/apps/dcmqrscp.cc
+           dcmqrdb/apps/dcmqrti.cc
+           dcmqrdb/libsrc/dcmqrcbm.cc
+           dcmqrdb/libsrc/dcmqrtis.cc
+           dcmtls/libsrc/tlslayer.cc
+           dcmtls/libsrc/tlstrans.cc
+           dcmwlm/libsrc/wlmactmg.cc
+           ofstd/libsrc/ofstd.cc
+           ofstd/libsrc/ofthread.cc
+           ofstd/libsrc/oftime.cc
+
+**** Changes from 2017.03.17 (eichelberg)
+
+- Fixed policy CMP0017 warning in CMake 3.7.2.
+  Affects: CMakeLists.txt
+
+**** Changes from 2017.03.17 (schlamelcher)
+
+- Fixed problems regarding Windows include magic:
+  Fixed problems caused by the previous commit that replaced OFauto_ptr with
+  OFunique_ptr. The file 'ofmem.h' includes <windows.h> and defines
+  WIN32_LEAN_AND_MEAN, which hides some Winsock functions required by dcmnet
+  and dcmpstat.
+  Explicitly included <windows.h> without defining WIN32_LEAN_AND_MEAN where
+  needed as a workaround.
+  Undefined the 'NEAR' macro from <windows.h> inside libcharls ('header.h'),
+  as a workaround for libcharls using NEAR as variable name etc.
+  Affects: dcmjpls/libcharls/header.h
+           dcmnet/apps/findscu.cc
+           dcmnet/libsrc/dfindscu.cc
+           dcmnet/libsrc/scp.cc
+           dcmnet/libsrc/scu.cc
+           dcmpstat/apps/dcmprscp.cc
+           dcmpstat/apps/dcmpsrcv.cc
+           dcmpstat/apps/dcmpssnd.cc
+           dcmpstat/libsrc/dviface.cc
+           dcmpstat/libsrc/dvpspr.cc
+
+**** Changes from 2017.03.16 (schlamelcher)
+
+- Updated Makefile dependencies.
+  Affects: dcmdata/apps/Makefile.dep
+           dcmdata/libi2d/Makefile.dep
+           dcmdata/libsrc/Makefile.dep
+           dcmdata/tests/Makefile.dep
+           dcmfg/libsrc/Makefile.dep
+           dcmimage/apps/Makefile.dep
+           dcmimage/libsrc/Makefile.dep
+           dcmimgle/apps/Makefile.dep
+           dcmimgle/libsrc/Makefile.dep
+           dcmiod/libsrc/Makefile.dep
+           dcmiod/tests/Makefile.dep
+           dcmjpeg/apps/Makefile.dep
+           dcmjpeg/libsrc/Makefile.dep
+           dcmjpls/apps/Makefile.dep
+           dcmjpls/libcharls/Makefile.dep
+           dcmjpls/libsrc/Makefile.dep
+           dcmnet/apps/Makefile.dep
+           dcmnet/libsrc/Makefile.dep
+           dcmnet/tests/Makefile.dep
+           dcmpmap/libsrc/Makefile.dep
+           dcmpstat/apps/Makefile.dep
+           dcmpstat/libsrc/Makefile.dep
+           dcmpstat/tests/Makefile.dep
+           dcmqrdb/apps/Makefile.dep
+           dcmqrdb/libsrc/Makefile.dep
+           dcmrt/apps/Makefile.dep
+           dcmrt/libsrc/Makefile.dep
+           dcmrt/tests/Makefile.dep
+           dcmseg/libsrc/Makefile.dep
+           dcmseg/tests/Makefile.dep
+           dcmsign/apps/Makefile.dep
+           dcmsign/libsrc/Makefile.dep
+           dcmsr/apps/Makefile.dep
+           dcmsr/libcmr/Makefile.dep
+           dcmsr/libsrc/Makefile.dep
+           dcmsr/tests/Makefile.dep
+           dcmtls/libsrc/Makefile.dep
+           dcmtract/libsrc/Makefile.dep
+           dcmwlm/apps/Makefile.dep
+           dcmwlm/libsrc/Makefile.dep
+           dcmwlm/tests/Makefile.dep
+           oflog/libsrc/Makefile.dep
+
+- Replaced OFauto_ptr with OFunique_ptr:
+  Replaced all occurrences of OFauto_ptr with OFunique_ptr and modified related
+  code according to the changed semantics (employed OFmove where needed etc.).
+  Closes DCMTK feature #537.
+  Removed: ofstd/include/dcmtk/ofstd/ofaptr.h
+  Affects: config/docs/macros.txt
+           dcmfg/libsrc/fginterface.cc
+           dcmjpls/libcharls/decodstr.h
+           dcmjpls/libcharls/encodstr.h
+           dcmjpls/libcharls/header.cc
+           dcmjpls/libcharls/header.h
+           dcmjpls/libcharls/jpegls.cc
+           dcmjpls/libcharls/scan.h
+           dcmpstat/apps/dcmprscp.cc
+           dcmpstat/libsrc/dviface.cc
+           oflog/include/dcmtk/oflog/appender.h
+           oflog/include/dcmtk/oflog/hierarchy.h
+           oflog/include/dcmtk/oflog/oflog.h
+           oflog/include/dcmtk/oflog/spi/factory.h
+           oflog/include/dcmtk/oflog/spi/logevent.h
+           oflog/libsrc/appender.cc
+           oflog/libsrc/hierarchy.cc
+           oflog/libsrc/logevent.cc
+           oflog/libsrc/oflog.cc
+           ofstd/include/dcmtk/ofstd/ofutil.h
+
+**** Changes from 2017.03.16 (eichelberg)
+
+- Minor API change in dcmjpls.
+  Affects: dcmjpls/libsrc/djcodece.cc
+
+**** Changes from 2017.03.15 (schlamelcher)
+
+- Fixed incorrect usage of FindICU.cmake:
+  FindICU.cmake is now used correctly be specifying which components are needed.
+  This works with the FindICU.cmake we provide with the DCMTK and also the newer
+  versions provided by CMake.
+  Affects: CMake/3rdparty.cmake
+
+- Modified config to prefer CMake's own FindXXX modules:
+  Modified the CMake configuration to prefer the FindXXX modules provided by
+  CMake (in ${CMAKE_ROOT}/Modules) instead of the ones we provide with DCMTK,
+  since ours are only meant as a fallback for supporting older CMake versions.
+  Affects: CMake/dcmtkPrepare.cmake
+
+**** Changes from 2017.03.15 (eichelberg)
+
+- JPEG/JPEG-LS padding now uses extended EOI marker:
+  DCMTK now pads JPEG and JPEG-LS bitstreams that have odd length with an
+  "extended" end of image (EOI) marker, writing ff/ff/d9 instead of adding
+  a zero byte after the EOI marker, i.e. writing ff/d9/00. The old behaviour
+  can be restored by defining the macro DISABLE_FF_JPEG_BITSTREAM_PADDING.
+  This implements the following note from DICOM Part 5 Section A.4:
+  "Any necessary padding may be added in the JPEG or JPEG-LS compressed data
+  stream as per ISO 10918-1 and ISO 14495-1 such that the End of Image (EOI)
+  marker ends on an even byte boundary, or may be appended after the EOI
+  marker, depending on the implementation. ISO 10918-1 and ISO 14495-1 define
+  the ability to add any number of padding bytes FFH before any marker (all
+  of which also begin with FFH)."
+  This closes DCMTK bug #658. Thanks to Mathieu Malaterre for the report.
+  Affects: config/docs/macros.txt
+           dcmjpeg/include/dcmtk/dcmjpeg/djutils.h
+           dcmjpeg/libsrc/djeijg12.cc
+           dcmjpeg/libsrc/djeijg16.cc
+           dcmjpeg/libsrc/djeijg8.cc
+           dcmjpeg/libsrc/djutils.cc
+           dcmjpls/include/dcmtk/dcmjpls/djcodece.h
+           dcmjpls/libsrc/djcodece.cc
+
+**** Changes from 2017.03.15 (schlamelcher)
+
+- Fixed build date definition problem regarding Xcode:
+  The compiler definition 'DCMTK_BUILD_DATE' is now differently escaped for
+  Xcode. This affects building DCMTK snapshot packages that set DCMTK_BUILD_DATE
+  to the day on which the snapshot was created. The previous escaping produced
+  unparsable Xcode project files.
+  Closes DCMTK bugs #497 and #651.
+  Affects: CMake/dcmtkPrepare.cmake
+
+**** Changes from 2017.03.15 (eichelberg)
+
+- Fixed bug introduced with commit f58cfe9:
+  Fixed bug introduced with commit f58cfe9 that prevented successful
+  reading of DICOM files without metaheader.
+  Affects: dcmdata/libsrc/dcdatset.cc
+           dcmdata/libsrc/dcfilefo.cc
+
+**** Changes from 2017.03.15 (schlamelcher)
+
+- Fixed inspecting fundamental arithmetic types:
+  CMake will now re-run the inspection of fundamental arithmetic types
+  (configuration test) if the test code ("arith.cc") is newer than the existing
+  "arith.h".
+  This fixes problems with incompatible "arith.h" files in re-used build
+  directories if the configure test code was modified.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+**** Changes from 2017.03.15 (eichelberg)
+
+- Updated API documentation.
+  Affects: ofstd/include/dcmtk/ofstd/ofstd.h
+
+**** Changes from 2017.03.15 (schlamelcher)
+
+- Fixed previous commit support for old CMake versions.
+  Affects: doxygen/CMakeLists.txt
+
+**** Changes from 2017.03.14 (schlamelcher)
+
+- Fixed installing manpages with CMake:
+  CMake now installs manpages from the source code directory unless a newer
+  version of a manpage exists in the build directory. This fixes installing
+  manpages in out-of-source builds in case they are not explicitly generated
+  via 'make man'.
+  Inside source builds are not affected by this modification, since the manpage
+  in the build and source directory are always identical in that case.
+  Futhermore, CMake now omits unwanted directory index manpages generated by
+  doxygen.
+  Affects: doxygen/CMakeLists.txt
+
+**** Changes from 2017.03.14 (eichelberg)
+
+- Parser can now be stopped before a certain tag:
+  Added methods to the dcmdata parser that allow the read process
+  to be stopped before a certain tag is fully processed. This also
+  works if the given tag (which must be on the main dataset level)
+  is not present in file, i.e. no higher tag is parsed/processed.
+  Added --stop-before-elem command line option to dcmdump to
+  enable use of these new methods.
+  This closes DCMTK patch #347. Thanks to Jeroen Eggermont for
+  the suggestion and the (partial) patch.
+  Affects: dcmdata/apps/dcmdump.cc
+           dcmdata/docs/dcmdump.man
+           dcmdata/include/dcmtk/dcmdata/dcdatset.h
+           dcmdata/include/dcmtk/dcmdata/dcfilefo.h
+           dcmdata/include/dcmtk/dcmdata/dcitem.h
+           dcmdata/libsrc/dcdatset.cc
+           dcmdata/libsrc/dcfilefo.cc
+           dcmdata/libsrc/dcitem.cc
+
+**** Changes from 2017.03.14 (goldhammer)
+
+- Fixed OFStandard::atof() not handling "NaN":
+  Handling of "INF" (infinity) was also integrated, because it required almost
+  no additional effort.
+  Closes DCMTK Bug #718.
+  Affects: ofstd/libsrc/ofstd.cc
+           ofstd/tests/tatof.cc
+
+**** Changes from 2017.03.14 (eichelberg)
+
+- Updated macro documentation.
+  Affects: config/docs/macros.txt
+
+**** Changes from 2017.03.13 (riesmeier)
+
+- Fixed indentation and removed trailing spaces.
+  Affects: config/docs/macros.txt
+
+**** Changes from 2017.03.13 (eichelberg)
+
+- OFMutex on Win32 now based on cricital sections:
+  The Win32 version of the OFMutex class now internally uyses critical
+  sections instead of Win32 mutexes, because critical sections are much
+  faster. The macro USE_WIN32_CREATE_MUTEX can be defined to revert to
+  the old implementation.
+  Thanks to Thomas Sondergaard for the suggestion.
+  This closes DCMTK Patch #520.
+  Affects: config/docs/macros.txt
+           ofstd/libsrc/ofthread.cc
+
+**** Changes from 2017.03.13 (riesmeier)
+
+- Updated "dcmrt" classes based on DICOM 2017a:
+  Updated automatically generated IOD and sequence C++ classes for the various
+  RT objects based on the current edition of the DICOM standard (2017a).
+  Added:   dcmrt/include/dcmtk/dcmrt/seq/drtgmcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtgms.h
+           dcmrt/libsrc/drtgmcs.cc
+           dcmrt/libsrc/drtgms.cc
+  Affects: dcmrt/apps/Makefile.dep
+           dcmrt/include/dcmtk/dcmrt/drtdose.h
+           dcmrt/include/dcmtk/dcmrt/drtimage.h
+           dcmrt/include/dcmtk/dcmrt/drtionpl.h
+           dcmrt/include/dcmtk/dcmrt/drtiontr.h
+           dcmrt/include/dcmtk/dcmrt/drtplan.h
+           dcmrt/include/dcmtk/dcmrt/drtstrct.h
+           dcmrt/include/dcmtk/dcmrt/drttreat.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtaadcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtadcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtads.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtafs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtags.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtajcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtas1.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtas5.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtas6.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtas7.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtass.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbads.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbas.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbcps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbl2.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbl5.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbldls.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbldps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtblds1.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtblds5.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtblds6.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbldts.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbrcss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbrdrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtbvcps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcbars.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtccs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcctus.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcdrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtces.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcgis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtchs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcims.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcncs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcos.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcpas.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcpis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcsas.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcshs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcsis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtcss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtdcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtdddps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtddps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtdias.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtdimcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtdimrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtdirs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtdrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtdspcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtdss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtdvhs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtdvrrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drteas.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtecs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtes.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtfds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtfes.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtfgs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtfgss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtfms.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtfsss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtgas.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtgpis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drthsdrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtiais.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtians.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtiblds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtibls.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtibs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drticpds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drticps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtics.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtiis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtipiqs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtircs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtiseis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtitts.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtiwps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtiws.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtlsds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtlsds6.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtlsds7.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtmacds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtmas.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtmdrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtmls.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtmps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtmris.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtmss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtmucs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtoas.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtois.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtopis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtos.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtpbcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtpcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtpcxs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtpdecs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtpdeds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtpfms.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtpics.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtporcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtporis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtppcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtprsis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtpscs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtpsics.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtpss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtpsss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtpvis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtqds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtras.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrbas2.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrbas8.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrbls.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrbos1.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrbos6.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrbos7.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrbs2.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrbs4.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrbs8.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrcdrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrcos.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrcps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrdros.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrdrs1.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrdrs6.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrdrs8.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrecs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrfgs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrfors.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrics.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrims.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtris.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrlsds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrmdrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrms.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrmss6.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrmss7.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrpcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrpis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrppcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrpphs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrpps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrppss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrris1.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrris6.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrris9.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrrms.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrros.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrrpcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrrros.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrrshs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrrtps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrrtps3.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrrtps4.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrrtps5.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrscs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrsers.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrses.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrshs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrshs6.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrshs7.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrsis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrsns.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrsos.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrsrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrsss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrsts.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrtrs2.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrtrs4.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrvis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrws.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtrwvms.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtscris.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtscs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtsdcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtsds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtshds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtsins.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtsis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtsns.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtspccs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtspcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtspgis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtsptcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtssrcs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtssrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtsss.h
+           dcmrt/include/dcmtk/dcmrt/seq/drttms0.h
+           dcmrt/include/dcmtk/dcmrt/seq/drttms9.h
+           dcmrt/include/dcmtk/dcmrt/seq/drttscds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drttsibs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drttsmds.h
+           dcmrt/include/dcmtk/dcmrt/seq/drttts.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtudis.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtvls.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtwps.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtwrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtwrsrs.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtws.h
+           dcmrt/include/dcmtk/dcmrt/seq/drtxrs.h
+           dcmrt/libsrc/CMakeLists.txt
+           dcmrt/libsrc/Makefile.dep
+           dcmrt/libsrc/Makefile.in
+           dcmrt/libsrc/drtaadcs.cc
+           dcmrt/libsrc/drtadcs.cc
+           dcmrt/libsrc/drtads.cc
+           dcmrt/libsrc/drtafs.cc
+           dcmrt/libsrc/drtags.cc
+           dcmrt/libsrc/drtajcs.cc
+           dcmrt/libsrc/drtas1.cc
+           dcmrt/libsrc/drtas5.cc
+           dcmrt/libsrc/drtas6.cc
+           dcmrt/libsrc/drtas7.cc
+           dcmrt/libsrc/drtass.cc
+           dcmrt/libsrc/drtbads.cc
+           dcmrt/libsrc/drtbas.cc
+           dcmrt/libsrc/drtbcps.cc
+           dcmrt/libsrc/drtbl2.cc
+           dcmrt/libsrc/drtbl5.cc
+           dcmrt/libsrc/drtbldls.cc
+           dcmrt/libsrc/drtbldps.cc
+           dcmrt/libsrc/drtblds1.cc
+           dcmrt/libsrc/drtblds5.cc
+           dcmrt/libsrc/drtblds6.cc
+           dcmrt/libsrc/drtbldts.cc
+           dcmrt/libsrc/drtbrcss.cc
+           dcmrt/libsrc/drtbrdrs.cc
+           dcmrt/libsrc/drtbrs.cc
+           dcmrt/libsrc/drtbs.cc
+           dcmrt/libsrc/drtbss.cc
+           dcmrt/libsrc/drtbvcps.cc
+           dcmrt/libsrc/drtcbars.cc
+           dcmrt/libsrc/drtccs.cc
+           dcmrt/libsrc/drtcctus.cc
+           dcmrt/libsrc/drtcdrs.cc
+           dcmrt/libsrc/drtces.cc
+           dcmrt/libsrc/drtcgis.cc
+           dcmrt/libsrc/drtchs.cc
+           dcmrt/libsrc/drtcims.cc
+           dcmrt/libsrc/drtcis.cc
+           dcmrt/libsrc/drtcncs.cc
+           dcmrt/libsrc/drtcos.cc
+           dcmrt/libsrc/drtcpas.cc
+           dcmrt/libsrc/drtcpis.cc
+           dcmrt/libsrc/drtcps.cc
+           dcmrt/libsrc/drtcs.cc
+           dcmrt/libsrc/drtcsas.cc
+           dcmrt/libsrc/drtcshs.cc
+           dcmrt/libsrc/drtcsis.cc
+           dcmrt/libsrc/drtcss.cc
+           dcmrt/libsrc/drtdcs.cc
+           dcmrt/libsrc/drtdddps.cc
+           dcmrt/libsrc/drtddps.cc
+           dcmrt/libsrc/drtdias.cc
+           dcmrt/libsrc/drtdimcs.cc
+           dcmrt/libsrc/drtdimrs.cc
+           dcmrt/libsrc/drtdirs.cc
+           dcmrt/libsrc/drtdose.cc
+           dcmrt/libsrc/drtdrs.cc
+           dcmrt/libsrc/drtds.cc
+           dcmrt/libsrc/drtdspcs.cc
+           dcmrt/libsrc/drtdss.cc
+           dcmrt/libsrc/drtdvhs.cc
+           dcmrt/libsrc/drtdvrrs.cc
+           dcmrt/libsrc/drteas.cc
+           dcmrt/libsrc/drtecs.cc
+           dcmrt/libsrc/drtes.cc
+           dcmrt/libsrc/drtfds.cc
+           dcmrt/libsrc/drtfes.cc
+           dcmrt/libsrc/drtfgs.cc
+           dcmrt/libsrc/drtfgss.cc
+           dcmrt/libsrc/drtfms.cc
+           dcmrt/libsrc/drtfsss.cc
+           dcmrt/libsrc/drtgas.cc
+           dcmrt/libsrc/drtgpis.cc
+           dcmrt/libsrc/drthsdrs.cc
+           dcmrt/libsrc/drtiais.cc
+           dcmrt/libsrc/drtians.cc
+           dcmrt/libsrc/drtiblds.cc
+           dcmrt/libsrc/drtibls.cc
+           dcmrt/libsrc/drtibs.cc
+           dcmrt/libsrc/drticpds.cc
+           dcmrt/libsrc/drticps.cc
+           dcmrt/libsrc/drtics.cc
+           dcmrt/libsrc/drtiis.cc
+           dcmrt/libsrc/drtimage.cc
+           dcmrt/libsrc/drtionpl.cc
+           dcmrt/libsrc/drtiontr.cc
+           dcmrt/libsrc/drtipiqs.cc
+           dcmrt/libsrc/drtircs.cc
+           dcmrt/libsrc/drtiseis.cc
+           dcmrt/libsrc/drtitts.cc
+           dcmrt/libsrc/drtiwps.cc
+           dcmrt/libsrc/drtiws.cc
+           dcmrt/libsrc/drtlsds.cc
+           dcmrt/libsrc/drtlsds6.cc
+           dcmrt/libsrc/drtlsds7.cc
+           dcmrt/libsrc/drtmacds.cc
+           dcmrt/libsrc/drtmas.cc
+           dcmrt/libsrc/drtmdrs.cc
+           dcmrt/libsrc/drtmls.cc
+           dcmrt/libsrc/drtmps.cc
+           dcmrt/libsrc/drtmris.cc
+           dcmrt/libsrc/drtmss.cc
+           dcmrt/libsrc/drtmucs.cc
+           dcmrt/libsrc/drtoas.cc
+           dcmrt/libsrc/drtois.cc
+           dcmrt/libsrc/drtopis.cc
+           dcmrt/libsrc/drtos.cc
+           dcmrt/libsrc/drtpbcs.cc
+           dcmrt/libsrc/drtpcs.cc
+           dcmrt/libsrc/drtpcxs.cc
+           dcmrt/libsrc/drtpdecs.cc
+           dcmrt/libsrc/drtpdeds.cc
+           dcmrt/libsrc/drtpfms.cc
+           dcmrt/libsrc/drtpics.cc
+           dcmrt/libsrc/drtplan.cc
+           dcmrt/libsrc/drtporcs.cc
+           dcmrt/libsrc/drtporis.cc
+           dcmrt/libsrc/drtppcs.cc
+           dcmrt/libsrc/drtprsis.cc
+           dcmrt/libsrc/drtpscs.cc
+           dcmrt/libsrc/drtpsics.cc
+           dcmrt/libsrc/drtpss.cc
+           dcmrt/libsrc/drtpsss.cc
+           dcmrt/libsrc/drtpvis.cc
+           dcmrt/libsrc/drtqds.cc
+           dcmrt/libsrc/drtras.cc
+           dcmrt/libsrc/drtrbas2.cc
+           dcmrt/libsrc/drtrbas8.cc
+           dcmrt/libsrc/drtrbls.cc
+           dcmrt/libsrc/drtrbos1.cc
+           dcmrt/libsrc/drtrbos6.cc
+           dcmrt/libsrc/drtrbos7.cc
+           dcmrt/libsrc/drtrbs2.cc
+           dcmrt/libsrc/drtrbs4.cc
+           dcmrt/libsrc/drtrbs8.cc
+           dcmrt/libsrc/drtrcdrs.cc
+           dcmrt/libsrc/drtrcos.cc
+           dcmrt/libsrc/drtrcps.cc
+           dcmrt/libsrc/drtrcs.cc
+           dcmrt/libsrc/drtrdros.cc
+           dcmrt/libsrc/drtrdrs1.cc
+           dcmrt/libsrc/drtrdrs6.cc
+           dcmrt/libsrc/drtrdrs8.cc
+           dcmrt/libsrc/drtrds.cc
+           dcmrt/libsrc/drtrecs.cc
+           dcmrt/libsrc/drtrfgs.cc
+           dcmrt/libsrc/drtrfors.cc
+           dcmrt/libsrc/drtrics.cc
+           dcmrt/libsrc/drtrims.cc
+           dcmrt/libsrc/drtris.cc
+           dcmrt/libsrc/drtrlsds.cc
+           dcmrt/libsrc/drtrmdrs.cc
+           dcmrt/libsrc/drtrms.cc
+           dcmrt/libsrc/drtrmss6.cc
+           dcmrt/libsrc/drtrmss7.cc
+           dcmrt/libsrc/drtrpcs.cc
+           dcmrt/libsrc/drtrpis.cc
+           dcmrt/libsrc/drtrppcs.cc
+           dcmrt/libsrc/drtrpphs.cc
+           dcmrt/libsrc/drtrpps.cc
+           dcmrt/libsrc/drtrppss.cc
+           dcmrt/libsrc/drtrps.cc
+           dcmrt/libsrc/drtrris1.cc
+           dcmrt/libsrc/drtrris6.cc
+           dcmrt/libsrc/drtrris9.cc
+           dcmrt/libsrc/drtrrms.cc
+           dcmrt/libsrc/drtrros.cc
+           dcmrt/libsrc/drtrrpcs.cc
+           dcmrt/libsrc/drtrrros.cc
+           dcmrt/libsrc/drtrrs.cc
+           dcmrt/libsrc/drtrrshs.cc
+           dcmrt/libsrc/drtrrtps.cc
+           dcmrt/libsrc/drtrrtps3.cc
+           dcmrt/libsrc/drtrrtps4.cc
+           dcmrt/libsrc/drtrrtps5.cc
+           dcmrt/libsrc/drtrscs.cc
+           dcmrt/libsrc/drtrsers.cc
+           dcmrt/libsrc/drtrses.cc
+           dcmrt/libsrc/drtrshs.cc
+           dcmrt/libsrc/drtrshs6.cc
+           dcmrt/libsrc/drtrshs7.cc
+           dcmrt/libsrc/drtrsis.cc
+           dcmrt/libsrc/drtrsns.cc
+           dcmrt/libsrc/drtrsos.cc
+           dcmrt/libsrc/drtrsrs.cc
+           dcmrt/libsrc/drtrss.cc
+           dcmrt/libsrc/drtrsss.cc
+           dcmrt/libsrc/drtrsts.cc
+           dcmrt/libsrc/drtrtrs2.cc
+           dcmrt/libsrc/drtrtrs4.cc
+           dcmrt/libsrc/drtrvis.cc
+           dcmrt/libsrc/drtrws.cc
+           dcmrt/libsrc/drtrwvms.cc
+           dcmrt/libsrc/drtscris.cc
+           dcmrt/libsrc/drtscs.cc
+           dcmrt/libsrc/drtsdcs.cc
+           dcmrt/libsrc/drtsds.cc
+           dcmrt/libsrc/drtshds.cc
+           dcmrt/libsrc/drtsins.cc
+           dcmrt/libsrc/drtsis.cc
+           dcmrt/libsrc/drtsns.cc
+           dcmrt/libsrc/drtspccs.cc
+           dcmrt/libsrc/drtspcs.cc
+           dcmrt/libsrc/drtspgis.cc
+           dcmrt/libsrc/drtsptcs.cc
+           dcmrt/libsrc/drtss.cc
+           dcmrt/libsrc/drtssrcs.cc
+           dcmrt/libsrc/drtssrs.cc
+           dcmrt/libsrc/drtsss.cc
+           dcmrt/libsrc/drtstrct.cc
+           dcmrt/libsrc/drttms0.cc
+           dcmrt/libsrc/drttms9.cc
+           dcmrt/libsrc/drttreat.cc
+           dcmrt/libsrc/drttscds.cc
+           dcmrt/libsrc/drttsibs.cc
+           dcmrt/libsrc/drttsmds.cc
+           dcmrt/libsrc/drttts.cc
+           dcmrt/libsrc/drtudis.cc
+           dcmrt/libsrc/drtvls.cc
+           dcmrt/libsrc/drtwps.cc
+           dcmrt/libsrc/drtwrs.cc
+           dcmrt/libsrc/drtwrsrs.cc
+           dcmrt/libsrc/drtws.cc
+           dcmrt/libsrc/drtxrs.cc
+           dcmrt/tests/Makefile.dep
+
+**** Changes from 2017.03.12 (eichelberg)
+
+- Fixed linker warnings reported by VS 2017.
+  Affects: oflog/libsrc/strcloc.cc
+           oflog/libsrc/striconv.cc
+
+- Fixed warnings reported by VS 2017.
+  Affects: dcmqrdb/libsrc/dcmqrdbi.cc
+
+**** Changes from 2017.03.10 (schlamelcher)
+
+- Fixed CMake unit tests when BUILD_APPS was disabled:
+  Unavailable unit tests are now no longer registered, disabling misleading
+  CTest output.
+  Closes DCMTK bugs #586 and #647.
+  Affects: CMake/dcmtkMacros.cmake
+
+**** Changes from 2017.03.10 (riesmeier)
+
+- Updated code definitions for DICOM 2017a:
+  Updated automatically generated code definitions for coding scheme "DCM",
+  "NCIt" and "UMLS" for the 2017a edition of the DICOM standard. For the
+  latter one, there were no changes.
+  Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h
+           dcmsr/include/dcmtk/dcmsr/codes/ncit.h
+           dcmsr/include/dcmtk/dcmsr/codes/umls.h
+
+- Updated data dictionary for DICOM 2017a:
+  Updated data dictionary for the latest edition of the DICOM standard, which
+  has been released today. Since DCMTK's data dictionary was already up-to-date
+  regarding the recently approved Supplements and CPs, there are no changes
+  apart from the "Version" column.
+  Affects: dcmdata/data/dicom.dic
+           dcmdata/include/dcmtk/dcmdata/dcdeftag.h
+           dcmdata/libsrc/dcdictbi.cc
+
+- Re-added call of endOptionBlock():
+  Re-added call of endOptionBlock() at the end of the "write-xfer-xxx" options,
+  which was accidentally removed with commit 2750839.
+  Affects: dcmdata/apps/dcmconv.cc
+
+- Removed trailing spaces.
+  Affects: dcmdata/docs/dcmconv.man
+
+- Fixed copyright date.
+  Affects: dcmdata/tests/tests.cc
+           dcmdata/tests/tvrcomp.cc
+
+**** Changes from 2017.03.10 (eichelberg)
+
+- Added support for writing GE private transfer syntax:
+  dcmconv can now convert image files to the historical private GE
+  implicit VR little endian with big endian pixel data transfer syntax,
+  mostly for testing purposes.
+  Affects: dcmdata/apps/dcmconv.cc
+           dcmdata/docs/dcmconv.man
+
+- Added support for GE private transfer syntax:
+  Added support for the historical GE implicit VR little endian
+  transfer syntax with big endian pixel data. Images encoded in
+  this transfer syntax can now be correctly read and processed.
+  This closes DCMTK bug #686.
+  Affects: dcmdata/libsrc/dcelem.cc
+           dcmdata/libsrc/dcvrpobw.cc
+
+**** Changes from 2017.03.09 (onken)
+
+- Fixed module name in documentation.
+  Affects: dcmdata/tests/tvrcomp.cc
+
+- Allow private tags creation in newDicomElement():
+  Thanks to forum user "Shaeto" for the suggestion and patch.
+  Added:   dcmdata/tests/tnewdcme.cc
+  Affects: dcmdata/include/dcmtk/dcmdata/dcitem.h
+           dcmdata/libsrc/dcitem.cc
+           dcmdata/tests/CMakeLists.txt
+           dcmdata/tests/Makefile.dep
+           dcmdata/tests/Makefile.in
+           dcmdata/tests/tests.cc
+
+**** Changes from 2017.03.08 (onken)
+
+- Fixed wrong buffer size for sprintf:
+  Fixed wrong buffer size allocated for sprintf operation. The old code does not
+  take into account that sprintf needs one extra byte for the \0 byte it
+  automatically appends.
+  Affects: dcmqrdb/libsrc/dcmqrdbi.cc
+
+**** Changes from 2017.03.08 (riesmeier)
+
+- Updated the code meaning of a "UCUM" code:
+  Updated the code meaning of the UCUM code "{counts}/s" in order to be
+  consistent with the latest version of the DICOM standard.
+  Affects: dcmsr/include/dcmtk/dcmsr/codes/ucum.h
+
+- Updated code definitions for "SRT":
+  Manually updated code definitions for the coding scheme "SRT": added code
+  for "Imaging Procedure" and removed retired code for "Liver".
+  Affects: dcmsr/include/dcmtk/dcmsr/codes/srt.h
+
+**** Changes from 2017.03.03 (riesmeier)
+
+- Fixed wrong comment on private GE transfer syntax:
+  Fixed wrong comment on recently introduced private GE transfer syntax.
+  It is almost identical to "Implicit VR Little Endian" and not to
+  "Explicit VR Little Endian" (with the exception of the pixel data).
+  Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h
+
+- Removed redundant "TransferSyntax" suffix:
+  Removed redundant "TransferSyntax" suffix from recently introduced "EXS_..."
+  enum definition. This has already been done for all other definitions back
+  in 2011 (see commit 51535a1).
+  Affects: dcmdata/include/dcmtk/dcmdata/dcxfer.h
+           dcmdata/libsrc/dcxfer.cc
+
+**** Changes from 2017.03.03 (eichelberg)
+
+- Added partial support for GE private transfer syntax:
+  Added partial support for the historical GE implicit VR little endian
+  transfer syntax with big endian pixel data. The transfer syntax
+  UID is now recognized, but correct byte order swapping of pixel data
+  not yet implemented.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h
+           dcmdata/include/dcmtk/dcmdata/dcxfer.h
+           dcmdata/libsrc/dcuid.cc
+           dcmdata/libsrc/dcxfer.cc
+
+- Replaced unlink() with OFStandard::deleteFile():
+  Replaced calls to unlink() with OFStandard::deleteFile().
+  Affects: dcmnet/apps/movescu.cc
+           dcmnet/apps/storescp.cc
+           dcmnet/libsrc/dimstore.cc
+           dcmnet/libsrc/dstorscp.cc
+           dcmnet/libsrc/scu.cc
+           dcmpstat/apps/dcmpsrcv.cc
+           dcmqrdb/libsrc/dcmqrcbs.cc
+           dcmqrdb/libsrc/dcmqrsrv.cc
+
+- Delete partially received DICOM objects after error:
+  Now deleting DICOM files that have been incompletely written during a
+  network receive operation.
+  Thanks to Alexander Haderer <alexander.haderer at loescap.de> for the
+  suggested patch.
+  Closes DCMTK Patch #322.
+  Affects: dcmnet/apps/movescu.cc
+           dcmnet/apps/storescp.cc
+           dcmnet/libsrc/dstorscp.cc
+           dcmnet/libsrc/scu.cc
+           dcmpstat/apps/dcmpsrcv.cc
+           dcmqrdb/libsrc/dcmqrcbs.cc
+
+**** Changes from 2017.03.03 (riesmeier)
+
+- Added comment on "specific character set" options:
+  Added comment on "specific character set" options that they require support
+  from an underlying character encoding library (same as for other tools).
+  Affects: dcmqrdb/docs/dcmqrscp.man
+
+- Manual fixes to data dictionary (DICOM 2017a):
+  Manual fixes to data dictionary according to the draft release of DICOM
+  2017a. Two attributes were wrong in Supplement 131: (0068,62F0) and
+  (0076,0034).
+  Affects: dcmdata/data/dicom.dic
+           dcmdata/include/dcmtk/dcmdata/dcdeftag.h
+           dcmdata/libsrc/dcdictbi.cc
+
+**** Changes from 2017.03.02 (riesmeier)
+
+- Fixed output of network debug information:
+  Fixed output of very low-level debug information in the network routines,
+  e.g. added missing newlines, fixed indentation, added missing typecast.
+  Since this output is usually disabled (for good reasons), a typical toolkit
+  user will not see any difference. Anyway, it might be useful for very deep
+  debugging sessions.
+  Affects: dcmnet/libsrc/assoc.cc
+           dcmnet/libsrc/dul.cc
+
+**** Changes from 2017.03.02 (eichelberg)
+
+- Fixed responding aetitle in ASC_dumpParameters():
+  ASC_dumpParameters() will now always show the responding aetitle
+  to be  identical to the called aetitle. This DICOM rule is enforced
+  in the DUL network layer, but the output of this function showed a
+  different value.
+  This fixes bug #375.
+  Affects: dcmnet/libsrc/assoc.cc
+
+**** Changes from 2017.03.01 (eichelberg)
+
+- Length check for DICOM implementation version name:
+  The maximum length of the implementation version name
+  (16 characters) is now properly enforced and checked.
+  This fixes DCMTK bug #596.
+  Affects: dcmnet/libsrc/assoc.cc
+           dcmnet/libsrc/dimse.cc
+           dcmnet/libsrc/dulfsm.cc
+
+**** Changes from 2017.03.01 (schlamelcher)
+
+- Fixed previous commit:
+  The previous commit would have broken the else case.
+  Affects: dcmqrdb/libsrc/dcmqrdbi.cc
+
+- Fixed dcmqrdb falsely retrying response conversion:
+  The dcmqrdb library does no longer retry response conversion if the fall-back
+  character set and the originally requested one are the same. This is more
+  efficient and prevents duplicated warning output.
+  Affects: dcmqrdb/libsrc/dcmqrdbi.cc
+
+**** Changes from 2017.03.01 (riesmeier)
+
+- Moved dcm2json tool to the top (alphabetic order).
+  Affects: dcmdata/docs/dcmdata.dox
+
+**** Changes from 2017.03.01 (schlamelcher)
+
+- Fixed previous commit:
+  The previous commit would have broken the else case.
+  Affects: dcmqrdb/libsrc/dcmqrdbi.cc
+
+- Fixed dcmqrdb falsely retrying response conversion:
+  The dcmqrdb library does no longer retry response conversion if the fall-back
+  character set and the originally requested one are the same. This is more
+  efficient and prevents duplicated warning output.
+  Affects: dcmqrdb/libsrc/dcmqrdbi.cc
+
+**** Changes from 2017.03.01 (riesmeier)
+
+- Removed outdated comment on DB_FindAttr struct:
+  The "key matching type", specifying which type of matching should be
+  performed, has been removed from DB_FindAttr - so should the comment.
+  Affects: dcmqrdb/libsrc/dcmqrdbi.cc
+
+- Added "Issuer of Patient ID" to documentation:
+  Added Issuer of Patient ID (0010,0021) to the documentation since it was
+  added only recently as a supported Query Key to the implementation (see
+  commit b1f5c6c).
+  Affects: dcmqrdb/docs/dcmqrscp.man
 
 **** Changes from 2017.02.28 (schlamelcher)
 
diff --git a/doxygen/CMakeLists.txt b/doxygen/CMakeLists.txt
index 0a30b1c..68ab259 100644
--- a/doxygen/CMakeLists.txt
+++ b/doxygen/CMakeLists.txt
@@ -6,15 +6,15 @@ IF(DCMTK_WITH_DOXYGEN)
 
   IF(DOXYGEN_EXECUTABLE)
     ADD_CUSTOM_TARGET(DOXYGEN)
-    ADD_CUSTOM_TARGET(html ${DOXYGEN_EXECUTABLE} htmldocs.tmp)
+    ADD_CUSTOM_TARGET(html "${DOXYGEN_EXECUTABLE}" htmldocs.tmp)
     ADD_DEPENDENCIES(DOXYGEN html)
     IF(NOT WIN32) # For Unix systems, also build manpages
-      ADD_CUSTOM_TARGET(man COMMAND ${DOXYGEN_EXECUTABLE} manpages.tmp
-                            COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/manpages/man1/*.man.1
-                            COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/patchman.sh)
+      ADD_CUSTOM_TARGET(man COMMAND "${DOXYGEN_EXECUTABLE}" manpages.tmp
+                            COMMAND rm -f "${CMAKE_CURRENT_BINARY_DIR}/manpages/man1/*.man.1"
+                            COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/patchman.sh")
       ADD_DEPENDENCIES(DOXYGEN man)
-      ADD_CUSTOM_TARGET(man2text COMMAND ${CMAKE_COMMAND} -E make_directory man2text
-                                 COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/man2text.sh)
+      ADD_CUSTOM_TARGET(man2text COMMAND "${CMAKE_COMMAND}" -E make_directory man2text
+                                 COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/man2text.sh")
       ADD_DEPENDENCIES(man2text man)
     ENDIF(NOT WIN32)
   ENDIF(DOXYGEN_EXECUTABLE)
@@ -28,9 +28,9 @@ IF(DCMTK_WITH_DOXYGEN)
   SET(DCMTK_VERSION "${DCMTK_PACKAGE_VERSION}${PACKAGE_VERSION_SUFFIX}")
   SET(DOXYGEN_INPUT_DIR "${CMAKE_SOURCE_DIR}")
   SET(DOXYGEN_DATA_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
-  CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/htmldocs.cfg ${CMAKE_CURRENT_BINARY_DIR}/htmldocs.tmp ESCAPE_QUOTES @ONLY)
+  CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/htmldocs.cfg" "${CMAKE_CURRENT_BINARY_DIR}/htmldocs.tmp" ESCAPE_QUOTES @ONLY)
   IF(NOT WIN32)
-    CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/manpages.cfg ${CMAKE_CURRENT_BINARY_DIR}/manpages.tmp ESCAPE_QUOTES @ONLY)
+    CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/manpages.cfg" "${CMAKE_CURRENT_BINARY_DIR}/manpages.tmp" ESCAPE_QUOTES @ONLY)
   ENDIF(NOT WIN32)
 
   # Make sure these directories exist when we try to install them
@@ -40,16 +40,23 @@ IF(DCMTK_WITH_DOXYGEN)
   ENDIF(NOT WIN32)
 
   # install html docs and manpages
-  INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/htmldocs/ DESTINATION ${DCMTK_INSTALL_HTMDIR} COMPONENT html PATTERN "*.md5" EXCLUDE)
+  INSTALL(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/htmldocs/" DESTINATION "${DCMTK_INSTALL_HTMDIR}" COMPONENT html PATTERN "*.md5" EXCLUDE)
   IF(DCMTK_GENERATE_DOXYGEN_TAGFILE)
-    INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DOXYGEN_TAGFILE} DESTINATION ${DCMTK_INSTALL_DOCDIR} COMPONENT html OPTIONAL)
+    INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${DOXYGEN_TAGFILE}" DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT html OPTIONAL)
   ENDIF(DCMTK_GENERATE_DOXYGEN_TAGFILE)
   IF(NOT WIN32)
-    INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/manpages/ DESTINATION ${DCMTK_INSTALL_MANDIR} COMPONENT man)
+    FILE(GLOB_RECURSE MANPAGES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/manpages/" "${CMAKE_CURRENT_SOURCE_DIR}/manpages/*.1")
+    FOREACH(MANPAGE ${MANPAGES})
+        IF("${CMAKE_CURRENT_SOURCE_DIR}/manpages/${MANPAGE}" IS_NEWER_THAN "${CMAKE_CURRENT_BINARY_DIR}/manpages/${MANPAGE}")
+            GET_FILENAME_COMPONENT(DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/manpages/${MANPAGE}" PATH)
+            FILE(COPY "${CMAKE_CURRENT_SOURCE_DIR}/manpages/${MANPAGE}" DESTINATION "${DESTINATION}")
+        ENDIF()
+    ENDFOREACH()
+    INSTALL(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/manpages/" DESTINATION "${DCMTK_INSTALL_MANDIR}" COMPONENT man PATTERN "*_.1" EXCLUDE)
   ENDIF(NOT WIN32)
 
   # the files in manpages/ and htmldocs/ should be removed by "make clean".
-  SET(make_clean_files ${CMAKE_CURRENT_BINARY_DIR}/htmldocs ${CMAKE_CURRENT_BINARY_DIR}/manpages ${CMAKE_CURRENT_BINARY_DIR}/man2text)
+  SET(make_clean_files "${CMAKE_CURRENT_BINARY_DIR}/htmldocs" "${CMAKE_CURRENT_BINARY_DIR}/manpages" "${CMAKE_CURRENT_BINARY_DIR}/man2text")
   SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${make_clean_files}")
 
   # the created files "htmldocs.tmp" and "manpages.tmp" should be removed with "make distclean",
@@ -60,7 +67,7 @@ ELSE(DCMTK_WITH_DOXYGEN)
 
   # by default, install the pre-defined manpages, i.e. the ones shipped with this package
   IF(NOT WIN32)
-    INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/manpages/ DESTINATION ${DCMTK_INSTALL_MANDIR} COMPONENT man)
+    INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/manpages/" DESTINATION "${DCMTK_INSTALL_MANDIR}" COMPONENT man)
   ENDIF(NOT WIN32)
 
 ENDIF(DCMTK_WITH_DOXYGEN)
diff --git a/doxygen/htmldocs.cfg b/doxygen/htmldocs.cfg
index a90c197..fbc7017 100644
--- a/doxygen/htmldocs.cfg
+++ b/doxygen/htmldocs.cfg
@@ -38,7 +38,7 @@ PROJECT_NAME           = DCMTK
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = "Version @DCMTK_VERSION@ 20170228"
+PROJECT_NUMBER         = "Version @DCMTK_VERSION@"
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
diff --git a/doxygen/manpages.cfg b/doxygen/manpages.cfg
index 03e4f1b..526cdc5 100644
--- a/doxygen/manpages.cfg
+++ b/doxygen/manpages.cfg
@@ -38,7 +38,7 @@ PROJECT_NAME           = "OFFIS DCMTK"
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = "@DCMTK_VERSION@ 20170228"
+PROJECT_NUMBER         = "@DCMTK_VERSION@"
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
diff --git a/doxygen/manpages/man1/dcm2json.1 b/doxygen/manpages/man1/dcm2json.1
index b94c04b..c27e8b6 100644
--- a/doxygen/manpages/man1/dcm2json.1
+++ b/doxygen/manpages/man1/dcm2json.1
@@ -1,4 +1,4 @@
-.TH "dcm2json" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcm2json" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcm2json \- Convert DICOM file and data set to JSON
@@ -93,13 +93,17 @@ input transfer syntax:
 output format:
 
   +fc   --formatted-code
-          output file with human readable formatting (default)
+          enable whitespace formatting (default)
+
+          # prints additional spaces and newlines for increased
+          # readability
 
   -fc   --compact-code
-          output without formatting (single line of code)
+          print only required characters
 
   +m    --write-meta
           write data set with meta information
+          (warning: not conforming to the DICOM standard)
 .fi
 .PP
 .SH "JSON Format"
@@ -112,7 +116,7 @@ The basic structure of the JSON output created from a DICOM file looks like the
     "00080005": {
         "vr": "CS",
         "Value": [
-            "ISO_IR192"
+            "ISO_IR 192"
         ]
     },
     "00080020": {
@@ -268,21 +272,7 @@ Binary data, i\&.e\&. DICOM element values with Value Representations (VR) of OB
 .SH "NOTES"
 .PP
 .SS "Character Encoding"
-The JSON encoding is determined automatically from the DICOM attribute (0008,0005) 'Specific Character Set' using the following mapping:
-.PP
-.PP
-.nf
-ISO Latin 1   "ISO_IR 100"  =>  "UTF-8"
-ISO Latin 2   "ISO_IR 101"  =>  "UTF-8"
-ISO Latin 3   "ISO_IR 109"  =>  "UTF-8"
-ISO Latin 4   "ISO_IR 110"  =>  "UTF-8"
-ISO Latin 5   "ISO_IR 148"  =>  "UTF-8"
-Cyrillic      "ISO_IR 144"  =>  "UTF-8"
-Arabic        "ISO_IR 127"  =>  "UTF-8"
-Greek         "ISO_IR 126"  =>  "UTF-8"
-Hebrew        "ISO_IR 138"  =>  "UTF-8"
-.fi
-.PP
+\fBdcm2json\fP always tries to output in UTF-8 encoding\&. If this is not possible, e\&.g\&. because there is no support for character set conversion, ASCII is used instead (which is a subset of UTF-8)\&.
 .SH "LOGGING"
 .PP
 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 \fI--verbose\fP also informational messages like processing details are reported\&. Option \fI--debug\fP can be used to get more details on the internal activity, e\&.g\&. for debugging purposes\&. Other logging levels can be selected using option \fI--log-level\fP\&. In \fI--qu [...]
diff --git a/doxygen/manpages/man1/dcm2pdf.1 b/doxygen/manpages/man1/dcm2pdf.1
index 6fc6b80..9fdb851 100644
--- a/doxygen/manpages/man1/dcm2pdf.1
+++ b/doxygen/manpages/man1/dcm2pdf.1
@@ -1,4 +1,4 @@
-.TH "dcm2pdf" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcm2pdf" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcm2pdf \- Extract PDF file from DICOM encapsulated PDF
diff --git a/doxygen/manpages/man1/dcm2pnm.1 b/doxygen/manpages/man1/dcm2pnm.1
index fa717ac..90b66dc 100644
--- a/doxygen/manpages/man1/dcm2pnm.1
+++ b/doxygen/manpages/man1/dcm2pnm.1
@@ -1,4 +1,4 @@
-.TH "dcm2pnm" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcm2pnm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcm2pnm \- Convert DICOM images to PGM/PPM, PNG, TIFF or BMP
diff --git a/doxygen/manpages/man1/dcm2xml.1 b/doxygen/manpages/man1/dcm2xml.1
index fb49805..4943546 100644
--- a/doxygen/manpages/man1/dcm2xml.1
+++ b/doxygen/manpages/man1/dcm2xml.1
@@ -1,4 +1,4 @@
-.TH "dcm2xml" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcm2xml" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcm2xml \- Convert DICOM file and data set to XML
diff --git a/doxygen/manpages/man1/dcmcjpeg.1 b/doxygen/manpages/man1/dcmcjpeg.1
index ede78bc..fee8c96 100644
--- a/doxygen/manpages/man1/dcmcjpeg.1
+++ b/doxygen/manpages/man1/dcmcjpeg.1
@@ -1,4 +1,4 @@
-.TH "dcmcjpeg" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmcjpeg" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmcjpeg \- Encode DICOM file to JPEG transfer syntax
@@ -320,7 +320,7 @@ non-standard YCbCr component subsampling (not with +tl):
   # interpretation is encoded as YBR_FULL_422 which violates DICOM rules.
 .fi
 .PP
-.SS "encapsulated pixel data encoding options"
+.SS "encapsulated pixel data encoding options:"
 .PP
 .nf
 encapsulated pixel data fragmentation:
diff --git a/doxygen/manpages/man1/dcmcjpls.1 b/doxygen/manpages/man1/dcmcjpls.1
index a802e25..fe887f9 100644
--- a/doxygen/manpages/man1/dcmcjpls.1
+++ b/doxygen/manpages/man1/dcmcjpls.1
@@ -1,4 +1,4 @@
-.TH "dcmcjpls" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmcjpls" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmcjpls \- Encode DICOM file to JPEG-LS transfer syntax
diff --git a/doxygen/manpages/man1/dcmconv.1 b/doxygen/manpages/man1/dcmconv.1
index 39571ca..ee3df0c 100644
--- a/doxygen/manpages/man1/dcmconv.1
+++ b/doxygen/manpages/man1/dcmconv.1
@@ -1,4 +1,4 @@
-.TH "dcmconv" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmconv" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmconv \- Convert DICOM file encoding
@@ -269,6 +269,10 @@ output transfer syntax:
   +td  --write-xfer-deflated
          write with deflated explicit VR little endian TS
 
+  +tg  --write-xfer-ge
+         write private GE implicit VR little endian
+         with big endian pixel data TS (non-standard)
+
 post-1993 value representations:
 
   +u   --enable-new-vr
diff --git a/doxygen/manpages/man1/dcmcrle.1 b/doxygen/manpages/man1/dcmcrle.1
index 92f515c..e432d92 100644
--- a/doxygen/manpages/man1/dcmcrle.1
+++ b/doxygen/manpages/man1/dcmcrle.1
@@ -1,4 +1,4 @@
-.TH "dcmcrle" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmcrle" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmcrle \- Encode DICOM file to RLE transfer syntax
diff --git a/doxygen/manpages/man1/dcmdjpeg.1 b/doxygen/manpages/man1/dcmdjpeg.1
index da02ea4..001c8ad 100644
--- a/doxygen/manpages/man1/dcmdjpeg.1
+++ b/doxygen/manpages/man1/dcmdjpeg.1
@@ -1,4 +1,4 @@
-.TH "dcmdjpeg" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmdjpeg" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmdjpeg \- Decode JPEG-compressed DICOM file
diff --git a/doxygen/manpages/man1/dcmdjpls.1 b/doxygen/manpages/man1/dcmdjpls.1
index 297f2b4..245cced 100644
--- a/doxygen/manpages/man1/dcmdjpls.1
+++ b/doxygen/manpages/man1/dcmdjpls.1
@@ -1,4 +1,4 @@
-.TH "dcmdjpls" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmdjpls" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmdjpls \- Decode JPEG-LS compressed DICOM file
diff --git a/doxygen/manpages/man1/dcmdrle.1 b/doxygen/manpages/man1/dcmdrle.1
index a8d2958..ec82350 100644
--- a/doxygen/manpages/man1/dcmdrle.1
+++ b/doxygen/manpages/man1/dcmdrle.1
@@ -1,4 +1,4 @@
-.TH "dcmdrle" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmdrle" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmdrle \- Decode RLE-compressed DICOM file
diff --git a/doxygen/manpages/man1/dcmdspfn.1 b/doxygen/manpages/man1/dcmdspfn.1
index 0fd64a9..36a7030 100644
--- a/doxygen/manpages/man1/dcmdspfn.1
+++ b/doxygen/manpages/man1/dcmdspfn.1
@@ -1,4 +1,4 @@
-.TH "dcmdspfn" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmdspfn" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmdspfn \- Export standard display curves to a text file
@@ -51,7 +51,7 @@ dcmfile-in  DICOM input filename to be dumped
          use config file f for the logger
 .fi
 .PP
-.SS "input options"
+.SS "input options (mutually exclusive)"
 .PP
 .nf
   +Im  --monitor-file  [f]ilename: string
diff --git a/doxygen/manpages/man1/dcmdump.1 b/doxygen/manpages/man1/dcmdump.1
index 2684b0e..34aefc1 100644
--- a/doxygen/manpages/man1/dcmdump.1
+++ b/doxygen/manpages/man1/dcmdump.1
@@ -1,4 +1,4 @@
-.TH "dcmdump" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmdump" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmdump \- Dump DICOM file and data set
@@ -212,6 +212,12 @@ other parsing options:
   +st  --stop-after-elem  [t]ag: "gggg,eeee" or dictionary name
          stop parsing after element specified by t
 
+  +sb  --stop-before-elem [t]ag: "gggg,eeee" or dictionary name
+         stop parsing before element specified by t
+
+         # only considers elements on main dataset level and also
+         # works if the given tag is not present in the file
+
 automatic data correction:
 
   +dc  --enable-correction
diff --git a/doxygen/manpages/man1/dcmftest.1 b/doxygen/manpages/man1/dcmftest.1
index dbe7053..2586fd9 100644
--- a/doxygen/manpages/man1/dcmftest.1
+++ b/doxygen/manpages/man1/dcmftest.1
@@ -1,4 +1,4 @@
-.TH "dcmftest" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmftest" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmftest \- Test if file uses DICOM part 10 format
diff --git a/doxygen/manpages/man1/dcmgpdir.1 b/doxygen/manpages/man1/dcmgpdir.1
index b197a48..35ed52a 100644
--- a/doxygen/manpages/man1/dcmgpdir.1
+++ b/doxygen/manpages/man1/dcmgpdir.1
@@ -1,4 +1,4 @@
-.TH "dcmgpdir" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmgpdir" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmgpdir \- Create a general purpose DICOMDIR
diff --git a/doxygen/manpages/man1/dcmj2pnm.1 b/doxygen/manpages/man1/dcmj2pnm.1
index f30c77f..de167d1 100644
--- a/doxygen/manpages/man1/dcmj2pnm.1
+++ b/doxygen/manpages/man1/dcmj2pnm.1
@@ -1,4 +1,4 @@
-.TH "dcmj2pnm" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmj2pnm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmj2pnm \- Convert DICOM images to PGM/PPM, PNG, TIFF, JPEG or BMP
diff --git a/doxygen/manpages/man1/dcml2pnm.1 b/doxygen/manpages/man1/dcml2pnm.1
index 8d9eb94..24df0be 100644
--- a/doxygen/manpages/man1/dcml2pnm.1
+++ b/doxygen/manpages/man1/dcml2pnm.1
@@ -1,4 +1,4 @@
-.TH "dcml2pnm" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcml2pnm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcml2pnm \- Convert DICOM images to PGM/PPM, PNG, TIFF or BMP
diff --git a/doxygen/manpages/man1/dcmmkcrv.1 b/doxygen/manpages/man1/dcmmkcrv.1
index 049918d..a158e7a 100644
--- a/doxygen/manpages/man1/dcmmkcrv.1
+++ b/doxygen/manpages/man1/dcmmkcrv.1
@@ -1,4 +1,4 @@
-.TH "dcmmkcrv" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmmkcrv" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmmkcrv \- Add 2D curve data to image
diff --git a/doxygen/manpages/man1/dcmmkdir.1 b/doxygen/manpages/man1/dcmmkdir.1
index 5faba29..f74b352 100644
--- a/doxygen/manpages/man1/dcmmkdir.1
+++ b/doxygen/manpages/man1/dcmmkdir.1
@@ -1,4 +1,4 @@
-.TH "dcmmkdir" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmmkdir" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmmkdir \- Create a DICOMDIR file
diff --git a/doxygen/manpages/man1/dcmmklut.1 b/doxygen/manpages/man1/dcmmklut.1
index 5f8a9d8..f9c53fa 100644
--- a/doxygen/manpages/man1/dcmmklut.1
+++ b/doxygen/manpages/man1/dcmmklut.1
@@ -1,4 +1,4 @@
-.TH "dcmmklut" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmmklut" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmmklut \- Create DICOM look-up tables
diff --git a/doxygen/manpages/man1/dcmodify.1 b/doxygen/manpages/man1/dcmodify.1
index 70794be..fc1bcbd 100644
--- a/doxygen/manpages/man1/dcmodify.1
+++ b/doxygen/manpages/man1/dcmodify.1
@@ -1,4 +1,4 @@
-.TH "dcmodify" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmodify" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmodify \- Modify DICOM files
diff --git a/doxygen/manpages/man1/dcmp2pgm.1 b/doxygen/manpages/man1/dcmp2pgm.1
index 42b58d7..e11abb2 100644
--- a/doxygen/manpages/man1/dcmp2pgm.1
+++ b/doxygen/manpages/man1/dcmp2pgm.1
@@ -1,4 +1,4 @@
-.TH "dcmp2pgm" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmp2pgm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmp2pgm \- Read DICOM image and presentation state and render bitmap
diff --git a/doxygen/manpages/man1/dcmprscp.1 b/doxygen/manpages/man1/dcmprscp.1
index 7bec28b..ded73b9 100644
--- a/doxygen/manpages/man1/dcmprscp.1
+++ b/doxygen/manpages/man1/dcmprscp.1
@@ -1,4 +1,4 @@
-.TH "dcmprscp" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmprscp" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmprscp \- DICOM basic grayscale print management SCP
diff --git a/doxygen/manpages/man1/dcmprscu.1 b/doxygen/manpages/man1/dcmprscu.1
index 01a5242..dff4f91 100644
--- a/doxygen/manpages/man1/dcmprscu.1
+++ b/doxygen/manpages/man1/dcmprscu.1
@@ -1,4 +1,4 @@
-.TH "dcmprscu" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmprscu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmprscu \- Print spooler for presentation state viewer
diff --git a/doxygen/manpages/man1/dcmpschk.1 b/doxygen/manpages/man1/dcmpschk.1
index 58af085..b74c2f6 100644
--- a/doxygen/manpages/man1/dcmpschk.1
+++ b/doxygen/manpages/man1/dcmpschk.1
@@ -1,4 +1,4 @@
-.TH "dcmpschk" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmpschk" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmpschk \- Checking tool for presentation states
diff --git a/doxygen/manpages/man1/dcmpsmk.1 b/doxygen/manpages/man1/dcmpsmk.1
index 29121a0..d610732 100644
--- a/doxygen/manpages/man1/dcmpsmk.1
+++ b/doxygen/manpages/man1/dcmpsmk.1
@@ -1,4 +1,4 @@
-.TH "dcmpsmk" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmpsmk" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmpsmk \- Create DICOM grayscale softcopy presentation state
@@ -53,7 +53,7 @@ dcmfile-out  DICOM presentation state file to be created
          use config file f for the logger
 .fi
 .PP
-.SS "input options"
+.SS "input optons"
 .PP
 .nf
 input file format:
diff --git a/doxygen/manpages/man1/dcmpsprt.1 b/doxygen/manpages/man1/dcmpsprt.1
index 9be27dd..d57cfd0 100644
--- a/doxygen/manpages/man1/dcmpsprt.1
+++ b/doxygen/manpages/man1/dcmpsprt.1
@@ -1,4 +1,4 @@
-.TH "dcmpsprt" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmpsprt" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmpsprt \- Read DICOM images and presentation states and render print job
diff --git a/doxygen/manpages/man1/dcmpsrcv.1 b/doxygen/manpages/man1/dcmpsrcv.1
index 0a0b14e..9ed5605 100644
--- a/doxygen/manpages/man1/dcmpsrcv.1
+++ b/doxygen/manpages/man1/dcmpsrcv.1
@@ -1,4 +1,4 @@
-.TH "dcmpsrcv" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmpsrcv" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmpsrcv \- Network receive for presentation state viewer
diff --git a/doxygen/manpages/man1/dcmpssnd.1 b/doxygen/manpages/man1/dcmpssnd.1
index 65963a2..70a3f0c 100644
--- a/doxygen/manpages/man1/dcmpssnd.1
+++ b/doxygen/manpages/man1/dcmpssnd.1
@@ -1,4 +1,4 @@
-.TH "dcmpssnd" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmpssnd" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmpssnd \- Network send for presentation state viewer
diff --git a/doxygen/manpages/man1/dcmqridx.1 b/doxygen/manpages/man1/dcmqridx.1
index 62b9248..b1f96b1 100644
--- a/doxygen/manpages/man1/dcmqridx.1
+++ b/doxygen/manpages/man1/dcmqridx.1
@@ -1,4 +1,4 @@
-.TH "dcmqridx" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmqridx" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmqridx \- Register a DICOM image file in an image database index file
diff --git a/doxygen/manpages/man1/dcmqrscp.1 b/doxygen/manpages/man1/dcmqrscp.1
index 8412ebe..c5274b5 100644
--- a/doxygen/manpages/man1/dcmqrscp.1
+++ b/doxygen/manpages/man1/dcmqrscp.1
@@ -1,4 +1,4 @@
-.TH "dcmqrscp" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmqrscp" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmqrscp \- DICOM image archive (central test node)
@@ -173,6 +173,13 @@ restriction of query/retrieve models:
 .SS "network options"
 .PP
 .nf
+association negotiation profiles from configuration file:
+
+  -xf   --assoc-config-file
+          [f]ilename, [i]n-profile, [o]ut-profile: string
+          use profile i from f for incoming associations
+          use profile o from f for outgoing associations
+
 preferred network transfer syntaxes (incoming associations):
 
   +x=   --prefer-uncompr
@@ -226,6 +233,12 @@ preferred network transfer syntaxes (incoming associations):
   +xo   --prefer-mpeg4-2-st
           prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS
 
+  +x4   --prefer-hevc
+          prefer HEVC H.265 Main Profile / Level 5.1 TS
+
+  +x5   --prefer-hevc10
+          prefer HEVC H.265 Main 10 Profile / Level 5.1 TS
+
   +xr   --prefer-rle
           prefer RLE lossless TS
 
@@ -299,6 +312,12 @@ proposed transmission transfer syntaxes (outgoing associations):
   -xo   --propose-mpeg4-2-st
           propose MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS only
 
+  -x4   --propose-hevc
+          propose HEVC H.265 Main Profile / Level 5.1 TS only
+
+  -x5   --propose-hevc10
+          propose HEVC H.265 Main 10 Profile / Level 5.1 TS only
+
   -xr   --propose-rle
           propose RLE lossless TS
           and all uncompressed transfer syntaxes
@@ -440,12 +459,15 @@ deflate compression level (only with --propose-deflated or
           0=uncompressed, 1=fastest, 9=best compression
 
 specific character set:
+
+  # the following options require support from an underlying character
+  # encoding library (see output of --version on which one is available)
+
   +Cr   --use-request-charset
-          try to convert all element values that are
-          affected by Specific Character Set (0008,0005)
-          to the one specified in the request data set,
-          fall back to the one specified via
-          --convert-to-xxx if that is not possible
+          try to convert all element values that are affected by
+          Specific Character Set (0008,0005) to the one specified
+          in the request data set, fall back to the one specified
+          via --convert-to-xxx if that is not possible
           (default, unless overridden by config file)
 
   -Cr   --override-charset
@@ -464,8 +486,8 @@ specific character set:
           convert affected element values to ISO 8859-1
 
   +C    --convert-to-charset  [c]harset: string
-          convert affected element values to the character
-          set specified by the DICOM defined term c
+          convert affected element values to the character set
+          specified by the DICOM defined term c
 
   -Ct   --transliterate
           try to approximate characters that cannot be
@@ -647,11 +669,15 @@ MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax   1.2.840.10008.1.2.4.103
 MPEG4HighProfileLevel4_2_For2DVideoTransferSyntax    1.2.840.10008.1.2.4.104
 MPEG4HighProfileLevel4_2_For3DVideoTransferSyntax    1.2.840.10008.1.2.4.105
 MPEG4StereoHighProfileLevel4_2TransferSyntax         1.2.840.10008.1.2.4.106
+HEVCMainProfileLevel5_1TransferSyntax                1.2.840.10008.1.2.4.107
+HEVCMain10ProfileLevel5_1TransferSyntax              1.2.840.10008.1.2.4.108
 RLELosslessTransferSyntax                            1.2.840.10008.1.2.5
 .fi
 .PP
 .PP
 The \fBdcmqrscp\fP application does not support extended negotiation\&.
+.PP
+Presentation contexts for other SOP Classes may be configured via the \fI--assoc-config-file\fP option by selecting an appropriate profile for outgoing associations\&. The selected profile will completely override the above mentioned default configuration\&.
 .SS "SCP Conformance"
 The \fBdcmqrscp\fP application supports the following SOP Classes as an SCP:
 .PP
@@ -718,7 +744,11 @@ PseudoColorSoftcopyPresentationStateStorage          1.2.840.10008.5.1.4.1.1.11.
 BlendingSoftcopyPresentationStateStorage             1.2.840.10008.5.1.4.1.1.11.4
 XAXRFGrayscaleSoftcopyPresentationStateStorage       1.2.840.10008.5.1.4.1.1.11.5
 GrayscalePlanarMPRVolumetricPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.6
-CompositingPlanarMPRVolumetricPresentationStateStor. 1.2.840.10008.5.1.4.1.1.11.7
+CompositingPlanarMPRVolumetricPresent.StateStorage   1.2.840.10008.5.1.4.1.1.11.7
+AdvancedBlendingPresentationStateStorage             1.2.840.10008.5.1.4.1.1.11.8
+VolumeRenderingVolumetricPresentationStateStorage    1.2.840.10008.5.1.4.1.1.11.9
+SegmentedVolumeRenderingVolumetricPres.StateStorage  1.2.840.10008.5.1.4.1.1.11.10
+MultipleVolumeRenderingVolumetricPres.StateStorage   1.2.840.10008.5.1.4.1.1.11.11
 XRayAngiographicImageStorage                         1.2.840.10008.5.1.4.1.1.12.1
 EnhancedXAImageStorage                               1.2.840.10008.5.1.4.1.1.12.1.1
 XRayRadiofluoroscopicImageStorage                    1.2.840.10008.5.1.4.1.1.12.2
@@ -757,6 +787,8 @@ StereometricRelationshipStorage                      1.2.840.10008.5.1.4.1.1.77.
 OphthalmicTomographyImageStorage                     1.2.840.10008.5.1.4.1.1.77.1.5.4
 WideFieldOphthalmicPhoto.Stereogr.Proj.ImageStorage  1.2.840.10008.5.1.4.1.1.77.1.5.5
 WideFieldOphthalmicPhotogr.3DCoordinatesImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.6
+OphthalmicOpticalCoherenceTomogr.EnFaceImageStorage  1.2.840.10008.5.1.4.1.1.77.1.5.7
+OphthalmicOpticalCoh.Tomogr.BscanVolumeAnalysisStor. 1.2.840.10008.5.1.4.1.1.77.1.5.8
 VLWholeSlideMicroscopyImageStorage                   1.2.840.10008.5.1.4.1.1.77.1.6
 RETIRED_VLMultiFrameImageStorage                     1.2.840.10008.5.1.4.1.1.77.2
 LensometryMeasurementsStorage                        1.2.840.10008.5.1.4.1.1.78.1
@@ -790,6 +822,7 @@ ColonCADSRStorage                                    1.2.840.10008.5.1.4.1.1.88.
 ImplantationPlanSRDocumentStorage                    1.2.840.10008.5.1.4.1.1.88.70
 AcquisitionContextSRStorage                          1.2.840.10008.5.1.4.1.1.88.71
 SimplifiedAdultEchoSRStorage                         1.2.840.10008.5.1.4.1.1.88.72
+PatientRadiationDoseSRStorage                        1.2.840.10008.5.1.4.1.1.88.73
 ContentAssessmentResultsStorage                      1.2.840.10008.5.1.4.1.1.90.1
 EncapsulatedPDFStorage                               1.2.840.10008.5.1.4.1.1.104.1
 EncapsulatedCDAStorage                               1.2.840.10008.5.1.4.1.1.104.2
@@ -798,7 +831,6 @@ LegacyConvertedEnhancedPETImageStorage               1.2.840.10008.5.1.4.1.1.128
 RETIRED_StandalonePETCurveStorage                    1.2.840.10008.5.1.4.1.1.129
 EnhancedPETImageStorage                              1.2.840.10008.5.1.4.1.1.130
 BasicStructuredDisplayStorage                        1.2.840.10008.5.1.4.1.1.131
-CTDefinedProcedureProtocolStorage                    1.2.840.10008.5.1.4.1.1.200.1
 CTPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.2
 RTImageStorage                                       1.2.840.10008.5.1.4.1.1.481.1
 RTDoseStorage                                        1.2.840.10008.5.1.4.1.1.481.2
@@ -858,11 +890,15 @@ MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax   1.2.840.10008.1.2.4.103
 MPEG4HighProfileLevel4_2_For2DVideoTransferSyntax    1.2.840.10008.1.2.4.104
 MPEG4HighProfileLevel4_2_For3DVideoTransferSyntax    1.2.840.10008.1.2.4.105
 MPEG4StereoHighProfileLevel4_2TransferSyntax         1.2.840.10008.1.2.4.106
+HEVCMainProfileLevel5_1TransferSyntax                1.2.840.10008.1.2.4.107
+HEVCMain10ProfileLevel5_1TransferSyntax              1.2.840.10008.1.2.4.108
 RLELosslessTransferSyntax                            1.2.840.10008.1.2.5
 .fi
 .PP
 .PP
 The \fBdcmqrscp\fP application does not support extended negotiation\&.
+.PP
+Presentation contexts for other SOP Classes may be configured via the \fI--assoc-config-file\fP option by selecting an appropriate profile for incoming associations\&. The selected profile will override only the above mentioned storage SOP classes, \fBdcmqrscp\fP will accept contexts with the above mentioned FIND, GET, MOVE and private shutdown SOP Classes additionally to the ones defined in the selected profile\&. Please note that an appropriate profile for \fBrole negotiation\fP must b [...]
 .SS "Query Keys"
 The \fBdcmqrscp\fP application supports the following attributes as query keys\&.
 .PP
@@ -872,16 +908,14 @@ Query/Retrieve Level: PATIENT (or STUDY for the Study Root Q/R model)
 .nf
 (0010,0010) PatientName
 (0010,0020) PatientID
+(0010,0021) IssuerOfPatientID
 (0010,0030) PatientBirthDate
 (0010,0032) PatientBirthTime
 (0010,0040) PatientSex
-(0010,1000) OtherPatientIDs
+(0010,1000) OtherPatientIDs (retired)
 (0010,1001) OtherPatientNames
 (0010,2160) EthnicGroup
 (0010,4000) PatientComments
-(0020,1200) NumberOfPatientRelatedStudies
-(0020,1202) NumberOfPatientRelatedSeries
-(0020,1204) NumberOfPatientRelatedInstances
 .fi
 .PP
 .PP
@@ -904,8 +938,6 @@ Query/Retrieve Level: STUDY
 (0020,000D) StudyInstanceUID
 (0020,0010) StudyID
 (0020,1070) RETIRED_OtherStudyNumbers
-(0020,1206) NumberOfStudyRelatedSeries
-(0020,1208) NumberOfStudyRelatedInstances
 .fi
 .PP
 .PP
@@ -955,6 +987,8 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fI<docdir>/dcmqrset\&.txt\fP - setup information
 .br
 \fI<etcdir>/dcmqrscp\&.cfg\fP - example configuration file
+.br
+\fI<etcdir>/dcmqrprf\&.cfg\fP - example configuration file for association profiles
 .SH "SEE ALSO"
 .PP
 \fBdcmqridx\fP(1), \fBdcmqrti\fP(1)
diff --git a/doxygen/manpages/man1/dcmqrti.1 b/doxygen/manpages/man1/dcmqrti.1
index 410438c..57f99a0 100644
--- a/doxygen/manpages/man1/dcmqrti.1
+++ b/doxygen/manpages/man1/dcmqrti.1
@@ -1,4 +1,4 @@
-.TH "dcmqrti" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmqrti" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmqrti \- The Terminal Initiator Telnet Client Program
@@ -90,7 +90,7 @@ peer  peer host name or symbolic name from cfg file
           connect to remote database defined in cfg file
 .fi
 .PP
-.SH "NOTES"
+.SH "dcmqrti_NOTES"
 .PP
 .SS "Commands"
 All commands can be abbreviated\&. An abbreviation is allowed if it does not conflict with another command\&.
diff --git a/doxygen/manpages/man1/dcmquant.1 b/doxygen/manpages/man1/dcmquant.1
index 9d168ba..306907d 100644
--- a/doxygen/manpages/man1/dcmquant.1
+++ b/doxygen/manpages/man1/dcmquant.1
@@ -1,4 +1,4 @@
-.TH "dcmquant" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmquant" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmquant \- Convert DICOM color images to palette color
@@ -85,7 +85,7 @@ input transfer syntax:
          read with implicit VR little endian TS
 .fi
 .PP
-.SS "processing options"
+.SS "image processing and encoding options"
 .PP
 .nf
 frame selection:
@@ -121,10 +121,15 @@ median cut representative color selection:
   +Cc  --mc-color-center
          select center of box
 
-color palette creation:
+color palette value representation:
 
   +pw  --write-ow
-         write Palette LUT as OW instead of US
+         write Palette LUT as OW (default)
+
+  +pu  --write-us
+         write Palette LUT as US (retired)
+
+color palette creation:
 
   +pe  --lut-entries-word
          write Palette LUT with 16-bit entries
@@ -238,4 +243,4 @@ The \fBdcmquant\fP utility will attempt to load DICOM data dictionaries specifie
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP 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 \fIDCMDICTPATH\fP environment variable\&. It is an error if no [...]
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2001-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2001-2017 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
diff --git a/doxygen/manpages/man1/dcmrecv.1 b/doxygen/manpages/man1/dcmrecv.1
index 434cc5a..64ff5d3 100644
--- a/doxygen/manpages/man1/dcmrecv.1
+++ b/doxygen/manpages/man1/dcmrecv.1
@@ -1,4 +1,4 @@
-.TH "dcmrecv" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmrecv" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmrecv \- Simple DICOM storage SCP (receiver)
diff --git a/doxygen/manpages/man1/dcmscale.1 b/doxygen/manpages/man1/dcmscale.1
index 36bc438..f3bb574 100644
--- a/doxygen/manpages/man1/dcmscale.1
+++ b/doxygen/manpages/man1/dcmscale.1
@@ -1,4 +1,4 @@
-.TH "dcmscale" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmscale" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmscale \- Scale DICOM images
@@ -85,7 +85,7 @@ input transfer syntax:
           read with implicit VR little endian TS
 .fi
 .PP
-.SS "processing options"
+.SS "image processing and encoding options"
 .PP
 .nf
 scaling:
diff --git a/doxygen/manpages/man1/dcmsend.1 b/doxygen/manpages/man1/dcmsend.1
index 67d0dd5..c35217b 100644
--- a/doxygen/manpages/man1/dcmsend.1
+++ b/doxygen/manpages/man1/dcmsend.1
@@ -1,4 +1,4 @@
-.TH "dcmsend" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmsend" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmsend \- Simple DICOM storage SCU (sender)
diff --git a/doxygen/manpages/man1/dcmsign.1 b/doxygen/manpages/man1/dcmsign.1
index fa45c4a..f852a76 100644
--- a/doxygen/manpages/man1/dcmsign.1
+++ b/doxygen/manpages/man1/dcmsign.1
@@ -1,4 +1,4 @@
-.TH "dcmsign" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmsign" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmsign \- Sign and Verify DICOM Files
diff --git a/doxygen/manpages/man1/dcod2lum.1 b/doxygen/manpages/man1/dcod2lum.1
index cde5c6d..9aa98f1 100644
--- a/doxygen/manpages/man1/dcod2lum.1
+++ b/doxygen/manpages/man1/dcod2lum.1
@@ -1,4 +1,4 @@
-.TH "dcod2lum" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcod2lum" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcod2lum \- Convert hardcopy characteristic curve file to softcopy format
diff --git a/doxygen/manpages/man1/dconvlum.1 b/doxygen/manpages/man1/dconvlum.1
index 547db75..41347b0 100644
--- a/doxygen/manpages/man1/dconvlum.1
+++ b/doxygen/manpages/man1/dconvlum.1
@@ -1,4 +1,4 @@
-.TH "dconvlum" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dconvlum" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dconvlum \- Convert VeriLUM files to DCMTK display files
diff --git a/doxygen/manpages/man1/drtdump.1 b/doxygen/manpages/man1/drtdump.1
index 6c7e7ad..ffb1045 100644
--- a/doxygen/manpages/man1/drtdump.1
+++ b/doxygen/manpages/man1/drtdump.1
@@ -1,4 +1,4 @@
-.TH "drtdump" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "drtdump" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 drtdump \- Dump DICOM RT file and data set
diff --git a/doxygen/manpages/man1/dsr2html.1 b/doxygen/manpages/man1/dsr2html.1
index 80c14b7..084fac8 100644
--- a/doxygen/manpages/man1/dsr2html.1
+++ b/doxygen/manpages/man1/dsr2html.1
@@ -1,4 +1,4 @@
-.TH "dsr2html" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dsr2html" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dsr2html \- Render DICOM SR file and data set to HTML/XHTML
diff --git a/doxygen/manpages/man1/dsr2xml.1 b/doxygen/manpages/man1/dsr2xml.1
index 7f5c82a..f47f0fd 100644
--- a/doxygen/manpages/man1/dsr2xml.1
+++ b/doxygen/manpages/man1/dsr2xml.1
@@ -1,4 +1,4 @@
-.TH "dsr2xml" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dsr2xml" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dsr2xml \- Convert DICOM SR file and data set to XML
@@ -237,7 +237,7 @@ Chinese       "GBK"                            =>  "GBK"
 If this DICOM attribute is missing in the input file, although needed, option \fI--charset-assume\fP can be used to specify an appropriate character set manually (using one of the DICOM defined terms)\&. For reasons of backward compatibility with previous versions of this tool, the following terms are also supported and mapped automatically to the associated DICOM defined terms: latin-1, latin-2, latin-3, latin-4, latin-5, cyrillic, arabic, greek, hebrew\&.
 .PP
 Option \fI--convert-to-utf8\fP can be used to convert the DICOM file or data set to UTF-8 encoding prior to the conversion to XML format\&.
-.SS "ERROR HANDLING"
+.SS "Error Handling"
 Please be careful with the processing options \fI--unknown-relationship\fP, \fI--invalid-item-value\fP, \fI--ignore-constraints\fP, \fI--ignore-item-errors\fP and \fI--skip-invalid-items\fP since they disable certain validation checks on the DICOM SR input file and, therefore, might result in non-standard conformant output\&. However, there might be reasons for using one or more of these options, e\&.g\&. in order to read and process an incorrectly encoded SR document\&.
 .SS "Limitations"
 The XML Schema \fIdsr2xml\&.xsd\fP does not support all variations of the \fBdsr2xml\fP output format\&. However, the default output format (plus option \fI--use-xml-namespace\fP) should work\&.
diff --git a/doxygen/manpages/man1/dsrdump.1 b/doxygen/manpages/man1/dsrdump.1
index 3e39de1..381e6a3 100644
--- a/doxygen/manpages/man1/dsrdump.1
+++ b/doxygen/manpages/man1/dsrdump.1
@@ -1,4 +1,4 @@
-.TH "dsrdump" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dsrdump" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dsrdump \- Dump DICOM SR file and data set
diff --git a/doxygen/manpages/man1/dump2dcm.1 b/doxygen/manpages/man1/dump2dcm.1
index a3f23fb..509f616 100644
--- a/doxygen/manpages/man1/dump2dcm.1
+++ b/doxygen/manpages/man1/dump2dcm.1
@@ -1,4 +1,4 @@
-.TH "dump2dcm" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dump2dcm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dump2dcm \- Convert ASCII dump to DICOM file
diff --git a/doxygen/manpages/man1/echoscu.1 b/doxygen/manpages/man1/echoscu.1
index 7e76e42..4cd908d 100644
--- a/doxygen/manpages/man1/echoscu.1
+++ b/doxygen/manpages/man1/echoscu.1
@@ -1,4 +1,4 @@
-.TH "echoscu" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "echoscu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 echoscu \- DICOM verification (C-ECHO) SCU
diff --git a/doxygen/manpages/man1/findscu.1 b/doxygen/manpages/man1/findscu.1
index a3afe36..4e5696f 100644
--- a/doxygen/manpages/man1/findscu.1
+++ b/doxygen/manpages/man1/findscu.1
@@ -1,4 +1,4 @@
-.TH "findscu" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "findscu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 findscu \- DICOM query (C-FIND) SCU
diff --git a/doxygen/manpages/man1/getscu.1 b/doxygen/manpages/man1/getscu.1
index 13450ef..fda71c8 100644
--- a/doxygen/manpages/man1/getscu.1
+++ b/doxygen/manpages/man1/getscu.1
@@ -1,4 +1,4 @@
-.TH "getscu" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "getscu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 getscu \- DICOM retrieve (C-GET) SCU
@@ -138,6 +138,12 @@ preferred storage transfer syntaxes (incoming associations):
   +xo   --prefer-mpeg4-2-st
           prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS
 
+  +x4   --prefer-hevc
+          prefer HEVC H.265 Main Profile / Level 5.1 TS
+
+  +x5   --prefer-hevc10
+          prefer HEVC H.265 Main 10 Profile / Level 5.1 TS
+
   +xr   --prefer-rle
           prefer RLE lossless TS
 
@@ -425,6 +431,8 @@ MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax   1.2.840.10008.1.2.4.103
 MPEG4HighProfileLevel4_2_For2DVideoTransferSyntax    1.2.840.10008.1.2.4.104
 MPEG4HighProfileLevel4_2_For3DVideoTransferSyntax    1.2.840.10008.1.2.4.105
 MPEG4StereoHighProfileLevel4_2TransferSyntax         1.2.840.10008.1.2.4.106
+HEVCMainProfileLevel5_1TransferSyntax                1.2.840.10008.1.2.4.107
+HEVCMain10ProfileLevel5_1TransferSyntax              1.2.840.10008.1.2.4.108
 RLELosslessTransferSyntax                            1.2.840.10008.1.2.5
 .fi
 .PP
diff --git a/doxygen/manpages/man1/img2dcm.1 b/doxygen/manpages/man1/img2dcm.1
index 275835a..e11235d 100644
--- a/doxygen/manpages/man1/img2dcm.1
+++ b/doxygen/manpages/man1/img2dcm.1
@@ -1,4 +1,4 @@
-.TH "img2dcm" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "img2dcm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 img2dcm \- Convert standard image formats into DICOM format
diff --git a/doxygen/manpages/man1/movescu.1 b/doxygen/manpages/man1/movescu.1
index f7cb862..725860b 100644
--- a/doxygen/manpages/man1/movescu.1
+++ b/doxygen/manpages/man1/movescu.1
@@ -1,4 +1,4 @@
-.TH "movescu" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "movescu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 movescu \- DICOM retrieve (C-MOVE) SCU
@@ -138,6 +138,12 @@ preferred network transfer syntaxes (incoming associations):
   +xo   --prefer-mpeg4-2-st
           prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS
 
+  +x4   --prefer-hevc
+          prefer HEVC H.265 Main Profile / Level 5.1 TS
+
+  +x5   --prefer-hevc10
+          prefer HEVC H.265 Main 10 Profile / Level 5.1 TS
+
   +xr   --prefer-rle
           prefer RLE lossless TS
 
@@ -438,7 +444,11 @@ PseudoColorSoftcopyPresentationStateStorage          1.2.840.10008.5.1.4.1.1.11.
 BlendingSoftcopyPresentationStateStorage             1.2.840.10008.5.1.4.1.1.11.4
 XAXRFGrayscaleSoftcopyPresentationStateStorage       1.2.840.10008.5.1.4.1.1.11.5
 GrayscalePlanarMPRVolumetricPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.6
-CompositingPlanarMPRVolumetricPresentationStateStor. 1.2.840.10008.5.1.4.1.1.11.7
+CompositingPlanarMPRVolumetricPresent.StateStorage   1.2.840.10008.5.1.4.1.1.11.7
+AdvancedBlendingPresentationStateStorage             1.2.840.10008.5.1.4.1.1.11.8
+VolumeRenderingVolumetricPresentationStateStorage    1.2.840.10008.5.1.4.1.1.11.9
+SegmentedVolumeRenderingVolumetricPres.StateStorage  1.2.840.10008.5.1.4.1.1.11.10
+MultipleVolumeRenderingVolumetricPres.StateStorage   1.2.840.10008.5.1.4.1.1.11.11
 XRayAngiographicImageStorage                         1.2.840.10008.5.1.4.1.1.12.1
 EnhancedXAImageStorage                               1.2.840.10008.5.1.4.1.1.12.1.1
 XRayRadiofluoroscopicImageStorage                    1.2.840.10008.5.1.4.1.1.12.2
@@ -477,6 +487,8 @@ StereometricRelationshipStorage                      1.2.840.10008.5.1.4.1.1.77.
 OphthalmicTomographyImageStorage                     1.2.840.10008.5.1.4.1.1.77.1.5.4
 WideFieldOphthalmicPhoto.Stereogr.Proj.ImageStorage  1.2.840.10008.5.1.4.1.1.77.1.5.5
 WideFieldOphthalmicPhotogr.3DCoordinatesImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.6
+OphthalmicOpticalCoherenceTomogr.EnFaceImageStorage  1.2.840.10008.5.1.4.1.1.77.1.5.7
+OphthalmicOpticalCoh.Tomogr.BscanVolumeAnalysisStor. 1.2.840.10008.5.1.4.1.1.77.1.5.8
 VLWholeSlideMicroscopyImageStorage                   1.2.840.10008.5.1.4.1.1.77.1.6
 RETIRED_VLMultiFrameImageStorage                     1.2.840.10008.5.1.4.1.1.77.2
 LensometryMeasurementsStorage                        1.2.840.10008.5.1.4.1.1.78.1
@@ -509,6 +521,8 @@ RadiopharmaceuticalRadiationDoseSRStorage            1.2.840.10008.5.1.4.1.1.88.
 ColonCADSRStorage                                    1.2.840.10008.5.1.4.1.1.88.69
 ImplantationPlanSRDocumentStorage                    1.2.840.10008.5.1.4.1.1.88.70
 AcquisitionContextSRStorage                          1.2.840.10008.5.1.4.1.1.88.71
+SimplifiedAdultEchoSRStorage                         1.2.840.10008.5.1.4.1.1.88.72
+PatientRadiationDoseSRStorage                        1.2.840.10008.5.1.4.1.1.88.73
 ContentAssessmentResultsStorage                      1.2.840.10008.5.1.4.1.1.90.1
 EncapsulatedPDFStorage                               1.2.840.10008.5.1.4.1.1.104.1
 EncapsulatedCDAStorage                               1.2.840.10008.5.1.4.1.1.104.2
@@ -517,7 +531,6 @@ LegacyConvertedEnhancedPETImageStorage               1.2.840.10008.5.1.4.1.1.128
 RETIRED_StandalonePETCurveStorage                    1.2.840.10008.5.1.4.1.1.129
 EnhancedPETImageStorage                              1.2.840.10008.5.1.4.1.1.130
 BasicStructuredDisplayStorage                        1.2.840.10008.5.1.4.1.1.131
-CTDefinedProcedureProtocolStorage                    1.2.840.10008.5.1.4.1.1.200.1
 CTPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.2
 RTImageStorage                                       1.2.840.10008.5.1.4.1.1.481.1
 RTDoseStorage                                        1.2.840.10008.5.1.4.1.1.481.2
@@ -540,9 +553,6 @@ DICONDE_EddyCurrentMultiframeImageStorage            1.2.840.10008.5.1.4.1.1.601
 DRAFT_RTBeamsDeliveryInstructionStorage              1.2.840.10008.5.1.4.34.1
 RTBeamsDeliveryInstructionStorage                    1.2.840.10008.5.1.4.34.7
 RTBrachyApplicationSetupDeliveryInstructionStorage   1.2.840.10008.5.1.4.34.10
-GenericImplantTemplateStorage                        1.2.840.10008.5.1.4.43.1
-ImplantAssemblyTemplateStorage                       1.2.840.10008.5.1.4.44.1
-ImplantTemplateGroupStorage                          1.2.840.10008.5.1.4.45.1
 .fi
 .PP
 .PP
diff --git a/doxygen/manpages/man1/pdf2dcm.1 b/doxygen/manpages/man1/pdf2dcm.1
index 326f713..ee1297b 100644
--- a/doxygen/manpages/man1/pdf2dcm.1
+++ b/doxygen/manpages/man1/pdf2dcm.1
@@ -1,4 +1,4 @@
-.TH "pdf2dcm" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "pdf2dcm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 pdf2dcm \- Convert PDF file to DICOM
diff --git a/doxygen/manpages/man1/storescp.1 b/doxygen/manpages/man1/storescp.1
index 5fce442..7472a18 100644
--- a/doxygen/manpages/man1/storescp.1
+++ b/doxygen/manpages/man1/storescp.1
@@ -1,4 +1,4 @@
-.TH "storescp" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "storescp" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 storescp \- DICOM storage (C-STORE) SCP
@@ -126,6 +126,12 @@ preferred network transfer syntaxes (not with --config-file):
   +xo   --prefer-mpeg4-2-st
           prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS
 
+  +x4   --prefer-hevc
+          prefer HEVC H.265 Main Profile / Level 5.1 TS
+
+  +x5   --prefer-hevc10
+          prefer HEVC H.265 Main 10 Profile / Level 5.1 TS
+
   +xr   --prefer-rle
           prefer RLE lossless TS
 
@@ -434,7 +440,9 @@ and for option \fI--sort-on-patientname\fP
 .fi
 .PP
 .PP
-where 'PatientName' is replaced by 'ANONYMOUS' if the data element is empty or absent in the data set\&. Please note, however, that for option \fI--sort-on-study-uid\fP the same subdirectory will be used for all DICOM objects that belong to the same study, i\&.e\&. in contrast to the other \fI--sort-xxx\fP options there is no guarantee that a study directory is ever completed\&.
+where 'PatientName' is replaced by 'ANONYMOUS' if the data element is empty or absent in the data set\&. Any existing patient name is transformed in order to use only ASCII characters\&. Please note that in this context only the DICOM default character set (ASCII, i\&.e\&. no entry in attribute Specific Character Set) and Latin-1 (Specific Character Set valued 'ISO_IR 100') are supported\&. If another character set is found and the patient name contains non-ASCII characters, a warning is [...]
+.PP
+For option \fI--sort-on-study-uid\fP the same subdirectory will be used for all DICOM objects that belong to the same study, i\&.e\&. in contrast to the other \fI--sort-xxx\fP options there is no guarantee that a study directory is ever completed\&.
 .PP
 Option \fI--timenames\fP creates filenames from timestamps corresponding to the time, \fBstorescp\fP writes a file to disk\&. The format is
 .PP
@@ -535,7 +543,11 @@ PseudoColorSoftcopyPresentationStateStorage          1.2.840.10008.5.1.4.1.1.11.
 BlendingSoftcopyPresentationStateStorage             1.2.840.10008.5.1.4.1.1.11.4
 XAXRFGrayscaleSoftcopyPresentationStateStorage       1.2.840.10008.5.1.4.1.1.11.5
 GrayscalePlanarMPRVolumetricPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.6
-CompositingPlanarMPRVolumetricPresentationStateStor. 1.2.840.10008.5.1.4.1.1.11.7
+CompositingPlanarMPRVolumetricPresent.StateStorage   1.2.840.10008.5.1.4.1.1.11.7
+AdvancedBlendingPresentationStateStorage             1.2.840.10008.5.1.4.1.1.11.8
+VolumeRenderingVolumetricPresentationStateStorage    1.2.840.10008.5.1.4.1.1.11.9
+SegmentedVolumeRenderingVolumetricPres.StateStorage  1.2.840.10008.5.1.4.1.1.11.10
+MultipleVolumeRenderingVolumetricPres.StateStorage   1.2.840.10008.5.1.4.1.1.11.11
 XRayAngiographicImageStorage                         1.2.840.10008.5.1.4.1.1.12.1
 EnhancedXAImageStorage                               1.2.840.10008.5.1.4.1.1.12.1.1
 XRayRadiofluoroscopicImageStorage                    1.2.840.10008.5.1.4.1.1.12.2
@@ -574,6 +586,8 @@ StereometricRelationshipStorage                      1.2.840.10008.5.1.4.1.1.77.
 OphthalmicTomographyImageStorage                     1.2.840.10008.5.1.4.1.1.77.1.5.4
 WideFieldOphthalmicPhoto.Stereogr.Proj.ImageStorage  1.2.840.10008.5.1.4.1.1.77.1.5.5
 WideFieldOphthalmicPhotogr.3DCoordinatesImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.6
+OphthalmicOpticalCoherenceTomogr.EnFaceImageStorage  1.2.840.10008.5.1.4.1.1.77.1.5.7
+OphthalmicOpticalCoh.Tomogr.BscanVolumeAnalysisStor. 1.2.840.10008.5.1.4.1.1.77.1.5.8
 VLWholeSlideMicroscopyImageStorage                   1.2.840.10008.5.1.4.1.1.77.1.6
 RETIRED_VLMultiFrameImageStorage                     1.2.840.10008.5.1.4.1.1.77.2
 LensometryMeasurementsStorage                        1.2.840.10008.5.1.4.1.1.78.1
@@ -607,6 +621,7 @@ ColonCADSRStorage                                    1.2.840.10008.5.1.4.1.1.88.
 ImplantationPlanSRDocumentStorage                    1.2.840.10008.5.1.4.1.1.88.70
 AcquisitionContextSRStorage                          1.2.840.10008.5.1.4.1.1.88.71
 SimplifiedAdultEchoSRStorage                         1.2.840.10008.5.1.4.1.1.88.72
+PatientRadiationDoseSRStorage                        1.2.840.10008.5.1.4.1.1.88.73
 ContentAssessmentResultsStorage                      1.2.840.10008.5.1.4.1.1.90.1
 EncapsulatedPDFStorage                               1.2.840.10008.5.1.4.1.1.104.1
 EncapsulatedCDAStorage                               1.2.840.10008.5.1.4.1.1.104.2
@@ -615,7 +630,6 @@ LegacyConvertedEnhancedPETImageStorage               1.2.840.10008.5.1.4.1.1.128
 RETIRED_StandalonePETCurveStorage                    1.2.840.10008.5.1.4.1.1.129
 EnhancedPETImageStorage                              1.2.840.10008.5.1.4.1.1.130
 BasicStructuredDisplayStorage                        1.2.840.10008.5.1.4.1.1.131
-CTDefinedProcedureProtocolStorage                    1.2.840.10008.5.1.4.1.1.200.1
 CTPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.2
 RTImageStorage                                       1.2.840.10008.5.1.4.1.1.481.1
 RTDoseStorage                                        1.2.840.10008.5.1.4.1.1.481.2
diff --git a/doxygen/manpages/man1/storescu.1 b/doxygen/manpages/man1/storescu.1
index 86f6fd1..5c204ee 100644
--- a/doxygen/manpages/man1/storescu.1
+++ b/doxygen/manpages/man1/storescu.1
@@ -1,4 +1,4 @@
-.TH "storescu" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "storescu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 storescu \- DICOM storage (C-STORE) SCU
@@ -169,6 +169,12 @@ proposed transmission transfer syntaxes (not with --config-file):
   -xo   --propose-mpeg4-2-st
           propose MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS only
 
+  -x4   --propose-hevc
+          propose HEVC H.265 Main Profile / Level 5.1 TS only
+
+  -x5   --propose-hevc10
+          propose HEVC H.265 Main 10 Profile / Level 5.1 TS only
+
   -xr   --propose-rle
           propose RLE lossless TS
           and all uncompressed transfer syntaxes
@@ -437,6 +443,8 @@ MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax   1.2.840.10008.1.2.4.103
 MPEG4HighProfileLevel4_2_For2DVideoTransferSyntax    1.2.840.10008.1.2.4.104
 MPEG4HighProfileLevel4_2_For3DVideoTransferSyntax    1.2.840.10008.1.2.4.105
 MPEG4StereoHighProfileLevel4_2TransferSyntax         1.2.840.10008.1.2.4.106
+HEVCMainProfileLevel5_1TransferSyntax                1.2.840.10008.1.2.4.107
+HEVCMain10ProfileLevel5_1TransferSyntax              1.2.840.10008.1.2.4.108
 RLELosslessTransferSyntax                            1.2.840.10008.1.2.5
 .fi
 .PP
diff --git a/doxygen/manpages/man1/termscu.1 b/doxygen/manpages/man1/termscu.1
index 96d58cd..51acb40 100644
--- a/doxygen/manpages/man1/termscu.1
+++ b/doxygen/manpages/man1/termscu.1
@@ -1,4 +1,4 @@
-.TH "termscu" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "termscu" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 termscu \- DICOM termination SCU
diff --git a/doxygen/manpages/man1/wlmscpfs.1 b/doxygen/manpages/man1/wlmscpfs.1
index badfde6..9b62024 100644
--- a/doxygen/manpages/man1/wlmscpfs.1
+++ b/doxygen/manpages/man1/wlmscpfs.1
@@ -1,4 +1,4 @@
-.TH "wlmscpfs" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "wlmscpfs" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 wlmscpfs \- DICOM Basic Worklist Management SCP (based on data files)
@@ -66,7 +66,7 @@ port  tcp/ip port number to listen on
 .nf
 general:
 
-  -dfp  --data-files-path  [p]ath: string (default: /home/www/wlist)
+  -dfp  --data-files-path  [p]ath: string (default: .)
           path to worklist data files
 
 handling of worklist files:
@@ -266,7 +266,7 @@ As return keys the following attributes are currently supported by \fBwlmscpfs:\
 (0010,0021) IssuerOfPatientID
 (0010,0030) PatientBirthDate
 (0010,0040) PatientSex
-(0010,1000) OtherPatientIDs
+(0010,1000) OtherPatientIDs (retired)
 (0010,1001) OtherPatientNames
 (0010,1020) PatientSize
 (0010,1030) PatientWeight
@@ -279,8 +279,8 @@ As return keys the following attributes are currently supported by \fBwlmscpfs:\
 (0010,21b0) AdditionalPatientHistory
 (0010,21c0) PregnancyStatus
 (0010,21d0) LastMenstrualDate
-(0010,2297) Responsible Person
-(0010,2298) Responsible Person Role
+(0010,2297) ResponsiblePerson
+(0010,2298) ResponsiblePersonRole
 (0010,4000) PatientComments
 (0020,000d) StudyInstanceUID
 (0032,1032) RequestingPhysician
@@ -361,4 +361,4 @@ The \fBwlmscpfs\fP utility will attempt to load DICOM data dictionaries specifie
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP 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 \fIDCMDICTPATH\fP environment variable\&. It is an error if no [...]
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1996-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1996-2017 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
diff --git a/doxygen/manpages/man1/xml2dcm.1 b/doxygen/manpages/man1/xml2dcm.1
index 2678b81..2181a78 100644
--- a/doxygen/manpages/man1/xml2dcm.1
+++ b/doxygen/manpages/man1/xml2dcm.1
@@ -1,4 +1,4 @@
-.TH "xml2dcm" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "xml2dcm" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 xml2dcm \- Convert XML document to DICOM file or data set
diff --git a/doxygen/manpages/man1/xml2dsr.1 b/doxygen/manpages/man1/xml2dsr.1
index 13041d5..ae0ffab 100644
--- a/doxygen/manpages/man1/xml2dsr.1
+++ b/doxygen/manpages/man1/xml2dsr.1
@@ -1,4 +1,4 @@
-.TH "xml2dsr" 1 "Tue Feb 28 2017" "Version 3.6.1" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "xml2dsr" 1 "Fri Jul 14 2017" "Version 3.6.2" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 xml2dsr \- Convert DICOM SR file and data set to XML
diff --git a/oflog/CMakeLists.txt b/oflog/CMakeLists.txt
index ea6d262..7897e2a 100644
--- a/oflog/CMakeLists.txt
+++ b/oflog/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(oflog)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${oflog_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES("${oflog_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include")
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc include etc)
diff --git a/oflog/etc/CMakeLists.txt b/oflog/etc/CMakeLists.txt
index 44798b9..49b1586 100644
--- a/oflog/etc/CMakeLists.txt
+++ b/oflog/etc/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(FILES logger.cfg filelog.cfg DESTINATION ${DCMTK_INSTALL_ETCDIR} COMPONENT etc)
+INSTALL(FILES logger.cfg filelog.cfg DESTINATION "${DCMTK_INSTALL_ETCDIR}" COMPONENT etc)
diff --git a/oflog/include/CMakeLists.txt b/oflog/include/CMakeLists.txt
index 04014f6..9c49277 100644
--- a/oflog/include/CMakeLists.txt
+++ b/oflog/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/oflog DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY dcmtk/oflog DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h")
diff --git a/oflog/include/dcmtk/oflog/appender.h b/oflog/include/dcmtk/oflog/appender.h
index 6234ea2..b9134ac 100644
--- a/oflog/include/dcmtk/oflog/appender.h
+++ b/oflog/include/dcmtk/oflog/appender.h
@@ -30,7 +30,7 @@
 #pragma once
 #endif
 
-#include "dcmtk/ofstd/ofaptr.h"
+#include "dcmtk/ofstd/ofmem.h"
 #include "dcmtk/oflog/layout.h"
 #include "dcmtk/oflog/loglevel.h"
 #include "dcmtk/oflog/tstring.h"
@@ -153,7 +153,7 @@ namespace log4cplus {
         /**
          * Set the {@link ErrorHandler} for this Appender.
          */
-        virtual void setErrorHandler(OFauto_ptr<ErrorHandler> eh);
+        virtual void setErrorHandler(OFunique_ptr<ErrorHandler> eh);
 
         /**
          * Return the currently set {@link ErrorHandler} for this
@@ -166,7 +166,7 @@ namespace log4cplus {
          * their own (fixed) layouts or do not use one. For example, the
          * SocketAppender ignores the layout set here.
          */
-        virtual void setLayout(OFauto_ptr<Layout> layout);
+        virtual void setLayout(OFunique_ptr<Layout> layout);
 
         /**
          * Returns the layout of this appender. The value may be NULL.
@@ -224,7 +224,7 @@ namespace log4cplus {
       // Data
         /** The layout variable does not need to be set if the appender
          *  implementation has its own layout. */
-        OFauto_ptr<Layout> layout;
+        OFunique_ptr<Layout> layout;
 
         /** Appenders are named. */
         log4cplus::tstring name;
@@ -237,10 +237,10 @@ namespace log4cplus {
         log4cplus::spi::FilterPtr filter;
 
         /** It is assumed and enforced that errorHandler is never null. */
-        OFauto_ptr<ErrorHandler> errorHandler;
+        OFunique_ptr<ErrorHandler> errorHandler;
 
         //! Optional system wide synchronization lock.
-        OFauto_ptr<helpers::LockFile> lockFile;
+        OFunique_ptr<helpers::LockFile> lockFile;
 
         //! Use lock file for inter-process synchronization of access
         //! to log file.
diff --git a/oflog/include/dcmtk/oflog/hierarchy.h b/oflog/include/dcmtk/oflog/hierarchy.h
index 652b64c..106b21c 100644
--- a/oflog/include/dcmtk/oflog/hierarchy.h
+++ b/oflog/include/dcmtk/oflog/hierarchy.h
@@ -213,7 +213,7 @@ namespace log4cplus {
         /**
          * Set the default LoggerFactory instance.
          */
-        virtual void setLoggerFactory(OFauto_ptr<spi::LoggerFactory> factory);
+        virtual void setLoggerFactory(OFunique_ptr<spi::LoggerFactory> factory);
         
         /**
          * Returns the default LoggerFactory instance.
@@ -298,7 +298,7 @@ namespace log4cplus {
 
      // Data
         thread::Mutex hashtable_mutex;
-        OFauto_ptr<spi::LoggerFactory> defaultFactory;
+        OFunique_ptr<spi::LoggerFactory> defaultFactory;
         ProvisionNodeMap provisionNodes;
         LoggerMap loggerPtrs;
         Logger root;
diff --git a/oflog/include/dcmtk/oflog/oflog.h b/oflog/include/dcmtk/oflog/oflog.h
index 25894c1..312e033 100644
--- a/oflog/include/dcmtk/oflog/oflog.h
+++ b/oflog/include/dcmtk/oflog/oflog.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2009-2016, OFFIS e.V.
+ *  Copyright (C) 2009-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -28,7 +28,7 @@
 #include "dcmtk/oflog/logger.h"
 #include "dcmtk/oflog/logmacro.h"
 #include "dcmtk/ofstd/oftypes.h"
-#include "dcmtk/ofstd/ofaptr.h"
+#include "dcmtk/ofstd/ofmem.h"
 #include "dcmtk/ofstd/ofconapp.h"
 
 #define OFLOG_TRACE(logger, msg) DCMTK_LOG4CPLUS_TRACE(logger, msg)
@@ -131,7 +131,7 @@ class DCMTK_LOG4CPLUS_EXPORT OFLog
  private:
 
     /// If we loaded a config file in configureFromCommandLine(), this is it
-    static OFauto_ptr<dcmtk::log4cplus::helpers::Properties> configProperties_;
+    static OFunique_ptr<dcmtk::log4cplus::helpers::Properties> configProperties_;
 };
 
 #endif
diff --git a/oflog/include/dcmtk/oflog/spi/factory.h b/oflog/include/dcmtk/oflog/spi/factory.h
index e0d0fd9..47997d0 100644
--- a/oflog/include/dcmtk/oflog/spi/factory.h
+++ b/oflog/include/dcmtk/oflog/spi/factory.h
@@ -85,7 +85,7 @@ namespace log4cplus {
         class DCMTK_LOG4CPLUS_EXPORT LayoutFactory : public BaseFactory {
         public:
             typedef Layout ProductType;
-            typedef OFauto_ptr<Layout> ProductPtr;
+            typedef OFrvalue<OFunique_ptr<Layout> > ProductPtr;
 
             LayoutFactory();
             virtual ~LayoutFactory() = 0;
@@ -93,7 +93,7 @@ namespace log4cplus {
             /**
              * Create a "Layout" object.
              */
-            virtual OFauto_ptr<Layout> createObject(const log4cplus::helpers::Properties& props) = 0;
+            virtual ProductPtr createObject(const log4cplus::helpers::Properties& props) = 0;
         };
 
 
@@ -160,7 +160,7 @@ namespace log4cplus {
              * Used to enter an object into the registry.  (The registry now
              *  owns <code>object</code>.)
              */
-            bool put(OFauto_ptr<T> object) {
+            bool put(OFunique_ptr<T> object) {
                  bool putValResult = putVal(object->getTypeName(), object.get());
                  object.release();
                  return putValResult; 
@@ -247,7 +247,7 @@ namespace log4cplus {
 
         #define DCMTK_LOG4CPLUS_REG_PRODUCT(reg, productprefix, productname, productns, productfact) \
         reg.put (																               \
-            OFauto_ptr<productfact> (                                                       \
+            OFrvalue<OFunique_ptr<productfact> > (                                                       \
                     new log4cplus::spi::FactoryTempl<productns productname, productfact> (     \
                     DCMTK_LOG4CPLUS_TEXT(productprefix)                                              \
                     DCMTK_LOG4CPLUS_TEXT(#productname))))
@@ -265,7 +265,7 @@ namespace log4cplus {
             log4cplus::spi::FilterFactory)
 
         #define DCMTK_LOG4CPLUS_REG_LOCALE(reg, name, factory)            \
-            reg.put (OFauto_ptr<log4cplus::spi::LocaleFactory> ( \
+            reg.put (OFrvalue<OFunique_ptr<log4cplus::spi::LocaleFactory> > ( \
                     new factory (name)))
     } // namespace spi
 }
diff --git a/oflog/include/dcmtk/oflog/spi/logevent.h b/oflog/include/dcmtk/oflog/spi/logevent.h
index 6fda9a5..cc330fb 100644
--- a/oflog/include/dcmtk/oflog/spi/logevent.h
+++ b/oflog/include/dcmtk/oflog/spi/logevent.h
@@ -31,7 +31,7 @@
 #endif
 
 #include <memory>
-#include "dcmtk/ofstd/ofaptr.h"
+#include "dcmtk/ofstd/ofmem.h"
 #include "dcmtk/oflog/loglevel.h"
 #include "dcmtk/oflog/ndc.h"
 #include "dcmtk/oflog/mdc.h"
@@ -104,7 +104,7 @@ namespace log4cplus {
            /** Returns a copy of this object.  Derived classes
              *  should override this method.
              */
-            virtual OFauto_ptr<InternalLoggingEvent> clone() const;
+            virtual OFrvalue<OFunique_ptr<InternalLoggingEvent> > clone() const;
 
 
 
diff --git a/oflog/libsrc/Makefile.dep b/oflog/libsrc/Makefile.dep
index 79ae7ff..3e26dba 100644
--- a/oflog/libsrc/Makefile.dep
+++ b/oflog/libsrc/Makefile.dep
@@ -7,11 +7,14 @@ apndimpl.o: apndimpl.cc ../include/dcmtk/oflog/appender.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/oflog/config/defines.h \
  ../include/dcmtk/oflog/helpers/threadcf.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/tstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/streams.h \
@@ -24,9 +27,6 @@ apndimpl.o: apndimpl.cc ../include/dcmtk/oflog/appender.h \
  ../include/dcmtk/oflog/helpers/loglog.h \
  ../include/dcmtk/oflog/spi/logevent.h ../include/dcmtk/oflog/ndc.h \
  ../include/dcmtk/oflog/mdc.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
@@ -40,11 +40,14 @@ appender.o: appender.cc ../include/dcmtk/oflog/appender.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/oflog/config/defines.h \
  ../include/dcmtk/oflog/helpers/threadcf.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/tstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/streams.h \
@@ -61,9 +64,6 @@ appender.o: appender.cc ../include/dcmtk/oflog/appender.h \
  ../include/dcmtk/oflog/helpers/strhelp.h \
  ../include/dcmtk/oflog/helpers/property.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/spi/factory.h ../include/dcmtk/oflog/spi/objreg.h \
  ../include/dcmtk/oflog/spi/logevent.h ../include/dcmtk/oflog/ndc.h \
@@ -82,18 +82,18 @@ asyncap.o: asyncap.cc ../include/dcmtk/oflog/config.h \
  ../include/dcmtk/oflog/helpers/threadcf.h \
  ../include/dcmtk/oflog/asyncap.h ../include/dcmtk/oflog/helpers/queue.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
- ../include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/tstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/ndc.h \
  ../include/dcmtk/oflog/mdc.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
@@ -130,7 +130,7 @@ clfsap.o: clfsap.cc ../include/dcmtk/oflog/config.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/clfsap.h ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/oflog/layout.h \
  ../include/dcmtk/oflog/loglevel.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
  ../include/dcmtk/oflog/spi/filter.h \
@@ -154,8 +154,11 @@ clogger.o: clogger.cc ../include/dcmtk/oflog/logger.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/spi/apndatch.h \
  ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/streams.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/streams.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
  ../include/dcmtk/oflog/thread/syncprim.h \
  ../include/dcmtk/oflog/spi/filter.h \
@@ -163,9 +166,6 @@ clogger.o: clogger.cc ../include/dcmtk/oflog/logger.h \
  ../include/dcmtk/oflog/spi/logfact.h ../include/dcmtk/oflog/clogger.h \
  ../include/dcmtk/oflog/hierarchy.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/helpers/loglog.h \
  ../include/dcmtk/oflog/spi/logimpl.h \
@@ -183,11 +183,14 @@ config.o: config.cc ../include/dcmtk/oflog/configrt.h \
  ../include/dcmtk/oflog/config/defines.h \
  ../include/dcmtk/oflog/helpers/threadcf.h \
  ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/tstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/streams.h \
@@ -199,9 +202,6 @@ config.o: config.cc ../include/dcmtk/oflog/configrt.h \
  ../include/dcmtk/oflog/spi/logfact.h \
  ../include/dcmtk/oflog/helpers/property.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/hierlock.h ../include/dcmtk/oflog/hierarchy.h \
  ../include/dcmtk/oflog/helpers/loglog.h \
@@ -232,7 +232,10 @@ consap.o: consap.cc ../include/dcmtk/oflog/layout.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/streams.h \
  ../include/dcmtk/oflog/consap.h ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
  ../include/dcmtk/oflog/thread/syncprim.h \
  ../include/dcmtk/oflog/spi/filter.h \
@@ -241,9 +244,6 @@ consap.o: consap.cc ../include/dcmtk/oflog/layout.h \
  ../include/dcmtk/oflog/helpers/strhelp.h \
  ../include/dcmtk/oflog/helpers/property.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/spi/logevent.h ../include/dcmtk/oflog/ndc.h \
  ../include/dcmtk/oflog/mdc.h ../include/dcmtk/oflog/helpers/timehelp.h \
@@ -276,11 +276,14 @@ factory.o: factory.cc ../include/dcmtk/oflog/spi/factory.h \
  ../include/dcmtk/oflog/config/defines.h \
  ../include/dcmtk/oflog/helpers/threadcf.h \
  ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/tstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/streams.h \
@@ -290,9 +293,6 @@ factory.o: factory.cc ../include/dcmtk/oflog/spi/factory.h \
  ../include/dcmtk/oflog/helpers/lockfile.h \
  ../include/dcmtk/oflog/spi/objreg.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/spi/logfact.h \
  ../include/dcmtk/oflog/helpers/loglog.h \
@@ -320,11 +320,14 @@ fileap.o: fileap.cc ../include/dcmtk/oflog/fileap.h \
  ../include/dcmtk/oflog/config/defines.h \
  ../include/dcmtk/oflog/helpers/threadcf.h \
  ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/tstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/streams.h \
@@ -338,9 +341,6 @@ fileap.o: fileap.cc ../include/dcmtk/oflog/fileap.h \
  ../include/dcmtk/oflog/helpers/strhelp.h \
  ../include/dcmtk/oflog/helpers/property.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/helpers/fileinfo.h \
  ../include/dcmtk/oflog/spi/logevent.h ../include/dcmtk/oflog/ndc.h \
@@ -392,7 +392,7 @@ filter.o: filter.cc ../include/dcmtk/oflog/spi/filter.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/ndc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/oflog/ndc.h \
  ../include/dcmtk/oflog/mdc.h ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
  ../include/dcmtk/oflog/thread/syncpub.h
@@ -413,17 +413,17 @@ globinit.o: globinit.cc ../include/dcmtk/oflog/config.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/spi/apndatch.h \
  ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/streams.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/streams.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
  ../include/dcmtk/oflog/thread/syncprim.h \
  ../include/dcmtk/oflog/spi/filter.h \
  ../include/dcmtk/oflog/helpers/lockfile.h \
  ../include/dcmtk/oflog/spi/logfact.h ../include/dcmtk/oflog/ndc.h \
  ../include/dcmtk/oflog/mdc.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/helpers/loglog.h \
  ../include/dcmtk/oflog/internal/internal.h \
@@ -454,17 +454,17 @@ hierarchy.o: hierarchy.cc ../include/dcmtk/oflog/hierarchy.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/spi/apndatch.h \
  ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/streams.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/streams.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
  ../include/dcmtk/oflog/thread/syncprim.h \
  ../include/dcmtk/oflog/spi/filter.h \
  ../include/dcmtk/oflog/helpers/lockfile.h \
  ../include/dcmtk/oflog/spi/logfact.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/helpers/loglog.h \
  ../include/dcmtk/oflog/spi/logimpl.h \
@@ -485,8 +485,11 @@ hierlock.o: hierlock.cc ../include/dcmtk/oflog/hierlock.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/loglevel.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/streams.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
@@ -496,9 +499,6 @@ hierlock.o: hierlock.cc ../include/dcmtk/oflog/hierlock.h \
  ../include/dcmtk/oflog/logger.h ../include/dcmtk/oflog/spi/apndatch.h \
  ../include/dcmtk/oflog/spi/logfact.h ../include/dcmtk/oflog/hierarchy.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/helpers/loglog.h \
  ../include/dcmtk/oflog/spi/logimpl.h \
@@ -523,11 +523,12 @@ layout.o: layout.cc ../include/dcmtk/oflog/layout.h \
  ../include/dcmtk/oflog/helpers/strhelp.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/ndc.h \
- ../include/dcmtk/oflog/mdc.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../ofstd/include/dcmtk/ofstd/ofutil.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/ndc.h ../include/dcmtk/oflog/mdc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/thread/threads.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
@@ -579,11 +580,14 @@ log4judp.o: log4judp.cc ../include/dcmtk/oflog/log4judp.h \
  ../include/dcmtk/oflog/config/defines.h \
  ../include/dcmtk/oflog/helpers/threadcf.h \
  ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/tstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/streams.h \
@@ -601,9 +605,6 @@ log4judp.o: log4judp.cc ../include/dcmtk/oflog/log4judp.h \
  ../include/dcmtk/oflog/helpers/loglog.h \
  ../include/dcmtk/oflog/helpers/property.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/spi/logevent.h ../include/dcmtk/oflog/ndc.h \
  ../include/dcmtk/oflog/mdc.h ../include/dcmtk/oflog/helpers/timehelp.h \
@@ -620,18 +621,18 @@ logevent.o: logevent.cc ../include/dcmtk/oflog/spi/logevent.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/oflog/config/defines.h \
  ../include/dcmtk/oflog/helpers/threadcf.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
- ../include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/tstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/ndc.h \
  ../include/dcmtk/oflog/mdc.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
@@ -658,17 +659,17 @@ logger.o: logger.cc ../include/dcmtk/oflog/logger.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/spi/apndatch.h \
  ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/streams.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/streams.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
  ../include/dcmtk/oflog/thread/syncprim.h \
  ../include/dcmtk/oflog/spi/filter.h \
  ../include/dcmtk/oflog/helpers/lockfile.h \
  ../include/dcmtk/oflog/spi/logfact.h ../include/dcmtk/oflog/hierarchy.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/helpers/loglog.h \
  ../include/dcmtk/oflog/spi/logimpl.h \
@@ -695,7 +696,7 @@ logimpl.o: logimpl.cc ../include/dcmtk/oflog/internal/internal.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/oflog/loglevel.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
@@ -737,7 +738,7 @@ loglevel.o: loglevel.cc ../include/dcmtk/oflog/loglevel.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
@@ -762,8 +763,11 @@ loglog.o: loglog.cc ../include/dcmtk/oflog/streams.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
  ../include/dcmtk/oflog/internal/env.h ../include/dcmtk/oflog/consap.h \
  ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/loglevel.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/spi/filter.h \
  ../include/dcmtk/oflog/helpers/lockfile.h
@@ -789,7 +793,7 @@ logmacro.o: logmacro.cc ../include/dcmtk/oflog/internal/internal.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/oflog/loglevel.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
@@ -824,7 +828,7 @@ mdc.o: mdc.cc ../include/dcmtk/oflog/mdc.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/streams.h ../include/dcmtk/oflog/ndc.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/oflog/loglevel.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
@@ -855,7 +859,7 @@ ndc.o: ndc.cc ../include/dcmtk/oflog/ndc.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/oflog/loglevel.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
@@ -881,11 +885,14 @@ nullap.o: nullap.cc ../include/dcmtk/oflog/nullap.h \
  ../include/dcmtk/oflog/config/defines.h \
  ../include/dcmtk/oflog/helpers/threadcf.h \
  ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/tstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/streams.h \
@@ -931,6 +938,7 @@ oflog.o: oflog.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../../ofstd/include/dcmtk/ofstd/ofdate.h \
  ../../ofstd/include/dcmtk/ofstd/oftime.h ../include/dcmtk/oflog/oflog.h \
  ../include/dcmtk/oflog/logger.h ../include/dcmtk/oflog/config.h \
@@ -940,8 +948,10 @@ oflog.o: oflog.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/tstring.h ../include/dcmtk/oflog/tchar.h \
  ../include/dcmtk/oflog/spi/apndatch.h ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/streams.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/streams.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
  ../include/dcmtk/oflog/thread/syncprim.h \
  ../include/dcmtk/oflog/spi/filter.h \
@@ -956,10 +966,8 @@ oflog.o: oflog.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../include/dcmtk/oflog/configrt.h \
  ../include/dcmtk/oflog/helpers/property.h \
- ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../include/dcmtk/oflog/consap.h ../include/dcmtk/oflog/helpers/loglog.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h ../include/dcmtk/oflog/consap.h \
+ ../include/dcmtk/oflog/helpers/loglog.h \
  ../include/dcmtk/oflog/helpers/socket.h \
  ../include/dcmtk/oflog/helpers/sockbuff.h \
  ../include/dcmtk/oflog/helpers/strhelp.h \
@@ -986,7 +994,10 @@ patlay.o: patlay.cc ../include/dcmtk/oflog/layout.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/streams.h \
  ../include/dcmtk/oflog/logmacro.h ../include/dcmtk/oflog/logger.h \
  ../include/dcmtk/oflog/spi/apndatch.h ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
  ../include/dcmtk/oflog/thread/syncprim.h \
  ../include/dcmtk/oflog/spi/filter.h \
@@ -1001,9 +1012,6 @@ patlay.o: patlay.cc ../include/dcmtk/oflog/layout.h \
  ../include/dcmtk/oflog/helpers/sockbuff.h \
  ../include/dcmtk/oflog/helpers/property.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/spi/logevent.h ../include/dcmtk/oflog/ndc.h \
  ../include/dcmtk/oflog/mdc.h ../include/dcmtk/oflog/thread/threads.h \
@@ -1053,7 +1061,7 @@ property.o: property.cc ../include/dcmtk/oflog/config.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/internal/internal.h ../include/dcmtk/oflog/ndc.h \
  ../include/dcmtk/oflog/mdc.h ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/oflog/loglevel.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
@@ -1073,18 +1081,18 @@ queue.o: queue.cc ../include/dcmtk/oflog/config.h \
  ../include/dcmtk/oflog/helpers/threadcf.h \
  ../include/dcmtk/oflog/helpers/queue.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
- ../include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/tstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/ndc.h \
  ../include/dcmtk/oflog/mdc.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
@@ -1109,8 +1117,11 @@ rootlog.o: rootlog.cc ../include/dcmtk/oflog/spi/rootlog.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
  ../include/dcmtk/oflog/thread/syncprim.h \
  ../include/dcmtk/oflog/spi/apndatch.h ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/loglevel.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/streams.h ../include/dcmtk/oflog/spi/filter.h \
  ../include/dcmtk/oflog/helpers/lockfile.h \
@@ -1155,7 +1166,7 @@ snprintf.o: snprintf.cc ../include/dcmtk/oflog/helpers/snprintf.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/oflog/loglevel.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
@@ -1205,11 +1216,14 @@ socketap.o: socketap.cc ../include/dcmtk/oflog/socketap.h \
  ../include/dcmtk/oflog/config/defines.h \
  ../include/dcmtk/oflog/helpers/threadcf.h \
  ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/tstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/streams.h \
@@ -1222,9 +1236,6 @@ socketap.o: socketap.cc ../include/dcmtk/oflog/socketap.h \
  ../include/dcmtk/oflog/thread/threads.h \
  ../include/dcmtk/oflog/spi/logevent.h ../include/dcmtk/oflog/ndc.h \
  ../include/dcmtk/oflog/mdc.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/helpers/loglog.h \
@@ -1285,12 +1296,13 @@ strhelp.o: strhelp.cc ../include/dcmtk/oflog/helpers/strhelp.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/oflog/internal/internal.h ../include/dcmtk/oflog/ndc.h \
  ../include/dcmtk/oflog/mdc.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../../ofstd/include/dcmtk/ofstd/ofutil.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/oflog/loglevel.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
@@ -1343,11 +1355,14 @@ syslogap.o: syslogap.cc ../include/dcmtk/oflog/syslogap.h \
  ../include/dcmtk/oflog/config/defines.h \
  ../include/dcmtk/oflog/helpers/threadcf.h \
  ../include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h ../include/dcmtk/oflog/layout.h \
- ../include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/layout.h ../include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../include/dcmtk/oflog/tstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/oflog/tchar.h ../include/dcmtk/oflog/streams.h \
@@ -1365,9 +1380,6 @@ syslogap.o: syslogap.cc ../include/dcmtk/oflog/syslogap.h \
  ../include/dcmtk/oflog/helpers/loglog.h \
  ../include/dcmtk/oflog/helpers/property.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/helpers/strhelp.h \
  ../include/dcmtk/oflog/spi/logevent.h ../include/dcmtk/oflog/ndc.h \
@@ -1408,7 +1420,7 @@ threads.o: threads.cc ../include/dcmtk/oflog/config.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/oflog/loglevel.h \
  ../include/dcmtk/oflog/helpers/snprintf.h
 timehelp.o: timehelp.cc ../include/dcmtk/oflog/helpers/timehelp.h \
@@ -1436,7 +1448,7 @@ timehelp.o: timehelp.cc ../include/dcmtk/oflog/helpers/timehelp.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/oflog/loglevel.h \
  ../include/dcmtk/oflog/thread/threads.h \
  ../include/dcmtk/oflog/helpers/pointer.h \
@@ -1470,12 +1482,12 @@ unixsock.o: unixsock.cc ../include/dcmtk/oflog/config.h \
  ../include/dcmtk/oflog/thread/syncprim.h \
  ../include/dcmtk/oflog/thread/syncpub.h \
  ../include/dcmtk/oflog/spi/logevent.h \
- ../../ofstd/include/dcmtk/ofstd/ofaptr.h \
- ../include/dcmtk/oflog/loglevel.h ../include/dcmtk/oflog/ndc.h \
- ../include/dcmtk/oflog/mdc.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../ofstd/include/dcmtk/ofstd/ofutil.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/oflog/loglevel.h ../include/dcmtk/oflog/ndc.h \
+ ../include/dcmtk/oflog/mdc.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/oflog/helpers/timehelp.h \
  ../include/dcmtk/oflog/thread/threads.h \
diff --git a/oflog/libsrc/appender.cc b/oflog/libsrc/appender.cc
index 524bc7c..3586e38 100644
--- a/oflog/libsrc/appender.cc
+++ b/oflog/libsrc/appender.cc
@@ -128,14 +128,14 @@ Appender::Appender(const log4cplus::helpers::Properties & properties)
         helpers::Properties layoutProperties =
                 properties.getPropertySubset( DCMTK_LOG4CPLUS_TEXT("layout.") );
         try {
-            OFauto_ptr<Layout> newLayout(factory->createObject(layoutProperties));
-            if(newLayout.get() == 0) {
+            OFunique_ptr<Layout> newLayout(factory->createObject(layoutProperties));
+            if(!newLayout) {
                 helpers::getLogLog().error(
                     DCMTK_LOG4CPLUS_TEXT("Failed to create appender: ")
                     + factoryName);
             }
             else {
-                layout = newLayout;
+                layout = OFmove(newLayout);
             }
         }
         catch(STD_NAMESPACE exception const & e) {
@@ -320,7 +320,7 @@ Appender::getErrorHandler()
 
 
 void
-Appender::setErrorHandler(OFauto_ptr<ErrorHandler> eh)
+Appender::setErrorHandler(OFunique_ptr<ErrorHandler> eh)
 {
     if (! eh.get())
     {
@@ -333,17 +333,17 @@ Appender::setErrorHandler(OFauto_ptr<ErrorHandler> eh)
 
     thread::MutexGuard guard (access_mutex);
 
-    this->errorHandler = eh;
+    this->errorHandler = OFmove(eh);
 }
 
 
 
 void
-Appender::setLayout(OFauto_ptr<Layout> lo)
+Appender::setLayout(OFunique_ptr<Layout> lo)
 {
     thread::MutexGuard guard (access_mutex);
 
-    this->layout = lo;
+    this->layout = OFmove(lo);
 }
 
 
diff --git a/oflog/libsrc/hierarchy.cc b/oflog/libsrc/hierarchy.cc
index 6945f74..9117777 100644
--- a/oflog/libsrc/hierarchy.cc
+++ b/oflog/libsrc/hierarchy.cc
@@ -221,9 +221,9 @@ Hierarchy::resetConfiguration()
 
 
 void 
-Hierarchy::setLoggerFactory(OFauto_ptr<spi::LoggerFactory> factory) 
+Hierarchy::setLoggerFactory(OFunique_ptr<spi::LoggerFactory> factory) 
 { 
-    defaultFactory = factory; 
+    defaultFactory = OFmove(factory); 
 }
 
 
diff --git a/oflog/libsrc/logevent.cc b/oflog/libsrc/logevent.cc
index 5a0ff6d..a0bbea1 100644
--- a/oflog/libsrc/logevent.cc
+++ b/oflog/libsrc/logevent.cc
@@ -201,11 +201,10 @@ InternalLoggingEvent::getType() const
 
 
 
-OFauto_ptr<InternalLoggingEvent>
+OFrvalue<OFunique_ptr<InternalLoggingEvent> >
 InternalLoggingEvent::clone() const
 {
-    OFauto_ptr<InternalLoggingEvent> tmp(new InternalLoggingEvent(*this));
-    return tmp;
+    return OFrvalue<OFunique_ptr<InternalLoggingEvent> >(new InternalLoggingEvent(*this));
 }
 
 
diff --git a/oflog/libsrc/oflog.cc b/oflog/libsrc/oflog.cc
index fa14b31..753c74d 100644
--- a/oflog/libsrc/oflog.cc
+++ b/oflog/libsrc/oflog.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2009-2016, OFFIS e.V.
+ *  Copyright (C) 2009-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -33,7 +33,7 @@
 #include "dcmtk/oflog/helpers/strhelp.h"
 #include "dcmtk/oflog/internal/internal.h"
 
-OFauto_ptr<dcmtk::log4cplus::helpers::Properties> OFLog::configProperties_;
+OFunique_ptr<dcmtk::log4cplus::helpers::Properties> OFLog::configProperties_;
 
 OFLogger::OFLogger(const dcmtk::log4cplus::Logger &base)
     : dcmtk::log4cplus::Logger(base)
@@ -59,11 +59,11 @@ static void OFLog_init()
 
     // we default to a really simple pattern: loglevel_prefix: message\n
     const char *pattern = "%P: %m%n";
-    OFauto_ptr<dcmtk::log4cplus::Layout> layout(new dcmtk::log4cplus::PatternLayout(pattern));
+    OFunique_ptr<dcmtk::log4cplus::Layout> layout(new dcmtk::log4cplus::PatternLayout(pattern));
     dcmtk::log4cplus::SharedAppenderPtr console(new dcmtk::log4cplus::ConsoleAppender(OFTrue /* logToStdErr */, OFTrue /* immediateFlush */));
     dcmtk::log4cplus::Logger rootLogger = dcmtk::log4cplus::Logger::getRoot();
 
-    console->setLayout(layout);
+    console->setLayout(OFmove(layout));
     rootLogger.addAppender(console);
     rootLogger.setLogLevel(dcmtk::log4cplus::INFO_LOG_LEVEL);
 }
diff --git a/oflog/libsrc/strcloc.cc b/oflog/libsrc/strcloc.cc
index 94d8987..89b51b7 100644
--- a/oflog/libsrc/strcloc.cc
+++ b/oflog/libsrc/strcloc.cc
@@ -148,9 +148,15 @@ towstring (char const * src)
     return ret;
 }
 
+#else
+
+int strcloc_cc_dummy_to_keep_linker_from_moaning = 0;
+
 #endif // DCMTK_LOG4CPLUS_WORKING_C_LOCALE
 
 } // namespace helpers
 
 } // namespace log4cplus
+
 } // end namespace dcmtk
+
diff --git a/oflog/libsrc/striconv.cc b/oflog/libsrc/striconv.cc
index d7dd9bf..2378415 100644
--- a/oflog/libsrc/striconv.cc
+++ b/oflog/libsrc/striconv.cc
@@ -263,6 +263,12 @@ towstring (char const * src)
 } // namespace helpers
 
 } // namespace log4cplus
+
+
 } // end namespace dcmtk
 
+#else
+
+int striconv_cc_dummy_to_keep_linker_from_moaning = 0;
+
 #endif // DCMTK_LOG4CPLUS_WITH_ICONV
diff --git a/ofstd/CMakeLists.txt b/ofstd/CMakeLists.txt
index 1dd23eb..d3ba0dd 100644
--- a/ofstd/CMakeLists.txt
+++ b/ofstd/CMakeLists.txt
@@ -2,7 +2,7 @@
 PROJECT(ofstd)
 
 # declare include directories which hold for all subdirectories
-INCLUDE_DIRECTORIES(${ofstd_SOURCE_DIR}/include ${LIBICONV_INCDIR})
+INCLUDE_DIRECTORIES("${ofstd_SOURCE_DIR}/include" ${LIBICONV_INCDIR})
 
 # recurse into subdirectories
 FOREACH(SUBDIR libsrc include tests)
diff --git a/ofstd/include/CMakeLists.txt b/ofstd/include/CMakeLists.txt
index 4b9f0f2..29489e9 100644
--- a/ofstd/include/CMakeLists.txt
+++ b/ofstd/include/CMakeLists.txt
@@ -1,2 +1,2 @@
 # declare installation files
-INSTALL(DIRECTORY dcmtk/ofstd DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "*.def")
+INSTALL(DIRECTORY dcmtk/ofstd DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "*.def")
diff --git a/ofstd/include/dcmtk/ofstd/diag/overflow.def b/ofstd/include/dcmtk/ofstd/diag/overflow.def
index a5f88af..181cdb1 100644
--- a/ofstd/include/dcmtk/ofstd/diag/overflow.def
+++ b/ofstd/include/dcmtk/ofstd/diag/overflow.def
@@ -2,8 +2,6 @@
 #pragma clang diagnostic ignored "-Winteger-overflow"
 #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0)
 #pragma GCC diagnostic ignored "-Woverflow"
-// Visual Studio doesn't seem to have such a warning yet, uncomment
-// and replace ???? when it does
-//#elif DCMTK_DIAGNOSTIC_MIN_MSC_VER(????)
-//#pragma warning(disable: ????)
+#elif defined(_MSC_VER)
+#pragma warning(disable: 4307)
 #endif
diff --git a/ofstd/include/dcmtk/ofstd/ofalgo.h b/ofstd/include/dcmtk/ofstd/ofalgo.h
index 2b17c4f..b7fd30b 100644
--- a/ofstd/include/dcmtk/ofstd/ofalgo.h
+++ b/ofstd/include/dcmtk/ofstd/ofalgo.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2012, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -67,7 +67,7 @@
 //   the parameter function to the correct type (e.g. NeXT gcc 2.5.8)
 
 
-#if defined(HAVE_STL) || defined(HAVE_STL_ALGORITHMS)
+#ifdef HAVE_STL_ALGORITHM
 // It is possible to use the standard template library list class since the
 // interface is nearly identical.
 // Important: If you want to use the standard template library (STL), no
diff --git a/ofstd/include/dcmtk/ofstd/ofalign.h b/ofstd/include/dcmtk/ofstd/ofalign.h
index a1cb032..ac2ef01 100644
--- a/ofstd/include/dcmtk/ofstd/ofalign.h
+++ b/ofstd/include/dcmtk/ofstd/ofalign.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2014, OFFIS e.V.
+ *  Copyright (C) 2014-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,7 +27,7 @@
 #include "dcmtk/ofstd/oftypes.h"
 
 // use native functionality if C++11 is supported
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
 
 #define OFalignof alignof
 // these helper templates automatically resolve the alignment
@@ -49,19 +49,21 @@ constexpr size_t OFalignof_or_identity_template() { return Size; }
 
 // these helper templates automatically resolve the alignment
 // if a type is given and pass-through any numeric constant
-template<size_t Size>
-struct OFalignas_size_helper { Uint8 size[Size]; };
 template<typename T>
-OFalignas_size_helper
-<
+struct OFalignas_size_helper_t
+{
 #ifdef OFalignof
-    OFalignof(T)
+    Uint8 size[OFalignof(T)];
 #else // use sizeof instead
-    sizeof(T)
+    Uint8 size[sizeof(T)];
 #endif
-> OFalignof_or_identity_template() {}
+};
+template<typename T>
+OFalignas_size_helper_t<T> OFalignof_or_identity_template() {}
 template<size_t Size>
-OFalignas_size_helper<Size> OFalignof_or_identity_template() {}
+struct OFalignas_size_helper_s { Uint8 size[Size]; };
+template<size_t Size>
+OFalignas_size_helper_s<Size> OFalignof_or_identity_template() {}
 #define OFalignof_or_identity(A) sizeof(OFalignof_or_identity_template<A>())
 
 #else // DOXYGEN
@@ -90,21 +92,21 @@ OFalignas_size_helper<Size> OFalignof_or_identity_template() {}
  */
 #define OFalignas <unspecified>
 
-/** Determine a type with modified alignment for a given type T.
+/** Align a variable or data member.
  *  @note OFalign may not be available on your platform / compiler combination.
  *    Use <kbd>#ifdef OFalign</kbd> to query availability.
  *  @sa OFalign_typename
  *  @details
  *  OFalign can be though of as the least common denominator of the alignment capabilities
  *  available on different platform / compiler combinations. Given a type T and an integral
- *  expression I, <kbd>OFalign(T,I)</kbd> evaluates to an appropriately aligned type corresponding
- *  to T.<br>
+ *  expression I, <kbd>OFalign(T,I)</kbd> evaluates to a type with a corresponding alignment
+ *  modifier (either included in the type definition or as a modifier put next to it).<br>
  *  You may also use another type to specify the desired alignment, e.g. <kbd>OFalign(T,int)</kbd>.
  *  OFalign will then calculate the alignment using <i>OFalignof</i> (if available) or use
  *  <i>sizeof()</i> as approximation.<br>
  *  To align arrays via OFalign, simply pass the array's extents within the parameter, e.g.
  *  <kbd>OFalign(char[12],float)</kbd> to align an array containing <i>12</i> chars like a float.<br>
- *  When using OFalign inside a dependant scope (i.e. inside templates), you may need
+ *  When using OFalign inside a dependent scope (i.e. inside templates), you may need
  *  to use OFalign_typename instead, e.g.
  *  @code typedef OFalign_typename(T,16) value_type; @endcode
  *  OFalign should support alignments as any power of two <= 8192 (examine your compiler's manual
@@ -124,14 +126,14 @@ OFalignas_size_helper<Size> OFalignof_or_identity_template() {}
  *  @sa OFalign
  *  @details
  *  OFalign_typename is an alternate version of OFalign that internally uses keywords like
- *  <i>OFTypename</i> so it can be used inside a dependant scope. See OFalign for more information.
+ *  <i>OFTypename</i> so it can be used inside a dependent scope. See OFalign for more information.
  */
 #define OFalign_typename OFTypename <unspecified>
 
 #endif // C++11
 
 // alignas
-#if defined(DCMTK_USE_CXX11_STL) && defined(ALIGNAS_SUPPORTS_TYPEDEFS)
+#if defined(HAVE_CXX11)
 
 #define OFalignas alignas
 
@@ -195,19 +197,17 @@ public:
 
 #if defined(OFalignas) && !defined(DOXYGEN)
 // OFalign based on OFalignas, so this is "platform-independent".
-#define OFalign(T,A) OFalignas_align<T>::as<OFalignof_or_identity(A)>::type
-#define OFalign_typename(T,A) OFTypename OFalignas_align<T>::template as<OFalignof_or_identity(A)>::type
+#define OFalign(T,A) OFalignas(A) OFalignas_type<T>::type
+#define OFalign_typename(T,A) OFalignas(A) OFTypename OFalignas_type<T>::type
 template<typename T>
-struct OFalignas_align
+struct OFalignas_type
 {
-    template<size_t A>
-    struct as { typedef T type OFalignas(A); };
+    typedef T type;
 };
 template<typename T,size_t S>
-struct OFalignas_align<T[S]>
+struct OFalignas_type<T[S]>
 {
-    template<size_t A>
-    struct as { typedef T type[S] OFalignas(A); };
+    typedef T type[S];
 };
 #endif
 
diff --git a/ofstd/include/dcmtk/ofstd/ofaptr.h b/ofstd/include/dcmtk/ofstd/ofaptr.h
deleted file mode 100644
index 95e6062..0000000
--- a/ofstd/include/dcmtk/ofstd/ofaptr.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- *
- *  Copyright (C) 2009-2010, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module:  ofstd
- *
- *  Author:  Uli Schlachter
- *
- *  Purpose: Template class for automatically deleting pointers when they go out
- *           of scope.
- *
- */
-
-#ifndef OFAPTR_H
-#define OFAPTR_H
-
-#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
-
-#if defined(HAVE_STL) || defined(HAVE_STL_AUTO_PTR)
-// std::auto_ptr has an identicaly interface so it can be used as an alternative
-#include <memory>
-#define OFauto_ptr std::auto_ptr
-
-#else
-
-#define INCLUDE_CSTDDEF               /* For NULL */
-#include "dcmtk/ofstd/ofstdinc.h"
-
-/** internal class, don't ever use this directly!
- *  This is needed to make the following code work:
- *  <pre>
- *  OFauto_ptr<X> func() { return new X; }
- *  OFauto_ptr<X> local_var = func();
- *  </pre>
- *
- *  The compiler will add implicit casts to OFauto_ptr_ref to make this work:
- *  <pre>
- *  OFauto_ptr<X> func() { return OFauto_ptr_ref<X>(new X); }
- *  OFauto_ptr<X> local_var = OFstatic_cast(OFauto_ptr_ref<X>, func());
- *  </pre>
- */
-template <class T> class OFauto_ptr_ref
-{
-public:
-    /// the pointer that it's all about
-    T *ptr;
-
-    /** constructs a OFauto_ptr_ref from a pointer.
-     *  @param p the pointer to use.
-     */
-    explicit OFauto_ptr_ref(T* p) : ptr(p)
-    {
-    }
-};
-
-/** a simple class which makes sure a pointer is deleted once it goes out of
- *  scope. This class does NOT do reference counting!
- *  This is a reimplementation of std::auto_ptr.
- */
-template <class T> class OFauto_ptr
-{
-  protected:
-    /// the pointer that it's all about
-    T *ptr;
-
-  public:
-    /** constructs a OFauto_ptr from the given pointer.
-     *  You must not call delete on a pointer that is managed by OFauto_ptr!
-     *  @param p the pointer
-     */
-    explicit OFauto_ptr(T* p = NULL) : ptr(p)
-    {
-    }
-
-    /** constructs a OFauto_ptr from another OFauto_ptr. The other OFauto_ptr
-     *  will be invalidated. This means he will point to NULL from now on!
-     *  @param other the OFauto_ptr to get the pointer from.
-     */
-    OFauto_ptr(OFauto_ptr<T>& other) : ptr(other.release())
-    {
-    }
-
-    /** constructs a OFauto_ptr from an OFauto_ptr_ref.
-     *  @param other the OFauto_ptr_ref to get the pointer from.
-     */
-    OFauto_ptr(OFauto_ptr_ref<T> other) : ptr(other.ptr)
-    {
-    }
-
-    /** destructor. Destroys the pointer that is managed by this instance,
-     *  if there is any.
-     */
-    ~OFauto_ptr()
-    {
-        reset();
-    }
-
-    /** assign another pointer to this OFauto_ptr, possibly deleting our
-     *  current pointer
-     *  @param p the new pointer
-     */
-    void reset(T* p = NULL)
-    {
-        if (this->ptr)
-            delete this->ptr;
-        this->ptr = p;
-    }
-
-    /** get the pointer that is managed by this class
-     *  @return the pointer
-     */
-    T* get() const { return this->ptr; }
-
-    /** get the pointer that is managed by this class
-     *  @return the pointer
-     */
-    T* operator->() const { return get(); }
-
-    /** dereference the pointer that is managed by this class
-     *  @return the reference
-     */
-    T& operator*() const { return *get(); }
-
-    /** this is used automatically by the compiler, don't call directly
-     *  @return an OFauto_ptr_ref that stores this object's pointer
-     */
-    operator OFauto_ptr_ref<T>()
-    {
-        return OFauto_ptr_ref<T>(release());
-    }
-
-    /** assigns the other pointer to this OFauto_ptr
-     *  @param other other OFauto_ptr which will be invalidated
-     *  @return reference to this object
-     */
-    OFauto_ptr& operator=(OFauto_ptr<T>& other)
-    {
-        reset(other.release());
-        return *this;
-    }
-
-    /** assigns the other pointer to this OFauto_ptr
-     *  @param other other OFauto_ptr_ref
-     *  @return reference to this object
-     */
-    OFauto_ptr& operator=(OFauto_ptr_ref<T> other)
-    {
-        reset(other.ptr);
-        return *this;
-    }
-
-    /** release the pointer that is managed by this class. You are now
-     *  responsible for destroying that pointer yourself!
-     *  @return the pointer
-     */
-    T* release()
-    {
-        T* tmp = this->ptr;
-        this->ptr = NULL;
-        return tmp;
-    }
-};
-
-#endif
-
-#endif
diff --git a/ofstd/include/dcmtk/ofstd/ofchrenc.h b/ofstd/include/dcmtk/ofstd/ofchrenc.h
index 012dde3..adb2239 100644
--- a/ofstd/include/dcmtk/ofstd/ofchrenc.h
+++ b/ofstd/include/dcmtk/ofstd/ofchrenc.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2011-2016, OFFIS e.V.
+ *  Copyright (C) 2011-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -126,7 +126,7 @@ public:
     /** check whether this object refers to a valid encoder.
      *  @result OFTrue if this refers to a valid encoder, OFFalse otherwise.
      */
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
     explicit
 #endif
     operator OFBool() const;
diff --git a/ofstd/include/dcmtk/ofstd/ofdefine.h b/ofstd/include/dcmtk/ofstd/ofdefine.h
index e95d7f0..3ce721f 100644
--- a/ofstd/include/dcmtk/ofstd/ofdefine.h
+++ b/ofstd/include/dcmtk/ofstd/ofdefine.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2014, OFFIS e.V.
+ *  Copyright (C) 1994-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -100,7 +100,7 @@ END_EXTERN_C
 #endif
 
 /* define OFconstexpr to 'constexpr' or '' if not supported */
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
 #define OFconstexpr constexpr
 #else // C++11
 #define OFconstexpr
diff --git a/ofstd/include/dcmtk/ofstd/oferror.h b/ofstd/include/dcmtk/ofstd/oferror.h
new file mode 100644
index 0000000..d7473d8
--- /dev/null
+++ b/ofstd/include/dcmtk/ofstd/oferror.h
@@ -0,0 +1,245 @@
+/*
+ *
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  ofstd
+ *
+ *  Author: Nikolas Goldhammer
+ *
+ *  Purpose:
+ *      Implementing platform abstracting error code handling.
+ *
+ */
+
+#ifndef OFERROR_H
+#define OFERROR_H
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+// also require STL string, since otherwise OFsystem_error would become incompatible with OFString
+#if defined(HAVE_STL_SYSTEM_ERROR) && defined(HAVE_STL_STRING)
+
+#include <system_error>
+typedef STD_NAMESPACE error_category OFerror_category;
+typedef STD_NAMESPACE error_code OFerror_code;
+
+inline const OFerror_category& OFsystem_category() { return STD_NAMESPACE system_category(); }
+inline const OFerror_category& OFgeneric_category() { return STD_NAMESPACE generic_category(); }
+
+#else // fallback implementations
+
+#define INCLUDE_CERRNO
+#include "dcmtk/ofstd/ofstdinc.h"
+
+#include "dcmtk/ofstd/ofstring.h"
+
+// for Doxygen such that it does not ignore the globally declared functions
+/// @file oferror.h Declares classes and functions for platform abstracting error code handling.
+
+/** OFerror_category serves as the base class for specific error category types,
+ *  such as OFsystem_category. It is possible to make your own error_category class.
+ *  The objects of error category classes are treated as singletons, passed by reference.
+ *  @note this implementation is meant to be a subset of the C++11's std::error_category
+ *  that lacks the following features: error condition support, iostream category,
+ *                                     future category.
+ *  See: http://en.cppreference.com/w/cpp/error/error_category to compare OFerror_category
+ *  against std::error_category.
+ *
+ *  The following table describes the possible operations on two instances <i>a</i> and <i>b</i>
+ *  of %OFerror_category:
+ *  <table border>
+ *    <tr><th>Expression</th><th>Meaning</th></tr>
+ *    <tr>
+ *      <td><center><kbd>a != b</kbd></center></td>
+ *      <td>Compares two OFerror_category objects and evaluates to OFTrue if both objects refer to different error categories.</td>
+ *    </tr>
+ *    <tr>
+ *      <td><center><kbd>a == b</kbd></center></td>
+ *      <td>Compares two OFerror_category objects and evaluates to OFTrue if both objects refer to the same error category.</td>
+ *    </tr>
+ *    <tr>
+ *      <td><center><kbd>a < b</kbd></center></td>
+ *      <td>
+ *        Implements a total order on OFerror_category objects. The semantics of one category being compared less than another
+ *        are intentionally not defined, but, if one category compares less than to another it will stay that way during the
+ *        remaining execution of the program and one and the same category will never compare less than to itself.
+ *      </td>
+ *    </tr>
+ *  </Table>
+ *  @see OFgeneric_category()
+ *  @see OFsystem_category()
+ */
+class DCMTK_OFSTD_EXPORT OFerror_category
+{
+public:
+
+    /** Default constructor, used by derived classes.
+     */
+    inline OFerror_category() {}
+
+    /** Obtains the name of the category, for example "generic".
+     *  @return a character pointer that refers to the name of the category.
+     */
+    virtual const char* name() const = 0;
+
+    /** Constructs an explanatory string for an error code.
+     *  @param code an integer that shall be interpreted as an error code.
+     *  @return an explanatory error message for the given code as an OFString.
+     */
+    virtual OFString message( int code ) const = 0;
+
+    // operator implementations, see above table for documentation
+#ifndef DOXYGEN
+    inline OFBool operator==(const OFerror_category& rhs) const { return this == &rhs; }
+    inline OFBool operator!=(const OFerror_category& rhs) const { return this != &rhs; }
+    inline OFBool operator<(const OFerror_category& rhs) const { return this < &rhs; }
+#endif // NOT DOXYGEN
+
+private:
+
+    // ensure singleton behavior by disabling the copy constructor and assignment
+    // operator
+#ifndef DOXYGEN
+    OFerror_category(const OFerror_category& other);
+    OFerror_category& operator=(const OFerror_category& rhs);
+#endif // NOT DOXYGEN
+};
+
+
+/** OFerror_code is a platform abstracting wrapper for platform specific error codes.
+ *  Each OFerror_code object holds an error code originating from the operating system
+ *  or some low-level interface and a pointer to an object of type OFerror_category,
+ *  which corresponds to the said interface. The error code values may be not unique across
+ *  different error categories.
+ *  @note This implementation is meant to be a subset of the C++11's std::error_code
+ *  that lacks the following features: error condition support, iostream category,
+ *                                     future category.
+ *  See: http://en.cppreference.com/w/cpp/error/error_code to compare OFerror_code against
+ *  std::error_code.
+ *
+ *  The following table describes the possible operations on two instances <i>a</i> and <i>b</i>
+ *  of %OFerror_code:
+ *  <table border>
+ *    <tr><th>Expression</th><th>Meaning</th></tr>
+ *    <tr>
+ *      <td><center><kbd>if(a), while(a), ...</kbd></center></td>
+ *      <td>
+ *        Test whether the error code refers to an error message or means that everything went fine.
+ *        OFTrue if the object refers to an error, OFFalse otherwise.
+ *      </td>
+ *    </tr>
+ *    <tr>
+ *      <td><center><kbd>a != b</kbd></center></td>
+ *      <td>
+ *        Compares two OFerror_code objects, evaluates to OFTrue if both objects refer to a different
+ *        error code, that is, if either the code or the category (or both) differ, OFFalse otherwise.
+ *      </td>
+ *    </tr>
+ *    <tr>
+ *      <td><center><kbd>a == b</kbd></center></td>
+ *      <td>
+ *        Compares two OFerror_code objects, evaluates to OFTrue if both objects refer to the same
+ *        error code, that is, if both the code and the category are equal, OFFalse otherwise.
+ *      </td>
+ *    </tr>
+ *    <tr>
+ *      <td><center><kbd>a < b</kbd></center></td>
+ *      <td>
+ *        Implements a total order on OFerror_code objects. Will return OFTrue if the category of <i>a</i>
+ *        compares less than to the category of <i>b</i>. Will return OFFalse if the category of <i>b</i>
+ *        compares less than to the category of <i>a</i>. If both objects refer to the same category, they
+ *        will be ordered using the actual error code integer.
+ *      </td>
+ *    </tr>
+ *  </Table>
+ */
+class DCMTK_OFSTD_EXPORT OFerror_code
+{
+public:
+
+    /** Default constructor.
+     *  Initializes an error code with value 0 (success)
+     *  and category OFsystem_category().
+     */
+    OFerror_code();
+
+    /** Constructs an error code from the given arguments.
+     *  @param code the actual error code.
+     *  @param category a reference to the OFerror_category that shall be used.
+     */
+    OFerror_code( int code, const OFerror_category& category );
+
+    /** Replaces the contents with the given error code and category.
+     *  @param code the actual error code.
+     *  @param category a reference to the OFerror_category that shall be used.
+     */
+    void assign( int code, const OFerror_category& category );
+
+    /** Sets the error code to value 0 (success) and the category
+     *  to OFsystem_category().
+     */
+    void clear();
+
+    /** Obtains the actual error code.
+     *  @return the error code as an integer.
+     */
+    int value() const;
+
+    /** Obtains the category linked to this error code.
+     *  @return a reference to the linked error category.
+     */
+    const OFerror_category& category() const;
+
+    /** Constructs an explanatory string for this error code using the
+     *  linked error category.
+     *  @return the error message as an OFString.
+     */
+    OFString message() const;
+
+    // declare overloaded operators, see above table for documentation
+#ifndef DOXYGEN
+#ifdef HAVE_CXX11
+    explicit
+#endif
+    operator OFBool() const;
+    OFBool operator!=( const OFerror_code& rhs ) const;
+    OFBool operator==( const OFerror_code& rhs ) const;
+    OFBool operator<( const OFerror_code& rhs ) const;
+#endif // NOT DOXYGEN
+
+private:
+
+    /// holds the error value.
+    int m_Code;
+
+    /// holds the error category
+    const OFerror_category* m_Category;
+};
+
+/** Retrieves a reference to an OFerror_category object used for operating system
+ *  specific error codes.
+ *  The object is required to override the virtual function OFerror_category::name()
+ *  to return a pointer to the string "system".
+ *  @return a reference to the system error category.
+ */
+DCMTK_OFSTD_EXPORT const OFerror_category& OFsystem_category();
+
+/** Retrieves a reference to an OFerror_category object used for generic error codes.
+ *  The object is required to override the virtual function OFerror_category::name()
+ *  to return a pointer to the string "generic".
+ *  @return a reference to the generic error category.
+ */
+DCMTK_OFSTD_EXPORT const OFerror_category& OFgeneric_category();
+
+#endif // NOT HAVE_STL_SYSTEM_ERROR && HAVE_STL_STRING
+
+#endif // OFERROR_H
diff --git a/ofstd/include/dcmtk/ofstd/offile.h b/ofstd/include/dcmtk/ofstd/offile.h
index da2abe1..656ac7c 100644
--- a/ofstd/include/dcmtk/ofstd/offile.h
+++ b/ofstd/include/dcmtk/ofstd/offile.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2006-2016, OFFIS e.V.
+ *  Copyright (C) 2006-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -43,6 +43,10 @@ BEGIN_EXTERN_C
 #endif
 END_EXTERN_C
 
+#ifdef HAVE_UNIX_H
+#include <unix.h>           /* needed for setlinebuf() on QNX */
+#endif
+
 /* HP-UX has clearerr both as macro and as a function definition. We have to
  * undef the macro so that we can define a function called "clearerr".
  */
@@ -59,19 +63,11 @@ END_EXTERN_C
  * Yes, this is ugly.
  */
 
-/* Find out whether current operating system needs explicit function calls
- * to handle large file support
+/* Find out whether to use explicit LFS function calls to handle
+ * large file support
  */
-#ifdef _LARGEFILE64_SOURCE
-  // Mac OS X defines _LARGEFILE64_SOURCE but anyhow expects implicit 64 bit calls.
-  // The same is true for current Cygwin versions (tested with version 1.7.7-1).
-  #if !(defined(__MACH__) && defined(__APPLE__)) && !defined(__CYGWIN__)
-    #define EXPLICIT_LFS_64
-  #endif
-#endif
-
-// Explicit LFS (LFS64) and Windows need 64 bit types
-#if defined(EXPLICIT_LFS_64) || defined(_WIN32)
+#if defined(DCMTK_ENABLE_LFS) && DCMTK_ENABLE_LFS == DCMTK_LFS64
+#define EXPLICIT_LFS_64
 
 // Use POSIX 64 bit file position type when available
 #ifdef HAVE_FPOS64_T
@@ -92,7 +88,19 @@ typedef Sint64 offile_off_t;
 
 #else // Implicit LFS or no LFS
 
-#ifdef HAVE_FSEEKO
+#if defined(DCMTK_ENABLE_LFS) && DCMTK_ENABLE_LFS == DCMTK_LFS
+#if defined(SIZEOF_FPOS_T) && (!defined(SIZEOF_OFF_T) || SIZEOF_FPOS_T > SIZEOF_OFF_T)
+// strange Windows LFS where sizeof(fpos_t) == 8 but sizeof(off_t) == 4
+#ifndef OF_NO_SINT64 // Use a 64 bit integer
+typedef Sint64 offile_off_t;
+#else // Cry when LFS is required but no 64 bit integer exists
+#error \
+  Could not find a suitable offset-type for LFS support.
+#endif
+#else
+typedef off_t offile_off_t;
+#endif
+#elif defined(HAVE_FSEEKO)
 typedef off_t offile_off_t;
 #else
 typedef long offile_off_t;
@@ -834,8 +842,8 @@ public:
   int fgetpos(offile_fpos_t *pos)
   {
     int result;
-#if defined(EXPLICIT_LFS_64) && ! defined(__MINGW32__)
-    // MinGW has EXPLICIT_LFS_64 but no fgetpos64()
+#if defined(EXPLICIT_LFS_64) && ! defined(__MINGW32__) && ! defined(__QNX__)
+    // MinGW and QNX have EXPLICIT_LFS_64 but no fgetpos64()
     result = :: fgetpos64(file_, pos);
 #else
     result = STDIO_NAMESPACE fgetpos(file_, pos);
@@ -854,8 +862,8 @@ public:
   int fsetpos(offile_fpos_t *pos)
   {
     int result;
-#if defined(EXPLICIT_LFS_64) && ! defined(__MINGW32__)
-    // MinGW has EXPLICIT_LFS_64 but no fsetpos64()
+#if defined(EXPLICIT_LFS_64) && ! defined(__MINGW32__) && ! defined(__QNX__)
+    // MinGW and QNX have EXPLICIT_LFS_64 but no fsetpos64()
     result = :: fsetpos64(file_, pos);
 #else
     result = STDIO_NAMESPACE fsetpos(file_, pos);
diff --git a/ofstd/include/dcmtk/ofstd/oflimits.h b/ofstd/include/dcmtk/ofstd/oflimits.h
index 0f9a7ac..5c0b920 100644
--- a/ofstd/include/dcmtk/ofstd/oflimits.h
+++ b/ofstd/include/dcmtk/ofstd/oflimits.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2014, OFFIS e.V.
+ *  Copyright (C) 2014-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -33,12 +33,11 @@
  *  @brief Provides an interface to query properties of all fundamental numeric types.
  */
 
-// use native classes if C++11 is supported
-#if __cplusplus >= 201103L
+// use native classes if available
+#ifdef HAVE_STL_LIMITS
 
 #include <limits>
-using OFfloat_round_style = std::float_round_style;
-enum
+enum OFfloat_round_style
 {
     OFround_indeterminate       = std::round_indeterminate,
     OFround_toward_zero         = std::round_toward_zero,
@@ -46,17 +45,42 @@ enum
     OFround_toward_infinity     = std::round_toward_infinity,
     OFround_toward_neg_infinity = std::round_toward_neg_infinity
 };
-using OFfloat_denorm_style = std::float_denorm_style;
-enum
+enum OFfloat_denorm_style
 {
     OFdenorm_indeterminate = std::denorm_indeterminate,
     OFdenorm_absent        = std::denorm_absent,
     OFdenorm_present       = std::denorm_present
 };
+
+#ifdef HAVE_CXX11
+
 template<typename T>
 using OFnumeric_limits = std::numeric_limits<T>;
 
-#else // fallback implementations
+#else // fallback implementation of C++11 features
+
+template<typename T>
+struct OFnumeric_limits : std::numeric_limits<T>
+{
+    static const int max_digits10 = 0;
+    static inline T lowest() { return std::numeric_limits<T>::min(); }
+};
+template<>
+struct OFnumeric_limits<float> : std::numeric_limits<float>
+{
+    static const int max_digits10 = DCMTK_FLOAT_MAX_DIGITS10;
+    static inline float lowest() { return -std::numeric_limits<float>::max(); }
+};
+template<>
+struct OFnumeric_limits<double> : std::numeric_limits<double>
+{
+    static const int max_digits10 = DCMTK_DOUBLE_MAX_DIGITS10;
+    static inline double lowest() { return -std::numeric_limits<double>::max(); }
+};
+
+#endif // fallback implementation of C++11 features based on std::numeric_limits
+
+#else // fallback implementations entirely without using the native STL
 
 #define INCLUDE_CLIMITS
 #define INCLUDE_CFLOAT
diff --git a/ofstd/include/dcmtk/ofstd/oflist.h b/ofstd/include/dcmtk/ofstd/oflist.h
index a0c3e0f..45d267c 100644
--- a/ofstd/include/dcmtk/ofstd/oflist.h
+++ b/ofstd/include/dcmtk/ofstd/oflist.h
@@ -47,7 +47,7 @@
 #error Your C++ compiler cannot handle class templates:
 #endif
 
-#if defined(HAVE_STL) || defined(HAVE_STL_LIST)
+#ifdef HAVE_STL_LIST
 // It is possible to use the standard template library list class since the
 // interface is nearly identical.
 // Important: If you want to use the standard template library (STL), no
diff --git a/ofstd/include/dcmtk/ofstd/ofmap.h b/ofstd/include/dcmtk/ofstd/ofmap.h
index 8e615bc..bcc07ba 100644
--- a/ofstd/include/dcmtk/ofstd/ofmap.h
+++ b/ofstd/include/dcmtk/ofstd/ofmap.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2009-2015, OFFIS e.V.
+ *  Copyright (C) 2009-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,7 +27,7 @@
 
 #include "dcmtk/ofstd/ofutil.h" // for OFPair
 
-#if defined(HAVE_STL) || defined(HAVE_STL_MAP)
+#ifdef HAVE_STL_MAP
 // it is possible to use the standard template library map class since the
 // interface is nearly identical.
 #include <map>
diff --git a/ofstd/include/dcmtk/ofstd/ofmem.h b/ofstd/include/dcmtk/ofstd/ofmem.h
index a805777..2d2fa57 100644
--- a/ofstd/include/dcmtk/ofstd/ofmem.h
+++ b/ofstd/include/dcmtk/ofstd/ofmem.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2012-2014, OFFIS e.V.
+ *  Copyright (C) 2012-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,7 +27,7 @@
 #include "dcmtk/ofstd/ofutil.h"
 
 // use native classes when c++11 is supported
-#ifdef DCMTK_USE_CXX11_STL
+#if defined(HAVE_STL_MEMORY) && defined(HAVE_CXX11)
 
 #include <memory>
 template<typename... ARGS>
diff --git a/ofstd/include/dcmtk/ofstd/ofoption.h b/ofstd/include/dcmtk/ofstd/ofoption.h
index ba96a52..99d50ab 100644
--- a/ofstd/include/dcmtk/ofstd/ofoption.h
+++ b/ofstd/include/dcmtk/ofstd/ofoption.h
@@ -39,7 +39,7 @@
 
 #ifndef DOXYGEN
 struct OFnullopt_t {};
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
 // declare constexpr nullopt if supported.
 constexpr OFnullopt_t OFnullopt{};
 #else // C++11
@@ -164,7 +164,7 @@ public:
     struct is_default_constructible
     : OFintegral_constant<OFBool,sizeof(sfinae<T>(OFnullptr)) == sizeof(yes_type)> {};
 
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
 
     template<typename... Args>
     void construct( Args&&... args )
@@ -192,7 +192,7 @@ public:
     void destroy() { OFstatic_cast( T*, content() )->~T(); m_State = OFFalse; }
     OFBool state() const { return m_State; }
     void* content() const { return m_Content; }
-    mutable OFalign_typename(Uint8[sizeof(T)],T) m_Content;
+    OFalign_typename(Uint8[sizeof(T)],T) mutable m_Content;
     OFBool m_State;
 #else
     // Allocate content on the heap.
@@ -745,7 +745,7 @@ public:
     // False friend of the copy constructor, to prevent incorrect behavior
     // (internally calls the real copy constructor).
     OFoptional( OFoptional& rhs )
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
     // delegate constructor if possible
     : OFoptional( const_cast<const OFoptional&>( rhs ) )
     {
@@ -767,7 +767,7 @@ public:
             OFoptional_traits<T>::construct( *rhs );
     }
 
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
     // Move constructor, kills rhs if it was engaged before.
     OFoptional( OFoptional&& rhs )
     : OFoptional_traits<T>()
@@ -877,7 +877,7 @@ public:
     // State and content accessing functions, see respective expression for details
 
 // declare cast operator as explicit, if possible
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
     explicit
 #endif // C++11
     operator OFBool() const
@@ -990,7 +990,7 @@ public:
     }
 
     // Move semantics if C++11 is supported
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
     OFoptional( OFoptional&& rhs )
     : m_pT( rhs.m_pT )
     {
@@ -1026,7 +1026,7 @@ public:
     // State and content accessing functions, see respective expression for details
 
 // declare cast operator as explicit, if possible
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
     explicit
 #endif // C++11
     operator bool() const
@@ -1061,7 +1061,7 @@ private:
 };
 
 // Move semantics and std::swap overload if C++11 is supported
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
 template<typename T>
 OFoptional<typename OFdecay<T>::type> OFmake_optional( T&& t )
 {
diff --git a/ofstd/include/dcmtk/ofstd/ofstack.h b/ofstd/include/dcmtk/ofstd/ofstack.h
index ba5f518..e0f3bf0 100644
--- a/ofstd/include/dcmtk/ofstd/ofstack.h
+++ b/ofstd/include/dcmtk/ofstd/ofstack.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2016, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -29,7 +29,7 @@
 #include "dcmtk/ofstd/ofcast.h"
 #include "dcmtk/ofstd/ofdefine.h"
 
-#if defined(HAVE_STL) || defined(HAVE_STL_STACK)
+#ifdef HAVE_STL_STACK
 // It is possible to use the standard template library list class since the
 // interface is nearly identical.
 // Important: If you want to use the standard template library, no variable
diff --git a/ofstd/include/dcmtk/ofstd/ofstd.h b/ofstd/include/dcmtk/ofstd/ofstd.h
index 684896d..8f0ccfe 100644
--- a/ofstd/include/dcmtk/ofstd/ofstd.h
+++ b/ofstd/include/dcmtk/ofstd/ofstd.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2015, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -31,6 +31,7 @@
 #include "dcmtk/ofstd/oftraits.h"   /* for OFenable_if, ... */
 #include "dcmtk/ofstd/ofcond.h"     /* for OFCondition */
 #include "dcmtk/ofstd/oflimits.h"   /* for OFnumeric_limits<T>::max() */
+#include "dcmtk/ofstd/oferror.h"
 
 #define INCLUDE_CASSERT
 #define INCLUDE_CSTDLIB
@@ -715,8 +716,9 @@ class DCMTK_OFSTD_EXPORT OFStandard
      *  is not affected by a locale setting, the radix character is always
      *  assumed to be '.'
      *  This implementation does not set errno if the input cannot be parsed
-     *  and it does not implement special handling for overflow/underflow
-     *  or NaN values.  However, a return code indicates whether or not
+     *  and it does not implement special handling for overflow/underflow.
+     *  It does handle "NaN" and "Inf" (case insensitive; following
+     *  characters are ignore). A return code indicates whether or not
      *  a successful conversion could be performed.
      *  The precision of this implementation is limited to approx. 9
      *  decimal digits.
@@ -918,7 +920,7 @@ class DCMTK_OFSTD_EXPORT OFStandard
 #else
     template<size_t Count>
     static OFTypename OFenable_if<!Count,OFBool>::type
-    checkDigits(const char* string)
+    checkDigits(const char* /*string*/)
     {
         return OFTrue;
     }
@@ -1026,6 +1028,41 @@ class DCMTK_OFSTD_EXPORT OFStandard
      */
     static OFString getHostName();
 
+    /** Initialize the network API (if necessary), e.g.\ Winsock.
+     *  Calls the appropriate network initialization routines for the current
+     *  platform, e.g.\ WSAStartup().
+     *  @note This function must be called by an application before any
+     *    network related functions are used, be it listening on a socket or
+     *    just retrieving the current host name. Not all platforms require
+     *    calling a network initialization routine, therefore testing if it
+     *    works to determine if this method must be called is not an option
+     *    -- just always ensure to call it at program startup if the
+     *    application does something network related!
+     */
+    static void initializeNetwork();
+
+    /** Shutdown the network API (if necessary), e.g.\ Winsock.
+     *  Calls the appropriate network shutdown routines to free used resources
+     *  (e.g.\ WSACleanup()).
+     */
+    static void shutdownNetwork();
+
+    /** Retrieve the last operating system error code that was emitted in the
+     *  calling thread.
+     *  The current implementation uses errno on POSIX-like platforms and
+     *  GetLastError() on Windows.
+     *  @return the last error code as OFerror_code object.
+     */
+    static OFerror_code getLastSystemErrorCode();
+
+    /** Retrieve the last network specific error code that was emitted in the
+     *  calling thread.
+     *  The current implementation uses errno on POSIX-like platforms and
+     *  WSAGetLastError() on Windows.
+     *  @return the last error code as OFerror_code object.
+     */
+    static OFerror_code getLastNetworkErrorCode();
+
  private:
 
     /** private implementation of strlcpy. Called when strlcpy
diff --git a/ofstd/include/dcmtk/ofstd/ofstream.h b/ofstd/include/dcmtk/ofstd/ofstream.h
index a8957a9..9c3775f 100644
--- a/ofstd/include/dcmtk/ofstd/ofstream.h
+++ b/ofstd/include/dcmtk/ofstd/ofstream.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2012, OFFIS e.V.
+ *  Copyright (C) 2002-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -95,7 +95,7 @@ typedef STD_NAMESPACE istringstream OFIStringStream;
 
 #define OFStringStream_ends ""
 
-#ifdef HAVE_STD_STRING
+#ifdef HAVE_STL_STRING
 #define OFSTRINGSTREAM_GETOFSTRING(oss, strng) \
     OFString strng((oss).str());
 #else
diff --git a/ofstd/include/dcmtk/ofstd/ofstring.h b/ofstd/include/dcmtk/ofstd/ofstring.h
index fc81532..0d0929f 100644
--- a/ofstd/include/dcmtk/ofstd/ofstring.h
+++ b/ofstd/include/dcmtk/ofstd/ofstring.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2012, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -33,7 +33,7 @@
 #define OFSTRING_GUARD(c_string) ((c_string != NULL) ? (c_string) : "")
 
 
-#ifdef HAVE_STD_STRING
+#ifdef HAVE_STL_STRING
 /*
 ** Use the ANSI Standard string class
 */
@@ -43,7 +43,7 @@
 #define OFString std::string
 #define OFString_npos std::string::npos
 
-#else /* not HAVE_STD_STRING */
+#else /* not HAVE_STL_STRING */
 
 /*
 ** Declare our own string class
@@ -1104,6 +1104,6 @@ DCMTK_OFSTD_EXPORT OFBool operator>= (const OFString& lhs, const char* rhs);
  */
 DCMTK_OFSTD_EXPORT OFBool operator>= (const OFString& lhs, char rhs);
 
-#endif /* HAVE_STD_STRING */
+#endif /* HAVE_STL_STRING */
 
 #endif /* OFSTRING_H */
diff --git a/ofstd/include/dcmtk/ofstd/oftraits.h b/ofstd/include/dcmtk/ofstd/oftraits.h
index a8a4e8b..3e8f775 100644
--- a/ofstd/include/dcmtk/ofstd/oftraits.h
+++ b/ofstd/include/dcmtk/ofstd/oftraits.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2014, OFFIS e.V.
+ *  Copyright (C) 2014-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -28,7 +28,7 @@
 #include "dcmtk/ofstd/oftypes.h"
 
 // use native classes if C++11 is supported
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_TYPE_TRAITS
 #include <type_traits>
 
 template<bool B,typename... ARGS>
diff --git a/ofstd/include/dcmtk/ofstd/oftuple.h b/ofstd/include/dcmtk/ofstd/oftuple.h
index 9718b53..9a6c3d5 100644
--- a/ofstd/include/dcmtk/ofstd/oftuple.h
+++ b/ofstd/include/dcmtk/ofstd/oftuple.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2014-2015, OFFIS e.V.
+ *  Copyright (C) 2014-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,16 +27,27 @@
 #include "dcmtk/ofstd/ofutil.h"
 #include "dcmtk/ofstd/ofdefine.h"
 
-// use native classes if C++11 is supported
-#ifdef DCMTK_USE_CXX11_STL
+// use native tuple if available
+#ifdef HAVE_STL_TUPLE
 #include <tuple>
 
-#define OFignore std::ignore
-#define OFmake_tuple std::make_tuple
-#define OFtie std::tie
+#define OFignore STD_NAMESPACE ignore
+#define OFmake_tuple STD_NAMESPACE make_tuple
+#define OFtie STD_NAMESPACE tie
 
+#ifdef HAVE_CXX11
 template<typename... Args>
 using OFtuple = std::tuple<Args...>;
+#else // HAVE_CXX11
+#include "dcmtk/ofstd/variadic/helpers.h"
+#define OFtuple STD_NAMESPACE tuple
+template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK(T)>
+void OFswap(OFtuple<OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>& lhs,
+            OFtuple<OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>& rhs)
+{
+    lhs.swap(rhs);
+}
+#endif // HAVE_CXX11
 
 #elif !defined(DOXYGEN) // fallback implementations
 
diff --git a/ofstd/include/dcmtk/ofstd/oftypes.h b/ofstd/include/dcmtk/ofstd/oftypes.h
index 217ec33..b8ecd70 100644
--- a/ofstd/include/dcmtk/ofstd/oftypes.h
+++ b/ofstd/include/dcmtk/ofstd/oftypes.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2014, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -34,7 +34,7 @@
  */
 
 // use native types if C++11 is supported
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
 #include <cstdint>
 #include <cstddef>
 #include <ostream>
@@ -120,7 +120,7 @@ typedef OFlonglong    Sint64;
 #define OF_NO_SINT64 1
 #endif
 
-#ifdef HAVE_INT64_T
+#ifdef HAVE_UINT64_T
 /* many platforms define uint64_t in <cstdint> */
 typedef uint64_t      Uint64;
 #elif SIZEOF_LONG == 8
diff --git a/ofstd/include/dcmtk/ofstd/ofutil.h b/ofstd/include/dcmtk/ofstd/ofutil.h
index db7f71f..44f6b97 100644
--- a/ofstd/include/dcmtk/ofstd/ofutil.h
+++ b/ofstd/include/dcmtk/ofstd/ofutil.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2014, OFFIS e.V.
+ *  Copyright (C) 2014-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -34,33 +34,14 @@
  *  for older compilers.
  */
 
-#ifdef DCMTK_USE_CXX11_STL
+// -------------------- misc C++11 / non C++11 utils --------------------
+
+#ifdef HAVE_CXX11
+
 #include <utility>
 #include <tuple>
 #define OFmove std::move
 #define OFswap std::swap
-#define OFMake_pair std::make_pair
-
-template<std::size_t Index,typename T>
-constexpr auto OFget( T&& t ) -> decltype( std::get<Index>( std::forward<T>( t ) ) )
-{
-    return std::get<Index>( std::forward<T>( t ) );
-}
-
-template<typename X,typename T>
-constexpr auto OFget( T&& t ) -> decltype( std::get<X>( std::forward<T>( t ) ) )
-{
-    return std::get<X>( std::forward<T>( t ) );
-}
-
-template<typename K,typename V>
-using OFPair = std::pair<K,V>;
-
-template<typename Tuple>
-using OFtuple_size = std::tuple_size<Tuple>;
-
-template<std::size_t Index,typename Tuple>
-using OFtuple_element = std::tuple_element<Index,Tuple>;
 
 // OFrvalue simply equals 'identity', as C++11 natively handles
 // rvalues / prvalues and so on.
@@ -127,6 +108,7 @@ public:
         sizeof(sfinae<T>(OFnullptr)) == sizeof(yes_type)
     >::type type;
 };
+
 #endif // NOT DOXYGEN
 
 /** A helper class to 'tag' objects as <i>rvalues</i> to help
@@ -170,6 +152,13 @@ struct OFrvalue : OFrvalue_base<T>::type
     inline OFrvalue(const T& t) : OFrvalue_base<T>::type( *OFreinterpret_cast( const OFrvalue*,  &t ) ) {}
     // copy-construct from an rvalue reference
     inline OFrvalue(const OFrvalue& rv) : OFrvalue_base<T>::type( rv ) {}
+    // poor man's in-place construction
+    template<typename X>
+    inline explicit OFrvalue( X x ) : OFrvalue_base<T>::type( x ) {}
+    template<typename X0,typename X1>
+    inline explicit OFrvalue( X0 x0, X1 x1 ) : OFrvalue_base<T>::type( x0, x1 ) {}
+    template<typename X0,typename X1,typename X2>
+    inline explicit OFrvalue( X0 x0, X1 x1, X2 x2 ) : OFrvalue_base<T>::type( x0, x1, x2 ) {}
 #endif // NOT DOXYGEN
 };
 
@@ -216,7 +205,7 @@ struct OFrvalue : OFrvalue_base<T>::type
  */
 #define OFrvalue_ref(T) unspecified
 #else // NOT DOXYGEN
-#define OFrvalue_ref(T) const OFrvalue<T>&
+#define OFrvalue_ref(T) const OFrvalue<T >&
 #endif
 
 /** Obtain an lvalue reference from an rvalue reference.
@@ -297,11 +286,18 @@ void OFswap( T& t0, T& t1 )
 ;
 #endif // DOXYGEN
 
-#if defined(HAVE_STL) || defined(HAVE_STL_MAP)
+#endif // NOT C++11
+
+// -------------------- STL pair --------------------
+
+#ifdef HAVE_STL_MAP
+
 // Use native pair class, to be compatible to std::map
 #define OFPair std::pair
 #define OFMake_pair std::make_pair
+
 #else // fallback implementation of std::pair
+
 /** a pair - this implements parts of std::pair's interface.
  */
 template<typename K, typename V> class OFPair
@@ -354,67 +350,56 @@ OFPair<K, V> OFMake_pair(const K& first, const V& second)
 {
     return OFPair<K, V>(first, second);
 }
-#endif // fallback implementation of OFPair
 
-/** A metafunction to determine the size of a tuple.
- *  @tparam Tuple a tuple type, e.g. an instance of OFtuple.
- *  @pre Tuple is a tuple type, see @ref tuple_types "Tuple Types"
- *    for definition.
- *  @return OFtuple_size is derived from an appropriate instance of
- *    OFintegral_constant if the preconditions are met. This means
- *    OFtuple_size declares a static member constant <i>value</i>
- *    set to the tuple's size.
- *  @relates OFPair
- *  @relates OFtuple
- *  @details
- *  <h3>Usage Example:</h3>
- *  @code{.cpp}
- *  typedef OFtuple<OFString,size_t,OFVector<int> > MyTuple;
- *  typedef OFPair<OFString,MyTuple> MyPair;
- *  COUT << "OFtuple_size<MyTuple>::value: " << OFtuple_size<MyTuple>::value << OFendl;
- *  COUT << "OFtuple_size<MyPair>::value: " << OFtuple_size<MyPair>::value << OFendl;
- *  @endcode
- *  <b>Output:</b>
- *  @verbatim
-    OFtuple_size<MyTuple>::value: 3
-    OFtuple_size<MyPair>::value: 2
-    @endverbatim
- *
- */
+#endif // HAVE_STL_MAP - fallback implementation of OFPair
+
+// -------------------- STL tuple --------------------
+
+#ifdef HAVE_STL_TUPLE
+
+#ifdef HAVE_CXX11
+
+template<std::size_t Index,typename T>
+constexpr auto OFget( T&& t ) -> decltype( std::get<Index>( std::forward<T>( t ) ) )
+{
+    return std::get<Index>( std::forward<T>( t ) );
+}
+
+template<typename X,typename T>
+constexpr auto OFget( T&& t ) -> decltype( std::get<X>( std::forward<T>( t ) ) )
+{
+    return std::get<X>( std::forward<T>( t ) );
+}
+
 template<typename Tuple>
-#ifndef DOXYGEN
-struct OFtuple_size;
-#else // NOT DOXYGEN
-<metafunction> OFtuple_size;
-#endif // DOXYGEN
+using OFtuple_size = std::tuple_size<Tuple>;
+
+template<std::size_t Index,typename Tuple>
+using OFtuple_element = std::tuple_element<Index,Tuple>;
+
+#else // HAVE_CXX11
+
+template<typename Tuple>
+struct OFtuple_size : STD_NAMESPACE tuple_size<Tuple> {};
 
-/** A metafunction to determine the type of one element of a tuple.
- *  @tparam Index the index of the element its type should be determined.
- *  @tparam Tuple a tuple type, e.g. an instance of OFtuple.
- *  @pre Tuple is a tuple type, see @ref tuple_types "Tuple Types"
- *    for definition.
- *  @pre Index is a valid index , essentially: <kbd>Index < OFtuple_size<Tuple>::value</kbd>.
- *  @return if the preconditions are met, OFtuple_element declares a member
- *    type alias <i>type</i> that yields the type of the element at the given index.
- *  @relates OFtuple
- *  @details
- *  <h3>Usage Example:</h3>
- *  @code{.cpp}
- *  typedef OFPair<OFString,size_t> MyPair;
- *  typedef OFtuple<OFtuple_element<0,MyPair>::type,OFtuple_element<1,MyPair>::type> MyTuple;
- *  MyPair pair( "Hello World", 42 );
- *  MyTuple tuple( pair ); // Works, since both elements' types are the same as within MyPair.
- *  @endcode
- *
- */
 template<size_t Index,typename Tuple>
-#ifndef DOXYGEN
+struct OFtuple_element : STD_NAMESPACE tuple_element<Index,Tuple> {};
+
+template<size_t Index,typename T>
+OFTypename OFtuple_element<Index,T>::type OFget( T& t ) { return STD_NAMESPACE get<Index>( t ); }
+
+template<size_t Index,typename T>
+OFTypename OFtuple_element<Index,T>::type OFget( const T& t ) { return STD_NAMESPACE get<Index>( t ); }
+
+#endif // NOT HAVE_CXX11
+
+#else // HAVE_STL_TUPLE
+
+template<typename Tuple>
+struct OFtuple_size;
+template<size_t Index,typename Tuple>
 struct OFtuple_element;
-#else // NOT DOXYGEN
-<metafunction> OFtuple_element;
-#endif // DOXYGEN
 
-#ifndef DOXYGEN
 // specialization of OFtuple_size for OFPair -> 2
 template<typename K,typename V>
 struct OFtuple_size<OFPair<K,V> >
@@ -480,7 +465,61 @@ struct OFtuple_nil;
 
 // include generated forward declaration for OFtuple.
 #include "dcmtk/ofstd/variadic/tuplefwd.h"
-#else // DOXYGEN
+
+#endif // HAVE_STL_TUPLE
+
+#ifdef DOXYGEN // doxygen documentation of OFtuple utils
+
+/** A metafunction to determine the size of a tuple.
+ *  @tparam Tuple a tuple type, e.g. an instance of OFtuple.
+ *  @pre Tuple is a tuple type, see @ref tuple_types "Tuple Types"
+ *    for definition.
+ *  @return OFtuple_size is derived from an appropriate instance of
+ *    OFintegral_constant if the preconditions are met. This means
+ *    OFtuple_size declares a static member constant <i>value</i>
+ *    set to the tuple's size.
+ *  @relates OFPair
+ *  @relates OFtuple
+ *  @details
+ *  <h3>Usage Example:</h3>
+ *  @code{.cpp}
+ *  typedef OFtuple<OFString,size_t,OFVector<int> > MyTuple;
+ *  typedef OFPair<OFString,MyTuple> MyPair;
+ *  COUT << "OFtuple_size<MyTuple>::value: " << OFtuple_size<MyTuple>::value << OFendl;
+ *  COUT << "OFtuple_size<MyPair>::value: " << OFtuple_size<MyPair>::value << OFendl;
+ *  @endcode
+ *  <b>Output:</b>
+ *  @verbatim
+    OFtuple_size<MyTuple>::value: 3
+    OFtuple_size<MyPair>::value: 2
+    @endverbatim
+ *
+ */
+template<typename Tuple>
+<metafunction> OFtuple_size;
+
+/** A metafunction to determine the type of one element of a tuple.
+ *  @tparam Index the index of the element its type should be determined.
+ *  @tparam Tuple a tuple type, e.g. an instance of OFtuple.
+ *  @pre Tuple is a tuple type, see @ref tuple_types "Tuple Types"
+ *    for definition.
+ *  @pre Index is a valid index , essentially: <kbd>Index < OFtuple_size<Tuple>::value</kbd>.
+ *  @return if the preconditions are met, OFtuple_element declares a member
+ *    type alias <i>type</i> that yields the type of the element at the given index.
+ *  @relates OFtuple
+ *  @details
+ *  <h3>Usage Example:</h3>
+ *  @code{.cpp}
+ *  typedef OFPair<OFString,size_t> MyPair;
+ *  typedef OFtuple<OFtuple_element<0,MyPair>::type,OFtuple_element<1,MyPair>::type> MyTuple;
+ *  MyPair pair( "Hello World", 42 );
+ *  MyTuple tuple( pair ); // Works, since both elements' types are the same as within MyPair.
+ *  @endcode
+ *
+ */
+template<size_t Index,typename Tuple>
+<metafunction> OFtuple_element;
+
 /** A function template to access an element of a tuple.
  *  @tparam Index the index of the element that should be accessed.
  *  @tparam Tuple a tuple type, e.g. an instance of OFtuple. This parameter
@@ -535,7 +574,7 @@ template<size_t Index,typename Tuple>
 const typename OFtuple_element<Index,Tuple>::type& OFget( const Tuple& tuple );
 #endif // DOXYGEN
 
-#endif // NOT C++11
+// -------------------- misc utils (OFinplace etc.) --------------------
 
 #ifndef DOXYGEN
 
diff --git a/ofstd/include/dcmtk/ofstd/ofvector.h b/ofstd/include/dcmtk/ofstd/ofvector.h
index c9f545e..8f76b90 100644
--- a/ofstd/include/dcmtk/ofstd/ofvector.h
+++ b/ofstd/include/dcmtk/ofstd/ofvector.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2010, OFFIS e.V.
+ *  Copyright (C) 2010-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -28,7 +28,7 @@
 #error Your C++ compiler cannot handle class templates:
 #endif
 
-#if defined(HAVE_STL) || defined(HAVE_STL_VECTOR)
+#ifdef HAVE_STL_VECTOR
 
 // Use the standard template library (STL) vector class.
 #include <vector>
@@ -85,7 +85,7 @@ public:
     /** default constructor. This creates an empty OFVector. */
     OFVector() : values_(NULL), allocated_(0), size_(0)
     {
-        reserve(0);
+
     }
 
     /** copy constructor.
diff --git a/ofstd/include/dcmtk/ofstd/ofvriant.h b/ofstd/include/dcmtk/ofstd/ofvriant.h
index d7eb225..4f2bcf7 100644
--- a/ofstd/include/dcmtk/ofstd/ofvriant.h
+++ b/ofstd/include/dcmtk/ofstd/ofvriant.h
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016, OFFIS e.V.
+ *  Copyright (C) 2016-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -34,7 +34,7 @@
  *  @see @ref ofvisit_variant "OFvisit" – @copybrief ofvisit_variant
  */
 
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
 #include <type_traits>
 #include <cassert>
 #include <limits>
diff --git a/ofstd/include/dcmtk/ofstd/variadic/tuple.h b/ofstd/include/dcmtk/ofstd/variadic/tuple.h
index a5cdf0e..a49b6a0 100644
--- a/ofstd/include/dcmtk/ofstd/variadic/tuple.h
+++ b/ofstd/include/dcmtk/ofstd/variadic/tuple.h
@@ -30,12 +30,23 @@ const typename OFtuple_element<N,OFtuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T
 {
     return OFget_tuple_element<typename OFtuple_element<N,OFtuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49> >::type,N>::from( t );
 }
+#ifdef HAVE_CXX11
+namespace std
+{
+    template<typename... Ts>
+    void swap( OFtuple<Ts...>& lhs, OFtuple<Ts...>& rhs )
+    {
+        lhs.swap( rhs );
+    }
+}
+#else
 template<typename T0,typename T1,typename T2,typename T3,typename T4,typename T5,typename T6,typename T7,typename T8,typename T9,typename T10,typename T11,typename T12,typename T13,typename T14,typename T15,typename T16,typename T17,typename T18,typename T19,typename T20,typename T21,typename T22,typename T23,typename T24,typename T25,typename T26,typename T27,typename T28,typename T29,typename T30,typename T31,typename T32,typename T33,typename T34,typename T35,typename T36,typename T37 [...]
 void OFswap( OFtuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49>& lhs,
              OFtuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49>& rhs )
 {
     lhs.swap( rhs );
 }
+#endif
 template<typename T0,typename T1,typename T2,typename T3,typename T4,typename T5,typename T6,typename T7,typename T8,typename T9,typename T10,typename T11,typename T12,typename T13,typename T14,typename T15,typename T16,typename T17,typename T18,typename T19,typename T20,typename T21,typename T22,typename T23,typename T24,typename T25,typename T26,typename T27,typename T28,typename T29,typename T30,typename T31,typename T32,typename T33,typename T34,typename T35,typename T36,typename T37 [...]
 OFBool operator==( const OFtuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49>& lhs,
                    const OFtuple<U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49>& rhs )
diff --git a/ofstd/libsrc/CMakeLists.txt b/ofstd/libsrc/CMakeLists.txt
index 8466f35..72b96d5 100644
--- a/ofstd/libsrc/CMakeLists.txt
+++ b/ofstd/libsrc/CMakeLists.txt
@@ -1,4 +1,4 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(ofstd ofchrenc ofcmdln ofconapp ofcond ofconfig ofconsol ofcrc32 ofdate ofdatime offile offname oflist ofstd ofstring ofthread oftime oftimer oftempf ofxml ofuuid ofmath)
+DCMTK_ADD_LIBRARY(ofstd ofchrenc ofcmdln ofconapp ofcond ofconfig ofconsol ofcrc32 ofdate ofdatime oferror offile offname oflist ofstd ofstring ofthread oftime oftimer oftempf ofxml ofuuid ofmath)
 
-DCMTK_TARGET_LINK_LIBRARIES(ofstd ${CHARSET_CONVERSION_LIBS} ${THREAD_LIBS} ${WIN32_STD_LIBRARIES})
+DCMTK_TARGET_LINK_LIBRARIES(ofstd ${CHARSET_CONVERSION_LIBS} ${SOCKET_LIBS} ${THREAD_LIBS} ${WIN32_STD_LIBRARIES})
diff --git a/ofstd/libsrc/Makefile.dep b/ofstd/libsrc/Makefile.dep
index 1861af7..e8e40f5 100644
--- a/ofstd/libsrc/Makefile.dep
+++ b/ofstd/libsrc/Makefile.dep
@@ -9,8 +9,9 @@ ofchrenc.o: ofchrenc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/ofdiag.h ../include/dcmtk/ofstd/ofconsol.h \
- ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/diag/push.def \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofdiag.h \
+ ../include/dcmtk/ofstd/ofconsol.h ../include/dcmtk/ofstd/ofthread.h \
+ ../include/dcmtk/ofstd/diag/push.def \
  ../include/dcmtk/ofstd/diag/shadow.def \
  ../include/dcmtk/ofstd/diag/pop.def
 ofcmdln.o: ofcmdln.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -23,8 +24,8 @@ ofcmdln.o: ofcmdln.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/ofchrenc.h ../include/dcmtk/ofstd/ofmem.h \
- ../include/dcmtk/ofstd/ofutil.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofchrenc.h \
+ ../include/dcmtk/ofstd/ofmem.h ../include/dcmtk/ofstd/ofutil.h \
  ../include/dcmtk/ofstd/variadic/tuplefwd.h
 ofconapp.o: ofconapp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofconapp.h ../include/dcmtk/ofstd/oftypes.h \
@@ -37,8 +38,8 @@ ofconapp.o: ofconapp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
  ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/ofchrenc.h ../include/dcmtk/ofstd/ofmem.h \
- ../include/dcmtk/ofstd/ofutil.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofchrenc.h \
+ ../include/dcmtk/ofstd/ofmem.h ../include/dcmtk/ofstd/ofutil.h \
  ../include/dcmtk/ofstd/variadic/tuplefwd.h
 ofcond.o: ofcond.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oftypes.h \
@@ -72,6 +73,18 @@ ofdatime.o: ofdatime.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
  ../include/dcmtk/ofstd/ofexport.h ../include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/ofstd/ofdate.h ../include/dcmtk/ofstd/oftime.h
+oferror.o: oferror.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstd.h \
+ ../include/dcmtk/ofstd/oflist.h ../include/dcmtk/ofstd/oftypes.h \
+ ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
+ ../include/dcmtk/ofstd/ofexport.h ../include/dcmtk/ofstd/ofstream.h \
+ ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftraits.h \
+ ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofdiag.h \
+ ../include/dcmtk/ofstd/diag/push.def \
+ ../include/dcmtk/ofstd/diag/vsprfw.def \
+ ../include/dcmtk/ofstd/diag/pop.def
 offile.o: offile.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/offile.h ../include/dcmtk/ofstd/oftypes.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
@@ -80,7 +93,8 @@ offile.o: offile.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
  ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 offname.o: offname.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/offname.h ../include/dcmtk/ofstd/oftypes.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
@@ -89,7 +103,8 @@ offname.o: offname.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
  ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 oflist.o: oflist.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oflist.h ../include/dcmtk/ofstd/oftypes.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
@@ -109,8 +124,8 @@ ofstd.o: ofstd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/offile.h ../include/dcmtk/ofstd/oftuple.h \
- ../include/dcmtk/ofstd/ofutil.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/offile.h \
+ ../include/dcmtk/ofstd/oftuple.h ../include/dcmtk/ofstd/ofutil.h \
  ../include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/ofstd/ofdiag.h ../include/dcmtk/ofstd/diag/push.def \
  ../include/dcmtk/ofstd/diag/mmtag.def \
@@ -133,7 +148,8 @@ oftempf.o: oftempf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/offname.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 ofthread.o: ofthread.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstd.h \
  ../include/dcmtk/ofstd/oflist.h ../include/dcmtk/ofstd/oftypes.h \
@@ -142,7 +158,8 @@ ofthread.o: ofthread.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/ofconsol.h
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofthread.h \
+ ../include/dcmtk/ofstd/ofconsol.h
 oftime.o: oftime.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/oftime.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftypes.h \
@@ -151,7 +168,8 @@ oftime.o: oftime.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
  ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 oftimer.o: oftimer.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftimer.h ../include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
@@ -164,7 +182,8 @@ ofuuid.o: ofuuid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/ofstd.h \
  ../include/dcmtk/ofstd/oflist.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 ofxml.o: ofxml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofxml.h ../include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
diff --git a/ofstd/libsrc/Makefile.in b/ofstd/libsrc/Makefile.in
index fe7705c..c64fac0 100644
--- a/ofstd/libsrc/Makefile.in
+++ b/ofstd/libsrc/Makefile.in
@@ -17,7 +17,8 @@ LOCALDEFS =
 
 objs = oflist.o ofstring.o ofcmdln.o ofconapp.o offname.o ofconsol.o ofthread.o \
 	ofcond.o ofstd.o ofcrc32.o ofdate.o oftime.o ofdatime.o oftimer.o \
-	ofconfig.o ofchrenc.o oftempf.o ofxml.o ofuuid.o offile.o ofmath.o
+	ofconfig.o ofchrenc.o oftempf.o ofxml.o ofuuid.o offile.o ofmath.o \
+	oferror.o
 
 library = libofstd.$(LIBEXT)
 
diff --git a/ofstd/libsrc/ofchrenc.cc b/ofstd/libsrc/ofchrenc.cc
index 70b2af3..5fa0d71 100644
--- a/ofstd/libsrc/ofchrenc.cc
+++ b/ofstd/libsrc/ofchrenc.cc
@@ -364,8 +364,16 @@ class OFCharacterEncoding::Implementation
         // the iconvctl function is implemented only in GNU libiconv and not in other
         // iconv implementations. The iconv implementation in the C standard library
         // therefore does not support different encoding flags.
+#ifdef __FreeBSD__
+        // FreeBSD has a custom mode where illegal sequences are replaced by '?', so
+        // none of the normal modes are supported.
+        return OFFalse;
+#else
+        // All other implementations seem to return an error when encountering
+        // illegal sequences by default, so 'abort' is the only supported mode.
         return flags == AbortTranscodingOnIllegalSequence;
 #endif
+#endif
     }
 
     unsigned getConversionFlags() const
@@ -384,7 +392,14 @@ class OFCharacterEncoding::Implementation
         if (result)
             return result;
 #endif
+#ifdef __FreeBSD__
+        // FreeBSD has a custom mode where illegal sequences are replaced by '?',
+        // which is none of the normal modes and can only be described as
+        // 'unknown' = 0
+        return 0;
+#else
         return AbortTranscodingOnIllegalSequence;
+#endif
     }
 
     OFBool setConversionFlags(const unsigned flags)
@@ -427,8 +442,14 @@ class OFCharacterEncoding::Implementation
         // the iconvctl function is implemented only in GNU libiconv and not in other
         // iconv implementations. The iconv implementation in the C standard library
         // therefore does not support different encoding flags.
+#ifdef __FreeBSD__
+        // FreeBSD has a custom mode where illegal sequences are replaced by '?', so
+        // none of the normal modes are supported.
+        return OFFalse;
+#else
         return flags == AbortTranscodingOnIllegalSequence;
 #endif
+#endif
     }
 
 
diff --git a/ofstd/libsrc/oferror.cc b/ofstd/libsrc/oferror.cc
new file mode 100644
index 0000000..8c9add8
--- /dev/null
+++ b/ofstd/libsrc/oferror.cc
@@ -0,0 +1,205 @@
+/*
+ *
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module: ofstd
+ *
+ *  Author: Nikolas Goldhammer
+ *
+ *  Purpose:
+ *      Implementing platform abstracting error code handling.
+ *
+ */
+
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+// Only provide the implementation if the STL one is not used
+#if !defined(HAVE_STL_SYSTEM_ERROR) || !defined(HAVE_STL_STRING)
+
+#define INCLUDE_CERRNO
+#include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/ofstd/ofstd.h"
+#include "dcmtk/ofstd/oferror.h"
+#include "dcmtk/ofstd/ofdiag.h"
+
+#ifdef HAVE_WINDOWS_H
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
+
+// all error categories are derived from the base error category.
+struct OFgeneric_error_category : OFerror_category
+{
+    static const char* unknownError()
+    {
+        return "Unknown error.";
+    }
+
+    // default constructor, since older versions of clang insist
+    inline OFgeneric_error_category() {}
+
+    const char* name() const
+    {
+        return "generic";
+    }
+
+    OFString message( int code ) const
+    {
+        char buffer[256];
+        const char* const result = OFStandard::strerror( code, buffer, 256 );
+        return OFString( result ? result : unknownError() );
+    }
+};
+
+struct OFsystem_error_category : OFgeneric_error_category
+{
+    // default constructor, since older versions of clang insist
+    inline OFsystem_error_category() {}
+
+    const char* name() const
+    {
+        return "system";
+    }
+
+    // only Windows has custom error codes, all others can simply use strerror from the generic category
+#ifdef _WIN32
+    OFString message( int code ) const
+    {
+        struct RAIICleaner
+        {
+            RAIICleaner() : buffer( OFnullptr ) {}
+            ~RAIICleaner() { LocalFree( buffer ); }
+            LPSTR buffer;
+        };
+        OFString message;
+        {
+            RAIICleaner cleanup;
+            if
+            (
+                FormatMessageA
+                (
+                    FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS,
+                    OFnullptr,
+                    code,
+                    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+                    OFreinterpret_cast(LPSTR, &cleanup.buffer),
+                    0,
+                    OFnullptr
+                ) > 0
+            )
+            {
+                message = cleanup.buffer;
+                // remove trailing "\r\n" FormatMessage() may potentially add although we never asked for this
+                if( message.length() >= 2 && message.substr( message.length() - 2 ) == "\r\n" )
+                    message = message.substr( 0, message.length() - 2 );
+            }
+        }
+        if( message.empty() )
+            message = unknownError();
+        return message;
+    }
+#endif
+};
+
+OFerror_code::OFerror_code()
+: m_Code( 0 )
+, m_Category( &OFsystem_category() )
+{
+
+}
+
+OFerror_code::OFerror_code( int code, const OFerror_category& category )
+: m_Code( code )
+, m_Category( &category )
+{
+
+}
+
+void OFerror_code::assign( int code, const OFerror_category& category )
+{
+    m_Code = code;
+    m_Category = &category;
+}
+
+void OFerror_code::clear()
+{
+    m_Code = 0;
+    m_Category = &OFsystem_category();
+}
+
+int OFerror_code::value() const
+{
+    return m_Code;
+}
+
+const OFerror_category& OFerror_code::category() const
+{
+    return *m_Category;
+}
+
+OFString OFerror_code::message() const
+{
+    return m_Category->message( value() );
+}
+
+OFBool OFerror_code::operator!=( const OFerror_code& rhs ) const
+{
+    return m_Code != rhs.m_Code || m_Category != rhs.m_Category;
+}
+
+OFBool OFerror_code::operator==( const OFerror_code& rhs ) const
+{
+    return m_Code == rhs.m_Code && m_Category == rhs.m_Category;
+}
+
+OFBool OFerror_code::operator<( const OFerror_code& rhs ) const
+{
+    return m_Category < rhs.m_Category || ( m_Category == rhs.m_Category && m_Code < rhs.m_Code );
+}
+
+OFerror_code::operator OFBool() const
+{
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_PERFORMANCE_WARNING
+    return m_Code;
+#include DCMTK_DIAGNOSTIC_POP
+}
+
+DCMTK_OFSTD_EXPORT const OFerror_category& OFsystem_category()
+{
+    static const OFsystem_error_category system_category_const;
+    return system_category_const;
+}
+
+DCMTK_OFSTD_EXPORT const OFerror_category& OFgeneric_category()
+{
+    static const OFgeneric_error_category generic_category_const;
+    return generic_category_const;
+}
+
+// helper class to ensure both categories are initialized before main(),
+// such that there will not be any race conditions in the singletons
+struct InitErrorCategories
+{
+    static InitErrorCategories Init;
+
+    InitErrorCategories()
+    {
+        OFstatic_cast(void, OFsystem_category());
+        OFstatic_cast(void, OFgeneric_category());
+    }
+};
+
+InitErrorCategories InitErrorCategories::Init;
+
+#endif // !HAVE_STL_SYSTEM_ERROR OR !HAVE_STL_STRING
diff --git a/ofstd/libsrc/ofstd.cc b/ofstd/libsrc/ofstd.cc
index 30510d3..048e50d 100644
--- a/ofstd/libsrc/ofstd.cc
+++ b/ofstd/libsrc/ofstd.cc
@@ -140,9 +140,14 @@ BEGIN_EXTERN_C
 #ifdef HAVE_SYS_UTSNAME_H
 #include <sys/utsname.h>
 #endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
 END_EXTERN_C
 
 #ifdef HAVE_WINDOWS_H
+#include <winsock2.h>
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>     /* for GetFileAttributes() */
 #include <direct.h>      /* for _mkdir() */
 #include <lm.h>          /* for NetWkstaUserGetInfo */
@@ -153,6 +158,18 @@ END_EXTERN_C
 #define F_OK 00 /* Existence only */
 #endif /* !R_OK */
 
+#elif defined(HAVE_WINSOCK_H)
+
+#include <winsock.h>  /* include winsock.h directly i.e. on MacOS */
+#ifdef macintosh
+/*
+** The WinSock header on Macintosh does not declare the WORD type nor the MAKEWORD
+** macro need to initialize the WinSock library.
+*/
+typedef u_short WORD;
+#define MAKEWORD(a,b) ((WORD) (((a)&0xff)<<8) | ((b)&0xff) )
+#endif /* macintosh */
+
 #endif /* HAVE_WINDOWS_H */
 
 #ifdef _WIN32
@@ -1815,6 +1832,16 @@ double OFStandard::atof(const char *s, OFBool *success)
         if (*p == '+') ++p;
     }
 
+    //Check for special cases like NaN
+    if ((p[0] == 'n' || p[0] == 'N') && (p[1] == 'a' || p[1] == 'A') && (p[2] == 'n' || p[2] == 'N')) {
+        if (success) *success = OFTrue;
+        return OFnumeric_limits<double>::quiet_NaN();
+    }
+
+    if ((p[0] == 'i' || p[0] == 'I') && (p[1] == 'n' || p[1] == 'N') && (p[2] == 'f' || p[2] == 'F')) {
+        if (success) *success = OFTrue;
+        return sign ? -OFnumeric_limits<double>::infinity() : OFnumeric_limits<double>::infinity();
+    }
     // Count the number of digits in the mantissa (including the decimal
     // point), and also locate the decimal point.
 
@@ -2594,6 +2621,14 @@ void OFStandard::trimString(const char*& pBegin, const char*& pEnd)
 
 #define MAX_NAME 65536
 
+#ifdef HAVE_GETHOSTBYNAME_R
+#ifndef HAVE_PROTOTYPE_GETHOSTBYNAME_R
+extern "C" {
+    int gethostbyname_r(const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop);
+}
+#endif
+#endif
+
 OFStandard::OFHostent OFStandard::getHostByName( const char* name )
 {
 #ifdef HAVE_GETHOSTBYNAME_R
@@ -2617,6 +2652,14 @@ OFStandard::OFHostent OFStandard::getHostByName( const char* name )
 #endif
 }
 
+#ifdef HAVE_GETHOSTBYADDR_R
+#ifndef HAVE_PROTOTYPE_GETHOSTBYADDR_R
+extern "C" {
+    int gethostbyaddr_r(const void *addr, socklen_t len, int type, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop);
+}
+#endif
+#endif
+
 OFStandard::OFHostent OFStandard::getHostByAddr( const char* addr,
                                      int len,
                                      int type )
@@ -2821,11 +2864,15 @@ OFCondition OFStandard::dropPrivileges()
 }
 
 
-#ifndef DCMTK_USE_CXX11_STL
+#ifndef HAVE_CXX11
 DCMTK_OFSTD_EXPORT OFnullptr_t OFnullptr;
 DCMTK_OFSTD_EXPORT OFnullopt_t OFnullopt;
+#endif
+
+
+#ifndef HAVE_STL_TUPLE
 static const OFignore_t OFignore_value;
-DCMTK_OFSTD_EXPORT const OFignore_t& OFignore( OFignore_value );
+DCMTK_OFSTD_EXPORT const OFignore_t& OFignore = OFignore_value;
 OFtuple<> OFmake_tuple() { return OFtuple<>(); }
 OFtuple<> OFtie() { return OFtuple<>(); }
 #endif
@@ -2852,23 +2899,21 @@ OFString OFStandard::getUserName()
         OFnullptr
     );
     return &*buf.begin();
-#elif defined(HAVE_CUSERID) && !defined(__CYGWIN__)
-    char buf[L_cuserid];
-    return cuserid( buf );
-#elif defined(HAVE_GETLOGIN)
-#if defined(_REENTRANT) && !defined(_WIN32) && !defined(__CYGWIN__)
+#elif defined(HAVE_GETLOGIN_R)
     // use getlogin_r instead of getlogin
     char buf[513];
     if( getlogin_r( buf, 512 ) != 0 )
         return "<no-utmp-entry>";
     buf[512] = 0;
     return buf;
-#else
+#elif defined(HAVE_GETLOGIN)
     // thread unsafe
     if( const char* s = getlogin() )
         return s;
     return "<no-utmp-entry>";
-#endif
+#elif defined(HAVE_CUSERID)
+    char buf[L_cuserid];
+    return cuserid( buf );
 #else
     return "<unknown-user>";
 #endif
@@ -2890,4 +2935,39 @@ OFString OFStandard::getHostName()
 #endif
 }
 
+void OFStandard::initializeNetwork()
+{
+#ifdef HAVE_WINSOCK_H
+    WSAData winSockData;
+    /* we need at least version 1.1 */
+    WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
+    WSAStartup(winSockVersionNeeded, &winSockData);
+#endif
+}
+
+void OFStandard::shutdownNetwork()
+{
+#ifdef HAVE_WINSOCK_H
+    WSACleanup();
+#endif
+}
+
+OFerror_code OFStandard::getLastSystemErrorCode()
+{
+#ifdef _WIN32
+    return OFerror_code( GetLastError(), OFsystem_category() );
+#else
+    return OFerror_code( errno, OFsystem_category() );
+#endif
+}
+
+OFerror_code OFStandard::getLastNetworkErrorCode()
+{
+#ifdef HAVE_WINSOCK_H
+    return OFerror_code( WSAGetLastError(), OFsystem_category() );
+#else
+    return OFerror_code( errno, OFsystem_category() );
+#endif
+}
+
 DCMTK_OFSTD_EXPORT OFin_place_tag OFin_place() { return *static_cast<OFin_place_tag*>(OFnullptr); }
diff --git a/ofstd/libsrc/ofstring.cc b/ofstd/libsrc/ofstring.cc
index 7d27995..ace7b7e 100644
--- a/ofstd/libsrc/ofstring.cc
+++ b/ofstd/libsrc/ofstring.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2014, OFFIS e.V.
+ *  Copyright (C) 1997-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -30,7 +30,7 @@
 
 #include "dcmtk/config/osconfig.h"     /* include OS specific configuration first */
 
-#ifndef HAVE_STD_STRING
+#ifndef HAVE_STL_STRING
 
 #include "dcmtk/ofstd/ofstring.h"
 #include "dcmtk/ofstd/ofcast.h"
@@ -1049,7 +1049,7 @@ OFBool operator>= (const OFString& lhs, char rhs)
     return (!(lhs < rhs));
 }
 
-#else /* HAVE_STD_STRING */
+#else /* HAVE_STL_STRING */
 
 int ofstring_cc_dummy_to_keep_linker_from_moaning = 0;
 
diff --git a/ofstd/libsrc/ofthread.cc b/ofstd/libsrc/ofthread.cc
index c1f8722..5e088eb 100644
--- a/ofstd/libsrc/ofthread.cc
+++ b/ofstd/libsrc/ofthread.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2015, OFFIS e.V.
+ *  Copyright (C) 2000-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -44,6 +44,7 @@ extern "C" {
 
 #ifdef HAVE_WINDOWS_H
 #define WINDOWS_INTERFACE
+#define WIN32_LEAN_AND_MEAN
 
 extern "C" {
 #include <windows.h>
@@ -591,7 +592,13 @@ OFMutex::OFMutex()
 : theMutex(NULL)
 {
 #ifdef WINDOWS_INTERFACE
+#ifdef USE_WIN32_CREATE_MUTEX
   theMutex = OFstatic_cast(void *, CreateMutex(NULL, FALSE, NULL));
+#else
+  CRITICAL_SECTION *critSec = new CRITICAL_SECTION;
+  InitializeCriticalSection(critSec);
+  theMutex = OFstatic_cast(void *, critSec);
+#endif
 #elif defined(POSIX_INTERFACE)
   pthread_mutex_t *mtx = new pthread_mutex_t;
   if (mtx)
@@ -614,7 +621,13 @@ OFMutex::OFMutex()
 OFMutex::~OFMutex()
 {
 #ifdef WINDOWS_INTERFACE
+#ifdef USE_WIN32_CREATE_MUTEX
   CloseHandle(OFthread_cast(HANDLE, theMutex));
+#else
+  CRITICAL_SECTION *critSec = OFthread_cast(CRITICAL_SECTION *, theMutex);
+  DeleteCriticalSection(critSec);
+  delete critSec;
+#endif
 #elif defined(POSIX_INTERFACE)
   if (theMutex) pthread_mutex_destroy(OFthread_cast(pthread_mutex_t *, theMutex));
   delete OFthread_cast(pthread_mutex_t *, theMutex);
@@ -640,8 +653,13 @@ OFBool OFMutex::initialized() const
 int OFMutex::lock()
 {
 #ifdef WINDOWS_INTERFACE
+#ifdef USE_WIN32_CREATE_MUTEX
   if (WaitForSingleObject(OFthread_cast(HANDLE, theMutex), INFINITE) == WAIT_OBJECT_0) return 0;
   else return OFstatic_cast(int, GetLastError());
+#else
+  EnterCriticalSection(OFthread_cast(CRITICAL_SECTION *, theMutex));
+  return 0;
+#endif
 #elif defined(POSIX_INTERFACE)
   if (theMutex) return pthread_mutex_lock(OFthread_cast(pthread_mutex_t *, theMutex)); else return EINVAL;
 #elif defined(SOLARIS_INTERFACE)
@@ -654,10 +672,15 @@ int OFMutex::lock()
 int OFMutex::trylock()
 {
 #ifdef WINDOWS_INTERFACE
+#ifdef USE_WIN32_CREATE_MUTEX
   DWORD result = WaitForSingleObject(OFthread_cast(HANDLE, theMutex), 0);
   if (result == WAIT_OBJECT_0) return 0;
   else if (result == WAIT_TIMEOUT) return OFMutex::busy;
   else return OFstatic_cast(int, GetLastError());
+#else
+  if (TryEnterCriticalSection(OFthread_cast(CRITICAL_SECTION *, theMutex))) return 0;
+  else return OFMutex::busy;
+#endif
 #elif defined(POSIX_INTERFACE)
   if (theMutex) return pthread_mutex_trylock(OFthread_cast(pthread_mutex_t *, theMutex)); else return EINVAL; // may return EBUSY.
 #elif defined(SOLARIS_INTERFACE)
@@ -670,7 +693,12 @@ int OFMutex::trylock()
 int OFMutex::unlock()
 {
 #ifdef WINDOWS_INTERFACE
+#ifdef USE_WIN32_CREATE_MUTEX
   if (ReleaseMutex(OFthread_cast(HANDLE, theMutex))) return 0; else return OFstatic_cast(int, GetLastError());
+#else
+  LeaveCriticalSection(OFthread_cast(CRITICAL_SECTION *, theMutex));
+  return 0;
+#endif
 #elif defined(POSIX_INTERFACE)
   if (theMutex) return pthread_mutex_unlock(OFthread_cast(pthread_mutex_t *, theMutex)); else return EINVAL;
 #elif defined(SOLARIS_INTERFACE)
@@ -687,7 +715,7 @@ void OFMutex::errorstr(OFString& description, int /* code */ )
 #endif
 {
 #ifdef WINDOWS_INTERFACE
-  if (code == OFSemaphore::busy) description = "mutex is already locked"; else
+  if (code == OFMutex::busy) description = "mutex is already locked"; else
   {
     LPVOID buf;
     FormatMessage(
diff --git a/ofstd/libsrc/oftime.cc b/ofstd/libsrc/oftime.cc
index 14dc1fb..1b85301 100644
--- a/ofstd/libsrc/oftime.cc
+++ b/ofstd/libsrc/oftime.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2015, OFFIS e.V.
+ *  Copyright (C) 2002-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -41,6 +41,7 @@ BEGIN_EXTERN_C
 END_EXTERN_C
 
 #ifdef HAVE_WINDOWS_H
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>      /* for Windows time functions */
 #endif
 
@@ -99,37 +100,73 @@ OFTime &OFTime::operator=(const OFTime &timeVal)
 
 OFBool OFTime::operator==(const OFTime &timeVal) const
 {
+#ifndef __i386__
     return (getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/) == timeVal.getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/));
+#else
+    volatile double lhs = getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/);
+    volatile double rhs = timeVal.getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/);
+    return lhs == rhs;
+#endif
 }
 
 
 OFBool OFTime::operator!=(const OFTime &timeVal) const
 {
+#ifndef __i386__
     return (getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/) != timeVal.getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/));
+#else
+    volatile double lhs = getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/);
+    volatile double rhs = timeVal.getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/);
+    return lhs != rhs;
+#endif
 }
 
 
 OFBool OFTime::operator<(const OFTime &timeVal) const
 {
+#ifndef __i386__
     return (getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/) < timeVal.getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/));
+#else
+    volatile double lhs = getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/);
+    volatile double rhs = timeVal.getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/);
+    return lhs < rhs;
+#endif
 }
 
 
 OFBool OFTime::operator<=(const OFTime &timeVal) const
 {
+#ifndef __i386__
     return (getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/) <= timeVal.getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/));
+#else
+    volatile double lhs = getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/);
+    volatile double rhs = timeVal.getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/);
+    return lhs <= rhs;
+#endif
 }
 
 
 OFBool OFTime::operator>=(const OFTime &timeVal) const
 {
+#ifndef __i386__
     return (getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/) >= timeVal.getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/));
+#else
+    volatile double lhs = getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/);
+    volatile double rhs = timeVal.getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/);
+    return lhs >= rhs;
+#endif
 }
 
 
 OFBool OFTime::operator>(const OFTime &timeVal) const
 {
+#ifndef __i386__
     return (getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/) > timeVal.getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/));
+#else
+    volatile double lhs = getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/);
+    volatile double rhs = timeVal.getTimeInSeconds(OFTrue /*useTimeZone*/, OFFalse /*normalize*/);
+    return lhs > rhs;
+#endif
 }
 
 
@@ -391,7 +428,7 @@ OFBool OFTime::setISOFormattedTime(const OFString &formattedTime)
         int tzHours;
         unsigned int tzMinutes;
         /* extract "HH", "MM", "SS" and "&ZZZZ" components from time string */
-        if (sscanf(formattedTime.c_str(), "%02u%02u%02u%03i%02u", &hours, &minutes, &seconds, &tzHours, &tzMinutes) == 5)
+        if (sscanf(formattedTime.c_str(), "%02u%02u%02u%03d%02u", &hours, &minutes, &seconds, &tzHours, &tzMinutes) == 5)
         {
             const double timeZone = (tzHours < 0) ? tzHours - OFstatic_cast(double, tzMinutes) / 60
                                                   : tzHours + OFstatic_cast(double, tzMinutes) / 60;
@@ -413,7 +450,7 @@ OFBool OFTime::setISOFormattedTime(const OFString &formattedTime)
                 /* and finally, extract the time zone component from the time string */
                 int tzHours;
                 unsigned int tzMinutes;
-                if (sscanf(formattedTime.c_str() + pos - 1, "%03i%*c%02u", &tzHours, &tzMinutes) == 2)
+                if (sscanf(formattedTime.c_str() + pos - 1, "%03d%*c%02u", &tzHours, &tzMinutes) == 2)
                 {
                     const double timeZone = (tzHours < 0) ? tzHours - OFstatic_cast(double, tzMinutes) / 60
                                                           : tzHours + OFstatic_cast(double, tzMinutes) / 60;
diff --git a/ofstd/libsrc/ofxml.cc b/ofstd/libsrc/ofxml.cc
index a272f8f..01e6fdb 100644
--- a/ofstd/libsrc/ofxml.cc
+++ b/ofstd/libsrc/ofxml.cc
@@ -125,6 +125,24 @@
 #define INCLUDE_CSTDLIB
 #include "dcmtk/ofstd/ofstdinc.h"
 
+// workaround for SunPro not defining these C functions in the global namespace
+#ifdef __sun
+using STD_NAMESPACE free;
+using STD_NAMESPACE malloc;
+using STD_NAMESPACE realloc;
+using STD_NAMESPACE atoi;
+using STD_NAMESPACE atol;
+using STD_NAMESPACE atof;
+using STD_NAMESPACE FILE;
+using STD_NAMESPACE fopen;
+using STD_NAMESPACE fread;
+using STD_NAMESPACE fwrite;
+using STD_NAMESPACE fprintf;
+using STD_NAMESPACE fseek;
+using STD_NAMESPACE ftell;
+using STD_NAMESPACE fclose;
+#endif
+
 XMLCSTR XMLNode::getVersion() { return _CXML("v2.43"); }
 void freeXMLString(XMLSTR t){if(t)free(t);}
 
diff --git a/ofstd/tests/CMakeLists.txt b/ofstd/tests/CMakeLists.txt
index add39cc..775ecdb 100644
--- a/ofstd/tests/CMakeLists.txt
+++ b/ofstd/tests/CMakeLists.txt
@@ -1,5 +1,5 @@
 # declare executables
-DCMTK_ADD_EXECUTABLE(ofstd_tests tests tatof tmap tvec tftoa tthread tbase64 tstring tlist tstack tofdatim tofstd tmarkup tchrenc txml tuuid toffile tmem toption ttuple tlimits tvariant)
+DCMTK_ADD_EXECUTABLE(ofstd_tests tests tatof terror tmap tvec tftoa tthread tbase64 tstring tlist tstack tofdatim tofstd tmarkup tchrenc txml tuuid toffile tmem toption ttuple tlimits tvariant)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(ofstd_tests ofstd)
@@ -9,5 +9,5 @@ DCMTK_ADD_TESTS(ofstd)
 
 # Cleanup testfile.$$$ generated by the ofstd_OFFile exhaustive testcase.
 SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
-  ${CMAKE_CURRENT_BINARY_DIR}/testfile.$$$
+  "${CMAKE_CURRENT_BINARY_DIR}/testfile.$$$"
 )
diff --git a/ofstd/tests/Makefile.dep b/ofstd/tests/Makefile.dep
index f3aa8e8..eda8646 100644
--- a/ofstd/tests/Makefile.dep
+++ b/ofstd/tests/Makefile.dep
@@ -6,9 +6,10 @@ tatof.o: tatof.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
- ../include/dcmtk/ofstd/ofcmdln.h ../include/dcmtk/ofstd/ofconsol.h \
- ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/offile.h
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/oftest.h \
+ ../include/dcmtk/ofstd/ofconapp.h ../include/dcmtk/ofstd/ofcmdln.h \
+ ../include/dcmtk/ofstd/ofconsol.h ../include/dcmtk/ofstd/ofthread.h \
+ ../include/dcmtk/ofstd/offile.h
 tbase64.o: tbase64.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -19,7 +20,8 @@ tbase64.o: tbase64.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/offile.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 tchrenc.o: tchrenc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -31,9 +33,21 @@ tchrenc.o: tchrenc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/ofchrenc.h ../include/dcmtk/ofstd/ofmem.h \
- ../include/dcmtk/ofstd/ofutil.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofchrenc.h \
+ ../include/dcmtk/ofstd/ofmem.h ../include/dcmtk/ofstd/ofutil.h \
  ../include/dcmtk/ofstd/variadic/tuplefwd.h
+terror.o: terror.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
+ ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
+ ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \
+ ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstream.h \
+ ../include/dcmtk/ofstd/ofcmdln.h ../include/dcmtk/ofstd/oflist.h \
+ ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/ofconsol.h \
+ ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/offile.h \
+ ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
+ ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -44,7 +58,8 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/offile.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 tftoa.o: tftoa.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -55,7 +70,8 @@ tftoa.o: tftoa.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/offile.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 tlimits.o: tlimits.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -67,8 +83,8 @@ tlimits.o: tlimits.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/ofdiag.h ../include/dcmtk/ofstd/ofmath.h \
- ../include/dcmtk/ofstd/diag/push.def \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofdiag.h \
+ ../include/dcmtk/ofstd/ofmath.h ../include/dcmtk/ofstd/diag/push.def \
  ../include/dcmtk/ofstd/diag/overflow.def \
  ../include/dcmtk/ofstd/diag/cnvrsn.def \
  ../include/dcmtk/ofstd/diag/pop.def
@@ -83,7 +99,8 @@ tlist.o: tlist.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/offile.h ../include/dcmtk/ofstd/ofstd.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
  ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 tmap.o: tmap.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -94,7 +111,8 @@ tmap.o: tmap.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/offile.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h ../include/dcmtk/ofstd/ofmap.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofmap.h \
  ../include/dcmtk/ofstd/ofutil.h \
  ../include/dcmtk/ofstd/variadic/tuplefwd.h
 tmarkup.o: tmarkup.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -107,7 +125,8 @@ tmarkup.o: tmarkup.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/offile.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 tmem.o: tmem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -118,7 +137,8 @@ tmem.o: tmem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/offile.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h ../include/dcmtk/ofstd/ofmem.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/ofstd/ofutil.h \
  ../include/dcmtk/ofstd/variadic/tuplefwd.h
 tofdatim.o: tofdatim.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -133,7 +153,8 @@ tofdatim.o: tofdatim.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/offile.h ../include/dcmtk/ofstd/ofstd.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
  ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 toffile.o: toffile.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/offile.h ../include/dcmtk/ofstd/oftypes.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
@@ -143,9 +164,9 @@ toffile.o: toffile.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
  ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/ofconsol.h ../include/dcmtk/ofstd/ofthread.h \
- ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
- ../include/dcmtk/ofstd/ofcmdln.h
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofconsol.h \
+ ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/oftest.h \
+ ../include/dcmtk/ofstd/ofconapp.h ../include/dcmtk/ofstd/ofcmdln.h
 tofstd.o: tofstd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -154,9 +175,10 @@ tofstd.o: tofstd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
- ../include/dcmtk/ofstd/ofcmdln.h ../include/dcmtk/ofstd/ofconsol.h \
- ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/offile.h
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/oftest.h \
+ ../include/dcmtk/ofstd/ofconapp.h ../include/dcmtk/ofstd/ofcmdln.h \
+ ../include/dcmtk/ofstd/ofconsol.h ../include/dcmtk/ofstd/ofthread.h \
+ ../include/dcmtk/ofstd/offile.h
 toption.o: toption.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -168,7 +190,8 @@ toption.o: toption.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/ofoption.h ../include/dcmtk/ofstd/ofutil.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofoption.h \
+ ../include/dcmtk/ofstd/ofutil.h \
  ../include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/ofstd/ofalign.h
 tstack.o: tstack.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -182,7 +205,8 @@ tstack.o: tstack.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/offile.h ../include/dcmtk/ofstd/ofstd.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
  ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 tstring.o: tstring.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftypes.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
@@ -193,7 +217,8 @@ tstring.o: tstring.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/offile.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 tthread.o: tthread.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -205,7 +230,8 @@ tthread.o: tthread.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/ofdiag.h ../include/dcmtk/ofstd/diag/push.def \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofdiag.h \
+ ../include/dcmtk/ofstd/diag/push.def \
  ../include/dcmtk/ofstd/diag/shadow.def \
  ../include/dcmtk/ofstd/diag/pop.def
 ttuple.o: ttuple.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -219,7 +245,8 @@ ttuple.o: ttuple.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/oftuple.h ../include/dcmtk/ofstd/ofutil.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/oftuple.h \
+ ../include/dcmtk/ofstd/ofutil.h \
  ../include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/ofstd/ofdiag.h ../include/dcmtk/ofstd/diag/push.def \
  ../include/dcmtk/ofstd/diag/mmtag.def \
@@ -237,7 +264,7 @@ tuuid.o: tuuid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/ofuuid.h
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofuuid.h
 tvariant.o: tvariant.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -249,7 +276,7 @@ tvariant.o: tvariant.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/ofvriant.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofvriant.h \
  ../include/dcmtk/ofstd/variadic/variant.h \
  ../include/dcmtk/ofstd/variadic/helpers.h \
  ../include/dcmtk/ofstd/ofalign.h ../include/dcmtk/ofstd/ofdiag.h \
@@ -268,7 +295,7 @@ tvec.o: tvec.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/ofvector.h
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofvector.h
 txml.o: txml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -279,4 +306,5 @@ txml.o: txml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/offile.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h ../include/dcmtk/ofstd/ofxml.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofxml.h
diff --git a/ofstd/tests/Makefile.in b/ofstd/tests/Makefile.in
index 001c8fe..57ff6d4 100644
--- a/ofstd/tests/Makefile.in
+++ b/ofstd/tests/Makefile.in
@@ -14,13 +14,13 @@ include $(configdir)/@common_makefile@
 
 LOCALINCLUDES = -I$(top_srcdir)/include
 LIBDIRS = -L$(top_srcdir)/libsrc
-LOCALLIBS = -lofstd
+LOCALLIBS = -lofstd $(CHARCONVLIBS) $(MATHLIBS)
 LOCALTRASH = *.out testfile.\$$\$$\$$
 
 test_objs = tests.o tatof.o tmap.o tvec.o tftoa.o tthread.o tbase64.o \
             tstring.o tlist.o tstack.o tofdatim.o tofstd.o tmarkup.o \
             tchrenc.o txml.o tuuid.o toffile.o tmem.o toption.o ttuple.o \
-            tlimits.o tvariant.o
+            tlimits.o tvariant.o terror.o
 objs = $(test_objs)
 progs = tests
 
@@ -28,7 +28,7 @@ progs = tests
 all: $(progs)
 
 tests: $(test_objs)
-	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $(test_objs) $(LOCALLIBS) $(CHARCONVLIBS) $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $(test_objs) $(LOCALLIBS) $(LIBS)
 
 
 check: tests
diff --git a/ofstd/tests/tatof.cc b/ofstd/tests/tatof.cc
index 974ca5d..5da97cd 100644
--- a/ofstd/tests/tatof.cc
+++ b/ofstd/tests/tatof.cc
@@ -74,8 +74,10 @@ const ValuePair vp[] =
   {"2.2250738585072014E-1000", 0.0, OFTrue},
 #endif
 
+  {"NaN", OFnumeric_limits<double>::quiet_NaN(), OFTrue},
+  {"INF", OFnumeric_limits<double>::infinity(), OFTrue},
+  {"-INF", -OFnumeric_limits<double>::infinity(), OFTrue},
   // conversions that should fail
-  // {"NaN", 0.0, OFFalse}, // this test will fail if DISABLE_OFSTD_ATOF is defined
   {"BIGNUM", 0.0, OFFalse},
   {"_1.0", 0.0, OFFalse},
   {"", 0.0, OFFalse}
diff --git a/ofstd/tests/terror.cc b/ofstd/tests/terror.cc
new file mode 100644
index 0000000..dca53cf
--- /dev/null
+++ b/ofstd/tests/terror.cc
@@ -0,0 +1,94 @@
+/*
+ *
+ *  Copyright (C) 2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module: ofstd
+ *
+ *  Author: Nikolas Goldhammer
+ *
+ *  Purpose: test program for OFerror_code et al.
+ *
+ */
+
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+#define OFTEST_OFSTD_ONLY
+#include "dcmtk/ofstd/oftest.h"
+#include "dcmtk/ofstd/ofstd.h"
+#include "dcmtk/ofstd/oferror.h"
+#include <iostream>
+#ifdef HAVE_WINDOWS_H
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <winsock2.h>
+#endif
+
+OFTEST(ofstd_error)
+{
+    // test constructor and operators
+    OFerror_code ec_success;
+    if(ec_success)
+    {
+        OFCHECK_FAIL("Error: 'Success' should not be an error.");
+        return;
+    }
+
+    OFCHECK(ec_success == OFerror_code(0, OFsystem_category()));
+
+    OFerror_code ec_error(42, OFsystem_category());
+    if(!ec_error)
+    {
+        OFCHECK_FAIL("Error: This should be an error and not return 0.");
+        return;
+    }
+
+    OFerror_code ec_error_generic(43, OFgeneric_category());
+    if(ec_error.category() != ec_success.category())
+    {
+        OFCHECK_FAIL("Error: Categories should be equal.");
+        return;
+    }
+
+    if(ec_error.category() == ec_error_generic.category())
+    {
+        OFCHECK_FAIL("Error: Categories should not be equal.");
+        return;
+    }
+
+    // test assignment
+    ec_error.assign(23, OFgeneric_category());
+    OFCHECK(ec_error.value() == 23);
+    OFCHECK(ec_error.category() == OFgeneric_category());
+
+    // test system and network error functions
+#ifdef _WIN32
+    ec_error.assign(301, OFsystem_category());
+    SetLastError(301);
+#else
+    ec_error.assign(71, OFsystem_category());
+    errno = 71;
+#endif
+    OFCHECK(OFStandard::getLastSystemErrorCode() == ec_error);
+
+#ifdef _WIN32
+    ec_error.assign(WSA_IO_INCOMPLETE, OFsystem_category());
+    WSASetLastError(WSA_IO_INCOMPLETE);
+#elif __OpenBSD__
+    ec_error.assign(EPROTOTYPE, OFsystem_category());
+    errno = EPROTOTYPE;
+#else
+    ec_error.assign(EPROTO, OFsystem_category());
+    errno = EPROTO;
+#endif
+    OFCHECK(OFStandard::getLastNetworkErrorCode() == ec_error);
+}
diff --git a/ofstd/tests/tests.cc b/ofstd/tests/tests.cc
index cd0b974..f27f9b2 100644
--- a/ofstd/tests/tests.cc
+++ b/ofstd/tests/tests.cc
@@ -79,4 +79,5 @@ OFTEST_REGISTER(ofstd_tuple);
 OFTEST_REGISTER(ofstd_limits);
 OFTEST_REGISTER(ofstd_safeSubtractAndAdd);
 OFTEST_REGISTER(ofstd_variant);
+OFTEST_REGISTER(ofstd_error);
 OFTEST_MAIN("ofstd")
diff --git a/ofstd/tests/tofdatim.cc b/ofstd/tests/tofdatim.cc
index f9d648d..f18250c 100644
--- a/ofstd/tests/tofdatim.cc
+++ b/ofstd/tests/tofdatim.cc
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2015, OFFIS e.V.
+ *  Copyright (C) 2002-2017, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -93,6 +93,10 @@ OFTEST(ofstd_OFTime)
     OFCHECK_EQUAL(time1.getTimeZone(), 1.0);
     OFCHECK(time1.setISOFormattedTime("12:15:30 -02:30"));
     OFCHECK_EQUAL(time1.getTimeZone(), -2.5);
+    OFCHECK(time1.setISOFormattedTime("12:15:30 -09:45"));
+    OFCHECK_EQUAL(time1.getTimeZone(), -9.75);
+    OFCHECK(time1.setISOFormattedTime("12:15:30 +09:15"));
+    OFCHECK_EQUAL(time1.getTimeZone(), +9.25);
     /* the "seconds" part is mandatory if time zone is present */
     OFCHECK(!time2.setISOFormattedTime("10:15 -02:30"));
     OFCHECK(!time2.setISOFormattedTime("1015+0100"));
diff --git a/ofstd/tests/toption.cc b/ofstd/tests/toption.cc
index f816ec5..7e907ea 100644
--- a/ofstd/tests/toption.cc
+++ b/ofstd/tests/toption.cc
@@ -85,7 +85,7 @@ OFTEST(ofstd_optional)
     OFCHECK( o1 && *o1 == 23 );
 #endif
 
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
     OFoptional<test> o3( 2, OFFalse );
 #else // C++11
     OFoptional<test> o3( test( 2, OFFalse ) );
@@ -106,7 +106,7 @@ OFTEST(ofstd_optional)
     OFCHECK( !o3 );
 #endif
 
-#ifdef DCMTK_USE_CXX11_STL
+#ifdef HAVE_CXX11
     o3.emplace( 0, OFFalse );
 #else // C++11
     o3 = test( 0, OFFalse );
diff --git a/ofstd/tests/tvec.cc b/ofstd/tests/tvec.cc
index ce8b6dd..004a83e 100644
--- a/ofstd/tests/tvec.cc
+++ b/ofstd/tests/tvec.cc
@@ -25,6 +25,10 @@
 #include "dcmtk/ofstd/oftest.h"
 #include "dcmtk/ofstd/ofvector.h"
 
+struct Recursive : OFVector<Recursive>
+{
+    int i;
+};
 
 OFTEST(ofstd_OFVector)
 {
@@ -115,4 +119,8 @@ OFTEST(ofstd_OFVector)
         else
             OFCHECK_EQUAL(*it, 6);
     }
+
+    // test if recursive vector structures can be constructed without causing
+    // a stack overflow
+    OFCHECK(OFVector<Recursive>().size() == 0);
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/dcmtk.git



More information about the debian-med-commit mailing list